aboutsummaryrefslogtreecommitdiff
path: root/lopcodes.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2011-04-07 15:14:12 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2011-04-07 15:14:12 -0300
commit427ee519db76b7a0747b5fc1d5dcf97092b5c0bf (patch)
tree9c4000cbd08211ddc5de55db60dde2c8ba1dd16e /lopcodes.h
parenta958b711f511e4f533d27cc6c27196e87b8cf346 (diff)
downloadlua-427ee519db76b7a0747b5fc1d5dcf97092b5c0bf.tar.gz
lua-427ee519db76b7a0747b5fc1d5dcf97092b5c0bf.tar.bz2
lua-427ee519db76b7a0747b5fc1d5dcf97092b5c0bf.zip
new instruction OP_LOADKX (to replace OP_LOADK with extra argument)
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 9009b382..60d1492d 100644
--- a/lopcodes.h
+++ b/lopcodes.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lopcodes.h,v 1.138 2011/02/01 18:03:10 roberto Exp roberto $ 2** $Id: lopcodes.h,v 1.139 2011/02/07 12:24:42 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*/
@@ -167,7 +167,8 @@ typedef enum {
167name args description 167name args description
168------------------------------------------------------------------------*/ 168------------------------------------------------------------------------*/
169OP_MOVE,/* A B R(A) := R(B) */ 169OP_MOVE,/* A B R(A) := R(B) */
170OP_LOADK,/* A Bx R(A) := Kst(Bx - 1) */ 170OP_LOADK,/* A Bx R(A) := Kst(Bx) */
171OP_LOADKX,/* A R(A) := Kst(extra arg) */
171OP_LOADBOOL,/* A B C R(A) := (Bool)B; if (C) pc++ */ 172OP_LOADBOOL,/* A B C R(A) := (Bool)B; if (C) pc++ */
172OP_LOADNIL,/* A B R(A) := ... := R(B) := nil */ 173OP_LOADNIL,/* A B R(A) := ... := R(B) := nil */
173OP_GETUPVAL,/* A B R(A) := UpValue[B] */ 174OP_GETUPVAL,/* A B R(A) := UpValue[B] */
@@ -242,7 +243,7 @@ OP_EXTRAARG/* Ax extra (larger) argument for previous opcode */
242 (*) 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
243 'instruction' is EXTRAARG(real C). 244 'instruction' is EXTRAARG(real C).
244 245
245 (*) In OP_LOADK, if (Bx == 0) then next 'instruction' is EXTRAARG(real Bx). 246 (*) In OP_LOADKX, the next 'instruction' is always EXTRAARG.
246 247
247 (*) For comparisons, A specifies what condition the test should accept 248 (*) For comparisons, A specifies what condition the test should accept
248 (true or false). 249 (true or false).