mirror of
https://github.com/lua/lua
synced 2026-09-26 16:17:11 +03:00
First implementation of constant propagation
Local constant variables initialized with compile-time constants are optimized away from the code.
This commit is contained in:
parent
be8445d7e4
commit
f6aab3ec1f
12 changed files with 249 additions and 119 deletions
1
lcode.h
1
lcode.h
|
|
@ -56,6 +56,7 @@ LUAI_FUNC int luaK_codeAsBx (FuncState *fs, OpCode o, int A, int Bx);
|
|||
LUAI_FUNC int luaK_codeABCk (FuncState *fs, OpCode o, int A,
|
||||
int B, int C, int k);
|
||||
LUAI_FUNC int luaK_isKint (expdesc *e);
|
||||
LUAI_FUNC int luaK_exp2const (FuncState *fs, const expdesc *e, TValue *v);
|
||||
LUAI_FUNC void luaK_fixline (FuncState *fs, int line);
|
||||
LUAI_FUNC void luaK_nil (FuncState *fs, int from, int n);
|
||||
LUAI_FUNC void luaK_reserveregs (FuncState *fs, int n);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue