Esempio n. 1
0
        internal override void Walk(EmitContext ec)
        {
            if (ec.Resolving)
            {
                if (stts != null)
                {
                    stts.Walk(ec);
                }
            }
            if (ec.Emitting)
            {
                // rcver
                ec.EmitBlockArg();

                // thread
                ec.EmitLoadThread();

                // args
                RNArray a   = stts as RNArray;
                int     len = a != null ? a.alen : (stts != null ? 1 : 0);
                ec.EmitNewArgArray(len);

                if (a != null)
                {
                    RNCall.EmitArgsArray(ec, a);
                }
                else if (stts != null)
                {
                    RNCall.EmitStoreArg(ec, 0, stts);
                }

                // block
                ec.EmitNull();

                ec.EmitYield();
            }
        }
Esempio n. 2
0
        internal override void Walk(EmitContext ec)
        {
            if(ec.Resolving)
                if(stts != null)
                    stts.Walk(ec);
            if(ec.Emitting) {
                // rcver
                ec.EmitBlockArg();

                // thread
                ec.EmitLoadThread();

                // args
                RNArray a = stts as RNArray;
                int len = a != null ? a.alen : (stts != null ? 1 : 0);
                ec.EmitNewArgArray(len);
                
                if(a != null) {
                    RNCall.EmitArgsArray(ec, a);
                } else if(stts != null) {
                    RNCall.EmitStoreArg(ec, 0, stts);
                }
                
                // block
                ec.EmitNull();
                
                ec.EmitYield();
            }
        }