aboutsummaryrefslogtreecommitdiff
path: root/ltests.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* 'lua_State.nci' must be an integerRoberto Ierusalimschy2025-02-261-2/+5
| | | | | | Lua can easily overflow an unsigned short counting nested calls. (The limit to this value is the maximum stack size, LUAI_MAXSTACK, which is currently 1e6.)
* Added macro LUAI_STRICT_ADDRESSRoberto Ierusalimschy2025-02-181-0/+4
| | | | | By default, the code assumes it is safe to use a dealocated pointer as long as the code does not access it.
* New function 'lua_printvalue' for internal debuggingRoberto Ierusalimschy2024-12-021-0/+7
|
* Better support in 'ltests' for tracing the GCRoberto Ierusalimschy2024-10-211-0/+4
|
* 'printstack' (from ltests.c) made publicRoberto Ierusalimschy2024-07-051-1/+5
| | | | That function is useful for debugging the API.
* Removed compatibility option LUA_COMPAT_GCPARAMSRoberto Ierusalimschy2023-12-221-2/+0
| | | | | | The meaning of different GC parameters changed, so there is point in supporting old values for them. The new code simply ignores the parameters when changing the GC mode, so the incompatibility is small.
* New option "setparms" for 'collectgarbage'Roberto Ierusalimschy2023-12-221-0/+2
| | | | | | The generational mode also uses the parameters for the incremental mode in its major collections, so it should be easy to change those parameters without having to change the GC mode.
* New function 'luaL_makeseed'Roberto Ierusalimschy2023-03-201-1/+2
| | | | | | This function unifies code from 'lua_newstate', 'math.randomseed', and 'table.sort' that tries to create a value with a minimum level of randomness.
* New function 'luaL_openselectedlibs'Roberto Ierusalimschy2022-12-071-2/+2
| | | | Makes it easier to start Lua with only some standard libraries.
* Bug: Wrong code generation in bitwise operationsRoberto Ierusalimschy2022-04-251-0/+7
|
* Details (do not affect regular code)Roberto Ierusalimschy2020-12-071-0/+5
| | | | | | | * Avoids multiple definitions of 'lua_assert' in test file. * Smaller C-stack limit in test mode. * Note in the manual about the use of false * Extra test for constant reuse.
* Back to a stackless implementationRoberto Ierusalimschy2020-10-121-5/+0
| | | | | | | | | | | | | 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.
* Clearer handling of gray lists when entering generational modeRoberto Ierusalimschy2020-08-031-0/+1
| | | | | | | | When entering generational mode, all objects are old. So, the only objects that need to be in a gray list are threads, which can be assigned without barriers. Changes in anything else (e.g., weak tables) will trigger barriers that, if needed, will add the object to a gray list.
* Function 'printobj' in 'ltests.c' made publicRoberto Ierusalimschy2020-07-271-1/+7
| | | | It helps to have this function available for debugging.
* Macro LUAI_ASSERT eases turning assertions onRoberto Ierusalimschy2020-07-081-3/+1
|
* DetailsRoberto Ierusalimschy2020-04-301-5/+9
| | | | | When in test mode (#include "tests.h"), force Lua to use its own implementation of 'lua_strx2number' and 'lua_number2strx' to test them.
* DetailsRoberto Ierusalimschy2020-02-271-3/+0
| | | | | Several details in code (e.g., moving a variable to the most inner scope that encloses its uses), comments, parameter names, extra tests.
* Clearer distinction between types and tagsRoberto Ierusalimschy2020-01-311-1/+1
| | | | | LUA_T* represents only types; tags (types + Variants) are represented by LUA_V* constants.
* Small changes around C-stack limitRoberto Ierusalimschy2019-06-261-1/+1
| | | | | | | | | - 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-1/+1
| | | | | Added new functions to dynamically set the C-stack limit ('lua_setCstacklimit' in the C-API, 'debug.setCstacklimit' in Lua).
* LUAI_MAXCCALLS renamed LUAI_MAXCSTACKRoberto Ierusalimschy2019-03-251-2/+2
| | | | | | | The limit LUAI_MAXCCALLS was renamed LUAI_MAXCSTACK, which better represents its meaning. Moreover, its definition was moved to 'luaconf.h', given its importance now that Lua does not use a "stackless" implementation.
* Changes in the control of C-stack overflowRoberto Ierusalimschy2018-12-271-1/+1
| | | | | | | | | | * 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.)
* Added opcodes for arithmetic with K operandsRoberto Ierusalimschy2018-11-231-1/+0
| | | | | | | | Added opcodes for all seven arithmetic operators with K operands (that is, operands that are numbers in the array of constants of the function). They cover the cases of constant float operands (e.g., 'x + .0.0', 'x^0.5') and large integer operands (e.g., 'x % 10000').
* Deprecated the emulation of '__le' using '__lt'Roberto Ierusalimschy2018-08-241-0/+1
| | | | | | | | | | | 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).
* 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.
* reorganization of '#if's for sellecting a type for 'Rand64' +Roberto Ierusalimschy2018-05-041-1/+5
| | | | comments
* no need to define 'luaP_opnames' in regular buildsRoberto Ierusalimschy2018-04-191-1/+5
|
* use test mode to test the interpreter without jump tablesRoberto Ierusalimschy2018-04-111-1/+5
|
* removed compatibility code with older versionsRoberto Ierusalimschy2018-02-271-11/+1
|
* default now is compiling without compatibility options + smallerRoberto Ierusalimschy2017-12-181-14/+14
| | | | | stack size in debug mode (clang uses still more stack space when debugging).
* new test function 'T.allocount' to restrict number of allocationsRoberto Ierusalimschy2017-12-071-1/+2
| | | | before a memory-allocation error
* no more 'stackless' implementation; 'luaV_execute' calls itselfRoberto Ierusalimschy2017-11-231-1/+5
| | | | | recursively to execute function calls. 'unroll' continues all executions suspended by an yield (through a long jump)
* includes 'stdio.h' to allow prints when testingRoberto Ierusalimschy2017-11-131-1/+2
|
* 'lineinfo' in prototypes saved as differences instead of absoluteRoberto Ierusalimschy2017-06-271-1/+2
| | | | | | values, so that the array can use bytes instead of ints, reducing its size. (A new array 'abslineinfo' is used when line differences do not fit in a byte.)
* redefine MAXINDEXRK (for debugging, to force most values toRoberto Ierusalimschy2016-07-191-2/+5
| | | | go through registers)
* code for string cache generalized for "associative sets" (compilerRoberto Ierusalimschy2015-09-221-1/+5
| | | | will optimize away or inline the extra loops)
* redefine 'l_sprintf' to test correctness of buffer sizes givenRoberto Ierusalimschy2015-06-181-1/+10
| | | | to 'snprintf'
* removed macro 'luai_numinvalidop' (main motivation removed, as foldingRoberto Ierusalimschy2014-12-261-6/+1
| | | | does not handle any division by zero by default)
* detail (in test for 'luai_numinvalidop', use a round float)Roberto Ierusalimschy2014-12-191-2/+2
|
* redefinition of LUAI_MAXSTACK to make stack-overflow tests run fasterRoberto Ierusalimschy2014-12-091-1/+6
|
* no more 'preloadedlibs' when opening libraries (as it is dead code now)Roberto Ierusalimschy2014-12-091-4/+1
|
* in test mode, debug library is not predefined (to allow testingRoberto Ierusalimschy2014-12-061-1/+4
| | | | 'preloadedlibs')
* some functions from test module must be exportedRoberto Ierusalimschy2014-11-291-4/+5
|
* new test for macro 'luai_numinvalidop'Roberto Ierusalimschy2014-11-241-1/+5
|
* deprecated "cast macros" ('luaL_checkint', 'luaL_optint', etc.)Roberto Ierusalimschy2014-10-011-2/+2
|
* 'ipairs' respects metamethodsRoberto Ierusalimschy2014-07-241-1/+2
|
* better support for extra user space associated with a Lua stateRoberto Ierusalimschy2014-07-241-5/+6
|
* detail (extra byte in LUAI_EXTRASPACE to test proper alignment ofRoberto Ierusalimschy2014-07-231-2/+3
| | | | a lua_State)
* comments + proper undef of compatibility macros + no need to undefRoberto Ierusalimschy2014-07-231-12/+22
| | | | internal macros (this is the first definition)
* ensure size for LUAI_USER_ALIGNMENT_T in tests is larger than theRoberto Ierusalimschy2014-07-181-2/+2
| | | | structures it is aligning (in most architectures)