# HG changeset patch # User Matthew Wild # Date 1290566936 0 # Node ID 5a928c1478adc97d792447dc2a8091af91054c59 # Parent cd1ba419c8084f35afec7b7a25940023e64b7e4b OP_GETUPVALUE: Clone original LValue diff -r cd1ba419c808 -r 5a928c1478ad lvm.js --- 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)];