diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2019-07-15 14:59:35 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2019-07-15 14:59:35 -0300 |
commit | 758c1ef445ab27d89bace746111add04083a8e20 (patch) | |
tree | 8136726cfaa1dc0841547987f2cb0555d02f2303 /lcode.h | |
parent | dd6d8db49acda5d5353a0a9c42485d9b4bde419d (diff) | |
download | lua-758c1ef445ab27d89bace746111add04083a8e20.tar.gz lua-758c1ef445ab27d89bace746111add04083a8e20.tar.bz2 lua-758c1ef445ab27d89bace746111add04083a8e20.zip |
Unification of size representation in OP_NEWTABLE and OP_SETLIST
Opcodes OP_NEWTABLE and OP_SETLIST use the same representation to
store the size of the array part of a table. This new representation
can go up to 2^33 (8 + 25 bits).
Diffstat (limited to 'lcode.h')
-rw-r--r-- | lcode.h | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -51,11 +51,11 @@ typedef enum UnOpr { OPR_MINUS, OPR_BNOT, OPR_NOT, OPR_LEN, OPR_NOUNOPR } UnOpr; | |||
51 | 51 | ||
52 | #define luaK_jumpto(fs,t) luaK_patchlist(fs, luaK_jump(fs), t) | 52 | #define luaK_jumpto(fs,t) luaK_patchlist(fs, luaK_jump(fs), t) |
53 | 53 | ||
54 | LUAI_FUNC int luaK_code (FuncState *fs, Instruction i); | ||
54 | LUAI_FUNC int luaK_codeABx (FuncState *fs, OpCode o, int A, unsigned int Bx); | 55 | LUAI_FUNC int luaK_codeABx (FuncState *fs, OpCode o, int A, unsigned int Bx); |
55 | LUAI_FUNC int luaK_codeAsBx (FuncState *fs, OpCode o, int A, int Bx); | 56 | LUAI_FUNC int luaK_codeAsBx (FuncState *fs, OpCode o, int A, int Bx); |
56 | LUAI_FUNC int luaK_codeABCk (FuncState *fs, OpCode o, int A, | 57 | LUAI_FUNC int luaK_codeABCk (FuncState *fs, OpCode o, int A, |
57 | int B, int C, int k); | 58 | int B, int C, int k); |
58 | LUAI_FUNC int luaK_codeextraarg (FuncState *fs, int a); | ||
59 | LUAI_FUNC int luaK_isKint (expdesc *e); | 59 | LUAI_FUNC int luaK_isKint (expdesc *e); |
60 | LUAI_FUNC int luaK_exp2const (FuncState *fs, const expdesc *e, TValue *v); | 60 | LUAI_FUNC int luaK_exp2const (FuncState *fs, const expdesc *e, TValue *v); |
61 | LUAI_FUNC void luaK_fixline (FuncState *fs, int line); | 61 | LUAI_FUNC void luaK_fixline (FuncState *fs, int line); |
@@ -87,6 +87,8 @@ LUAI_FUNC void luaK_prefix (FuncState *fs, UnOpr op, expdesc *v, int line); | |||
87 | LUAI_FUNC void luaK_infix (FuncState *fs, BinOpr op, expdesc *v); | 87 | LUAI_FUNC void luaK_infix (FuncState *fs, BinOpr op, expdesc *v); |
88 | LUAI_FUNC void luaK_posfix (FuncState *fs, BinOpr op, expdesc *v1, | 88 | LUAI_FUNC void luaK_posfix (FuncState *fs, BinOpr op, expdesc *v1, |
89 | expdesc *v2, int line); | 89 | expdesc *v2, int line); |
90 | LUAI_FUNC void luaK_settablesize (FuncState *fs, int pc, | ||
91 | int ra, int rb, int rc); | ||
90 | LUAI_FUNC void luaK_setlist (FuncState *fs, int base, int nelems, int tostore); | 92 | LUAI_FUNC void luaK_setlist (FuncState *fs, int base, int nelems, int tostore); |
91 | LUAI_FUNC void luaK_finish (FuncState *fs); | 93 | LUAI_FUNC void luaK_finish (FuncState *fs); |
92 | LUAI_FUNC l_noret luaK_semerror (LexState *ls, const char *msg); | 94 | LUAI_FUNC l_noret luaK_semerror (LexState *ls, const char *msg); |