| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Corrections in comments and manual. Added note in the manual about
local variables in the REPL.
|
| |
|
|
|
|
| |
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).
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
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.
|
|
|
|
| |
Plus other comments and small details.
|
|
|
|
| |
Strings can use external buffers to store their contents.
|
|
|
|
| |
Long strings have a pointer to string contents.
|
|\ |
|
| |\ |
|
| | | |
|
| | | |
|
|\ \ \
| | |/
| |/| |
|
| | |
| | |
| | |
| | |
| | | |
We may want to add other string variants in the future; this change
documents better where the code may need to handle those variants.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Although stack resize can be a little expensive, it seems unusual to
have too many threads needing resize during one GC cycle. On the other
hand, the change allows full collections to skip the propagate phase,
going straight from a pause to the atomic phase.
|
| |/
| |
| |
| |
| | |
Several functions that were already being used only inside their
own file have been declared as 'static'.
|
| |
| |
| |
| |
| | |
'collectgarbage("step")' (without an argument) does not have any
special meaning, it means "do a step with some default size".
|
| |
| |
| |
| | |
Positive debts seems more natural then negative ones.
|
| |
| |
| |
| |
| | |
More uniformity when handling GC parameters + avoid divisions by 100
when applying them.
|
|\| |
|
| | |
|
| |
| |
| |
| |
| | |
Each incremental step has always the same size (stepsize), and the
debt for next step also is always the same.
|
| | |
|
| |
| |
| |
| |
| | |
Function calls do not create new objects. (It may use memory with
stack reallocation, but now that is irrelevant to the GC.)
|
| | |
|
| |
| |
| |
| | |
Still needs to review generational mode.
|
|/
|
|
| |
It may simplify the control of the garbage collector.
|
|
|
|
|
| |
Using a version of 'luaC_newobj' that allows offsets (extra space
before the object itself).
|
|
|
|
|
| |
That will allow to change pointers to offsets while reallocating
the stack.
|
| |
|
|
|
|
|
| |
'os.exit' can call lua_close again, separating new finalizers
created after all previous finalizers were already separated.
|
|
|
|
|
|
| |
The flag CIST_FIN does not mark a finalizer, but the function that was
running when the finalizer was called. (So, the function did not call
the finalizer, but it looks that way in the stack.)
|
|
|
|
| |
As the GC is not reentrant, finalizers should not be able to invoke it.
|
|
|
|
|
|
| |
Instead of assuming that shrinking a block may be an emergency
collection, use an explicit field ('gcstopem') to stop emergency
collections while GC is working.
|
|
|
|
|
|
| |
More uses of macros 'likely'/'unlikely' (renamed to
'l_likely'/'l_unlikely'), both in range (extended to the
libraries) and in scope (extended to hooks, stack growth).
|
|
|
|
|
|
| |
When a stack grows, its extra area can be in use, and it becomes part
of the common area. So, the extra area must be kept correct all the
times. (Bug introduced by commit 5aa36e894f5.)
|
|
|
|
|
|
| |
Fixed the bug that a key removed from a table might not be found
again by 'next'. (This is needed to allow keys to be removed during a
traversal.) This bug was introduced in commit 73ec04fc.
|
|
|
|
|
|
|
| |
- After converting a generic GCObject to a specific type ('gco2*'),
avoid using the original GCObject (to reduce aliasing).
- Small corrections in comments in 'lopcodes.h'
- Added tests about who calls __close metamethods
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
Avoid turning an object to gray except at the moment it is inserted in a
gray list or in the explicit exceptional cases such as open upvalues and
fixed strings.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Macro 'gray2black' was renamed 'nw2black' (Non-White to black), as it
was already being used on objects that could be already black.
- Macros 'white2gray' and 'black2gray' were unified in 'set2gray'; no
reason to have two macros when one will do and, again, 'black2gray' was
already being used on objects that could be already gray.
Moreover, macros 'maskcolors' and 'maskgcbits' were negated to have
ones in the described bits, instead of zeros. (This naming seems more
intuitive.)
|
|
|
|
|
|
|
| |
This commit fixes a bug introduced in commit 9cf3299fa. TOUCHED2
objects are always black while the mutator runs, but they can become
temporarily gray inside a minor collection (e.g., if the object is a
weak table).
|