summaryrefslogtreecommitdiff
path: root/lopcodes.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2002-05-13 10:09:00 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2002-05-13 10:09:00 -0300
commitaf19d556355b6e79296811cb18fe511f8784b8f1 (patch)
tree2126e8dec5d21939bb2ff298f29f0d429c62d7db /lopcodes.h
parentb55fded18c270412e127259a5f28c785620dbf1a (diff)
downloadlua-github-af19d556355b6e79296811cb18fe511f8784b8f1.tar.gz
generic for also coded to make test at the end of the loop
Diffstat (limited to 'lopcodes.h')
-rw-r--r--lopcodes.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/lopcodes.h b/lopcodes.h
index 79dae70c..fbdec4cf 100644
--- a/lopcodes.h
+++ b/lopcodes.h
@@ -1,5 +1,5 @@
/*
-** $Id: lopcodes.h,v 1.95 2002/04/24 20:07:46 roberto Exp roberto $
+** $Id: lopcodes.h,v 1.96 2002/05/06 15:51:41 roberto Exp roberto $
** Opcodes for Lua virtual machine
** See Copyright Notice in lua.h
*/
@@ -170,7 +170,8 @@ OP_FORLOOP,/* A sBx R(A)+=R(A+2); if R(A) <?= R(A+1) then PC+= sBx */
OP_TFORLOOP,/* A C R(A+2), ... ,R(A+2+C) := R(A)(R(A+1), R(A+2));
if R(A+2) ~= nil then pc++ */
-OP_TFORPREP,/* A if type(R(A)) == table then R(A+1):=R(A), R(A):=next */
+OP_TFORPREP,/* A sBx if type(R(A)) == table then R(A+1):=R(A), R(A):=next;
+ PC += sBx */
OP_SETLIST,/* A Bx R(A)[Bx-Bx%FPF+i] := R(A+i), 1 <= i <= Bx%FPF+1 */
OP_SETLISTO,/* A Bx */
@@ -193,6 +194,8 @@ OP_CLOSURE/* A Bx R(A) := closure(KPROTO[Bx], R(A), ... ,R(A+n)) */
(2) In OP_RETURN, if (B == 0) then return up to `top'
(3) For comparisons, B specifies what conditions the test should accept.
+
+ (4) All `skips' (pc++) assume that next instruction is a jump
===========================================================================*/