// Dual licensed under the terms of the MIT X11 or GNU GPL
//
// Copyright 2009 Novell, Inc
+// Copyright 2011 Xamarin Inc.
//
using System;
throw new NotImplementedException ();
}
+ public override bool ContainsEmitWithAwait ()
+ {
+ throw new NotSupportedException ();
+ }
+
public override Expression CreateExpressionTree (ResolveContext ec)
{
- throw new NotImplementedException ();
+ throw new NotSupportedException ();
}
protected override Expression DoResolve (ResolveContext ec)
throw new NotImplementedException ();
}
- public void EmitAssign (EmitContext ec, Expression source, bool leave_copy, bool prepare_for_load)
+ public void EmitAssign (EmitContext ec, Expression source, bool leave_copy, bool isCompound)
{
throw new NotImplementedException ();
}
protected CSharpBinderFlags flags;
TypeSpec binder_type;
- TypeParameter[] context_mvars;
+ TypeParameters context_mvars;
public DynamicExpressionStatement (IDynamicBinder binder, Arguments args, Location loc)
{
}
}
+ public override bool ContainsEmitWithAwait ()
+ {
+ return arguments.ContainsEmitWithAwait ();
+ }
+
public override Expression CreateExpressionTree (ResolveContext ec)
{
ec.Report.Error (1963, loc, "An expression tree cannot contain a dynamic operation");
var site_container = ec.CreateDynamicSite ();
if (context_mvars != null) {
- TypeParameter[] tparam;
+ TypeParameters tparam;
TypeContainer sc = site_container;
do {
tparam = sc.CurrentTypeParameters;
return;
if (del_type_instance_access == null) {
- var dt = d.CurrentType.DeclaringType.MakeGenericType (module, context_mvars.Select (l => l.Type).ToArray ());
+ var dt = d.CurrentType.DeclaringType.MakeGenericType (module, context_mvars.Types);
del_type_instance_access = new TypeExpression (MemberCache.GetMember (dt, d.CurrentType), loc);
}
if (inflate_using_mvar || context_mvars == null) {
gt = site_container.CurrentType;
} else {
- gt = site_container.CurrentType.MakeGenericType (module, context_mvars.Select (l => l.Type).ToArray ());
+ gt = site_container.CurrentType.MakeGenericType (module, context_mvars.Types);
}
// When site container already exists the inflated version has to be
class DynamicInvocation : DynamicExpressionStatement, IDynamicBinder
{
- ATypeNameExpression member;
+ readonly ATypeNameExpression member;
public DynamicInvocation (ATypeNameExpression member, Arguments args, Location loc)
: base (null, args, loc)
throw new NotImplementedException ();
}
- public void EmitAssign (EmitContext ec, Expression source, bool leave_copy, bool prepare_for_load)
+ public void EmitAssign (EmitContext ec, Expression source, bool leave_copy, bool isCompound)
{
EmitCall (ec, setter, setter_args, !leave_copy);
}
sealed class DynamicSiteClass : HoistedStoreyClass
{
- public DynamicSiteClass (TypeContainer parent, MemberBase host, TypeParameter[] tparams)
+ public DynamicSiteClass (TypeContainer parent, MemberBase host, TypeParameters tparams)
: base (parent, MakeMemberName (host, "DynamicSite", parent.DynamicSitesCounter, tparams, Location.Null), tparams, Modifiers.STATIC)
{
parent.DynamicSitesCounter++;