new instructions to optimize indexing on upvalues

This commit is contained in:
Roberto Ierusalimschy
2010-02-26 17:40:29 -03:00
parent d08d237a49
commit 0fe2576a39
8 changed files with 89 additions and 31 deletions

View File

@@ -1,5 +1,5 @@
/*
** $Id: lopcodes.c,v 1.40 2008/10/30 15:39:30 roberto Exp roberto $
** $Id: lopcodes.c,v 1.41 2009/11/19 19:06:52 roberto Exp roberto $
** See Copyright Notice in lua.h
*/
@@ -20,8 +20,10 @@ LUAI_DDEF const char *const luaP_opnames[NUM_OPCODES+1] = {
"LOADNIL",
"GETUPVAL",
"GETGLOBAL",
"GETTABUP",
"GETTABLE",
"SETGLOBAL",
"SETTABUP",
"SETUPVAL",
"SETTABLE",
"NEWTABLE",
@@ -68,8 +70,10 @@ LUAI_DDEF const lu_byte luaP_opmodes[NUM_OPCODES] = {
,opmode(0, 1, OpArgR, OpArgN, iABC) /* OP_LOADNIL */
,opmode(0, 1, OpArgU, OpArgN, iABC) /* OP_GETUPVAL */
,opmode(0, 1, OpArgK, OpArgN, iABx) /* OP_GETGLOBAL */
,opmode(0, 1, OpArgU, OpArgK, iABC) /* OP_GETTABUP */
,opmode(0, 1, OpArgR, OpArgK, iABC) /* OP_GETTABLE */
,opmode(0, 0, OpArgK, OpArgN, iABx) /* OP_SETGLOBAL */
,opmode(0, 0, OpArgK, OpArgK, iABC) /* OP_SETTABUP */
,opmode(0, 0, OpArgU, OpArgN, iABC) /* OP_SETUPVAL */
,opmode(0, 0, OpArgK, OpArgK, iABC) /* OP_SETTABLE */
,opmode(0, 1, OpArgU, OpArgU, iABC) /* OP_NEWTABLE */