"Implement" OP_CLOSE

Mon, 22 Nov 2010 02:43:55 +0000

author
Matthew Wild <mwild1@gmail.com>
date
Mon, 22 Nov 2010 02:43:55 +0000
changeset 118
05d10aebb9f5
parent 117
8f1045a7f1d6
child 119
ad42e6dd7cbd

"Implement" OP_CLOSE

lvm.js file | annotate | diff | comparison | revisions
--- a/lvm.js	Mon Nov 22 02:36:09 2010 +0000
+++ b/lvm.js	Mon Nov 22 02:43:55 2010 +0000
@@ -34,7 +34,7 @@
 var OP_FORPREP = 32;
 var OP_TFORLOOP = 33;
 var OP_SETLIST = 34;
-//var OP_CLOSE = 35;
+var OP_CLOSE = 35;
 var OP_CLOSURE = 36;
 //var OP_VARARG = 37;
 
@@ -566,6 +566,9 @@
 				else
 					return rets;
 				break;
+			case OP_CLOSE:
+				// No-op, since we leave upvalue management to the GC
+				break;
 			case OP_SELF:
 				var table = frame.reg[INS_B(instruction)];
 				frame.reg[INS_A(instruction)+1] = table;

mercurial