aboutsummaryrefslogtreecommitdiff
path: root/testes/cstack.lua (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Avoid shrinking stacks to oftenRoberto Ierusalimschy2020-10-121-1/+49
| | | | | | Shrink a stack only when the final stack size can be at most 2/3 the previous size with half of its entries empty. This commit also improves the clarity of 'luaD_growstack'.
* Revision of stackless implementationRoberto Ierusalimschy2020-10-121-107/+30
| | | | | | - more organized handling of 'nCcalls' - comments - deprecation of 'setcstacklimit'
* Back to a stackless implementationRoberto Ierusalimschy2020-10-121-0/+2
| | | | | | | | | | | | | 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 bug: wrong stack limit when entering a coroutineRoberto Ierusalimschy2020-07-131-0/+16
| | | | | | When entering a coroutine, the computation of nCcalls added 'from->nci' to correct for preallocated CallInfos, but 'nci' includes also the Callinfos already used.
* C-Stack test does not assume minimum of 400 slotsRoberto Ierusalimschy2020-05-041-17/+26
|
* Comments (mosty typos)Roberto Ierusalimschy2019-12-301-5/+12
|
* 'setCstacklimit' renamed to 'setcstacklimit'Roberto Ierusalimschy2019-09-241-12/+12
| | | | Function names in the API use only lowercase letters.
* Small changes around C-stack limitRoberto Ierusalimschy2019-06-261-7/+21
| | | | | | | | | - 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'.
* New function 'setCstacklimit'Roberto Ierusalimschy2019-06-181-0/+48
| | | | | Added new functions to dynamically set the C-stack limit ('lua_setCstacklimit' in the C-API, 'debug.setCstacklimit' in Lua).
* Improvements in 'testes/cstack.lua'Roberto Ierusalimschy2019-06-031-12/+32
| | | | | | - tests show progress in real time, so that we can see maximum stack levels even if test crashes. - new test for recursion continuing into message handler.
* Changes in the control of C-stack overflowRoberto Ierusalimschy2018-12-271-0/+62
* 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.)