| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
They were already allocated as a single block, so there is no need
for the global_State to point to its main thread.
|
|
|
|
|
| |
- Added support for negative stack indices in the "C interpreter"
- Improved format when printing values
|
|
|
|
|
| |
'lua_numbertostrbuff' -> 'lua_numbertocstring'
'lua_pushextlstring' -> 'lua_pushexternalstring'
|
|
|
|
| |
Tables don't accept sizes larger than int.
|
|
|
|
|
| |
'luaD_throw' may call 'luaE_resetthread', which returns an error code
but clears 'L->status'; so, 'luaD_throw' should set that status again.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Instead of using 'alimit' for keeping the size of the array and at
the same time being a hint for '#t', a table now keeps these two
values separate. The Table structure has a field 'asize' with the
size of the array, while the length hint is kept in the array itself.
That way, tables with no array part waste no space with that field.
Moreover, the space for the hint may have zero cost for small arrays,
if the array of tags plus the hint still fits in a single word.
|
|
|
|
|
|
| |
'debug.getinfo' can return number of extra arguments added to a call by
a chain of __call metavalues. That information is being used to improve
error messages about errors in these extra arguments.
|
|
|
|
|
|
|
|
| |
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.)
|