diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2010-10-13 13:45:54 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2010-10-13 13:45:54 -0300 |
commit | f3026c36c2373793d807c4deecd1fecaf33a9cef (patch) | |
tree | 2acf8d47eafe6e3685ef844c3f8c26b11f7c344a /lopcodes.h | |
parent | cd0ebd0a802c55d1f16796d2fbb4a6623a6fda57 (diff) | |
download | lua-f3026c36c2373793d807c4deecd1fecaf33a9cef.tar.gz lua-f3026c36c2373793d807c4deecd1fecaf33a9cef.tar.bz2 lua-f3026c36c2373793d807c4deecd1fecaf33a9cef.zip |
details in opcode list
Diffstat (limited to 'lopcodes.h')
-rw-r--r-- | lopcodes.h | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lopcodes.h,v 1.134 2010/02/26 20:40:29 roberto Exp roberto $ | 2 | ** $Id: lopcodes.h,v 1.135 2010/03/12 19:14: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 | */ |
@@ -17,6 +17,7 @@ | |||
17 | `A' : 8 bits | 17 | `A' : 8 bits |
18 | `B' : 9 bits | 18 | `B' : 9 bits |
19 | `C' : 9 bits | 19 | `C' : 9 bits |
20 | 'Ax' : 26 bits ('A', 'B', and 'C' together) | ||
20 | `Bx' : 18 bits (`B' and `C' together) | 21 | `Bx' : 18 bits (`B' and `C' together) |
21 | `sBx' : signed Bx | 22 | `sBx' : signed Bx |
22 | 23 | ||
@@ -212,6 +213,8 @@ OP_FORLOOP,/* A sBx R(A)+=R(A+2); | |||
212 | OP_FORPREP,/* A sBx R(A)-=R(A+2); pc+=sBx */ | 213 | OP_FORPREP,/* A sBx R(A)-=R(A+2); pc+=sBx */ |
213 | 214 | ||
214 | OP_TFORCALL,/* A C R(A+3), ... ,R(A+2+C) := R(A)(R(A+1), R(A+2)); */ | 215 | OP_TFORCALL,/* A C R(A+3), ... ,R(A+2+C) := R(A)(R(A+1), R(A+2)); */ |
216 | OP_TFORLOOP,/* A sBx if R(A+1) ~= nil then { R(A)=R(A+1); pc += sBx }*/ | ||
217 | |||
215 | OP_SETLIST,/* A B C R(A)[(C-1)*FPF+i] := R(A+i), 1 <= i <= B */ | 218 | OP_SETLIST,/* A B C R(A)[(C-1)*FPF+i] := R(A+i), 1 <= i <= B */ |
216 | 219 | ||
217 | OP_CLOSE,/* A close all variables in the stack up to (>=) R(A)*/ | 220 | OP_CLOSE,/* A close all variables in the stack up to (>=) R(A)*/ |
@@ -219,8 +222,6 @@ OP_CLOSURE,/* A Bx R(A) := closure(KPROTO[Bx]) */ | |||
219 | 222 | ||
220 | OP_VARARG,/* A B R(A), R(A+1), ..., R(A+B-2) = vararg */ | 223 | OP_VARARG,/* A B R(A), R(A+1), ..., R(A+B-2) = vararg */ |
221 | 224 | ||
222 | OP_TFORLOOP,/* A sBx if R(A+1) ~= nil then { R(A)=R(A+1); pc += sBx }*/ | ||
223 | |||
224 | OP_EXTRAARG/* Ax extra (larger) argument for previous opcode */ | 225 | OP_EXTRAARG/* Ax extra (larger) argument for previous opcode */ |
225 | } OpCode; | 226 | } OpCode; |
226 | 227 | ||