OP_GETUPVALUE: Clone original LValue

Wed, 24 Nov 2010 02:48:56 +0000

author
Matthew Wild <mwild1@gmail.com>
date
Wed, 24 Nov 2010 02:48:56 +0000
changeset 132
5a928c1478ad
parent 131
cd1ba419c808
child 133
afce5a550d18

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)];

mercurial