aboutsummaryrefslogtreecommitdiff
path: root/llimits.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* New type 'TStatus' for thread status/error codesRoberto Ierusalimschy2025-01-301-0/+6
|
* DetailsRoberto Ierusalimschy2025-01-161-1/+1
| | | | New year (2024->2025), typos in comments
* New macro 'assert_code'Roberto Ierusalimschy2024-11-151-5/+6
| | | | | It allows code that is only used by assertions but that are not assertions (e.g., declaration of a variable used in a later assertion).
* GC back to controling pace counting bytesRoberto Ierusalimschy2024-09-191-10/+9
| | | | Memory is the resource we want to save. Still to be reviewed again.
* '-Wconversion' extended to all options of Lua numbersRoberto Ierusalimschy2024-07-271-1/+3
|
* Added gcc option '-Wconversion'Roberto Ierusalimschy2024-07-271-0/+11
| | | | | No warnings for standard numerical types. Still pending alternative numerical types.
* Small changes in casts from void* to functionsRoberto Ierusalimschy2024-07-021-0/+20
| | | | | | Macro moved to llimits.h, and casts from void* to lua_CFunction first go through 'voidf' (a pointer to a function from void to void), a kind of void* for functions.
* lua_writestring & co. moved to llimits.hRoberto Ierusalimschy2024-06-211-0/+25
| | | | They don't need to be visible by clients of Lua.
* Cleaning of llimits.hRoberto Ierusalimschy2024-06-201-140/+4
| | | | | | 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.
* Some 'unsigned int' changed to 'unsigned'Roberto Ierusalimschy2024-03-221-1/+1
| | | | | 'unsigned int' is too long sometimes. (We already write 'long' instead of 'long int'...)
* Option 0 for step multiplier makes GC non-incrementalRoberto Ierusalimschy2023-12-201-2/+6
|
* Merge branch 'master' into nextversionRoberto Ierusalimschy2023-06-221-1/+1
|\
| * Detailsv5.4.5Roberto Ierusalimschy2023-04-181-1/+1
| | | | | | | | Typos in comments and details in the manual.
* | Merge branch 'master' into nextversionRoberto Ierusalimschy2023-02-021-4/+17
|\|
| * Small changes in hash of pointersRoberto Ierusalimschy2023-02-021-4/+17
| | | | | | | | | | When converting from pointer to integer, use 'uintptr_t' if available; otherwise try 'uintmax_t', and use 'size_t' as last resource.
* | Changed signal of GC debtRoberto Ierusalimschy2022-12-131-5/+2
| | | | | | | | Positive debts seems more natural then negative ones.
* | Revamp of GC parametersRoberto Ierusalimschy2022-12-131-1/+1
| | | | | | | | | | More uniformity when handling GC parameters + avoid divisions by 100 when applying them.
* | 'l_mem' renamed to 'l_obj' to count objectsRoberto Ierusalimschy2022-11-231-6/+8
| |
* | First version of GC counting objects for controlRoberto Ierusalimschy2022-11-231-1/+1
|/ | | | Still needs to review generational mode.
* DetailsRoberto Ierusalimschy2021-12-211-1/+1
| | | | correction in macro for hard tests + type in comment
* Using 'inline' in some functionsRoberto Ierusalimschy2021-09-151-0/+14
| | | | | According to ISO C, "making a function an inline function suggests that calls to the function be as fast as possible." (Not available in C89.)
* Broadening the use of branch hintsRoberto Ierusalimschy2021-02-241-16/+0
| | | | | | 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).
* Optimization for 'n^2'v5.4.2Roberto Ierusalimschy2020-11-131-1/+2
| | | | | Squares are much more common than other exponentiations, and 'n*n' is much more efficient than 'pow'.
* Fixed compiler option -DHARDSTACKTESTS to commit 5aa36e8Roberto Ierusalimschy2020-10-191-1/+1
|
* Revision of stackless implementationRoberto Ierusalimschy2020-10-121-0/+11
| | | | | | - more organized handling of 'nCcalls' - comments - deprecation of 'setcstacklimit'
* Macro LUAI_ASSERT eases turning assertions onRoberto Ierusalimschy2020-07-081-1/+9
|
* Small correction in assertionRoberto Ierusalimschy2019-12-131-1/+1
|
* A few changes in tests about number of bits in integersRoberto Ierusalimschy2019-05-131-4/+0
| | | | | | - The preprocessor must work with at least 'long', and therefore must do shifts of up to 31 bits correctly. - Whenever possible, use unsigned types in shifts.
* Some improvements in 'luaconf.h'Roberto Ierusalimschy2019-05-131-4/+7
| | | | | Added '#if !defined' in some definitions to allow external definitions; more comments; other small changes.
* Avoid the creation of too many strings in 'package'Roberto Ierusalimschy2019-05-031-1/+1
| | | | | | | | | Both when setting a path and searching for a file ('searchpath'), this commit reduces the number of intermediate strings created in Lua. (For setting a path the change is not relevant, because this is done only twice when loading the module. Anyway, it is a nice example of how to use auxlib buffers to manipulate strings in the C API.)
* Added field 'srclen' to structure 'lua_Debug'Roberto Ierusalimschy2019-04-041-0/+4
| | | | | | This new field gets the length of 'source' in the same structure. Unlike the other strings in that structure, 'source' can be relatively large, and Lua already has its length readily available.
* LUAI_MAXCCALLS renamed LUAI_MAXCSTACKRoberto Ierusalimschy2019-03-251-9/+0
| | | | | | | 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.
* Keep correct type for immediate operands in comparisonsRoberto Ierusalimschy2019-03-221-0/+2
| | | | | | | | | | | | When calling metamethods for things like 'a < 3.0', which generates the opcode OP_LTI, the C register tells that the operand was converted to an integer, so that it can be corrected to float when calling a metamethod. This commit also includes some other stuff: - file 'onelua.c' added to the project - opcode OP_PREPVARARG renamed to OP_VARARGPREP - comparison opcodes rewritten through macros
* Changes in the control of C-stack overflowRoberto Ierusalimschy2018-12-271-2/+4
| | | | | | | | | | * 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.)
* Details (comments)Roberto Ierusalimschy2018-09-111-1/+4
|
* Corrections in the implementation of '%' for floats.Roberto Ierusalimschy2018-08-281-6/+8
| | | | | | | | | The multiplication (m*b) used to test whether 'm' is non-zero and 'm' and 'b' have different signs can underflow for very small numbers, giving a wrong result. The use of explicit comparisons solves this problem. This commit also adds several new tests for '%' (both for floats and for integers) to exercise more corner cases, such as very large and very small values.
* 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.
* new macro 'ispow2'Roberto Ierusalimschy2018-06-151-1/+7
|
* new macros 'likely'/'unlikely' with hints for jump predictionsRoberto Ierusalimschy2018-05-301-1/+20
| | | | (used only in errors for now)
* janitor work on castsRoberto Ierusalimschy2018-01-281-2/+7
|
* commentRoberto Ierusalimschy2017-12-281-3/+2
|
* more freedom in handling memory-allocation errors (not all allocationsRoberto Ierusalimschy2017-12-111-2/+2
| | | | | automatically raise an error), which allows fixing a bug when resizing a table.
* another value for LUAI_MAXCCALLS (must think more about that)Roberto Ierusalimschy2017-12-011-2/+2
|
* no more 'stackless' implementation; 'luaV_execute' calls itselfRoberto Ierusalimschy2017-11-231-3/+4
| | | | | recursively to execute function calls. 'unroll' continues all executions suspended by an yield (through a long jump)
* new type 'ls_byte' for signed bytesRoberto Ierusalimschy2017-06-271-1/+2
|
* avoid overflows in computation of step sizeRoberto Ierusalimschy2017-06-011-1/+8
|
* type 'L_Umaxalign' replaced by macro 'LUAI_MAXALIGN', which is also addedRoberto Ierusalimschy2017-04-241-16/+1
| | | | to the auxlib buffer
* details (typos in comments)Roberto Ierusalimschy2015-11-191-2/+2
|
* small changes to allow 'precall' to spend time preserving 'func'Roberto Ierusalimschy2015-10-211-6/+7
| | | | only when needed (that is, when stack actually changes)
* detail (string cache a bit smaller by default)Roberto Ierusalimschy2015-10-061-2/+2
|