aboutsummaryrefslogtreecommitdiff
path: root/lopcodes.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2010-10-13 13:45:54 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2010-10-13 13:45:54 -0300
commitf3026c36c2373793d807c4deecd1fecaf33a9cef (patch)
tree2acf8d47eafe6e3685ef844c3f8c26b11f7c344a /lopcodes.h
parentcd0ebd0a802c55d1f16796d2fbb4a6623a6fda57 (diff)
downloadlua-f3026c36c2373793d807c4deecd1fecaf33a9cef.tar.gz
lua-f3026c36c2373793d807c4deecd1fecaf33a9cef.tar.bz2
lua-f3026c36c2373793d807c4deecd1fecaf33a9cef.zip
details in opcode list
Diffstat (limited to 'lopcodes.h')
-rw-r--r--lopcodes.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/lopcodes.h b/lopcodes.h
index dc8f37f5..935ac17e 100644
--- a/lopcodes.h
+++ b/lopcodes.h
@@ -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);
212OP_FORPREP,/* A sBx R(A)-=R(A+2); pc+=sBx */ 213OP_FORPREP,/* A sBx R(A)-=R(A+2); pc+=sBx */
213 214
214OP_TFORCALL,/* A C R(A+3), ... ,R(A+2+C) := R(A)(R(A+1), R(A+2)); */ 215OP_TFORCALL,/* A C R(A+3), ... ,R(A+2+C) := R(A)(R(A+1), R(A+2)); */
216OP_TFORLOOP,/* A sBx if R(A+1) ~= nil then { R(A)=R(A+1); pc += sBx }*/
217
215OP_SETLIST,/* A B C R(A)[(C-1)*FPF+i] := R(A+i), 1 <= i <= B */ 218OP_SETLIST,/* A B C R(A)[(C-1)*FPF+i] := R(A+i), 1 <= i <= B */
216 219
217OP_CLOSE,/* A close all variables in the stack up to (>=) R(A)*/ 220OP_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
220OP_VARARG,/* A B R(A), R(A+1), ..., R(A+B-2) = vararg */ 223OP_VARARG,/* A B R(A), R(A+1), ..., R(A+B-2) = vararg */
221 224
222OP_TFORLOOP,/* A sBx if R(A+1) ~= nil then { R(A)=R(A+1); pc += sBx }*/
223
224OP_EXTRAARG/* Ax extra (larger) argument for previous opcode */ 225OP_EXTRAARG/* Ax extra (larger) argument for previous opcode */
225} OpCode; 226} OpCode;
226 227