diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2011-04-07 15:14:12 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2011-04-07 15:14:12 -0300 |
commit | 427ee519db76b7a0747b5fc1d5dcf97092b5c0bf (patch) | |
tree | 9c4000cbd08211ddc5de55db60dde2c8ba1dd16e /lopcodes.h | |
parent | a958b711f511e4f533d27cc6c27196e87b8cf346 (diff) | |
download | lua-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.h | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -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 { | |||
167 | name args description | 167 | name args description |
168 | ------------------------------------------------------------------------*/ | 168 | ------------------------------------------------------------------------*/ |
169 | OP_MOVE,/* A B R(A) := R(B) */ | 169 | OP_MOVE,/* A B R(A) := R(B) */ |
170 | OP_LOADK,/* A Bx R(A) := Kst(Bx - 1) */ | 170 | OP_LOADK,/* A Bx R(A) := Kst(Bx) */ |
171 | OP_LOADKX,/* A R(A) := Kst(extra arg) */ | ||
171 | OP_LOADBOOL,/* A B C R(A) := (Bool)B; if (C) pc++ */ | 172 | OP_LOADBOOL,/* A B C R(A) := (Bool)B; if (C) pc++ */ |
172 | OP_LOADNIL,/* A B R(A) := ... := R(B) := nil */ | 173 | OP_LOADNIL,/* A B R(A) := ... := R(B) := nil */ |
173 | OP_GETUPVAL,/* A B R(A) := UpValue[B] */ | 174 | OP_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). |