+ public Parameter Clone ()
+ {
+ Parameter p = (Parameter) MemberwiseClone ();
+ if (attributes != null) {
+ p.attributes = attributes.Clone ();
+ p.attributes.AttachTo (p);
+ }
+
+ return p;
+ }
+
+ public ExpressionStatement CreateExpressionTreeVariable (EmitContext ec)
+ {
+ if ((modFlags & Modifier.ISBYREF) != 0)
+ Report.Error (1951, Location, "An expression tree parameter cannot use `ref' or `out' modifier");
+
+ LocalInfo variable = ec.CurrentBlock.AddTemporaryVariable (
+ ResolveParameterExpressionType (ec, Location), Location);
+ variable.Resolve (ec);
+
+ expr_tree_variable = new LocalVariableReference (
+ ec.CurrentBlock, variable.Name, Location, variable, false);
+
+ ArrayList arguments = new ArrayList (2);
+ arguments.Add (new Argument (new TypeOf (
+ new TypeExpression (parameter_type, Location), Location)));
+ arguments.Add (new Argument (new StringConstant (Name, Location)));
+ return new SimpleAssign (ExpressionTreeVariableReference (),
+ Expression.CreateExpressionFactoryCall ("Parameter", null, arguments, Location));
+ }
+
+ public void Emit (EmitContext ec)
+ {
+ int arg_idx = idx;
+ if (!ec.IsStatic)
+ arg_idx++;
+
+ ParameterReference.EmitLdArg (ec.ig, arg_idx);
+ }
+
+ public void EmitAssign (EmitContext ec)
+ {
+ int arg_idx = idx;
+ if (!ec.IsStatic)
+ arg_idx++;
+
+ if (arg_idx <= 255)
+ ec.ig.Emit (OpCodes.Starg_S, (byte) arg_idx);
+ else
+ ec.ig.Emit (OpCodes.Starg, arg_idx);
+ }
+
+ public void EmitAddressOf (EmitContext ec)