aboutsummaryrefslogtreecommitdiff
path: root/llimits.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* code for string cache generalized for "associative sets" (compilerRoberto Ierusalimschy2015-09-221-4/+7
| | | | will optimize away or inline the extra loops)
* 'lua_longassert' defined as an expression (instead of a command)Roberto Ierusalimschy2015-09-081-2/+2
|
* 'lua_Number' added to 'L_Umaxalign' unionRoberto Ierusalimschy2015-07-151-2/+8
|
* commentRoberto Ierusalimschy2015-06-091-6/+6
|
* macro 'luai_apicheck'/'api_check' back with a 'lua_State' parameterRoberto Ierusalimschy2015-03-061-8/+4
| | | | (some people use it)
* new cache for interning stringsRoberto Ierusalimschy2015-03-041-1/+9
|
* 'point2int' -> 'point2uint' (to reflect its actual result type)Roberto Ierusalimschy2015-03-031-3/+3
|
* detail (use 'l_floor' instead of 'l_mathop(floor)')Roberto Ierusalimschy2015-02-091-2/+2
|
* macros 'luai_num*' (for float arithmetic operations) moved toRoberto Ierusalimschy2015-02-051-1/+48
| | | | llimits.h.
* LUAI_MAXSHORTLEN moved from 'luaconf.h' to 'llimits.h' (does notRoberto Ierusalimschy2015-01-161-1/+11
| | | | affect the API and is seldom modified)
* larger MINSTRTABSIZE (standard Lua starts with ~230 strings, afterRoberto Ierusalimschy2015-01-161-3/+8
| | | | oppening the standard libraries)
* commentsRoberto Ierusalimschy2015-01-161-2/+12
|
* definition for 'MAXUPVAL' moved for a more "private" place and itsRoberto Ierusalimschy2015-01-131-6/+1
| | | | value and comment corrected to reflect current implementation
* old Visual Studio versions did not support 'noreturn' attributeRoberto Ierusalimschy2014-12-191-2/+2
|
* comments (references to "ANSI C" changed to "ISO C", which is theRoberto Ierusalimschy2014-11-021-2/+2
| | | | international name
* configurations for types 'lu_mem'/'l_mem'/'Instruction' moved to hereRoberto Ierusalimschy2014-10-291-14/+26
| | | | | (from 'luaconf.h'), as they are not needed by the API and probably will not be changed
* 'MAXSTACK' -> 'MAXREGS' and moved to 'lcode.c' (there is no reasonRoberto Ierusalimschy2014-10-271-5/+1
| | | | to change that constant...)
* `name' in comments changed to 'name'Roberto Ierusalimschy2014-10-251-3/+3
|
* no more "-2" for limits. (Limits should be precise; safety is inRoberto Ierusalimschy2014-07-181-6/+6
| | | | the code that handles these limits.)
* detail (no need to define LUAI_USER_ALIGNMENT_T when it is notRoberto Ierusalimschy2014-07-181-4/+5
| | | | defined; simpler to define 'L_Umaxalign' directly)
* removed unused parameter Ä'L' in macro 'api_check' and companyRoberto Ierusalimschy2014-07-151-7/+4
|