69ba1ac441
new "instruction" 'absindex'
Roberto Ierusalimschy
2010-05-14 10:15:54 -03:00
4a925c1552
in 'absindex', do not need to call gettop (can inline it)
Roberto Ierusalimschy
2010-05-14 10:15:26 -03:00
cf531912f2
one more macro (mvdispatch) to easy experiments with alternative dispatch methods
Roberto Ierusalimschy
2010-05-13 16:53:05 -03:00
0d00729e31
detail (breaking a long line)
Roberto Ierusalimschy
2010-05-13 09:03:26 -03:00
b6e9fcbd70
use of macro ('vmcase') to format all cases in main switch of 'luaV_execute' (to facilitate experiences with direct threading)
Roberto Ierusalimschy
2010-05-12 17:40:35 -03:00
8554baeacf
small changes in 'luaV_execute' to make cases more regularly formatted
Roberto Ierusalimschy
2010-05-12 17:31:33 -03:00
f5b7f077ec
added comments to '#else' and '#endif' in long conditionals
Roberto Ierusalimschy
2010-05-12 11:17:36 -03:00
e924a7f9ea
new API function 'lua_absindex'
Roberto Ierusalimschy
2010-05-12 11:09:20 -03:00
de0f51a02c
wrong type being assigned (not detected because of obj2gco macro)
Roberto Ierusalimschy
2010-05-11 17:48:36 -03:00
0567221848
udata in 'tobefnz' list be have old bit on (it will be cleared when udata is moved to 'allgc' list)
Roberto Ierusalimschy
2010-05-10 15:24:36 -03:00
1c1a98e872
corrected some places where an old object could end up in front of a new one + minimal documentation about this problem
Roberto Ierusalimschy
2010-05-10 15:23:45 -03:00
c006f085d9
new macro 'resetoldbit'
Roberto Ierusalimschy
2010-05-10 13:46:49 -03:00
a48e330f37
macros 'lua_number2int' and 'lua_number2uint' for Visual Studio corrected and tested
Roberto Ierusalimschy
2010-05-10 13:38:58 -03:00
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.
Roberto Ierusalimschy
2010-05-10 12:25:02 -03:00
2d81cfa4e1
corrected definition of 'lua_register' (there is no LUA_ENVIRONINDEX anymore)
Roberto Ierusalimschy
2010-05-10 10:50:20 -03:00
de97177744
avoid 'else assert' (which may result in an empty else)
Roberto Ierusalimschy
2010-05-07 15:43:24 -03:00
fa2ddb070a
details (to avoid too long strings in assertions)
Roberto Ierusalimschy
2010-05-07 15:23:17 -03:00
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')
Roberto Ierusalimschy
2010-05-07 15:19:36 -03:00
8e1bdda66a
stupid bug when calling 'luaC_changemode' (in function lua_gc)
Roberto Ierusalimschy
2010-05-07 15:10:01 -03:00
9c1347e647
more tests in 'lua_checkmemory' + more information in function 'gccolor'
Roberto Ierusalimschy
2010-05-07 15:09:23 -03:00
b373a40133
new macro 'isgenerational' + new macro 'isold' + better deffinition for 'isdead', compatible with the code used by 'sweeplist'
Roberto Ierusalimschy
2010-05-07 15:08:05 -03:00
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)
Roberto Ierusalimschy
2010-05-06 15:18:07 -03:00
8c583c61a3
more tests in 'lua_checkmemory'
Roberto Ierusalimschy
2010-05-06 15:16:57 -03:00
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)
Roberto Ierusalimschy
2010-05-05 15:58:36 -03:00
d77898597e
new function 'luaC_changemode'
Roberto Ierusalimschy
2010-05-05 15:53:41 -03:00
237f755dca
typos in comments
Roberto Ierusalimschy
2010-05-05 15:49:56 -03:00
e7ce7e1850
changes in patch to monitor garbage collection
Roberto Ierusalimschy
2010-05-04 15:10:02 -03:00
3e662cec89
full GC must run finalizers only after finishing everything else (including a return to generational mode if needed)
Roberto Ierusalimschy
2010-05-04 15:09:06 -03:00
2d7a81a204
missing parentheses in declaration
Roberto Ierusalimschy
2010-05-04 14:21:08 -03:00
658ea8752b
no need to handle '\0' differently from other control chars in format '%q'
Roberto Ierusalimschy
2010-05-04 14:20:33 -03:00
aa73403ba4
no need of a KGC_FORCED collection kind; it has the same behavior of a normal collection
Roberto Ierusalimschy
2010-05-03 14:39:48 -03:00
0c27de2e7b
no more 'finalize' phase in GC; finalizers are called along the entire cycle
Roberto Ierusalimschy
2010-05-03 14:33:39 -03:00
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).
Roberto Ierusalimschy
2010-05-03 08:55:40 -03:00
85555646e3
invariant must be kept in atomic 'phase' too
Roberto Ierusalimschy
2010-05-03 08:24:30 -03:00
4d871ee973
"gray lists" only need to be valid when 'keepinvariant' is true
Roberto Ierusalimschy
2010-04-30 15:37:14 -03:00
b9e1dec2cb
added comment explaining a bit about the invariants of the collector
Roberto Ierusalimschy
2010-04-30 15:36:45 -03:00
0062db1e06
default PAUSE should be 200 (differences may be corrected in internal multiplers) + check for unbilt stack equal the one used by lgc.c
Roberto Ierusalimschy
2010-04-30 11:22:23 -03:00
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.
Roberto Ierusalimschy
2010-04-29 18:43:36 -03:00
9d28e2b3e5
bug with io.read(op, "*n")
Roberto Ierusalimschy
2010-04-19 15:04:58 -03:00
49ca1f7083
allows thread switches (when/if there are thread switches) in the same places that finalizers can run (so they should be safe...)
Roberto Ierusalimschy
2010-04-19 14:58:46 -03:00
4db6f20770
ensure that 'luai_userstatethread' is always called (even if 'stack_init' throws a memory error)
Roberto Ierusalimschy
2010-04-19 14:40:13 -03:00
cca71912e6
'gcinfo' was deprecated in version 5.0.
Roberto Ierusalimschy
2010-04-19 14:02:02 -03:00
8003e9544d
'string.format' may get buffer as an argument when there are missing arguments and format string is too long
Roberto Ierusalimschy
2010-04-19 13:39:25 -03:00
973d81efb3
complete control over number of each kind of object allocated
Roberto Ierusalimschy
2010-04-19 13:38:25 -03:00
26d4a73962
with light C functions, 'pairs' does not need to keep 'next' as an upvalue.
Roberto Ierusalimschy
2010-04-19 13:36:06 -03:00
99a39f6f4a
tells the allocation function that the first block is a thread
Roberto Ierusalimschy
2010-04-19 13:34:46 -03:00
1bb407e494
in lua_gc/step, 'luaC_step' changes GCthreshold, so there was little control over the real step size.
Roberto Ierusalimschy
2010-04-19 13:33:19 -03:00
53f9499f7f
"light C function" is a better name than "C-function pointer"
Roberto Ierusalimschy
2010-04-18 10:22:48 -03:00
575befc394
comparsion tag methods follow the same rule as other binary TMs
Roberto Ierusalimschy
2010-04-18 10:15:11 -03:00
e7ffb1b501
macro LUA_USE_LONGJMP allows choosing longjmp when compiling Lua as C++ code
Roberto Ierusalimschy
2010-04-18 09:41:35 -03:00
c066ac10a9
better line numbers for function calls and unary/binary operators + null statement + no more "ambiguous syntax" restriction
Roberto Ierusalimschy
2010-04-17 09:46:32 -03:00
1e6940f291
'gcstate' now also runs collector until given state + small changes in 'testC' to test 'lua_topointer' and 'lua_tocfunction'
Roberto Ierusalimschy
2010-04-16 14:42:49 -03:00
d8d81ba891
new escape sequence '\*' + several comments + moving options from switch default into cases (as now locale is fixed)
Roberto Ierusalimschy
2010-04-16 09:31:07 -03:00
cf22133b69
no need to avoid calling ctype functions as now they are implemented by us (no inefficiencies due to accessing locale information)
Roberto Ierusalimschy
2010-04-15 16:44:43 -03:00
afdb19ac82
no more 'ccall' nor 'cpcall' functions. (With light C functions they are obsolete.)
Roberto Ierusalimschy
2010-04-14 12:14:21 -03:00
7dfa4cd655
first implementation of light C functions
Roberto Ierusalimschy
2010-04-14 12:13:48 -03:00
fc6203ee43
BUG: 'string.format' may get buffer when there are missing arguments
Roberto Ierusalimschy
2010-04-12 13:13:02 -03:00
b2dd246b7a
better control in 'totalmem' over choosing counters
Roberto Ierusalimschy
2010-04-12 13:07:39 -03:00
d20ff60615
new macro LUA_NUMTAGS
Roberto Ierusalimschy
2010-04-12 13:07:29 -03:00
d41b467320
check memory allows strings to live in the main GC list (it should work ok).
Roberto Ierusalimschy
2010-04-12 09:42:07 -03:00
4541243355
patterns now accept '\0' as a regular character
Roberto Ierusalimschy
2010-04-12 09:00:50 -03:00
9100f7479a
new implementation for Generic Buffer manipulation (using userdata as temporary buffer space)
Roberto Ierusalimschy
2010-04-09 13:14:46 -03:00
055104f5b6
keep memory-error message in the global state, so that its use does not depend on Lua internalizing strings to avoid a string creation on memory errors
Roberto Ierusalimschy
2010-04-08 14:16:46 -03:00