+2008-07-18 Marek Safar <marek.safar@gmail.com>
+
+ * ecore.cs, linq.cs, delegate.cs, constant.cs, nullable.cs, expression.cs:
+ Finished missing generic type mutators.
+
2008-07-18 Marek Safar <marek.safar@gmail.com>
* iterators.cs, statement.cs: Finished statements CloneTo.
{
// CloneTo: Nothing, we do not keep any state on this expression
}
+
+ public override void MutateHoistedGenericType (AnonymousMethodStorey storey)
+ {
+ // A constant cannot be of generic type
+ }
}
public abstract class IntegralConstant : Constant {
return null;
}
+ public override void MutateHoistedGenericType (AnonymousMethodStorey storey)
+ {
+ if (delegate_instance_expression != null)
+ delegate_instance_expression.MutateHoistedGenericType (storey);
+
+ delegate_method = storey.MutateGenericMethod (delegate_method);
+ constructor_method = storey.MutateConstructor (constructor_method);
+ }
+
#region IErrorHandler Members
public bool NoExactMatch (EmitContext ec, MethodBase method)
}
}
+ public override void MutateHoistedGenericType (AnonymousMethodStorey storey)
+ {
+ expr.MutateHoistedGenericType (storey);
+ }
+
public override void Emit (EmitContext ec)
{
expr.Emit (ec);
{
expr.EmitBranchable (ec, target, on_true);
}
+
+ public override void MutateHoistedGenericType (AnonymousMethodStorey storey)
+ {
+ expr.MutateHoistedGenericType (storey);
+ }
}
//
throw new NotSupportedException ("ET");
}
+ public override void MutateHoistedGenericType (AnonymousMethodStorey storey)
+ {
+ throw new NotSupportedException ();
+ }
+
public override FullNamedExpression ResolveAsTypeStep (IResolveContext ec, bool silent)
{
return this;
foreach (Argument a in arguments)
a.Expr.MutateHoistedGenericType (storey);
}
-
- // TODO: finish !!
+
+ if (array_data != null) {
+ foreach (Expression e in array_data)
+ e.MutateHoistedGenericType (storey);
+ }
}
//
arg.Emit (ec);
}
+ public override void MutateHoistedGenericType (AnonymousMethodStorey storey)
+ {
+ foreach (Argument arg in Arguments)
+ arg.Expr.MutateHoistedGenericType (storey);
+ }
+
protected override void CloneTo (CloneContext clonectx, Expression t)
{
Arglist target = (Arglist) t;
Expr.EmitBranchable (ec, target, on_true);
}
+ public override void MutateHoistedGenericType (AnonymousMethodStorey storey)
+ {
+ Expr.MutateHoistedGenericType (storey);
+ }
+
protected override void CloneTo (CloneContext clonectx, Expression t)
{
CheckedExpr target = (CheckedExpr) t;
Expr.EmitBranchable (ec, target, on_true);
}
+ public override void MutateHoistedGenericType (AnonymousMethodStorey storey)
+ {
+ Expr.MutateHoistedGenericType (storey);
+ }
+
protected override void CloneTo (CloneContext clonectx, Expression t)
{
UnCheckedExpr target = (UnCheckedExpr) t;
source.Emit (ec);
ec.ig.Emit (OpCodes.Call, method);
}
+
+ public override void MutateHoistedGenericType (AnonymousMethodStorey storey)
+ {
+ source.MutateHoistedGenericType (storey);
+ method = storey.MutateGenericMethod (method);
+ }
}
// <summary>
protected abstract string MethodName { get; }
+ public override void MutateHoistedGenericType (AnonymousMethodStorey storey)
+ {
+ // Nothing to mutate
+ }
+
public virtual AQueryClause Next {
set {
next = value;
{
throw new NotSupportedException ();
}
+
+ public override void MutateHoistedGenericType (AnonymousMethodStorey storey)
+ {
+ throw new NotSupportedException ();
+ }
}
public ImplicitQueryParameter (LocatedToken variable)
{
public readonly Type Type;
public readonly Type UnderlyingType;
- public readonly MethodInfo HasValue;
- public readonly MethodInfo Value;
- public readonly MethodInfo GetValueOrDefault;
- public readonly ConstructorInfo Constructor;
+ public MethodInfo HasValue;
+ public MethodInfo Value;
+ public MethodInfo GetValueOrDefault;
+ public ConstructorInfo Constructor;
public NullableInfo (Type type)
{
LocalVariable.Emit (ec);
}
+ public override void MutateHoistedGenericType (AnonymousMethodStorey storey)
+ {
+ type = storey.MutateType (type);
+ info.Constructor = storey.MutateConstructor (info.Constructor);
+ info.HasValue = storey.MutateGenericMethod (info.HasValue);
+ info.GetValueOrDefault = storey.MutateGenericMethod (info.GetValueOrDefault);
+ info.Value = storey.MutateGenericMethod (info.Value);
+ }
+
public void AddressOf (EmitContext ec, AddressOp mode)
{
IMemoryLocation ml = expr as VariableReference;
ig.MarkLabel (end_label);
}
+ public override void MutateHoistedGenericType (AnonymousMethodStorey storey)
+ {
+ left.MutateHoistedGenericType (storey);
+ right.MutateHoistedGenericType (storey);
+ type = storey.MutateType (type);
+ }
+
protected override void CloneTo (CloneContext clonectx, Expression t)
{
NullCoalescingOperator target = (NullCoalescingOperator) t;