| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Instead of preloading all non-loaded libraries, there is another
mask to select which libraries to preload.
|
|\ |
|
| |
| |
| |
| |
| | |
The standard panic function was using 'lua_tostring', which may raise
a memory-allocation error if error value is a number.
|
| |
| |
| |
| |
| | |
The reference system has a defined way to add initial values to the
table where it operates.
|
| |
| |
| |
| | |
That constant was already deprecated (see commit 6aabf4b15e7).
|
| |
| |
| |
| |
| |
| | |
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 encoding brings more precision and a larger range for these
parameters.
|
| | |
|
| |
| |
| |
| |
| | |
Major collections do not need to "stop the world". Still pending:
criteria for shifts minor-major, shifts generational-incremental.
|
| |
| |
| |
| | |
Plus other comments and small details.
|
| |
| |
| |
| |
| | |
In the (rare) cases when sizeof(void*) or sizeof(time_t) are not
multiples of sizeof(int), we still can use all their bytes in the seed.
|
| |
| |
| |
| | |
Strings can use external buffers to store their contents.
|
|\ \ |
|
| |/ |
|
| |
| |
| |
| |
| | |
A fixed buffer keeps a binary chunk "forever", so that the program
does not need to copy some of its parts when loading it.
|
|\| |
|
| |
| |
| |
| |
| |
| | |
'lua_resetthread' is back to its original signature, to avoid
incompatibilities in the ABI between releases of the same version.
New function 'lua_closethread' added with the "correct" signature.
|
| |
| |
| |
| |
| |
| | |
This function unifies code from 'lua_newstate', 'math.randomseed',
and 'table.sort' that tries to create a value with a minimum level
of randomness.
|
| |
| |
| |
| |
| | |
More uniformity when handling GC parameters + avoid divisions by 100
when applying them.
|
| |
| |
| |
| | |
Makes it easier to start Lua with only some standard libraries.
|
| | |
|
| | |
|
| |
| |
| |
| | |
Still needs to review generational mode.
|
|/
|
|
|
| |
Only tables with some minimum number of entries in their hash part
have a 'lastfree' field, kept in a header before the node vector.
|
|
|
|
|
| |
That will allow to change pointers to offsets while reallocating
the stack.
|
| |
|
|
|
|
| |
Some cast operations rewritten to use respective macros.
|
|
|
|
|
| |
When object has a '__name' metafield, 'luaL_tolstring' used the
received index after pushing a string on the stack.
|
|
|
|
|
|
| |
The warning function using for tests need to check the stack before
pushing anything. (Warning functions are not expected to access a
Lua state, therefore they have no preallocated stack space.)
|
|
|
|
|
|
|
|
| |
To-be-closed variables are linked in their own list, embedded into the
stack elements. (Due to alignment, this information does not change
the size of the stack elements in most architectures.) This new list
does not produce garbage and avoids memory errors when creating tbc
variables.
|
|
|
|
|
|
| |
Closing a to-be-closed variable with 'lua_settop' is too restrictive,
as it erases all slots above the variable. Moreover, it adds side
effects to 'lua_settop', which should be a fairly basic function.
|
|
|
|
| |
The module 'ltests.c' must work correctly with asserts off, too.
|
|
|
|
|
|
|
|
| |
The allocation of a userdata for the state of the warn system can
cause a panic if it fails; 'luaL_ref' also can fail. This commit
re-implements the warn system so that it does not need an explicit
state. Instead, the system uses different functions to represent
the different states.
|
|
|
|
|
|
|
| |
Hashes for long strings are computed only when they are used as keys
in a table, not a too common case. And, in that case, it is to easy to
force collisions changing only the characters which are not part of the
hash.
|
|
|
|
|
|
| |
The stack size is derived from 'stack_last', when needed. Moreover,
the handling of stack sizes is more consistent, always excluding the
extra space except when allocating/deallocating the array.
|
|
|
|
|
| |
Test uses an extra bit in 'marked' to mark all elements in gray lists
and then check against elements colored gray.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
The fields 'old' and 'finobjold' were renamed 'old1' and 'finobjold1',
respectively, to make clearer the main ages of their elements.
|
|
|
|
| |
It helps to have this function available for debugging.
|
|
|
|
|
| |
Main thread must be non yieldable even at "level 0" (bare API), outside
the 'pcall' from 'lua.c'.
|
|
|
|
|
|
|
| |
To allow their use in memory tests, some functions in 'ltests.c'
should never allocate memory. To avoid this allocation, the
library registers the strings used for status codes, and keeps
the variable '_WARN' always defined (with false instead of nil).
|
|
|
|
|
| |
Since commit ca6fe7449a74, userdata with uservalues can be gray
and can belong to gray lists ('gclist').
|
|
|
|
|
|
| |
Avoid undefined behavior in calls like «fprintf("%s", NULL)».
('lua_writestringerror' is implemented as 'fprintf', and 'lua_tostring'
can return NULL if object is not a string.)
|
|
|
|
|
| |
The string "(null)" used for non-collectable values must be printed as a
string, not as a pointer. (Bug introduced in commit e0cbaa50fa7).
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
| |
Warnings are mostly a tool to help developers (e.g., by showing hidden
error messages); regular users usually don't need to see them.
|
|
|
|
|
|
| |
When using warn-mode '@store', from the test library, the tests ensure
not only that the expected warnings were issued, but also that there was
no extra warnings.
|