aboutsummaryrefslogtreecommitdiff
path: root/lstate.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* Open upvalues should be gray when entering gen. modeRoberto Ierusalimschy2020-08-071-6/+8
| | | | | Open upvalues are never black; so, when entering generational mode, they must be colored gray, not black.
* Optimization in 'markold'Roberto Ierusalimschy2020-07-291-1/+17
| | | | | | | | | | OLD1 objects can be potentially anywhere in the 'allgc' list (up to 'reallyold'), but frequently they are all after 'old1' (natural evolution of survivals) or do not exist at all (when all objects die young). So, instead of 'markold' starts looking for them always from the start of 'allgc', the collector keeps an extra pointer, 'firstold1', that points to the first OLD1 object in the 'allgc' list, or is NULL if there are no OLD1 objects in that list.
* DetailsRoberto Ierusalimschy2020-07-291-6/+13
| | | | | The fields 'old' and 'finobjold' were renamed 'old1' and 'finobjold1', respectively, to make clearer the main ages of their elements.
* Fixed bug: invalid 'oldpc' when returning to a functionRoberto Ierusalimschy2020-07-171-1/+1
| | | | | | | | | | The field 'L->oldpc' is not always updated when control returns to a function; an invalid value can seg. fault when computing 'changedline'. (One example is an error in a finalizer; control can return to 'luaV_execute' without executing 'luaD_poscall'.) Instead of trying to fix all possible corner cases, it seems safer to be resilient to invalid values for 'oldpc'. Valid but wrong values at most cause an extra call to a line hook.
* Improvements in the handling of signalsRoberto Ierusalimschy2020-05-221-2/+2
| | | | Added 'volatile' to 'l_signalT' variables plus some minor changes.
* Clearer distinction between types and tagsRoberto Ierusalimschy2020-01-311-7/+7
| | | | | LUA_T* represents only types; tags (types + Variants) are represented by LUA_V* constants.
* Supressed errors in '__close' generate warningsRoberto Ierusalimschy2019-08-161-0/+1
|
* Tag LUA_TUPVALTBC replaced by a flagRoberto Ierusalimschy2019-07-191-2/+1
| | | | | It is simpler to signal a to-be-closed upvalue with a boolean flag, instead of using a different tag.
* Details (typos in comments)Roberto Ierusalimschy2019-07-051-4/+4
|
* New function 'setCstacklimit'Roberto Ierusalimschy2019-06-181-0/+5
| | | | | Added new functions to dynamically set the C-stack limit ('lua_setCstacklimit' in the C-API, 'debug.setCstacklimit' in Lua).
* Revamp around 'L->nCcalls' countRoberto Ierusalimschy2019-06-121-17/+34
| | | | | The field 'L->nCcalls' now counts downwards, so that the C-stack limits do not depend on the stack size.
* DetailsRoberto Ierusalimschy2019-05-281-0/+16
| | | | | | | - new error message for "attempt to assign to const variable" - note in the manual about compatibility options - comments - small changes in 'read_line' and 'pushstr'
* Changes in the warning systemRoberto Ierusalimschy2019-03-141-1/+1
| | | | | | | | - The warning functions get an extra parameter that tells whether message is to be continued (instead of using end-of-lines as a signal). - The user data for the warning function is a regular value, instead of a writable slot inside the Lua state.
* After a "bad collections", avoid switching back back to generationalRoberto Ierusalimschy2019-01-301-0/+1
| | | | | | | After a major bad collection (one that collects too few objects), next collection will be major again. In that case, avoid switching back to generational mode (as it will have to switch again to incremental to do next major collection).
* No more LUA_ERRGCMM errorsRoberto Ierusalimschy2019-01-011-0/+1
| | | | | Errors in finalizers (__gc metamethods) are never propagated. Instead, they generate a warning.
* Added a warning system to LuaRoberto Ierusalimschy2018-12-281-0/+2
| | | | | The warning system is just a way for Lua to emit warnings, messages to the programmer that do not interfere with the running program.
* Changes in the control of C-stack overflowRoberto Ierusalimschy2018-12-271-10/+42
| | | | | | | | | | * unification of the 'nny' and 'nCcalls' counters; * external C functions ('lua_CFunction') count more "slots" in the C stack (to allow for their possible use of buffers) * added a new test script specific for C-stack overflows. (Most of those tests were already present, but concentrating them in a single script easies the task of checking whether 'LUAI_MAXCCALLS' is adequate in a system.)
* Removed internal cache for closuresRoberto Ierusalimschy2018-11-011-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 variablesRoberto Ierusalimschy2018-10-081-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 Ierusalimschy2018-08-241-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 coroutineRoberto Ierusalimschy2018-07-111-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 Ierusalimschy2018-06-181-2/+1
| | | | Lua should work correctly with several copies of the kernel
* new field 'nilvalue' in struct 'global_State' to avoid the use ofRoberto Ierusalimschy2018-06-151-1/+2
| | | | addresses of static variables
* 'fTransfer' -> 'ftransfer' / 'nTransfer' -> 'ntransfer'Roberto Ierusalimschy2018-03-161-3/+3
| | | | (keep the standard of names in lower case)
* added check in 'obj2gco' to prevent its use in non Lua-object pointersRoberto Ierusalimschy2018-02-251-3/+6
| | | | (otherwise its cast is blind, casting any value given to it)
* two new fields 'fTransfer'/'nTransfer' in 'lua_Debug' structureRoberto Ierusalimschy2018-02-171-2/+7
| | | | (for information about values being given and returned in function calls)
* no more 'nfield' stringRoberto Ierusalimschy2018-02-151-2/+2
|
* vararg back to '...' (but with another implementation)Roberto Ierusalimschy2018-02-091-1/+2
| | | | new implementation should have zero overhead for non-vararg functions
* new macro 'isLuacode' (to distinguish regular Lua code fromRoberto Ierusalimschy2017-12-191-3/+7
| | | | hooks, where C code can run inside a Lua function).
* no more 'stackless' implementation; 'luaV_execute' calls itselfRoberto Ierusalimschy2017-11-231-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 andRoberto Ierusalimschy2017-11-131-1/+2
| | | | to update its copy of 'base' when the stack is reallocated)
* back to 'CallInfo' (no gains with its removal)Roberto Ierusalimschy2017-11-071-10/+40
|
* no more 'CallInfo' structureRoberto Ierusalimschy2017-11-041-14/+1
|
* no more useful fields in CallInfoRoberto Ierusalimschy2017-11-031-15/+1
|
* more fields moved out of 'CallInfo'Roberto Ierusalimschy2017-11-031-13/+9
|
* new API for 'lua_resume' + cleaning the uses of the 'extra' field inRoberto Ierusalimschy2017-11-021-8/+5
| | | | 'CallInfo'
* baby steps to remove 'CallInfo': keeping 'L->func' correctRoberto Ierusalimschy2017-10-311-1/+2
|
* no more reference 'memerrmsg' + new reference to "n"Roberto Ierusalimschy2017-07-271-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 Ierusalimschy2017-06-121-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 collectorRoberto Ierusalimschy2017-05-261-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 Ierusalimschy2017-05-131-2/+1
| | | | with old/new vararg implementation)
* barrier for prototype's cache (with new gray list 'protogray' to keepRoberto Ierusalimschy2017-05-041-2/+4
| | | | prototypes to have their caches visited again) + constant 'MAXMISS'
* 'KGC_NORMAL' -> 'KGC_INC' + emergency GC signalled by flag (insteadRoberto Ierusalimschy2017-04-241-3/+3
| | | | of mode)
* first version of control for the generational collectorRoberto Ierusalimschy2017-04-191-1/+3
|
* Upvalues collected like everything else (with mark-sweep) insteadRoberto Ierusalimschy2017-04-111-1/+3
| | | | of reference count (simpler and better for generational mode)
* generational collector (still not complete)Roberto Ierusalimschy2017-04-051-2/+6
|
* generational collection: new attempt (still incomplete)Roberto Ierusalimschy2017-02-231-2/+6
|
* comments about gray listsRoberto Ierusalimschy2017-02-151-1/+19
|
* detail (removing spaces at end of lines)Roberto Ierusalimschy2016-12-221-4/+4
|
* new flag in 'CallInfo.callstatus' to tell whether function is runningRoberto Ierusalimschy2016-10-191-1/+2
| | | | as a finalizer