Example #1
0
 int code(int instruction, int line) {
   Prototype f = this.f;
   this.dischargejpc(); /* `pc' will change */
   /* put new instruction in code array */
   if (f.code == null || this.pc + 1 > f.code.length)
     f.code = LuaC.realloc(f.code, this.pc * 2 + 1);
   f.code[this.pc] = instruction;
   /* save corresponding line information */
   if (f.lineinfo == null || this.pc + 1 > f.lineinfo.length)
     f.lineinfo = LuaC.realloc(f.lineinfo, this.pc * 2 + 1);
   f.lineinfo[this.pc] = line;
   return this.pc++;
 }
Example #2
0
 void indexed(expdesc t, expdesc k) {
   t.u.ind_t = (short) t.u.info;
   t.u.ind_idx = (short) this.exp2RK(k);
   LuaC._assert(t.k == LexState.VUPVAL || vkisinreg(t.k));
   t.u.ind_vt = (short) ((t.k == LexState.VUPVAL) ? LexState.VUPVAL : LexState.VLOCAL);
   t.k = LexState.VINDEXED;
 }