Roberto Ierusalimschy
022abc301b
'gcemergency' should be zero before any memory allocation
7 years ago
Roberto Ierusalimschy
e2b15aa21d
janitor work on casts
7 years ago
Roberto Ierusalimschy
4dc0be950a
new macro 'isLuacode' (to distinguish regular Lua code from
hooks, where C code can run inside a Lua function).
7 years ago
Roberto Ierusalimschy
196c87c9ce
no more 'stackless' implementation; 'luaV_execute' calls itself
recursively to execute function calls. 'unroll' continues all
executions suspended by an yield (through a long jump)
7 years ago
Roberto Ierusalimschy
5440b42f43
using 'trap' to stop 'luaV_execute' when necessary (tracing and
to update its copy of 'base' when the stack is reallocated)
7 years ago
Roberto Ierusalimschy
ad0704e40c
back to 'CallInfo' (no gains with its removal)
7 years ago
Roberto Ierusalimschy
93fd67b793
no more 'CallInfo' structure
7 years ago
Roberto Ierusalimschy
54eb35a8aa
more fields moved out of 'CallInfo'
7 years ago
Roberto Ierusalimschy
c5482468fd
baby steps to remove 'CallInfo': keeping 'L->func' correct
7 years ago
Roberto Ierusalimschy
1d8920dd7f
some cleaning in GC parameters
7 years ago
Roberto Ierusalimschy
f96497397a
new type 'StackValue' for stack elements
(we may want to put extra info there in the future)
7 years ago
Roberto Ierusalimschy
72d82a296c
revamping the incremental collector
Some simplifications (not counting bytes, couting only slots visited;
no more 'gcfinnum'); more GC parameters; using vararg in 'lua_gc' to
set parameters in different GC modes
8 years ago
Roberto Ierusalimschy
2376eb6347
barrier for prototype's cache (with new gray list 'protogray' to keep
prototypes to have their caches visited again) + constant 'MAXMISS'
8 years ago
Roberto Ierusalimschy
69371c4b84
'KGC_NORMAL' -> 'KGC_INC' + emergency GC signalled by flag (instead
of mode)
8 years ago
Roberto Ierusalimschy
f74b87c3c2
removed initialization of 'GCestimate' (it is initialized during
a GC cycle, when it start counting)
8 years ago
Roberto Ierusalimschy
0c8a7e071b
'mainthread' lives in 'allgc' list, like everybody else
8 years ago
Roberto Ierusalimschy
e4287da3a6
generational collector (still not complete)
8 years ago
Roberto Ierusalimschy
f5f3df3bd1
generational collection: new attempt (still incomplete)
8 years ago
Roberto Ierusalimschy
89e3a84344
removed field 'n' from 'CallInfo' (not being used right now)
9 years ago
Roberto Ierusalimschy
33b366ec32
added counters for total and individual CallInfo entries (to allow
better syncronization between CallInfo size and stack size)
9 years ago
Roberto Ierusalimschy
75d5a8924c
macro 'addbuff' was using external variable name, instead of using
its parameter name inside the macro.
9 years ago
Roberto Ierusalimschy
41964648ee
long strings are created directly in final position when possible
(instead of using an auxiliar buffer to first create the string
and then allocate the final string and copy result there)
9 years ago
Roberto Ierusalimschy
2b61360d82
avoid overflows (detected with 'clang -ftrapv')
9 years ago
Roberto Ierusalimschy
a80cada914
new cache for interning strings
10 years ago
Roberto Ierusalimschy
e75c0148c3
comments (references to "ANSI C" changed to "ISO C", which is the
international name
10 years ago
Roberto Ierusalimschy
28fdbcf393
added include for 'lprefix.h', for stuff that must be added before
any other header file
10 years ago
Roberto Ierusalimschy
57d8424146
extra space for new threads is initialized with a copy of the main
thread, not of the creator thread.
10 years ago
Roberto Ierusalimschy
baa0e23456
better support for extra user space associated with a Lua state
10 years ago
Roberto Ierusalimschy
ca41b43f53
type 'TString' refers directly to the structure inside the union
(union used only for size purposes)
10 years ago
Roberto Ierusalimschy
56137d58ff
added check for conversion 'obj2gco' (and corrections for small
problems detected by this check)
10 years ago
Roberto Ierusalimschy
3f78de256e
no need to keep threads in a different GC list, now that there is the
'twups' list
11 years ago
Roberto Ierusalimschy
d764cc5522
new list 'twups' to allow traversal of upvalues from dead threads
(+ fixed some problems with cycles involving those upvalues)
11 years ago
Roberto Ierusalimschy
de3b1c9b53
better control for number of finalizers called at each GC cycle
(increases progressively)
11 years ago
Roberto Ierusalimschy
733c58595b
no more local collection
11 years ago
Roberto Ierusalimschy
ba3586cc90
keep a single list of objects to be finalized (with local and non-local
objects), to ensure finalization order
11 years ago
Roberto Ierusalimschy
de7cf8e63a
bug: should call 'luai_userstateclose' only when 'luai_userstateopen'
has been called before
11 years ago
Roberto Ierusalimschy
4c6dfc342b
CallInfo lists shrinks together with their associated stacks
11 years ago
Roberto Ierusalimschy
686e57cf9c
GC local pause configurable
11 years ago
Roberto Ierusalimschy
dd373a8f66
threads are kept in a separated GC list, linked after the main thread
11 years ago
Roberto Ierusalimschy
1150873447
'luaC_newobj' does not handle special cases; only special case
now is threads, which do not use 'luaC_newobj' anymore.
11 years ago
Roberto Ierusalimschy
d3bbb34c24
back to open hashing for the string table (but with a different
'hnext' field, to strings are still collected like all other
objects)
11 years ago
Roberto Ierusalimschy
aeff4f79fa
local collection now calls finalizers
11 years ago
Roberto Ierusalimschy
1bf4faec64
new GC state to sweep 'localgc' list + small changes in sweep control
11 years ago
Roberto Ierusalimschy
9a871dd3db
tables and userdata all go to local list, too
11 years ago
Roberto Ierusalimschy
af35c7f398
upvalues collected by reference count
11 years ago
Roberto Ierusalimschy
742b7377d3
Lua closures go to local, too
11 years ago
Roberto Ierusalimschy
50955e27f5
C functions and strings now go to the local list; first version
of the local collector
11 years ago
Roberto Ierusalimschy
0df6635711
"fixed" objects kept in a separated list (instead of being kept in
'allgc' list with a bit marking them)
11 years ago
Roberto Ierusalimschy
ae800656c9
change in string table: string table is now independent of GC lists; all
strings live in 'normal' GC lists
11 years ago
Roberto Ierusalimschy
439d74e29f
added 'local' bit (true => object is only refered by local variables)
11 years ago