Пример #1
0
 internal Type block; // Generated type of the block attached to the call
 
 // ( argsarr -- argsarr )
 internal static void EmitStoreArg(EmitContext ec, int i, RNode val) {
     ec.EmitDup(); // arr
     ec.EmitInt(i); // idx
     val.Walk(ec); // val
     ec.EmitArrayStore();
 }
Пример #2
0
 internal override void Walk(EmitContext ec)
 {
     if(ec.Emitting) {
         ec.EmitRArray(alen);
     }
     
     int i = 0;
     for(RNode n = this; n != null; ) {
         if(n is RNArray) {
             if(n.head != null) {
                 if(ec.Emitting) {
                     ec.EmitDup();
                     ec.EmitInt(i);
                 }
                 n.head.Walk(ec);
                 if(ec.Emitting) {
                     ec.EmitRArraySet();
                 }
             }
             n = n.next;
             i++;
         } else {
             // n.Walk(ec);
             // break;
             throw new NotSupportedException("bug: array has tail of type " + n.GetType().Name);
         }
     }
 }