aboutsummaryrefslogtreecommitdiff
path: root/ldo.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Removed unused function 'luaD_inctop'Roberto I2026-06-031-1/+0
| | | | Commit 3228a97 removed all its uses.
* Bug: 'lua_load' does not preserve the stackRoberto I2026-04-231-0/+1
| | | | | | | 'lua_load' does not preserve the stack through the calls to the reader function, as it should. Immediately after the first call (to detect whether chunk is binary) it adds stuff, and it also adds a new table when starting the compilation of each new function.
* GC checks stack space before running finalizerv5.5.0Roberto I2025-12-131-0/+1
| | | | | | If the stack does not have some minimum available space, the GC defers calling a finalizer until the next cycle. That avoids errors while running a finalizer that the programmer cannot control.
* A coroutine can close itselfRoberto Ierusalimschy2025-06-121-0/+1
| | | | | A call to close itself will close all its to-be-closed variables and return to the resume that (re)started the coroutine.
* 'luaD_seterrorobj' should not raise errorsRoberto Ierusalimschy2025-03-121-0/+1
| | | | | | This function can be called unprotected, so it should not raise any kind of errors. (It could raise a memory-allocation error when creating a message).
* New type 'TStatus' for thread status/error codesRoberto Ierusalimschy2025-01-301-6/+8
|
* Cleaning of llimits.hRoberto Ierusalimschy2024-06-201-1/+20
| | | | | | Several definitions that don't need to be "global" (that is, that concerns only specific parts of the code) moved out of llimits.h, to more appropriate places.
* Merge branch 'master' into nextversionRoberto Ierusalimschy2023-06-221-1/+0
|\
| * Several functions turned 'static'Roberto Ierusalimschy2023-05-221-1/+0
| | | | | | | | | | Several functions that were already being used only inside their own file have been declared as 'static'.
* | Removed GC checks from function callsRoberto Ierusalimschy2022-11-241-12/+0
|/ | | | | Function calls do not create new objects. (It may use memory with stack reallocation, but now that is irrelevant to the GC.)
* Stack indices changed to union'sRoberto Ierusalimschy2022-10-291-3/+4
| | | | | That will allow to change pointers to offsets while reallocating the stack.
* More checks and documentation for uses of EXTRA_STACKRoberto Ierusalimschy2022-05-261-0/+7
|
* Details (identation and typos)Roberto Ierusalimschy2022-05-101-1/+2
|
* More uniform implementation for tail callsRoberto Ierusalimschy2021-10-291-1/+1
| | | | | | | | | | | 'luaD_pretailcall' mimics 'luaD_precall', handling call metamethods and calling C functions directly. That makes the code in the interpreter loop simpler. This commit also goes back to emulating the tail call in 'luaD_precall' with a goto, as C compilers may not do proper tail calls and the C stack can overflow much sooner than the Lua stack (which grows as the metamethod is added to it).
* 'luaD_tryfuncTM' checks stack space by itselfRoberto Ierusalimschy2021-08-181-1/+1
|
* Undo simplification of tail calls (commit 901d760)Roberto Ierusalimschy2021-08-181-13/+2
| | | | Not that simpler and slower.
* Simplification in the parameters of 'luaD_precall'Roberto Ierusalimschy2021-06-301-2/+13
| | | | | | The parameters 'nresults' and 'delta1', in 'luaD_precall', were never meaningful simultaneously. So, they were combined in a single parameter 'retdel'.
* Simpler implementation for tail callsRoberto Ierusalimschy2021-06-111-2/+2
| | | | | Tail calls handled by 'luaD_precall', like regular calls, to avoid code duplication.
* Broadening the use of branch hintsRoberto Ierusalimschy2021-02-241-1/+1
| | | | | | More uses of macros 'likely'/'unlikely' (renamed to 'l_likely'/'l_unlikely'), both in range (extended to the libraries) and in scope (extended to hooks, stack growth).
* Cleaner handling of errors in '__close' metamethodsRoberto Ierusalimschy2020-12-281-0/+1
| | | | | Instead of protecting each individual metamethod call, protect the entire call to 'luaF_close'.
* Correct handling of 'luaV_execute' invocationsRoberto Ierusalimschy2020-10-121-1/+1
| | | | | | | | | The previous stackless implementations marked all 'luaV_execute' invocations as fresh. However, re-entering 'luaV_execute' when resuming a coroutine should not be a fresh invocation. (It works because 'unroll' called 'luaV_execute' for each call entry, but it was slower than letting 'luaV_execute' finish all non-fresh invocations.)
* Back to a stackless implementationRoberto Ierusalimschy2020-10-121-0/+1
| | | | | | | | | | | | | A "with stack" implementation gains too little in performance to be worth all the noise from C-stack overflows. This commit is almost a sketch, to test performance. There are several pending stuff: - review control of C-stack overflow and error messages; - what to do with setcstacklimit; - review comments; - review unroll of Lua calls.
* Fixed bugs of stack reallocation x GCRoberto Ierusalimschy2020-07-071-2/+4
| | | | | | | | Macro 'checkstackGC' was doing a GC step after resizing the stack; the GC could shrink the stack and undo the resize. Moreover, macro 'checkstackp' also does a GC step, which could remove the preallocated CallInfo when calling a function. (Its name has been changed to 'checkstackGCp' to emphasize that it calls the GC.)
* First "complete" implementation of to-be-closed variablesRoberto Ierusalimschy2018-10-171-0/+1
| | | | | | | Still missing: - handling of memory errors when creating upvalue (must run closing method all the same) - interaction with coroutines
* Removed extra information from RCS keyword stringsRoberto Ierusalimschy2018-08-231-1/+1
| | | | | Version numbers and dates (mostly wrong) from RCS keyword strings removed from all source files; only the file name are kept.
* in 'luaD_poscall', there is no need to compute 'firstResult' when 'nres==0'Roberto Ierusalimschy2018-05-221-3/+2
|
* two new fields 'fTransfer'/'nTransfer' in 'lua_Debug' structureRoberto Ierusalimschy2018-02-171-2/+3
| | | | (for information about values being given and returned in function calls)
* some simplifications/optimizations in returns from Lua functionsRoberto Ierusalimschy2018-02-151-4/+1
|
* vararg back to '...' (but with another implementation)Roberto Ierusalimschy2018-02-091-1/+9
| | | | new implementation should have zero overhead for non-vararg functions
* call hooks for Lua functions called by 'luaV_execute'Roberto Ierusalimschy2018-02-061-1/+2
|
* 'luaD_tryfuncTM' can ensure it does not change the stackRoberto Ierusalimschy2018-01-101-2/+2
|
* 'luaD_growstack' cannot raise any errors when 'raiseerror' isRoberto Ierusalimschy2017-12-111-3/+3
| | | | false (+ some comments)
* more freedom in handling memory-allocation errors (not all allocationsRoberto Ierusalimschy2017-12-081-4/+5
| | | | | automatically raise an error), which allows fixing a bug when resizing a table.
* small simplifications in 'luaD_poscall'Roberto Ierusalimschy2017-11-231-2/+2
|
* no more 'stackless' implementation; 'luaV_execute' calls itselfRoberto Ierusalimschy2017-11-231-2/+1
| | | | | recursively to execute function calls. 'unroll' continues all executions suspended by an yield (through a long jump)
* more direct implementation for tail calls.Roberto Ierusalimschy2017-11-211-1/+3
|
* back to 'CallInfo' (no gains with its removal)Roberto Ierusalimschy2017-11-071-2/+3
|
* no more 'CallInfo' structureRoberto Ierusalimschy2017-11-041-3/+2
|
* new type 'StackValue' for stack elementsRoberto Ierusalimschy2017-06-291-2/+2
| | | | (we may want to put extra info there in the future)
* back to old-style vararg system (with vararg table collecting extraRoberto Ierusalimschy2017-05-131-1/+9
| | | | arguments)
* avoid empty macro arguments (invalid in C89)Roberto Ierusalimschy2015-12-211-2/+2
|
* details (comments)Roberto Ierusalimschy2015-11-231-2/+2
|
* details (typos in comments)Roberto Ierusalimschy2015-11-191-2/+2
|
* trying to optimize a little 'luaD_poscall'Roberto Ierusalimschy2015-11-131-2/+3
|
* in 'luaD_call', use two functions instead of one with fixed booleanRoberto Ierusalimschy2015-11-021-3/+3
| | | | argument
* macro 'incr_top' replaced by function 'luaD_inctop'. (It is not usedRoberto Ierusalimschy2015-11-021-2/+2
| | | | in critical time pathes, can save a few bytes without the macro)
* small changes to allow 'precall' to spend time preserving 'func'Roberto Ierusalimschy2015-10-211-3/+14
| | | | only when needed (that is, when stack actually changes)
* bug: interpreter cannot pop activation frame before calling returnRoberto Ierusalimschy2015-05-221-2/+2
| | | | | hook (as it may want to access local variables active by the end of the function)
* `name' in comments changed to 'name'Roberto Ierusalimschy2014-10-251-2/+2
|
* 'lua_load' has an extra argument 'mode'Roberto Ierusalimschy2011-11-291-2/+3
|