aboutsummaryrefslogtreecommitdiff
path: root/lparser.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2019-07-01 12:42:31 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2019-07-01 12:42:31 -0300
commit8eca21c2e85625390a2a3b08c231e75e315980b0 (patch)
tree47106e7a62cf00091594302629c7157fed81f738 /lparser.h
parent924bed7297d5ea16a78ec07e7acc64afad951aa8 (diff)
downloadlua-8eca21c2e85625390a2a3b08c231e75e315980b0.tar.gz
lua-8eca21c2e85625390a2a3b08c231e75e315980b0.tar.bz2
lua-8eca21c2e85625390a2a3b08c231e75e315980b0.zip
First take on constant propagation
Diffstat (limited to 'lparser.h')
-rw-r--r--lparser.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/lparser.h b/lparser.h
index 228d4a5c..b708de25 100644
--- a/lparser.h
+++ b/lparser.h
@@ -81,6 +81,7 @@ typedef struct expdesc {
81 81
82/* description of an active local variable */ 82/* description of an active local variable */
83typedef struct Vardesc { 83typedef 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
147LUAI_FUNC Vardesc *luaY_getvardesc (FuncState **fs, const expdesc *e);
146LUAI_FUNC LClosure *luaY_parser (lua_State *L, ZIO *z, Mbuffer *buff, 148LUAI_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