details in opcode list

This commit is contained in:
Roberto Ierusalimschy
2010-10-13 13:45:54 -03:00
parent cd0ebd0a80
commit f3026c36c2
2 changed files with 7 additions and 6 deletions

View File

@@ -1,5 +1,5 @@
/*
** $Id: lopcodes.h,v 1.134 2010/02/26 20:40:29 roberto Exp roberto $
** $Id: lopcodes.h,v 1.135 2010/03/12 19:14:06 roberto Exp roberto $
** Opcodes for Lua virtual machine
** See Copyright Notice in lua.h
*/
@@ -17,6 +17,7 @@
`A' : 8 bits
`B' : 9 bits
`C' : 9 bits
'Ax' : 26 bits ('A', 'B', and 'C' together)
`Bx' : 18 bits (`B' and `C' together)
`sBx' : signed Bx
@@ -212,6 +213,8 @@ OP_FORLOOP,/* A sBx R(A)+=R(A+2);
OP_FORPREP,/* A sBx R(A)-=R(A+2); pc+=sBx */
OP_TFORCALL,/* A C R(A+3), ... ,R(A+2+C) := R(A)(R(A+1), R(A+2)); */
OP_TFORLOOP,/* A sBx if R(A+1) ~= nil then { R(A)=R(A+1); pc += sBx }*/
OP_SETLIST,/* A B C R(A)[(C-1)*FPF+i] := R(A+i), 1 <= i <= B */
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]) */
OP_VARARG,/* A B R(A), R(A+1), ..., R(A+B-2) = vararg */
OP_TFORLOOP,/* A sBx if R(A+1) ~= nil then { R(A)=R(A+1); pc += sBx }*/
OP_EXTRAARG/* Ax extra (larger) argument for previous opcode */
} OpCode;