aboutsummaryrefslogtreecommitdiff
path: root/lopcodes.h
diff options
context:
space:
mode:
Diffstat (limited to 'lopcodes.h')
-rw-r--r--lopcodes.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/lopcodes.h b/lopcodes.h
index 697eb5d6..43a90525 100644
--- a/lopcodes.h
+++ b/lopcodes.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lopcodes.h,v 1.110 2004/06/29 18:49:02 roberto Exp roberto $ 2** $Id: lopcodes.h,v 1.111 2004/08/04 20:18:13 roberto Exp $
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*/
@@ -198,8 +198,7 @@ OP_TFORLOOP,/* A C R(A+2), ... ,R(A+2+C) := R(A)(R(A+1), R(A+2));
198OP_TFORPREP,/* A sBx if type(R(A)) == table then R(A+1):=R(A), R(A):=next; 198OP_TFORPREP,/* A sBx if type(R(A)) == table then R(A+1):=R(A), R(A):=next;
199 pc+=sBx */ 199 pc+=sBx */
200 200
201OP_SETLIST,/* A Bx R(A)[Bx-Bx%FPF+i] := R(A+i), 1 <= i <= Bx%FPF+1 */ 201OP_SETLIST,/* A B C R(A)[(C-1)*FPF+i] := R(A+i), 1 <= i <= B */
202OP_SETLISTO,/* A Bx */
203 202
204OP_CLOSE,/* A close all variables in the stack up to (>=) R(A)*/ 203OP_CLOSE,/* A close all variables in the stack up to (>=) R(A)*/
205OP_CLOSURE,/* A Bx R(A) := closure(KPROTO[Bx], R(A), ... ,R(A+n)) */ 204OP_CLOSURE,/* A Bx R(A) := closure(KPROTO[Bx], R(A), ... ,R(A+n)) */
@@ -219,11 +218,15 @@ OP_VARARG/* A B R(A), R(A+1), ..., R(A+B-1) = vararg */
219 next open instruction (OP_CALL, OP_RETURN, OP_SETLIST) may use `top'. 218 next open instruction (OP_CALL, OP_RETURN, OP_SETLIST) may use `top'.
220 219
221 (*) In OP_VARARG, if (B == 0) then use actual number of varargs and 220 (*) In OP_VARARG, if (B == 0) then use actual number of varargs and
222 set top (like in OP_CALL). 221 set top (like in OP_CALL with C == 0).
223 222
224 (*) In OP_RETURN, if (B == 0) then return up to `top' 223 (*) In OP_RETURN, if (B == 0) then return up to `top'
225 224
226 (*) For comparisons, B specifies what conditions the test should accept. 225 (*) In OP_SETLIST, if (B == 0) then B = `top';
226 if (C == 0) then next `instruction' is real C
227
228 (*) For comparisons, A specifies what condition the test should accept
229 (true or false).
227 230
228 (*) All `skips' (pc++) assume that next instruction is a jump 231 (*) All `skips' (pc++) assume that next instruction is a jump
229===========================================================================*/ 232===========================================================================*/