new instruction OP_LOADKX (to replace OP_LOADK with extra argument)

This commit is contained in:
Roberto Ierusalimschy
2011-04-07 15:14:12 -03:00
parent a958b711f5
commit 427ee519db
6 changed files with 27 additions and 19 deletions

View File

@@ -1,5 +1,5 @@
/*
** $Id: lcode.h,v 1.55 2010/07/02 20:42:40 roberto Exp roberto $
** $Id: lcode.h,v 1.56 2011/02/01 18:03:10 roberto Exp roberto $
** Code generator for Lua
** See Copyright Notice in lua.h
*/
@@ -44,11 +44,9 @@ typedef enum UnOpr { OPR_MINUS, OPR_NOT, OPR_LEN, OPR_NOUNOPR } UnOpr;
#define luaK_jumpto(fs,t) luaK_patchlist(fs, luaK_jump(fs), t)
#define luaK_codek(fs,reg,k) luaK_codeABxX(fs, OP_LOADK, reg, k)
LUAI_FUNC int luaK_codeABx (FuncState *fs, OpCode o, int A, unsigned int Bx);
LUAI_FUNC int luaK_codeABC (FuncState *fs, OpCode o, int A, int B, int C);
LUAI_FUNC int luaK_codeABxX (FuncState *fs, OpCode o, int reg, int k);
LUAI_FUNC int luaK_codek (FuncState *fs, int reg, int k);
LUAI_FUNC void luaK_fixline (FuncState *fs, int line);
LUAI_FUNC void luaK_nil (FuncState *fs, int from, int n);
LUAI_FUNC void luaK_reserveregs (FuncState *fs, int n);