lvm.js

changeset 85
25470393fe74
parent 83
0e6b19731508
child 86
97678a1565d4
equal deleted inserted replaced
84:dfd323d565b4 85:25470393fe74
437 var value = frame.reg[INS_B(instruction)].index(RK(frame, C)).value; 437 var value = frame.reg[INS_B(instruction)].index(RK(frame, C)).value;
438 frame.reg[INS_A(instruction)] = this.LValue(value); 438 frame.reg[INS_A(instruction)] = this.LValue(value);
439 break; 439 break;
440 case OP_SETTABLE: 440 case OP_SETTABLE:
441 var C = INS_C(instruction); 441 var C = INS_C(instruction);
442 var valuesource = (C&0x100)?frame.f.constants:frame.reg;
443 var value = valuesource[C&0xff];
444
445 var B = INS_B(instruction); 442 var B = INS_B(instruction);
446 frame.reg[INS_A(instruction)].setIndex(RK(frame, B), value); 443 frame.reg[INS_A(instruction)].setIndex(RK(frame, B), RK(frame, C));
447 break; 444 break;
448 case OP_CALL: 445 case OP_CALL:
449 var f = frame.reg[INS_A(instruction)].precall(); // return JS or LValue 446 var f = frame.reg[INS_A(instruction)].precall(); // return JS or LValue
450 var A = INS_A(instruction), B = INS_B(instruction), C = INS_C(instruction); 447 var A = INS_A(instruction), B = INS_B(instruction), C = INS_C(instruction);
451 var undefined; 448 var undefined;

mercurial