no more 'getBMode'-'getCMode' (imprecise + we will need more space

for op mode) + better control of op modes
This commit is contained in:
Roberto Ierusalimschy
2017-09-28 13:53:29 -03:00
parent 1b10033583
commit 722bdbe17d
6 changed files with 109 additions and 109 deletions

View File

@@ -1,5 +1,5 @@
/*
** $Id: lcode.h,v 1.65 2017/04/20 19:53:55 roberto Exp roberto $
** $Id: lcode.h,v 1.66 2017/09/13 19:50:08 roberto Exp roberto $
** Code generator for Lua
** See Copyright Notice in lua.h
*/
@@ -43,13 +43,13 @@ typedef enum UnOpr { OPR_MINUS, OPR_BNOT, OPR_NOT, OPR_LEN, OPR_NOUNOPR } UnOpr;
/* get (pointer to) instruction of given 'expdesc' */
#define getinstruction(fs,e) ((fs)->f->code[(e)->u.info])
#define luaK_codeAsBx(fs,o,A,sBx) luaK_codeABx(fs,o,A,(sBx)+MAXARG_sBx)
#define luaK_setmultret(fs,e) luaK_setreturns(fs, e, LUA_MULTRET)
#define luaK_jumpto(fs,t) luaK_patchlist(fs, luaK_jump(fs), t)
LUAI_FUNC int luaK_codeABx (FuncState *fs, OpCode o, int A, unsigned int Bx);
LUAI_FUNC int luaK_codeAsBx (FuncState *fs, OpCode o, int A, int Bx);
LUAI_FUNC int luaK_codeABC (FuncState *fs, OpCode o, int A, int B, int C);
LUAI_FUNC void luaK_fixline (FuncState *fs, int line);
LUAI_FUNC void luaK_nil (FuncState *fs, int from, int n);