aboutsummaryrefslogtreecommitdiff
path: root/lopcodes.h
diff options
context:
space:
mode:
Diffstat (limited to 'lopcodes.h')
-rw-r--r--lopcodes.h24
1 files changed, 12 insertions, 12 deletions
diff --git a/lopcodes.h b/lopcodes.h
index bbca12d9..45674257 100644
--- a/lopcodes.h
+++ b/lopcodes.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lopcodes.h,v 1.73 2001/06/05 18:17:01 roberto Exp roberto $ 2** $Id: lopcodes.h,v 1.74 2001/06/08 19:00:57 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*/
@@ -153,20 +153,20 @@ OP_CONCAT,/* A B C R(A) := R(B).. ... ..R(C) */
153OP_JMP,/* sBc PC += sBc */ 153OP_JMP,/* sBc PC += sBc */
154OP_CJMP,/* sBc if test then PC += sBc (see (1)) */ 154OP_CJMP,/* sBc if test then PC += sBc (see (1)) */
155 155
156OP_TESTEQ,/* B C test := (R(B) == R/K(C)) */ 156OP_TESTEQ,/* A C test := (R(A) == R/K(C)) */
157OP_TESTNE,/* B C test := (R(B) ~= R/K(C)) */ 157OP_TESTNE,/* A C test := (R(A) ~= R/K(C)) */
158OP_TESTLT,/* B C test := (R(B) < R/K(C)) */ 158OP_TESTLT,/* A C test := (R(A) < R/K(C)) */
159OP_TESTLE,/* B C test := (R(B) <= R/K(C)) */ 159OP_TESTLE,/* A C test := (R(A) <= R/K(C)) */
160OP_TESTGT,/* B C test := (R(B) > R/K(C)) */ 160OP_TESTGT,/* A C test := (R(A) > R/K(C)) */
161OP_TESTGE,/* B C test := (R(B) >= R/K(C)) */ 161OP_TESTGE,/* A C test := (R(A) >= R/K(C)) */
162 162
163OP_TESTT,/* A B test := R(B); if (test) R(A) := R(B) */ 163OP_TESTT,/* A B test := R(B); if (test) R(A) := R(B) */
164OP_TESTF,/* A B test := not R(B); if (test) R(A) := nil */ 164OP_TESTF,/* A B test := not R(B); if (test) R(A) := nil */
165 165
166OP_NILJMP,/* A R(A) := nil; PC++; */ 166OP_NILJMP,/* A R(A) := nil; PC++; */
167 167
168OP_CALL,/* A B C R(A), ... ,R(C-1) := R(A)(R(A+1), ... ,R(B-1)) */ 168OP_CALL,/* A B C R(A), ... ,R(A+C-1) := R(A)(R(A+1), ... ,R(A+B))*/
169OP_RETURN,/* A B return R(A), ... ,R(B-1) (see (3)) */ 169OP_RETURN,/* A B return R(A), ... ,R(A+B-1) (see (3)) */
170 170
171OP_FORPREP,/* A sBc */ 171OP_FORPREP,/* A sBc */
172OP_FORLOOP,/* A sBc */ 172OP_FORLOOP,/* A sBc */
@@ -191,10 +191,10 @@ OP_CLOSURE /* A Bc R(A) := closure(KPROTO[Bc], R(A), ... ,R(A+n)) */
191 instructions OP_TEST* and OP_CJMP must always occur together. 191 instructions OP_TEST* and OP_CJMP must always occur together.
192 192
193 (2) In OP_CALL, if (B == NO_REG) then B = top. C is the number of returns, 193 (2) In OP_CALL, if (B == NO_REG) then B = top. C is the number of returns,
194 and can be NO_REG. OP_CALL always set "top" to last_result+1, so 194 and can be NO_REG. OP_CALL can set `top' to last_result+1, so
195 next open instruction (OP_CALL, OP_RETURN, OP_SETLIST) may use "top". 195 next open instruction (OP_CALL, OP_RETURN, OP_SETLIST) may use `top'.
196 196
197 (3) In OP_RETURN, if (B == NO_REG) then B = top. 197 (3) In OP_RETURN, if (B == NO_REG) then return up to `top'
198===========================================================================*/ 198===========================================================================*/
199 199
200 200