Example #1
0
        internal override void Walk(EmitContext ec)
        {
            if (ec.Resolving)
            {
                if (recv != null)
                {
                    recv.Walk(ec);
                }
                if (args != null)
                {
                    args.Walk(ec);
                }
            }
            if (ec.Emitting)
            {
                RNArray a = (RNArray)args;
                // rcver
                if (recv != null)
                {
                    recv.Walk(ec);
                }
                else
                {
                    ec.EmitSelf();
                }
                // name
                ec.EmitString(mid);

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

                EmitArgsArray(ec, a);

                // block
                if (block != null)
                {
                    ec.EmitCreateBlock(block);
                }
                else
                {
                    ec.EmitNull();
                }

                ec.EmitSend();
            }
        }
Example #2
0
        internal override void Walk(EmitContext ec)
        {
            if(ec.Resolving) {
                if(recv != null)
                    recv.Walk(ec);
                if(args != null)
                    args.Walk(ec);
            }
            if(ec.Emitting) {
                RNArray a = (RNArray)args;
                // rcver
                if(recv != null) {
                    recv.Walk(ec);
                } else {
                    ec.EmitSelf();
                }
                // name
                ec.EmitString(mid);
                
                // args
                int len = a != null ? a.alen : 0;
                ec.EmitNewArgArray(len);
                
                EmitArgsArray(ec, a);
                
                // block
                if(block != null) {
                    ec.EmitCreateBlock(block);
                } else {
                    ec.EmitNull();
                }

                ec.EmitSend();
            }
        }