Emit (ec, false, false);
}
+ public void EmitPrepare (EmitContext ec)
+ {
+ foreach (var a in args) {
+ a.Expr.EmitPrepare (ec);
+ }
+ }
+
//
// if `dup_args' is true or any of arguments contains await.
// A copy of all arguments will be returned to the caller
throw new NotSupportedException ();
}
+ public override void EmitPrepare (EmitContext ec)
+ {
+ InstanceExpression?.EmitPrepare (ec);
+ }
+
public void EmitCall (EmitContext ec, Arguments arguments, bool statement)
{
var call = new CallEmitter ();
public void AddressOf (EmitContext ec, AddressOp mode)
{
- Variable.CreateBuilder (ec);
+ if (!Variable.Created)
+ Variable.CreateBuilder (ec);
if (Initializer != null) {
lvr.EmitAssign (ec, Initializer, false, false);
{
throw new NotImplementedException ();
}
+
+ public override void EmitPrepare (EmitContext ec)
+ {
+ Variable.CreateBuilder (ec);
+ }
}
//
else
mg.EmitCall (ec, arguments, false);
}
-
+
+ public override void EmitPrepare (EmitContext ec)
+ {
+ mg.EmitPrepare (ec);
+
+ arguments?.EmitPrepare (ec);
+ }
+
public override void EmitStatement (EmitContext ec)
{
if (mg.IsConditionallyExcluded)
--- /dev/null
+class X
+{
+ void Test (string arg)
+ {
+ while (Call (out string s))
+ {
+ arg = s.ToString ();
+ }
+ }
+
+ static bool Call (out string s)
+ {
+ s = "";
+ return true;
+ }
+
+ public static void Main ()
+ {
+ Call (out string s);
+ }
+}
\ No newline at end of file
</method>
</type>
</test>
+ <test name="test-decl-expr-05.cs">
+ <type name="X">
+ <method name="Void Test(System.String)" attrs="129">
+ <size>29</size>
+ </method>
+ <method name="Boolean Call(System.String ByRef)" attrs="145">
+ <size>17</size>
+ </method>
+ <method name="Void Main()" attrs="150">
+ <size>10</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ </test>
<test name="test-dictinit-01.cs">
<type name="Program">
<method name="Int32 Main()" attrs="145">