예제 #1
0
파일: codegen.cs 프로젝트: retahc/old-code
        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();
            }
        }
예제 #2
0
파일: codegen.cs 프로젝트: emtees/old-code
        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();
            }
        }