| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Instead of allways adding a prefix for the next message, and then
removing it if there is no message, add the prefix after each message.
|
|
|
|
| |
Bug introduced in 05932567.
|
| |
|
|
|
|
|
| |
'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 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.)
|
|
|
|
| |
Negligible performance gains don't justify extra complexity.
|
|
|
|
|
| |
A few operations on arrays can be performed "in bulk", treating all
tags of a cell as a simple (or a few) word(s).
|
|
|
|
|
|
| |
- 'unsigned int' -> 'unsigned'
- Some explicit casts to avoid warnings
- Test avoids printing the value of 'fail' (which may not be nil)
|
|
|
|
|
|
| |
size_t should be big enough to count the number of strings in a dump.
(And, by definition, it is big enough to count the length of each
string.)
|
| |
|
| |
|
|
|
|
|
| |
Instead of preloading all non-loaded libraries, there is another
mask to select which libraries to preload.
|
|
|
|
|
|
|
|
| |
- Usign lua_Unsigned to count strings.
- Varint uses a type large enough both for size_t and lua_Unsigned.
- Most-Significant Bit 0 means last byte, to conform to common usage.
- (unrelated) Change in macro 'getaddr' so that multiplication is
by constants.
|
| |
|
|
|
|
|
| |
Due to allignment, it is already using the space of a pointer, and
a pointer generates slightly simpler code.
|
|
|
|
|
|
|
|
| |
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.)
|
| |
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| | |
Yielding in a hook must decrease the program counter, because it already
counted an instruction that, in the end, was not executed. However,
that decrement should be done only when about to restart the thread.
Otherwise, inspecting the thread with the debug library shows it one
instruction behind of where it really is.
|
| |
| |
| |
| |
| | |
Even if the string fits in size_t, the whole size of the TString object
can overflow when we add the header.
|
| |
| |
| |
| |
| | |
The standard panic function was using 'lua_tostring', which may raise
a memory-allocation error if error value is a number.
|
| |
| |
| |
| |
| |
| | |
It is quite common to write to empty but existing cells in the array
part of a table, so 'luaH_psetint' checks for the common case that
the table doesn't have a newindex metamethod to complete the write.
|
| |
| |
| |
| |
| | |
Creates a table preallocating memory. (It just exports to Lua the API
function 'lua_createtable'.)
|
| | |
|
| |
| |
| |
| |
| | |
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).
|
| |
| |
| |
| |
| |
| | |
'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.
|
| |
| |
| |
| |
| | |
It does not make sense to wait for another cycle to decide when much of
the information about creation of old objects is already available.
|
| | |
|
| |
| |
| |
| |
| | |
Major collections do not need to "stop the world". Still pending:
criteria for shifts minor-major, shifts generational-incremental.
|
| |
| |
| |
| |
| | |
It is simpler to use always 'setage'. The saving from 'changeage'
is too irrelevant.
|
| |
| |
| |
| | |
A call to 'collectgarbage("step")' always performs one GC basic step.
|
| |
| |
| |
| | |
Options 'setpause' and 'setstepmul' were deprecated in Lua 5.4.
|
| |
| |
| |
| | |
Plus other comments and small details.
|
| | |
|
| |
| |
| |
| |
| | |
With the tags comming first in a cell, we can define the whole cell
as a C type and let C do part of the address computations.
|
| |
| |
| |
| |
| | |
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.
|
| | |
|
| |
| |
| |
| |
| | |
The buffer system from the auxiliary library reuses its buffer
as external memory when closing long strings.
|
| |
| |
| |
| |
| |
| | |
Call to 'luaH_setint' could call the GC with the string unanchored.
Moreover, previously saved strings were being assigned to the prototype
without a barrier.
|
| | |
|