From 8eca21c2e85625390a2a3b08c231e75e315980b0 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Mon, 1 Jul 2019 12:42:31 -0300 Subject: First take on constant propagation --- lparser.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lparser.h') 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 { /* description of an active local variable */ typedef struct Vardesc { + TValue val; /* constant value (if variable is 'const') */ short idx; /* index of the variable in the Proto's 'locvars' array */ lu_byte ro; /* true if variable is 'const' */ } Vardesc; @@ -143,6 +144,7 @@ typedef struct FuncState { } FuncState; +LUAI_FUNC Vardesc *luaY_getvardesc (FuncState **fs, const expdesc *e); LUAI_FUNC LClosure *luaY_parser (lua_State *L, ZIO *z, Mbuffer *buff, Dyndata *dyd, const char *name, int firstchar); -- cgit v1.2.3-55-g6feb