diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2019-07-09 10:43:17 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2019-07-09 10:43:17 -0300 |
commit | 54f7b46c1e8a0188e1649046a3a72522f2d769f4 (patch) | |
tree | 28e973e10e2bc82de4d7d1e7a9f6673b028f7ad2 /lcode.h | |
parent | e888976bc6ba5592fb8ab8ecc04a8f63e217aa74 (diff) | |
download | lua-54f7b46c1e8a0188e1649046a3a72522f2d769f4.tar.gz lua-54f7b46c1e8a0188e1649046a3a72522f2d769f4.tar.bz2 lua-54f7b46c1e8a0188e1649046a3a72522f2d769f4.zip |
New implementation for constants
VLOCAL expressions keep a reference to their corresponding 'Vardesc',
and 'Upvaldesc' (for upvalues) has a field 'ro' (read-only). So, it is
easier to check whether a variable is read-only. The decoupling in
VLOCAL between 'vidx' ('Vardesc' index) and 'sidx' (stack index)
should also help the forthcoming implementation of compile-time
constant propagation.
Diffstat (limited to 'lcode.h')
-rw-r--r-- | lcode.h | 1 |
1 files changed, 0 insertions, 1 deletions
@@ -51,7 +51,6 @@ 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_tonumeral (FuncState *fs, const expdesc *e, TValue *v); | ||
55 | LUAI_FUNC int luaK_codeABx (FuncState *fs, OpCode o, int A, unsigned int Bx); | 54 | LUAI_FUNC int luaK_codeABx (FuncState *fs, OpCode o, int A, unsigned int Bx); |
56 | LUAI_FUNC int luaK_codeAsBx (FuncState *fs, OpCode o, int A, int Bx); | 55 | LUAI_FUNC int luaK_codeAsBx (FuncState *fs, OpCode o, int A, int Bx); |
57 | LUAI_FUNC int luaK_codeABCk (FuncState *fs, OpCode o, int A, | 56 | LUAI_FUNC int luaK_codeABCk (FuncState *fs, OpCode o, int A, |