746 if(C == 0) |
746 if(C == 0) |
747 throw "Dynamic table construction not yet implemented"; |
747 throw "Dynamic table construction not yet implemented"; |
748 // #define LFIELDS_PER_FLUSH 50 // Lua 5.1 |
748 // #define LFIELDS_PER_FLUSH 50 // Lua 5.1 |
749 var baseindex = (C-1)*50; |
749 var baseindex = (C-1)*50; |
750 var index = new LValue(this, "number", 1); |
750 var index = new LValue(this, "number", 1); |
751 for(var i = 1; i<=B; index.value=(baseindex+(++i))) |
751 var lim = B>0?B:((frame.reg.length-baseindex)-2); |
|
752 for(var i = 1; i<=lim; index.value=(baseindex+(++i))) |
752 RA.setIndex(index, frame.reg[A+i]); |
753 RA.setIndex(index, frame.reg[A+i]); |
753 break; |
754 break; |
754 default: |
755 default: |
755 throw "Unhandled opcode: "+INS_OPCODE(instruction); |
756 throw "Unhandled opcode: "+INS_OPCODE(instruction); |
756 } |
757 } |