diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2019-07-01 12:42:31 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2019-07-01 12:42:31 -0300 |
commit | 8eca21c2e85625390a2a3b08c231e75e315980b0 (patch) | |
tree | 47106e7a62cf00091594302629c7157fed81f738 /lparser.h | |
parent | 924bed7297d5ea16a78ec07e7acc64afad951aa8 (diff) | |
download | lua-8eca21c2e85625390a2a3b08c231e75e315980b0.tar.gz lua-8eca21c2e85625390a2a3b08c231e75e315980b0.tar.bz2 lua-8eca21c2e85625390a2a3b08c231e75e315980b0.zip |
First take on constant propagation
Diffstat (limited to 'lparser.h')
-rw-r--r-- | lparser.h | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -81,6 +81,7 @@ typedef struct expdesc { | |||
81 | 81 | ||
82 | /* description of an active local variable */ | 82 | /* description of an active local variable */ |
83 | typedef struct Vardesc { | 83 | typedef struct Vardesc { |
84 | TValue val; /* constant value (if variable is 'const') */ | ||
84 | short idx; /* index of the variable in the Proto's 'locvars' array */ | 85 | short idx; /* index of the variable in the Proto's 'locvars' array */ |
85 | lu_byte ro; /* true if variable is 'const' */ | 86 | lu_byte ro; /* true if variable is 'const' */ |
86 | } Vardesc; | 87 | } Vardesc; |
@@ -143,6 +144,7 @@ typedef struct FuncState { | |||
143 | } FuncState; | 144 | } FuncState; |
144 | 145 | ||
145 | 146 | ||
147 | LUAI_FUNC Vardesc *luaY_getvardesc (FuncState **fs, const expdesc *e); | ||
146 | LUAI_FUNC LClosure *luaY_parser (lua_State *L, ZIO *z, Mbuffer *buff, | 148 | LUAI_FUNC LClosure *luaY_parser (lua_State *L, ZIO *z, Mbuffer *buff, |
147 | Dyndata *dyd, const char *name, int firstchar); | 149 | Dyndata *dyd, const char *name, int firstchar); |
148 | 150 | ||