| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
New year (2024->2025), typos in comments
|
|
|
|
|
| |
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).
|
|
|
|
| |
Memory is the resource we want to save. Still to be reviewed again.
|
| |
|
|
|
|
|
| |
No warnings for standard numerical types. Still pending alternative
numerical types.
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
They don't need to be visible by clients of Lua.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
'unsigned int' is too long sometimes. (We already write 'long' instead
of 'long int'...)
|
| |
|
|\ |
|
| |
| |
| |
| | |
Typos in comments and details in the manual.
|
|\| |
|
| |
| |
| |
| |
| | |
When converting from pointer to integer, use 'uintptr_t' if available;
otherwise try 'uintmax_t', and use 'size_t' as last resource.
|
| |
| |
| |
| | |
Positive debts seems more natural then negative ones.
|
| |
| |
| |
| |
| | |
More uniformity when handling GC parameters + avoid divisions by 100
when applying them.
|
| | |
|
|/
|
|
| |
Still needs to review generational mode.
|
|
|
|
| |
correction in macro for hard tests + type in comment
|
|
|
|
|
| |
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.)
|
|
|
|
|
|
| |
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).
|
|
|
|
|
| |
Squares are much more common than other exponentiations, and 'n*n' is
much more efficient than 'pow'.
|
| |
|
|
|
|
|
|
| |
- more organized handling of 'nCcalls'
- comments
- deprecation of 'setcstacklimit'
|
| |
|
| |
|
|
|
|
|
|
| |
- 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.
|
|
|
|
|
| |
Added '#if !defined' in some definitions to allow external definitions;
more comments; other small changes.
|
|
|
|
|
|
|
|
|
| |
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.)
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
* 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.)
|
| |
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Version numbers and dates (mostly wrong) from RCS keyword strings
removed from all source files; only the file name are kept.
|
| |
|
|
|
|
| |
(used only in errors for now)
|
| |
|
| |
|
|
|
|
|
| |
automatically raise an error), which allows fixing a bug when resizing
a table.
|
| |
|
|
|
|
|
| |
recursively to execute function calls. 'unroll' continues all
executions suspended by an yield (through a long jump)
|
| |
|
| |
|
|
|
|
| |
to the auxlib buffer
|
| |
|
|
|
|
| |
only when needed (that is, when stack actually changes)
|
| |
|