Wed, 24 Nov 2010 02:48:56 +0000
OP_GETUPVALUE: Clone original LValue
lvm.js | file | annotate | diff | comparison | revisions |
--- a/lvm.js Wed Nov 24 02:48:27 2010 +0000 +++ b/lvm.js Wed Nov 24 02:48:56 2010 +0000 @@ -451,7 +451,8 @@ frame.pc++; break; case OP_GETUPVAL: - frame.reg[INS_A(instruction)] = frame.f.upvalues[INS_B(instruction)]; + var upvalue = frame.f.upvalues[INS_B(instruction)]; + frame.reg[INS_A(instruction)] = new LValue(this, upvalue.type, upvalue.value); break; case OP_GETGLOBAL: var name = frame.f.constants[INS_Bx(instruction)];