297 this.frame.reg[INS_A(instruction)] = this.frame.reg[INS_B(instruction)]; |
298 this.frame.reg[INS_A(instruction)] = this.frame.reg[INS_B(instruction)]; |
298 break; |
299 break; |
299 case OP_LOADNIL: |
300 case OP_LOADNIL: |
300 for(var i = INS_A(instruction);i<=INS_B(instruction);i++) |
301 for(var i = INS_A(instruction);i<=INS_B(instruction);i++) |
301 this.frame.reg[i] = new LValue("nil", null); |
302 this.frame.reg[i] = new LValue("nil", null); |
|
303 break; |
|
304 case OP_LOADBOOL: |
|
305 this.frame.reg[INS_A(instruction)] = new LValue("boolean", INS_B(instruction)!=0); |
|
306 if(INS_C(instruction)!=0) |
|
307 this.frame.pc++; |
302 break; |
308 break; |
303 case OP_GETUPVAL: |
309 case OP_GETUPVAL: |
304 this.frame.reg[INS_A(instruction)] = this.frame.f.upvalues[INS_B(instruction)]; |
310 this.frame.reg[INS_A(instruction)] = this.frame.f.upvalues[INS_B(instruction)]; |
305 break; |
311 break; |
306 case OP_GETGLOBAL: |
312 case OP_GETGLOBAL: |