aboutsummaryrefslogtreecommitdiff
path: root/lopcodes.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2011-02-01 16:03:10 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2011-02-01 16:03:10 -0200
commitdd547c55c85ba48f481836ba76ecdfe69960bcd0 (patch)
treed75d864ae35fc5bafacf3c206eaa20885b03a3d1 /lopcodes.h
parentf6bd8b1147d58c35e73225b4adc5499c11d2bf0f (diff)
downloadlua-dd547c55c85ba48f481836ba76ecdfe69960bcd0.tar.gz
lua-dd547c55c85ba48f481836ba76ecdfe69960bcd0.tar.bz2
lua-dd547c55c85ba48f481836ba76ecdfe69960bcd0.zip
new scheme to close upvalues in 'break'; jump instructions may
do the close, avoiding the need for a OP_CLOSE instruction
Diffstat (limited to 'lopcodes.h')
-rw-r--r--lopcodes.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/lopcodes.h b/lopcodes.h
index b26a4519..f606ab0a 100644
--- a/lopcodes.h
+++ b/lopcodes.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lopcodes.h,v 1.136 2010/10/13 16:45:54 roberto Exp roberto $ 2** $Id: lopcodes.h,v 1.137 2010/10/25 12:24:55 roberto Exp roberto $
3** Opcodes for Lua virtual machine 3** Opcodes for Lua virtual machine
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -195,8 +195,7 @@ OP_LEN,/* A B R(A) := length of R(B) */
195 195
196OP_CONCAT,/* A B C R(A) := R(B).. ... ..R(C) */ 196OP_CONCAT,/* A B C R(A) := R(B).. ... ..R(C) */
197 197
198OP_JMP,/* sBx pc+=sBx */ 198OP_JMP,/* A sBx pc+=sBx; if (A) close all upvalues >= R(A) + 1 */
199
200OP_EQ,/* A B C if ((RK(B) == RK(C)) ~= A) then pc++ */ 199OP_EQ,/* A B C if ((RK(B) == RK(C)) ~= A) then pc++ */
201OP_LT,/* A B C if ((RK(B) < RK(C)) ~= A) then pc++ */ 200OP_LT,/* A B C if ((RK(B) < RK(C)) ~= A) then pc++ */
202OP_LE,/* A B C if ((RK(B) <= RK(C)) ~= A) then pc++ */ 201OP_LE,/* A B C if ((RK(B) <= RK(C)) ~= A) then pc++ */
@@ -217,7 +216,7 @@ OP_TFORLOOP,/* A sBx if R(A+1) ~= nil then { R(A)=R(A+1); pc += sBx }*/
217 216
218OP_SETLIST,/* A B C R(A)[(C-1)*FPF+i] := R(A+i), 1 <= i <= B */ 217OP_SETLIST,/* A B C R(A)[(C-1)*FPF+i] := R(A+i), 1 <= i <= B */
219 218
220OP_CLOSE,/* A close all variables in the stack up to (>=) R(A)*/ 219OP_CLOSE,/* A close all upvalues >= R(A) */
221OP_CLOSURE,/* A Bx R(A) := closure(KPROTO[Bx]) */ 220OP_CLOSURE,/* A Bx R(A) := closure(KPROTO[Bx]) */
222 221
223OP_VARARG,/* A B R(A), R(A+1), ..., R(A+B-2) = vararg */ 222OP_VARARG,/* A B R(A), R(A+1), ..., R(A+B-2) = vararg */