| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
Array part needs 1/3 of its elements filled, instead of 1/2.
Array entries use ~1/3 the memory of hash entries, so this new rule
still ensures that array parts do not use more memory than keeping
the values in the hash, while allowing more uses of the array part,
which is more efficient than the hash.
|
| |
|
| |
|
|
|
|
| |
Memory is the resource we want to save. Still to be reviewed again.
|
| |
|
|
|
|
|
| |
No warnings for standard numerical types. Still pending alternative
numerical types.
|
|
|
|
| |
That function is useful for debugging the API.
|
|
|
|
|
|
| |
New instruction format 'ivABC' (a variant of iABC where parameter vC has
10 bits) allows constructors of up to 1024 elements to be coded without
EXTRAARG.
|
|
|
|
|
|
|
|
| |
Instead of a fixed limit of 50 registers (which, in a bad worst case,
can limit the nesting of constructors to 5 levels), the compiler
computes an individual limit for each constructor based on how many
registers are available when it runs. This limit then controls the
frequency of SETLIST instructions.
|
| |
|
|
|
|
|
| |
As the encoding of array indices is (~index), 0 is encoded as -1 and
INT_MAX is encoded as INT_MIN.
|
|
|
|
|
| |
'unsigned int' is too long sometimes. (We already write 'long' instead
of 'long int'...)
|
|
|
|
|
|
|
| |
Undoing previous commit. Returning TValue increases code size without
any visible gains. Returning the tag is a little simpler than returning
a special code (HOK/HNOTFOUND) and the tag is useful by itself in
some cases.
|
|
|
|
|
| |
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.
|