| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
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.)
|
|
|
|
|
| |
By default, the code assumes it is safe to use a dealocated pointer
as long as the code does not access it.
|
| |
|
| |
|
|
|
|
| |
That function is useful for debugging the API.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
This function unifies code from 'lua_newstate', 'math.randomseed',
and 'table.sort' that tries to create a value with a minimum level
of randomness.
|
|
|
|
| |
Makes it easier to start Lua with only some standard libraries.
|
| |
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
It helps to have this function available for debugging.
|
| |
|
|
|
|
|
| |
When in test mode (#include "tests.h"), force Lua to use its own
implementation of 'lua_strx2number' and 'lua_number2strx' to test them.
|
|
|
|
|
| |
Several details in code (e.g., moving a variable to the most inner
scope that encloses its uses), comments, parameter names, extra tests.
|
|
|
|
|
| |
LUA_T* represents only types; tags (types + Variants) are represented
by LUA_V* constants.
|
|
|
|
|
|
|
|
|
| |
- 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'.
|
|
|
|
|
| |
Added new functions to dynamically set the C-stack limit
('lua_setCstacklimit' in the C-API, 'debug.setCstacklimit' in Lua).
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
| |
* 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 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').
|
|
|
|
|
|
|
|
|
|
|
| |
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).
|
|
|
|
|
| |
Version numbers and dates (mostly wrong) from RCS keyword strings
removed from all source files; only the file name are kept.
|
|
|
|
| |
comments
|
| |
|
| |
|
| |
|
|
|
|
|
| |
stack size in debug mode (clang uses still more stack space when
debugging).
|
|
|
|
| |
before a memory-allocation error
|
|
|
|
|
| |
recursively to execute function calls. 'unroll' continues all
executions suspended by an yield (through a long jump)
|
| |
|
|
|
|
|
|
| |
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.)
|
|
|
|
| |
go through registers)
|
|
|
|
| |
will optimize away or inline the extra loops)
|
|
|
|
| |
to 'snprintf'
|
|
|
|
| |
does not handle any division by zero by default)
|
| |
|
| |
|
| |
|
|
|
|
| |
'preloadedlibs')
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
a lua_State)
|
|
|
|
| |
internal macros (this is the first definition)
|
|
|
|
| |
structures it is aligning (in most architectures)
|