-
Notifications
You must be signed in to change notification settings - Fork 5
Inlining
Dibyendu Majumdar edited this page Jul 7, 2020
·
5 revisions
Some random thoughts about inlining.
Function that has no upvalues ... ? That doesn't take varargs. Total number of locals must be inside a range
We need to be able to establish that the function cannot be replaced. So it must not be a global. It needs to be a local function in the same chunk. It also cannot have escaped (i.e. referenced as up-value).
TODO so what do we know at a call-site?
Maybe at AST level. Duplicate the body of the function to the call-site. Assign args. Assign return values.