| 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.
|
| |
|
|
|
|
|
|
|
|
|
| |
Since commit f407b3c4a, it was being used for two distinct (and
incompatible) meanings:
A: Function has TBC variables (now bit CIST_TBC)
B: Interpreter is closing TBC variables (original bit CIST_CLSRET)
B implies A, but A does not imply B.
|
|
|
|
|
| |
'lua_numbertostrbuff' -> 'lua_numbertocstring'
'lua_pushextlstring' -> 'lua_pushexternalstring'
|
|
|
|
| |
Tables don't accept sizes larger than int.
|
|
|
|
|
| |
The "faster way" to check whether a value is not 'nilvalue' is not
faster. (Both forms entail one memory access.)
|
|
|
|
| |
Plus details
|
| |
|
|
|
|
|
| |
It converts a Lua number to a string in a buffer, without creating
a new Lua string.
|
|
|
|
|
|
| |
Any call to 'va_start' must have a corresponding call to 'va_end';
so, functions called between them (luaO_pushvfstring in particular)
cannot raise errors.
|
| |
|
|
|
|
| |
USHRT_MAX does not fit in an 'int' in 16-bit systems.
|
|
|
|
| |
Memory is the resource we want to save. Still to be reviewed again.
|
|
|
|
|
| |
'size_t' is the common type for measuring memory. 'int' can be too
small for steps.
|
|
|
|
|
| |
All fields in the global state that control the pace of the garbage
collector prefixed with 'GC'.
|
|
|
|
|
| |
No warnings for standard numerical types. Still pending alternative
numerical types.
|
|
|
|
| |
That gives us more free bits in 'callstatus', for future use.
|
|
|
|
|
| |
The callstatus flag CIST_CLSRET is used in all tests for the
presence of variables to be closed in C functions.
|
|
|
|
|
|
| |
The parameter 'nresults' in 'lua_call' and similar functions has a
limit of 250. It already had an undocumented (and unchecked) limit of
SHRT_MAX, but it is seldom larger than 2.
|
|
|
|
| |
(As the length of any string in Lua.)
|
|
|
|
|
|
|
| |
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 receiving a parameter telling them where to put the result
of the query, these functions return the TValue directly. (That is,
they return a structure.)
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
Avoid silent conversions from int to unsigned int when calling
'luaH_resize'; avoid silent conversions from lua_Integer to int in
'table.create'; MAXASIZE corrected for the new implementation of arrays;
'luaH_resize' checks explicitly whether new size respects MAXASIZE.
(Even constructors were bypassing that check.)
|
| |
|
| |
|
|
|
|
|
|
| |
'lua_rawgeti' now uses "fast track"; 'lua_rawseti' still calls
'luaH_setint', but the latter was recoded to avoid extra overhead
when writing to the array part after 'alimit'.
|
| |
|
|
|
|
|
|
| |
- back with step size in collectgarbage("step")
- adjustments in defaults for some GC parameters
- adjustments in 'luaO_codeparam'
|
|
|
|
|
|
| |
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 encoding brings more precision and a larger range for these
parameters.
|
|
|
|
|
| |
'lua_dump' signals to the writer function the end of a dump, so that
is has more freedom when using the stack.
|
| |
|
|
|
|
|
| |
Major collections do not need to "stop the world". Still pending:
criteria for shifts minor-major, shifts generational-incremental.
|
|
|
|
| |
A call to 'collectgarbage("step")' always performs one GC basic step.
|
|
|
|
| |
Options 'setpause' and 'setstepmul' were deprecated in Lua 5.4.
|
|
|
|
| |
Strings can use external buffers to store their contents.
|
|\ |
|
| |\ |
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The array part of a table wastes too much space, due to padding.
To avoid that, we need to store values in the array as something
different from a TValue. Therefore, the API for table access
should not assume that any value in a table lives in a *TValue.
This commit is the first step to remove that assumption: functions
luaH_get*, instead of returning a *TValue where the value lives,
receive a *TValue where to put the value being accessed.
(We still have to change the luaH_set* functions.)
|
|\ \ \
| | |/
| |/| |
|
| |/
| |
| |
| |
| | |
We may want to add other string variants in the future; this change
documents better where the code may need to handle those variants.
|
| |
| |
| |
| |
| | |
A repeated string in a dump is represented as an index to its first
occurence, instead of another copy of the string.
|
| |
| |
| |
| | |
Positive debts seems more natural then negative ones.
|
| |
| |
| |
| |
| | |
More uniformity when handling GC parameters + avoid divisions by 100
when applying them.
|