Roberto Ierusalimschy
b373a40133
new macro 'isgenerational' + new macro 'isold' + better deffinition
for 'isdead', compatible with the code used by 'sweeplist'
15 years ago
Roberto Ierusalimschy
25951e0ea5
some cleaning in 'sweeplist' (threads do not need to be traversed
if they are going to be collected + use of bit masks to unify
differences in generational and incremental modes)
15 years ago
Roberto Ierusalimschy
a4f20e3c8b
comments
15 years ago
Roberto Ierusalimschy
8c583c61a3
more tests in 'lua_checkmemory'
15 years ago
Roberto Ierusalimschy
d2ea5b00b7
new function 'luaC_changemode' +
bug: objects entering the 'allgc' list must have their OLDBIT cleared
(upvalues being cleared) + bug: in 'checkSizes', KGC_EMERGENCY is
stored in 'gckind' field, not in 'gcstate' + current white changes when
entering sweep phase (so there are dead objects only in that phase)
15 years ago
Roberto Ierusalimschy
d77898597e
new function 'luaC_changemode'
15 years ago
Roberto Ierusalimschy
237f755dca
typos in comments
15 years ago
Roberto Ierusalimschy
7444b5a1d5
better documentation of GC costs
15 years ago
Roberto Ierusalimschy
e7ce7e1850
changes in patch to monitor garbage collection
15 years ago
Roberto Ierusalimschy
3e662cec89
full GC must run finalizers only after finishing everything else
(including a return to generational mode if needed)
15 years ago
Roberto Ierusalimschy
fde866e303
details (comments)
15 years ago
Roberto Ierusalimschy
2d7a81a204
missing parentheses in declaration
15 years ago
Roberto Ierusalimschy
658ea8752b
no need to handle '\0' differently from other control chars in
format '%q'
15 years ago
Roberto Ierusalimschy
aa73403ba4
no need of a KGC_FORCED collection kind; it has the same behavior of
a normal collection
15 years ago
Roberto Ierusalimschy
0c27de2e7b
no more 'finalize' phase in GC; finalizers are called along the
entire cycle
15 years ago
Roberto Ierusalimschy
d25f7f9d78
items in 'tobefnz' are kept black (as before recent change) and changed
to white only when needed (being moved to 'allgc' when not keeping
invariant).
15 years ago
Roberto Ierusalimschy
85555646e3
invariant must be kept in atomic 'phase' too
15 years ago
Roberto Ierusalimschy
4d871ee973
"gray lists" only need to be valid when 'keepinvariant' is true
15 years ago
Roberto Ierusalimschy
b9e1dec2cb
added comment explaining a bit about the invariants of the collector
15 years ago
Roberto Ierusalimschy
dc2b8a0073
detail
15 years ago
Roberto Ierusalimschy
9a9fe42deb
wrong comment
15 years ago
Roberto Ierusalimschy
0062db1e06
default PAUSE should be 200 (differences may be corrected in
internal multiplers)
+ check for unbilt stack equal the one used by lgc.c
15 years ago
Roberto Ierusalimschy
23001d8607
nasty GC bug: upvalue must be turned white when not keeping invariant,
but barrier was not being called when uv->v were already white.
15 years ago
Roberto Ierusalimschy
5d79c6684b
removed commented-out debugging code
15 years ago
Roberto Ierusalimschy
3410dcd375
new way to control GC speed
15 years ago
Roberto Ierusalimschy
5a7a0c72d8
'luaC_linkupval' embedded into call site
15 years ago
Roberto Ierusalimschy
ee7478e884
improved 'lua_checkmemory', with better control over gray objects
15 years ago
Roberto Ierusalimschy
aaa5d7adab
'luaC_linkupval' moved into 'lfunc.c' code + new way to control GC speed
15 years ago
Roberto Ierusalimschy
3eb1788bb4
new way to control GC speed (keeping a 'debt' counter)
15 years ago
Roberto Ierusalimschy
00114a95b2
lots of new comments + small changes in loop controls + other small
"janitor work"
15 years ago
Roberto Ierusalimschy
4aaf0ef75c
"to-be-finalized" objects marked and sweeped like all other objects
15 years ago
Roberto Ierusalimschy
ed720d09f3
upvalue barriers for Lua functions must act on the upvalue itself,
not on its closure
15 years ago
Roberto Ierusalimschy
376e939ef6
missing parentheses around 'luaL_pushresultsize' declaration
15 years ago
Roberto Ierusalimschy
9d28e2b3e5
bug with io.read(op, "*n")
15 years ago
Roberto Ierusalimschy
49ca1f7083
allows thread switches (when/if there are thread switches) in the same
places that finalizers can run (so they should be safe...)
15 years ago
Roberto Ierusalimschy
4db6f20770
ensure that 'luai_userstatethread' is always called (even if
'stack_init' throws a memory error)
15 years ago
Roberto Ierusalimschy
cca71912e6
'gcinfo' was deprecated in version 5.0.
15 years ago
Roberto Ierusalimschy
8003e9544d
'string.format' may get buffer as an argument when there are
missing arguments and format string is too long
15 years ago
Roberto Ierusalimschy
973d81efb3
complete control over number of each kind of object allocated
15 years ago
Roberto Ierusalimschy
26d4a73962
with light C functions, 'pairs' does not need to keep 'next' as an
upvalue.
15 years ago
Roberto Ierusalimschy
99a39f6f4a
tells the allocation function that the first block is a thread
15 years ago
Roberto Ierusalimschy
1bb407e494
in lua_gc/step, 'luaC_step' changes GCthreshold, so there was little
control over the real step size.
15 years ago
Roberto Ierusalimschy
53f9499f7f
"light C function" is a better name than "C-function pointer"
15 years ago
Roberto Ierusalimschy
575befc394
comparsion tag methods follow the same rule as other binary TMs
15 years ago
Roberto Ierusalimschy
e7ffb1b501
macro LUA_USE_LONGJMP allows choosing longjmp when compiling Lua as
C++ code
15 years ago
Roberto Ierusalimschy
c066ac10a9
better line numbers for function calls and unary/binary operators +
null statement + no more "ambiguous syntax" restriction
15 years ago
Roberto Ierusalimschy
1e6940f291
'gcstate' now also runs collector until given state + small changes
in 'testC' to test 'lua_topointer' and 'lua_tocfunction'
15 years ago
Roberto Ierusalimschy
d8d81ba891
new escape sequence '\*' + several comments + moving options from
switch default into cases (as now locale is fixed)
15 years ago
Roberto Ierusalimschy
cf22133b69
no need to avoid calling ctype functions as now they are implemented
by us (no inefficiencies due to accessing locale information)
15 years ago
Roberto Ierusalimschy
b7be05ad27
invalid instructions "cannot" happen
15 years ago