Commit Graph

3330 Commits

Author SHA1 Message Date
Roberto Ierusalimschy
1c1a98e872 corrected some places where an old object could end up in front
of a new one + minimal documentation about this problem
2010-05-10 15:23:45 -03:00
Roberto Ierusalimschy
c006f085d9 new macro 'resetoldbit' 2010-05-10 13:46:49 -03:00
Roberto Ierusalimschy
a48e330f37 macros 'lua_number2int' and 'lua_number2uint' for Visual Studio
corrected and tested
2010-05-10 13:38:58 -03:00
Roberto Ierusalimschy
dcc070683c avoid reserving LUA_RIDX_LAST slots in any table used by reference
system. Store free list in a field indexed by a unique name,
instead of using a numerical index.
2010-05-10 12:25:02 -03:00
Roberto Ierusalimschy
2d81cfa4e1 corrected definition of 'lua_register' (there is no LUA_ENVIRONINDEX
anymore)
2010-05-10 10:50:20 -03:00
Roberto Ierusalimschy
0bccf03d7e slightly better definition for 'changenvalue' 2010-05-07 15:44:46 -03:00
Roberto Ierusalimschy
ad2b5decc8 'lua_assert' can be empty when assertions are off 2010-05-07 15:44:12 -03:00
Roberto Ierusalimschy
32c1764b5d slightly better definition for 'isgray' 2010-05-07 15:43:51 -03:00
Roberto Ierusalimschy
de97177744 avoid 'else assert' (which may result in an empty else) 2010-05-07 15:43:24 -03:00
Roberto Ierusalimschy
fa2ddb070a details (to avoid too long strings in assertions) 2010-05-07 15:23:17 -03:00
Roberto Ierusalimschy
0fac33da9e bug: incremental sweep was not cleaning old bits (as it stopped in the
first old object) + bug: moving udata to 'udgc' list might put old
object in front a new one + some new macros + generational mode may
be in 'pause' state (it just skips 'markroot')
2010-05-07 15:19:36 -03:00
Roberto Ierusalimschy
8e1bdda66a stupid bug when calling 'luaC_changemode' (in function lua_gc) 2010-05-07 15:10:01 -03:00
Roberto Ierusalimschy
9c1347e647 more tests in 'lua_checkmemory' + more information in function
'gccolor'
2010-05-07 15:09:23 -03:00
Roberto Ierusalimschy
b373a40133 new macro 'isgenerational' + new macro 'isold' + better deffinition
for 'isdead', compatible with the code used by 'sweeplist'
2010-05-07 15:08:05 -03:00
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)
2010-05-06 15:18:07 -03:00
Roberto Ierusalimschy
a4f20e3c8b comments 2010-05-06 15:17:22 -03:00
Roberto Ierusalimschy
8c583c61a3 more tests in 'lua_checkmemory' 2010-05-06 15:16:57 -03:00
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)
2010-05-05 15:58:36 -03:00
Roberto Ierusalimschy
d77898597e new function 'luaC_changemode' 2010-05-05 15:53:41 -03:00
Roberto Ierusalimschy
237f755dca typos in comments 2010-05-05 15:49:56 -03:00
Roberto Ierusalimschy
7444b5a1d5 better documentation of GC costs 2010-05-05 10:39:58 -03:00
Roberto Ierusalimschy
e7ce7e1850 changes in patch to monitor garbage collection 2010-05-04 15:10:02 -03:00
Roberto Ierusalimschy
3e662cec89 full GC must run finalizers only after finishing everything else
(including a return to generational mode if needed)
2010-05-04 15:09:06 -03:00
Roberto Ierusalimschy
fde866e303 details (comments) 2010-05-04 14:25:19 -03:00
Roberto Ierusalimschy
2d7a81a204 missing parentheses in declaration 2010-05-04 14:21:08 -03:00
Roberto Ierusalimschy
658ea8752b no need to handle '\0' differently from other control chars in
format '%q'
2010-05-04 14:20:33 -03:00
Roberto Ierusalimschy
aa73403ba4 no need of a KGC_FORCED collection kind; it has the same behavior of
a normal collection
2010-05-03 14:39:48 -03:00
Roberto Ierusalimschy
0c27de2e7b no more 'finalize' phase in GC; finalizers are called along the
entire cycle
2010-05-03 14:33:39 -03:00
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).
2010-05-03 08:55:40 -03:00
Roberto Ierusalimschy
85555646e3 invariant must be kept in atomic 'phase' too 2010-05-03 08:24:30 -03:00
Roberto Ierusalimschy
4d871ee973 "gray lists" only need to be valid when 'keepinvariant' is true 2010-04-30 15:37:14 -03:00
Roberto Ierusalimschy
b9e1dec2cb added comment explaining a bit about the invariants of the collector 2010-04-30 15:36:45 -03:00
Roberto Ierusalimschy
dc2b8a0073 detail 2010-04-30 15:36:22 -03:00
Roberto Ierusalimschy
9a9fe42deb wrong comment 2010-04-30 15:17:24 -03:00
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
2010-04-30 11:22:23 -03:00
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.
2010-04-29 18:43:36 -03:00
Roberto Ierusalimschy
5d79c6684b removed commented-out debugging code 2010-04-29 18:42:33 -03:00
Roberto Ierusalimschy
3410dcd375 new way to control GC speed 2010-04-29 14:35:10 -03:00
Roberto Ierusalimschy
5a7a0c72d8 'luaC_linkupval' embedded into call site 2010-04-29 14:34:35 -03:00
Roberto Ierusalimschy
ee7478e884 improved 'lua_checkmemory', with better control over gray objects 2010-04-29 14:33:51 -03:00
Roberto Ierusalimschy
aaa5d7adab 'luaC_linkupval' moved into 'lfunc.c' code + new way to control GC speed 2010-04-29 14:32:40 -03:00
Roberto Ierusalimschy
3eb1788bb4 new way to control GC speed (keeping a 'debt' counter) 2010-04-29 14:31:31 -03:00
Roberto Ierusalimschy
00114a95b2 lots of new comments + small changes in loop controls + other small
"janitor work"
2010-04-26 14:58:00 -03:00
Roberto Ierusalimschy
4aaf0ef75c "to-be-finalized" objects marked and sweeped like all other objects 2010-04-20 17:15:30 -03:00
Roberto Ierusalimschy
ed720d09f3 upvalue barriers for Lua functions must act on the upvalue itself,
not on its closure
2010-04-20 17:14:50 -03:00
Roberto Ierusalimschy
376e939ef6 missing parentheses around 'luaL_pushresultsize' declaration 2010-04-19 15:52:15 -03:00
Roberto Ierusalimschy
9d28e2b3e5 bug with io.read(op, "*n") 2010-04-19 15:04:58 -03:00
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...)
2010-04-19 14:58:46 -03:00
Roberto Ierusalimschy
4db6f20770 ensure that 'luai_userstatethread' is always called (even if
'stack_init' throws a memory error)
2010-04-19 14:40:13 -03:00
Roberto Ierusalimschy
cca71912e6 'gcinfo' was deprecated in version 5.0. 2010-04-19 14:02:02 -03:00