aboutsummaryrefslogtreecommitdiff
path: root/manual (unfollow)
Commit message (Collapse)AuthorFilesLines
2019-07-12Reordering of instructions in the main loopRoberto Ierusalimschy1-44/+44
The instructions in the main interpreter loop were reordered to the same order of their enumeration in 'lopcodes.h'.
2019-07-12OP_NEWTABLE keeps exact size of arraysRoberto Ierusalimschy10-88/+67
OP_NEWTABLE is followed by an OP_EXTRAARG, so that it can keep the exact size of the array part of the table to be created. (Functions 'luaO_int2fb'/'luaO_fb2int' were removed.)
2019-07-12First implementation of constant propagationRoberto Ierusalimschy12-119/+249
Local constant variables initialized with compile-time constants are optimized away from the code.
2019-07-10DetailsRoberto Ierusalimschy3-13/+13
In the generic for loop, it is simpler for OP_TFORLOOP to use the same 'ra' as OP_TFORCALL. Moreover, the internal names of the loop temporaries "(for ...)" don't need to leak internal details (even because the numerical for loop doesn't have a fixed role for each of its temporaries).
2019-07-10Towards constant propagationRoberto Ierusalimschy3-42/+87
This commit detaches the number of active variables from the number of variables in the stack, during compilation. Soon, compile-time constants will be propagated and therefore will not exist during run time (in the stack).
2019-07-09New implementation for constantsRoberto Ierusalimschy8-131/+125
VLOCAL expressions keep a reference to their corresponding 'Vardesc', and 'Upvaldesc' (for upvalues) has a field 'ro' (read-only). So, it is easier to check whether a variable is read-only. The decoupling in VLOCAL between 'vidx' ('Vardesc' index) and 'sidx' (stack index) should also help the forthcoming implementation of compile-time constant propagation.
2019-07-05Details (typos in comments)Roberto Ierusalimschy9-19/+19
2019-07-03Local attributes can be used in list of local variablesRoberto Ierusalimschy3-81/+103
The syntax for local attributes ('const'/'toclose') was unified with the regular syntax for local variables, so that we can have variables with attributes in local definitions with multiple names; for instance: local <toclose> f, <const> err = io.open(fname) This new syntax does not implement constant propagation, yet. This commit also has some small improvements to the manual.
2019-07-01First take on constant propagationRoberto Ierusalimschy4-26/+73
2019-07-01Methods separated from metamethods in 'io'Roberto Ierusalimschy1-10/+20
In the 'io' library, changed the use of the metatable also as its own "method table", so that metamethods cannot be accessed as if they were methods. (For instance, 'io.stdin.__gc' does not result in the finalizer metamethod anymore.)
2019-06-26Small changes around C-stack limitRoberto Ierusalimschy4-10/+24
- Better documentation in 'testes/cstack.lua' about using 'debug.setCstacklimit' to find a good limit. - Constant LUAI_MAXCSTACK gets added CSTACKERR (extra stack for error handling), so that it is compatible with the argument to 'debug.setCstacklimit'.
2019-06-25'__call' metamethod can be any callable objectRoberto Ierusalimschy2-14/+31
Removed the restriction that a '__call' metamethod must be an actual function.
2019-06-25A few more tests for table access in the APIRoberto Ierusalimschy2-1/+63
Added tests where the table being accessed is also the index or value in the operation.