1
0
mirror of https://github.com/lua/lua.git synced 2025-01-14 05:43:00 +08:00

detail (keep OP_LOADK and OP_LOADKX together)

This commit is contained in:
Roberto Ierusalimschy 2017-09-15 11:19:06 -03:00
parent 80d9b09f35
commit 022e4427cf
2 changed files with 5 additions and 5 deletions

View File

@ -1,5 +1,5 @@
/*
** $Id: lopcodes.c,v 1.60 2017/08/14 18:33:14 roberto Exp roberto $
** $Id: lopcodes.c,v 1.61 2017/09/13 19:50:08 roberto Exp roberto $
** Opcodes for Lua virtual machine
** See Copyright Notice in lua.h
*/
@ -19,8 +19,8 @@
LUAI_DDEF const char *const luaP_opnames[NUM_OPCODES+1] = {
"MOVE",
"LOADK",
"LOADI",
"LOADK",
"LOADKX",
"LOADBOOL",
"LOADNIL",
@ -81,8 +81,8 @@ LUAI_DDEF const char *const luaP_opnames[NUM_OPCODES+1] = {
LUAI_DDEF const lu_byte luaP_opmodes[NUM_OPCODES] = {
/* T A B C mode opcode */
opmode(0, 1, OpArgR, OpArgN, iABC) /* OP_MOVE */
,opmode(0, 1, OpArgK, OpArgN, iABx) /* OP_LOADK */
,opmode(0, 1, OpArgU, OpArgN, iAsBx) /* OP_LOADI */
,opmode(0, 1, OpArgK, OpArgN, iABx) /* OP_LOADK */
,opmode(0, 1, OpArgN, OpArgN, iABx) /* OP_LOADKX */
,opmode(0, 1, OpArgU, OpArgU, iABC) /* OP_LOADBOOL */
,opmode(0, 1, OpArgU, OpArgN, iABC) /* OP_LOADNIL */

View File

@ -1,5 +1,5 @@
/*
** $Id: lopcodes.h,v 1.156 2017/08/14 18:33:14 roberto Exp roberto $
** $Id: lopcodes.h,v 1.157 2017/09/13 19:50:08 roberto Exp roberto $
** Opcodes for Lua virtual machine
** See Copyright Notice in lua.h
*/
@ -175,8 +175,8 @@ typedef enum {
name args description
------------------------------------------------------------------------*/
OP_MOVE,/* A B R(A) := R(B) */
OP_LOADK,/* A Bx R(A) := Kst(Bx) */
OP_LOADI,/* A sBx R(A) := sBx */
OP_LOADK,/* A Bx R(A) := Kst(Bx) */
OP_LOADKX,/* A R(A) := Kst(extra arg) */
OP_LOADBOOL,/* A B C R(A) := (Bool)B; if (C) pc++ */
OP_LOADNIL,/* A B R(A), R(A+1), ..., R(A+B) := nil */