aboutsummaryrefslogtreecommitdiff
path: root/lopcodes.h
diff options
context:
space:
mode:
Diffstat (limited to 'lopcodes.h')
-rw-r--r--lopcodes.h15
1 files changed, 9 insertions, 6 deletions
diff --git a/lopcodes.h b/lopcodes.h
index 7471fedc..866c1641 100644
--- a/lopcodes.h
+++ b/lopcodes.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lopcodes.h,v 1.128 2008/10/30 15:39:30 roberto Exp roberto $ 2** $Id: lopcodes.h,v 1.129 2009/03/09 15:27:56 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*/
@@ -166,15 +166,15 @@ typedef enum {
166name args description 166name args description
167------------------------------------------------------------------------*/ 167------------------------------------------------------------------------*/
168OP_MOVE,/* A B R(A) := R(B) */ 168OP_MOVE,/* A B R(A) := R(B) */
169OP_LOADK,/* A Bx R(A) := Kst(Bx) */ 169OP_LOADK,/* A Bx R(A) := Kst(Bx - 1) */
170OP_LOADBOOL,/* A B C R(A) := (Bool)B; if (C) pc++ */ 170OP_LOADBOOL,/* A B C R(A) := (Bool)B; if (C) pc++ */
171OP_LOADNIL,/* A B R(A) := ... := R(B) := nil */ 171OP_LOADNIL,/* A B R(A) := ... := R(B) := nil */
172OP_GETUPVAL,/* A B R(A) := UpValue[B] */ 172OP_GETUPVAL,/* A B R(A) := UpValue[B] */
173 173
174OP_GETGLOBAL,/* A Bx R(A) := Gbl[Kst(Bx)] */ 174OP_GETGLOBAL,/* A Bx R(A) := Gbl[Kst(Bx - 1)] */
175OP_GETTABLE,/* A B C R(A) := R(B)[RK(C)] */ 175OP_GETTABLE,/* A B C R(A) := R(B)[RK(C)] */
176 176
177OP_SETGLOBAL,/* A Bx Gbl[Kst(Bx)] := R(A) */ 177OP_SETGLOBAL,/* A Bx Gbl[Kst(Bx - 1)] := R(A) */
178OP_SETUPVAL,/* A B UpValue[B] := R(A) */ 178OP_SETUPVAL,/* A B UpValue[B] := R(A) */
179OP_SETTABLE,/* A B C R(A)[RK(B)] := RK(C) */ 179OP_SETTABLE,/* A B C R(A)[RK(B)] := RK(C) */
180 180
@@ -221,7 +221,7 @@ OP_VARARG,/* A B R(A), R(A+1), ..., R(A+B-1) = vararg */
221 221
222OP_TFORLOOP,/* A sBx if R(A+1) ~= nil then { R(A)=R(A+1); pc += sBx }*/ 222OP_TFORLOOP,/* A sBx if R(A+1) ~= nil then { R(A)=R(A+1); pc += sBx }*/
223 223
224OP_EXTRAARG/* Ax extra argument for previous opcode */ 224OP_EXTRAARG/* Ax extra (larger) argument for previous opcode */
225} OpCode; 225} OpCode;
226 226
227 227
@@ -241,7 +241,10 @@ OP_EXTRAARG/* Ax extra argument for previous opcode */
241 (*) In OP_RETURN, if (B == 0) then return up to `top'. 241 (*) In OP_RETURN, if (B == 0) then return up to `top'.
242 242
243 (*) In OP_SETLIST, if (B == 0) then B = `top'; if (C == 0) then next 243 (*) In OP_SETLIST, if (B == 0) then B = `top'; if (C == 0) then next
244 `instruction' is EXTRAARG(real C). 244 'instruction' is EXTRAARG(real C).
245
246 (*) In OP_LOADK, OP_GETGLOBAL, and OP_SETGLOBAL, if (Bx == 0) then next
247 'instruction' is EXTRAARG(real Bx).
245 248
246 (*) For comparisons, A specifies what condition the test should accept 249 (*) For comparisons, A specifies what condition the test should accept
247 (true or false). 250 (true or false).