diff options
Diffstat (limited to 'lopcodes.h')
-rw-r--r-- | lopcodes.h | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -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) }*/ |
212 | OP_FORPREP,/* A sBx R(A)-=R(A+2); pc+=sBx */ | 212 | OP_FORPREP,/* A sBx R(A)-=R(A+2); pc+=sBx */ |
213 | 213 | ||
214 | OP_TFORLOOP,/* A C R(A+3), ... ,R(A+2+C) := R(A)(R(A+1), R(A+2)); | 214 | OP_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++ */ | ||
216 | OP_SETLIST,/* A B C R(A)[(C-1)*FPF+i] := R(A+i), 1 <= i <= B */ | 215 | OP_SETLIST,/* A B C R(A)[(C-1)*FPF+i] := R(A+i), 1 <= i <= B */ |
217 | 216 | ||
218 | OP_CLOSE,/* A close all variables in the stack up to (>=) R(A)*/ | 217 | OP_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 | ||
221 | OP_VARARG,/* A B R(A), R(A+1), ..., R(A+B-1) = vararg */ | 220 | OP_VARARG,/* A B R(A), R(A+1), ..., R(A+B-1) = vararg */ |
222 | 221 | ||
222 | OP_TFORLOOP,/* A sBx if R(A+1) ~= nil then { R(A)=R(A+1); pc += sBx }*/ | ||
223 | |||
223 | OP_EXTRAARG/* Ax extra argument for previous opcode */ | 224 | OP_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 | ||
261 | enum OpArgMask { | 262 | enum OpArgMask { |