Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Complete implementation of to-be-closed variables | Roberto Ierusalimschy | 2018-10-22 | 1 | -3/+6 |
| | |||||
* | First "complete" implementation of to-be-closed variables | Roberto Ierusalimschy | 2018-10-17 | 1 | -7/+13 |
| | | | | | | | Still missing: - handling of memory errors when creating upvalue (must run closing method all the same) - interaction with coroutines | ||||
* | Towards "to closed" local variables | Roberto Ierusalimschy | 2018-10-08 | 1 | -2/+1 |
| | | | | | | | | | | | | Start of the implementation of "scoped variables" or "to be closed" variables, local variables whose '__close' (or themselves) are called when they go out of scope. This commit implements the syntax, the opcode, and the creation of the corresponding upvalue, but it still does not call the finalizations when the variable goes out of scope (the most important part). Currently, the syntax is 'local scoped name = exp', but that will probably change. | ||||
* | Added "cost" for the use of C stack by a coroutine invocation. | Roberto Ierusalimschy | 2018-09-11 | 1 | -2/+8 |
| | | | | | | | | | Resuming a coroutine uses more C stack than other operations (such as function calls or recursive syntax). So, to avoid stack overflow in recursive coroutine invocations, either LUAI_MAXCCALLS must be too small or a coroutine invocation must "pay" a higher price. New constant LUAL_COROCSTK ("COROutine C STaK") defines how much is this price. | ||||
* | Bug: wrong 'nCcalls' when resuming a coroutine | Roberto Ierusalimschy | 2018-07-11 | 1 | -3/+6 |
| | | | | | | | | The counter 'nCcalls' now includes the number of CallInfo structures pre-allocated (so that these "potential" C calls can be made without checking 'nCcalls'). So, when copying this value from a thread to another, in 'lua_resume', it must be corrected to the number of CallInfo structures in the thread being resumed. | ||||
* | new macros 'likely'/'unlikely' with hints for jump predictions | Roberto Ierusalimschy | 2018-05-30 | 1 | -9/+9 |
| | | | | (used only in errors for now) | ||||
* | in 'luaD_poscall', there is no need to compute 'firstResult' when 'nres==0' | Roberto Ierusalimschy | 2018-05-22 | 1 | -39/+30 |
| | |||||
* | 'fTransfer' -> 'ftransfer' / 'nTransfer' -> 'ntransfer' | Roberto Ierusalimschy | 2018-03-16 | 1 | -8/+8 |
| | | | | (keep the standard of names in lower case) | ||||
* | details (avoid using non-C89 '//' comment) | Roberto Ierusalimschy | 2018-03-07 | 1 | -2/+1 |
| | |||||
* | typo in comment | Roberto Ierusalimschy | 2018-03-05 | 1 | -2/+2 |
| | |||||
* | better names for macros for tags and types. | Roberto Ierusalimschy | 2018-02-26 | 1 | -2/+2 |
| | | | | | rttype -> rawtt; ttyperaw -> withvariant; ttype -> ttypetag; tnov -> ttype | ||||
* | two new fields 'fTransfer'/'nTransfer' in 'lua_Debug' structure | Roberto Ierusalimschy | 2018-02-17 | 1 | -9/+22 |
| | | | | (for information about values being given and returned in function calls) | ||||
* | in return hook, 'top' must be corrected only if smaller than 'ci->top'. | Roberto Ierusalimschy | 2018-02-17 | 1 | -2/+3 |
| | | | | | (It may be larger when returning multiple values, and then it must be larger to preserve that stack slice.) | ||||
* | some simplifications/optimizations in returns from Lua functions | Roberto Ierusalimschy | 2018-02-15 | 1 | -8/+16 |
| | |||||
* | vararg back to '...' (but with another implementation) | Roberto Ierusalimschy | 2018-02-09 | 1 | -20/+17 |
| | | | | new implementation should have zero overhead for non-vararg functions | ||||
* | details | Roberto Ierusalimschy | 2018-02-07 | 1 | -13/+16 |
| | |||||
* | new opcode 'PREPVARARG' | Roberto Ierusalimschy | 2018-02-07 | 1 | -14/+5 |
| | | | | (avoids test for vararg function in all function calls) | ||||
* | call hooks for Lua functions called by 'luaV_execute' | Roberto Ierusalimschy | 2018-02-06 | 1 | -16/+14 |
| | |||||
* | warnings in VS (implicit casts from ptrdiff_t to int) | Roberto Ierusalimschy | 2018-01-29 | 1 | -2/+2 |
| | |||||
* | bug in tailcall of vararg functions | Roberto Ierusalimschy | 2018-01-28 | 1 | -13/+16 |
| | | | | (when adjusting missing parameters) | ||||
* | calling a vararg function needs to check GC | Roberto Ierusalimschy | 2018-01-28 | 1 | -7/+7 |
| | | | | (because it creates a new table) | ||||
* | 'luaD_tryfuncTM' can ensure it does not change the stack | Roberto Ierusalimschy | 2018-01-10 | 1 | -7/+4 |
| | |||||
* | by-one error when filling missing arguments in a tail call | Roberto Ierusalimschy | 2017-12-29 | 1 | -3/+3 |
| | |||||
* | when calling a hook, cannot decrease 'ci->top' (to preserve stack | Roberto Ierusalimschy | 2017-12-28 | 1 | -6/+6 |
| | | | | size if the stack is reallocated) | ||||
* | when running Lua code, there is no need to keep 'L->top' "correct"; | Roberto Ierusalimschy | 2017-12-20 | 1 | -3/+6 |
| | | | | set it only when needed. | ||||
* | new macro 'isLuacode' (to distinguish regular Lua code from | Roberto Ierusalimschy | 2017-12-19 | 1 | -3/+4 |
| | | | | hooks, where C code can run inside a Lua function). | ||||
* | 'Proto->numparams' does not include vararg parameter | Roberto Ierusalimschy | 2017-12-15 | 1 | -3/+3 |
| | | | | (one less subtraction when calling functions...) | ||||
* | when shrinking stack, always shrinks the CI list. | Roberto Ierusalimschy | 2017-12-12 | 1 | -5/+2 |
| | | | | (Stack overflow is not corelated to CI overflow anymore.) | ||||
* | 'luaD_growstack' cannot raise any errors when 'raiseerror' is | Roberto Ierusalimschy | 2017-12-11 | 1 | -14/+27 |
| | | | | false (+ some comments) | ||||
* | more freedom in handling memory-allocation errors (not all allocations | Roberto Ierusalimschy | 2017-12-08 | 1 | -19/+23 |
| | | | | | automatically raise an error), which allows fixing a bug when resizing a table. | ||||
* | detail | Roberto Ierusalimschy | 2017-12-01 | 1 | -3/+3 |
| | |||||
* | 'luaV_execute' gets call info as extra argument (it is always | Roberto Ierusalimschy | 2017-11-29 | 1 | -6/+7 |
| | | | | available on call sites) | ||||
* | small simplifications in 'luaD_poscall' | Roberto Ierusalimschy | 2017-11-23 | 1 | -18/+18 |
| | |||||
* | no more 'stackless' implementation; 'luaV_execute' calls itself | Roberto Ierusalimschy | 2017-11-23 | 1 | -48/+18 |
| | | | | | recursively to execute function calls. 'unroll' continues all executions suspended by an yield (through a long jump) | ||||
* | more direct implementation for tail calls. | Roberto Ierusalimschy | 2017-11-21 | 1 | -10/+37 |
| | |||||
* | using 'trap' to stop 'luaV_execute' when necessary (tracing and | Roberto Ierusalimschy | 2017-11-13 | 1 | -3/+12 |
| | | | | to update its copy of 'base' when the stack is reallocated) | ||||
* | avoid accessing wrong union field | Roberto Ierusalimschy | 2017-11-13 | 1 | -2/+3 |
| | |||||
* | back to 'CallInfo' (no gains with its removal) | Roberto Ierusalimschy | 2017-11-07 | 1 | -95/+95 |
| | |||||
* | no more 'CallInfo' structure | Roberto Ierusalimschy | 2017-11-04 | 1 | -42/+22 |
| | |||||
* | 'lua_Debug' not using 'CallInfo' | Roberto Ierusalimschy | 2017-11-03 | 1 | -3/+3 |
| | |||||
* | no more useful fields in CallInfo | Roberto Ierusalimschy | 2017-11-03 | 1 | -24/+30 |
| | |||||
* | more fields moved out of 'CallInfo' | Roberto Ierusalimschy | 2017-11-03 | 1 | -37/+43 |
| | |||||
* | new API for 'lua_resume' + cleaning the uses of the 'extra' field in | Roberto Ierusalimschy | 2017-11-02 | 1 | -6/+8 |
| | | | | 'CallInfo' | ||||
* | using 'L->func' when possible | Roberto Ierusalimschy | 2017-11-01 | 1 | -5/+5 |
| | |||||
* | baby steps to remove 'CallInfo': keeping 'L->func' correct | Roberto Ierusalimschy | 2017-10-31 | 1 | -3/+11 |
| | |||||
* | no more reference 'memerrmsg' + new reference to "n" | Roberto Ierusalimschy | 2017-07-27 | 1 | -2/+3 |
| | | | | | | (both can be retrieved by 'luaS_newliteral' without creating anything, because they are fixed, but "n" deserves fast access while 'memerrmsg' does not) | ||||
* | new type 'StackValue' for stack elements | Roberto Ierusalimschy | 2017-06-29 | 1 | -18/+20 |
| | | | | (we may want to put extra info there in the future) | ||||
* | details (using proper version of 'setobj') | Roberto Ierusalimschy | 2017-05-23 | 1 | -2/+2 |
| | |||||
* | no more field 'base' in CallInfo (base is always equal to 'func + 1', | Roberto Ierusalimschy | 2017-05-13 | 1 | -4/+1 |
| | | | | with old/new vararg implementation) | ||||
* | back to old-style vararg system (with vararg table collecting extra | Roberto Ierusalimschy | 2017-05-13 | 1 | -35/+6 |
| | | | | arguments) |