Jelajahi Sumber

detail (keep OP_LOADK and OP_LOADKX together)

Roberto Ierusalimschy 7 tahun lalu
induk
melakukan
022e4427cf
2 mengubah file dengan 5 tambahan dan 5 penghapusan
  1. 3 3
      lopcodes.c
  2. 2 2
      lopcodes.h

+ 3 - 3
lopcodes.c

@@ -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 */

+ 2 - 2
lopcodes.h

@@ -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		*/