aboutsummaryrefslogtreecommitdiff
path: root/lopcodes.h
diff options
context:
space:
mode:
Diffstat (limited to 'lopcodes.h')
-rw-r--r--lopcodes.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/lopcodes.h b/lopcodes.h
index d52afc1d..910bcff2 100644
--- a/lopcodes.h
+++ b/lopcodes.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lopcodes.h,v 1.126 2006/09/11 14:07:24 roberto Exp roberto $ 2** $Id: lopcodes.h,v 1.127 2008/04/02 16:16:06 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*/
@@ -211,8 +211,7 @@ OP_FORLOOP,/* A sBx R(A)+=R(A+2);
211 if R(A) <?= R(A+1) then { pc+=sBx; R(A+3)=R(A) }*/ 211 if R(A) <?= R(A+1) then { pc+=sBx; R(A+3)=R(A) }*/
212OP_FORPREP,/* A sBx R(A)-=R(A+2); pc+=sBx */ 212OP_FORPREP,/* A sBx R(A)-=R(A+2); pc+=sBx */
213 213
214OP_TFORLOOP,/* A C R(A+3), ... ,R(A+2+C) := R(A)(R(A+1), R(A+2)); 214OP_TFORCALL,/* A C R(A+3), ... ,R(A+2+C) := R(A)(R(A+1), R(A+2)); */
215 if R(A+3) ~= nil then R(A+2)=R(A+3) else pc++ */
216OP_SETLIST,/* A B C R(A)[(C-1)*FPF+i] := R(A+i), 1 <= i <= B */ 215OP_SETLIST,/* A B C R(A)[(C-1)*FPF+i] := R(A+i), 1 <= i <= B */
217 216
218OP_CLOSE,/* A close all variables in the stack up to (>=) R(A)*/ 217OP_CLOSE,/* A close all variables in the stack up to (>=) R(A)*/
@@ -220,6 +219,8 @@ OP_CLOSURE,/* A Bx R(A) := closure(KPROTO[Bx], R(A), ... ,R(A+n)) */
220 219
221OP_VARARG,/* A B R(A), R(A+1), ..., R(A+B-1) = vararg */ 220OP_VARARG,/* A B R(A), R(A+1), ..., R(A+B-1) = vararg */
222 221
222OP_TFORLOOP,/* A sBx if R(A+1) ~= nil then { R(A)=R(A+1); pc += sBx }*/
223
223OP_EXTRAARG/* Ax extra argument for previous opcode */ 224OP_EXTRAARG/* Ax extra argument for previous opcode */
224} OpCode; 225} OpCode;
225 226
@@ -255,7 +256,7 @@ OP_EXTRAARG/* Ax extra argument for previous opcode */
255** bits 2-3: C arg mode 256** bits 2-3: C arg mode
256** bits 4-5: B arg mode 257** bits 4-5: B arg mode
257** bit 6: instruction set register A 258** bit 6: instruction set register A
258** bit 7: operator is a test 259** bit 7: operator is a test (next instruction must be a jump)
259*/ 260*/
260 261
261enum OpArgMask { 262enum OpArgMask {