Commit Graph

282 Commits

Author SHA1 Message Date
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)
2017-11-23 14:41:16 -02:00
Roberto Ierusalimschy
5440b42f43 using 'trap' to stop 'luaV_execute' when necessary (tracing and
to update its copy of 'base' when the stack is reallocated)
2017-11-13 13:36:52 -02:00
Roberto Ierusalimschy
ad0704e40c back to 'CallInfo' (no gains with its removal) 2017-11-07 11:25:26 -02:00
Roberto Ierusalimschy
93fd67b793 no more 'CallInfo' structure 2017-11-04 10:57:02 -02:00
Roberto Ierusalimschy
54eb35a8aa more fields moved out of 'CallInfo' 2017-11-03 10:12:30 -02:00
Roberto Ierusalimschy
c5482468fd baby steps to remove 'CallInfo': keeping 'L->func' correct 2017-10-31 15:54:35 -02:00
Roberto Ierusalimschy
1d8920dd7f some cleaning in GC parameters 2017-10-11 09:38:45 -03:00
Roberto Ierusalimschy
f96497397a new type 'StackValue' for stack elements
(we may want to put extra info there in the future)
2017-06-29 12:06:44 -03:00
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
2017-05-26 16:14:29 -03:00
Roberto Ierusalimschy
2376eb6347 barrier for prototype's cache (with new gray list 'protogray' to keep
prototypes to have their caches visited again) + constant 'MAXMISS'
2017-05-04 10:32:01 -03:00
Roberto Ierusalimschy
69371c4b84 'KGC_NORMAL' -> 'KGC_INC' + emergency GC signalled by flag (instead
of mode)
2017-04-24 13:59:26 -03:00
Roberto Ierusalimschy
f74b87c3c2 removed initialization of 'GCestimate' (it is initialized during
a GC cycle, when it start counting)
2017-04-12 15:56:25 -03:00
Roberto Ierusalimschy
0c8a7e071b 'mainthread' lives in 'allgc' list, like everybody else 2017-04-11 16:00:27 -03:00
Roberto Ierusalimschy
e4287da3a6 generational collector (still not complete) 2017-04-05 13:50:51 -03:00
Roberto Ierusalimschy
f5f3df3bd1 generational collection: new attempt (still incomplete) 2017-02-23 18:07:34 -03:00
Roberto Ierusalimschy
89e3a84344 removed field 'n' from 'CallInfo' (not being used right now) 2015-11-13 10:16:51 -02:00
Roberto Ierusalimschy
33b366ec32 added counters for total and individual CallInfo entries (to allow
better syncronization between CallInfo size and stack size)
2015-11-02 14:01:41 -02:00
Roberto Ierusalimschy
75d5a8924c macro 'addbuff' was using external variable name, instead of using
its parameter name inside the macro.
2015-10-20 11:11:05 -02:00
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)
2015-09-08 12:41:05 -03:00
Roberto Ierusalimschy
2b61360d82 avoid overflows (detected with 'clang -ftrapv') 2015-07-13 10:30:03 -03:00
Roberto Ierusalimschy
a80cada914 new cache for interning strings 2015-03-04 10:31:21 -03:00
Roberto Ierusalimschy
e75c0148c3 comments (references to "ANSI C" changed to "ISO C", which is the
international name
2014-11-02 17:33:33 -02:00
Roberto Ierusalimschy
28fdbcf393 added include for 'lprefix.h', for stuff that must be added before
any other header file
2014-11-02 17:19:04 -02:00
Roberto Ierusalimschy
57d8424146 extra space for new threads is initialized with a copy of the main
thread, not of the creator thread.
2014-07-24 13:17:56 -03:00
Roberto Ierusalimschy
baa0e23456 better support for extra user space associated with a Lua state 2014-07-24 11:00:16 -03:00
Roberto Ierusalimschy
ca41b43f53 type 'TString' refers directly to the structure inside the union
(union used only for size purposes)
2014-07-18 10:36:14 -03:00
Roberto Ierusalimschy
56137d58ff added check for conversion 'obj2gco' (and corrections for small
problems detected by this check)
2014-07-18 09:17:54 -03:00
Roberto Ierusalimschy
3f78de256e no need to keep threads in a different GC list, now that there is the
'twups' list
2014-02-18 10:46:26 -03:00
Roberto Ierusalimschy
d764cc5522 new list 'twups' to allow traversal of upvalues from dead threads
(+ fixed some problems with cycles involving those upvalues)
2014-02-18 10:39:37 -03:00
Roberto Ierusalimschy
de3b1c9b53 better control for number of finalizers called at each GC cycle
(increases progressively)
2014-02-13 12:46:38 -02:00
Roberto Ierusalimschy
733c58595b no more local collection 2014-02-13 10:11:34 -02:00
Roberto Ierusalimschy
ba3586cc90 keep a single list of objects to be finalized (with local and non-local
objects), to ensure finalization order
2014-02-11 10:18:12 -02:00
Roberto Ierusalimschy
de7cf8e63a bug: should call 'luai_userstateclose' only when 'luai_userstateopen'
has been called before
2013-11-08 15:34:22 -02:00
Roberto Ierusalimschy
4c6dfc342b CallInfo lists shrinks together with their associated stacks 2013-09-17 12:40:06 -03:00
Roberto Ierusalimschy
686e57cf9c GC local pause configurable 2013-09-13 13:21:52 -03:00
Roberto Ierusalimschy
dd373a8f66 threads are kept in a separated GC list, linked after the main thread 2013-09-11 11:09:55 -03:00
Roberto Ierusalimschy
1150873447 'luaC_newobj' does not handle special cases; only special case
now is threads, which do not use 'luaC_newobj' anymore.
2013-09-11 09:26:14 -03:00
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)
2013-09-05 16:31:49 -03:00
Roberto Ierusalimschy
aeff4f79fa local collection now calls finalizers 2013-09-03 12:37:10 -03:00
Roberto Ierusalimschy
1bf4faec64 new GC state to sweep 'localgc' list + small changes in sweep control 2013-08-30 16:14:26 -03:00
Roberto Ierusalimschy
9a871dd3db tables and userdata all go to local list, too 2013-08-28 15:30:26 -03:00
Roberto Ierusalimschy
af35c7f398 upvalues collected by reference count 2013-08-27 15:53:35 -03:00
Roberto Ierusalimschy
742b7377d3 Lua closures go to local, too 2013-08-26 09:41:10 -03:00
Roberto Ierusalimschy
50955e27f5 C functions and strings now go to the local list; first version
of the local collector
2013-08-23 10:34:54 -03:00
Roberto Ierusalimschy
0df6635711 "fixed" objects kept in a separated list (instead of being kept in
'allgc' list with a bit marking them)
2013-08-21 17:09:51 -03:00
Roberto Ierusalimschy
ae800656c9 change in string table: string table is now independent of GC lists; all
strings live in 'normal' GC lists
2013-08-21 16:21:16 -03:00
Roberto Ierusalimschy
439d74e29f added 'local' bit (true => object is only refered by local variables) 2013-08-16 15:55:49 -03:00
Roberto Ierusalimschy
623e388bb4 double-linked list of all upvalues elliminated and changed to a
traversal of all non-marked threads
2013-08-07 09:18:11 -03:00
Roberto Ierusalimschy
677d90165f no more generational collection !!! 2013-08-05 13:58:28 -03:00
Roberto Ierusalimschy
c6b6024a9d cast in 'luai_makeseed' now casts to needed type 2012-10-02 14:40:53 -03:00