Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Removed internal cache for closures | Roberto Ierusalimschy | 2018-11-01 | 1 | -3/+0 |
| | | | | | | | | | | | | | | | | | | | The mechanism of "caching the last closure created for a prototype to try to reuse it the next time a closure for that prototype is created" was removed. There are several reasons: - It is hard to find a natural example where this cache has a measurable impact on performance. - Programmers already perceive closure creation as something slow, so they tend to avoid it inside hot paths. (Any case where the cache could reuse a closure can be rewritten predefining the closure in some variable and using that variable.) - The implementation was somewhat complex, due to a bad interaction with the generational collector. (Typically, new closures are new, while prototypes are old. So, the cache breaks the invariant that old objects should not point to new ones.) | ||||
* | Towards "to closed" local variables | Roberto Ierusalimschy | 2018-10-08 | 1 | -1/+2 |
| | | | | | | | | | | | | 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. | ||||
* | Deprecated the emulation of '__le' using '__lt' | Roberto Ierusalimschy | 2018-08-24 | 1 | -3/+5 |
| | | | | | | | | | | | As hinted in the manual for Lua 5.3, the emulation of the metamethod for '__le' using '__le' has been deprecated. It is slow, complicates the logic, and it is easy to avoid this emulation by defining a proper '__le' function. Moreover, often this emulation was used wrongly, with a programmer assuming that an order is total when it is not (e.g., NaN in floating-point numbers). | ||||
* | Bug: wrong 'nCcalls' when resuming a coroutine | Roberto Ierusalimschy | 2018-07-11 | 1 | -2/+18 |
| | | | | | | | | 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. | ||||
* | no need to check whether libraries and host use the same kernel; | Roberto Ierusalimschy | 2018-06-18 | 1 | -2/+1 |
| | | | | Lua should work correctly with several copies of the kernel | ||||
* | new field 'nilvalue' in struct 'global_State' to avoid the use of | Roberto Ierusalimschy | 2018-06-15 | 1 | -1/+2 |
| | | | | addresses of static variables | ||||
* | 'fTransfer' -> 'ftransfer' / 'nTransfer' -> 'ntransfer' | Roberto Ierusalimschy | 2018-03-16 | 1 | -3/+3 |
| | | | | (keep the standard of names in lower case) | ||||
* | added check in 'obj2gco' to prevent its use in non Lua-object pointers | Roberto Ierusalimschy | 2018-02-25 | 1 | -3/+6 |
| | | | | (otherwise its cast is blind, casting any value given to it) | ||||
* | two new fields 'fTransfer'/'nTransfer' in 'lua_Debug' structure | Roberto Ierusalimschy | 2018-02-17 | 1 | -2/+7 |
| | | | | (for information about values being given and returned in function calls) | ||||
* | no more 'nfield' string | Roberto Ierusalimschy | 2018-02-15 | 1 | -2/+2 |
| | |||||
* | vararg back to '...' (but with another implementation) | Roberto Ierusalimschy | 2018-02-09 | 1 | -1/+2 |
| | | | | new implementation should have zero overhead for non-vararg functions | ||||
* | new macro 'isLuacode' (to distinguish regular Lua code from | Roberto Ierusalimschy | 2017-12-19 | 1 | -3/+7 |
| | | | | hooks, where C code can run inside a Lua function). | ||||
* | no more 'stackless' implementation; 'luaV_execute' calls itself | Roberto Ierusalimschy | 2017-11-23 | 1 | -9/+8 |
| | | | | | recursively to execute function calls. 'unroll' continues all executions suspended by an yield (through a long jump) | ||||
* | using 'trap' to stop 'luaV_execute' when necessary (tracing and | Roberto Ierusalimschy | 2017-11-13 | 1 | -1/+2 |
| | | | | to update its copy of 'base' when the stack is reallocated) | ||||
* | back to 'CallInfo' (no gains with its removal) | Roberto Ierusalimschy | 2017-11-07 | 1 | -10/+40 |
| | |||||
* | no more 'CallInfo' structure | Roberto Ierusalimschy | 2017-11-04 | 1 | -14/+1 |
| | |||||
* | no more useful fields in CallInfo | Roberto Ierusalimschy | 2017-11-03 | 1 | -15/+1 |
| | |||||
* | more fields moved out of 'CallInfo' | Roberto Ierusalimschy | 2017-11-03 | 1 | -13/+9 |
| | |||||
* | new API for 'lua_resume' + cleaning the uses of the 'extra' field in | Roberto Ierusalimschy | 2017-11-02 | 1 | -8/+5 |
| | | | | 'CallInfo' | ||||
* | baby steps to remove 'CallInfo': keeping 'L->func' correct | Roberto Ierusalimschy | 2017-10-31 | 1 | -1/+2 |
| | |||||
* | no more reference 'memerrmsg' + new reference to "n" | Roberto Ierusalimschy | 2017-07-27 | 1 | -2/+2 |
| | | | | | | (both can be retrieved by 'luaS_newliteral' without creating anything, because they are fixed, but "n" deserves fast access while 'memerrmsg' does not) | ||||
* | no more 'DEADKEY'. Table traversals do not need to consider dead keys; | Roberto Ierusalimschy | 2017-06-12 | 1 | -3/+2 |
| | | | | | | if the key is dead, it cannot be given to 'next'. Instead, we now use a 'table' tag without the collectable bit, which makes it a unique tag good enough to reserve space. | ||||
* | revamping the incremental collector | Roberto Ierusalimschy | 2017-05-26 | 1 | -5/+4 |
| | | | | | | Some simplifications (not counting bytes, couting only slots visited; no more 'gcfinnum'); more GC parameters; using vararg in 'lua_gc' to set parameters in different GC modes | ||||
* | no more field 'base' in CallInfo (base is always equal to 'func + 1', | Roberto Ierusalimschy | 2017-05-13 | 1 | -2/+1 |
| | | | | with old/new vararg implementation) | ||||
* | barrier for prototype's cache (with new gray list 'protogray' to keep | Roberto Ierusalimschy | 2017-05-04 | 1 | -2/+4 |
| | | | | prototypes to have their caches visited again) + constant 'MAXMISS' | ||||
* | 'KGC_NORMAL' -> 'KGC_INC' + emergency GC signalled by flag (instead | Roberto Ierusalimschy | 2017-04-24 | 1 | -3/+3 |
| | | | | of mode) | ||||
* | first version of control for the generational collector | Roberto Ierusalimschy | 2017-04-19 | 1 | -1/+3 |
| | |||||
* | Upvalues collected like everything else (with mark-sweep) instead | Roberto Ierusalimschy | 2017-04-11 | 1 | -1/+3 |
| | | | | of reference count (simpler and better for generational mode) | ||||
* | generational collector (still not complete) | Roberto Ierusalimschy | 2017-04-05 | 1 | -2/+6 |
| | |||||
* | generational collection: new attempt (still incomplete) | Roberto Ierusalimschy | 2017-02-23 | 1 | -2/+6 |
| | |||||
* | comments about gray lists | Roberto Ierusalimschy | 2017-02-15 | 1 | -1/+19 |
| | |||||
* | detail (removing spaces at end of lines) | Roberto Ierusalimschy | 2016-12-22 | 1 | -4/+4 |
| | |||||
* | new flag in 'CallInfo.callstatus' to tell whether function is running | Roberto Ierusalimschy | 2016-10-19 | 1 | -1/+2 |
| | | | | as a finalizer | ||||
* | allow more bits in 'callstatus' (use no extra space due to alignments) | Roberto Ierusalimschy | 2016-06-16 | 1 | -2/+2 |
| | |||||
* | make 'hook' volatile (as it may be changed in signal handling) | Roberto Ierusalimschy | 2015-12-16 | 1 | -2/+2 |
| | |||||
* | using 'sig_atomic_t' for 'hookmask' (as it can be changed inside | Roberto Ierusalimschy | 2015-12-14 | 1 | -2/+11 |
| | | | | a signal) | ||||
* | removed field 'n' from 'CallInfo' (not being used right now) | Roberto Ierusalimschy | 2015-11-13 | 1 | -2/+1 |
| | |||||
* | added counters for total and individual CallInfo entries (to allow | Roberto Ierusalimschy | 2015-11-02 | 1 | -1/+3 |
| | | | | better syncronization between CallInfo size and stack size) | ||||
* | flag CIST_REENTRY changed to CIST_FRESH (its negation); fresh invocations | Roberto Ierusalimschy | 2015-11-02 | 1 | -3/+3 |
| | | | | | seem to be less frequent than reentries. (So, avoid setting flag on the frequent case.) | ||||
* | code for string cache generalized for "associative sets" (compiler | Roberto Ierusalimschy | 2015-09-22 | 1 | -2/+2 |
| | | | | will optimize away or inline the extra loops) | ||||
* | long strings are created directly in final position when possible | Roberto Ierusalimschy | 2015-09-08 | 1 | -2/+1 |
| | | | | | (instead of using an auxiliar buffer to first create the string and then allocate the final string and copy result there) | ||||
* | because of debt, 'totalbytes' can be negative (and therefore its | Roberto Ierusalimschy | 2015-07-04 | 1 | -3/+3 |
| | | | | type must be signed) | ||||
* | 'strcache' elements as arrays of 1 element hints that cache can | Roberto Ierusalimschy | 2015-06-01 | 1 | -2/+2 |
| | | | | be n-way (instead of direct mapped) | ||||
* | Bug: suspended '__le' metamethod can give wrong result | Roberto Ierusalimschy | 2015-04-10 | 1 | -1/+2 |
| | |||||
* | new cache for interning strings | Roberto Ierusalimschy | 2015-03-04 | 1 | -1/+2 |
| | |||||
* | comments (a few extra quotes around identifiers) | Roberto Ierusalimschy | 2014-10-30 | 1 | -5/+5 |
| | |||||
* | `name' in comments changed to 'name' | Roberto Ierusalimschy | 2014-10-25 | 1 | -5/+5 |
| | |||||
* | 'lua_Kcontext' -> 'lua_KContext' | Roberto Ierusalimschy | 2014-10-07 | 1 | -2/+2 |
| | |||||
* | comments | Roberto Ierusalimschy | 2014-10-06 | 1 | -2/+8 |
| | |||||
* | 'lua_Ctx' -> 'lua_Kcontext' | Roberto Ierusalimschy | 2014-08-01 | 1 | -2/+2 |
| |