lvm.js

changeset 114
82d7b057d330
parent 113
1e49dfb8ccdc
child 115
1555cb5a97b3
equal deleted inserted replaced
113:1e49dfb8ccdc 114:82d7b057d330
461 case OP_NEWTABLE: 461 case OP_NEWTABLE:
462 frame.reg[INS_A(instruction)] = new LValue(this, "table", {}); 462 frame.reg[INS_A(instruction)] = new LValue(this, "table", {});
463 break; 463 break;
464 case OP_GETTABLE: 464 case OP_GETTABLE:
465 var C = INS_C(instruction); 465 var C = INS_C(instruction);
466 var value = frame.reg[INS_B(instruction)].index(RK(frame, C)).value; 466 var value = frame.reg[INS_B(instruction)].index(RK(frame, C));
467 frame.reg[INS_A(instruction)] = this.LValue(value); 467 frame.reg[INS_A(instruction)] = new LValue(this, value.type, value.value);
468 break; 468 break;
469 case OP_SETTABLE: 469 case OP_SETTABLE:
470 var C = INS_C(instruction); 470 var C = INS_C(instruction);
471 var B = INS_B(instruction); 471 var B = INS_B(instruction);
472 frame.reg[INS_A(instruction)].setIndex(RK(frame, B), RK(frame, C)); 472 frame.reg[INS_A(instruction)].setIndex(RK(frame, B), RK(frame, C));

mercurial