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
9aec500a26
no need for field 'gch' anymore
2014-07-17 14:27:49 -03:00
Roberto Ierusalimschy
5a9cc57a5e
change in GCObject: instead of being a union, it is now a structure
...
with the common header of all collectable objects; union is used
only for conversions. (Goal is to be able to check that the cast
'obj2gco' can have a check to ensure that object being converted
is really a collectable object.). This is the first step in the
change.
2014-07-17 14:09:50 -03:00
Roberto Ierusalimschy
1aa4f69b51
new type 'lua_Ctx' for continuation-function contexts (to allow type
...
to be configurable)
2014-07-17 10:53:37 -03:00
Roberto Ierusalimschy
fa3113ffbf
cleaner way to handle bit CIST_OAH (with auxiliar macros)
2014-06-12 16:07:30 -03:00
Roberto Ierusalimschy
88a9e51f34
bit-field CIST_YIELDED removed (it was never consulted)
2014-06-10 16:18:50 -03:00
Roberto Ierusalimschy
542b6cfc02
no need for field 'status' in structure 'CallInfo' (after removal
...
of 'lua_getctx') + field 'old_allowhook' can be packed into a single
bit
2014-06-10 15:51:21 -03:00
Roberto Ierusalimschy
6f6fd96e3b
new type lua_KFunction + no more 'lua_getctx'
2014-06-10 14:41:38 -03:00
Roberto Ierusalimschy
0aa32fa0cb
small changes in field order in some structs to reduce padding
2014-05-15 17:41:27 -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
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
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
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
33c49f7fa0
some details over new implementation of string table
2013-08-22 12:21:48 -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
8f6b80aa1d
GC bits SEPARATED and FINALIZEDBIT mixed in FINALIZEDBIT (with simpler
...
control)
2013-08-20 14:46:34 -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
f7ec36ab16
comment
2012-07-02 10:37:04 -03:00
Roberto Ierusalimschy
cc2a60ecb7
bugs in yields inside debug hooks
2012-06-08 12:14:04 -03:00
Roberto Ierusalimschy
086da10dac
merge of fields 'lastmajormem' (used in gen. mode) and 'estimate'
...
(used in inc. mode)
2012-05-22 14:50:39 -03:00
Roberto Ierusalimschy
b36b4b521f
try to avoid sweeping new objects created with new white (and
...
therefore not collectable in the current cycle)
2012-05-22 14:32:25 -03:00
Roberto Ierusalimschy
2a66b34f72
revamp of the GC pace control; more like 5.1: any X Kbytes allocated
...
makes the GC handle f(X) Kbytes of objects
2012-05-20 17:36:44 -03:00
Roberto Ierusalimschy
678c1255c9
random seed used in the hash of all strings to avoid intentional
...
collisions
2012-02-01 19:57:15 -02:00
Roberto Ierusalimschy
a4b96ce9a3
first implementation of long strings
2012-01-25 19:05:40 -02:00
Roberto Ierusalimschy
fd22ccd6d0
object tag keeps variant bits too -> no need for 'isC' field in
...
Closures + more strick typing for closure variants
2012-01-20 20:05:50 -02:00
Roberto Ierusalimschy
9caf5b4f79
lint (unused definition)
2011-09-30 09:46:06 -03:00
Roberto Ierusalimschy
3dc5475e23
'nCcalls' should be local to each thread, as each thread may have its
...
own C stack (with LuaThreads or something similar)
2011-08-23 14:24:34 -03:00
Roberto Ierusalimschy
3b44821334
stricter control (using tag variants) over closure kinds (Lua x C)
2011-06-02 16:31:40 -03:00
Roberto Ierusalimschy
551b076f1c
change in the relationship between totalbytes and GCdebt - luaM_realloc_
...
is too critical to update two counters
2010-12-20 17:40:07 -02:00
Roberto Ierusalimschy
737f119187
better control for GC running or stopped
2010-12-20 16:17:46 -02:00
Roberto Ierusalimschy
9b7a12c46d
finalizers (__gc) for tables
2010-11-26 12:32:31 -02:00
Roberto Ierusalimschy
fdd5f2f7a3
comment typos
2010-10-29 15:52:46 -02:00
Roberto Ierusalimschy
ffff9a49da
'nresults' in CallInfo now refers to number of results that the current
...
function returns (and not what it expects from a call)
2010-09-30 14:21:31 -03:00
Roberto Ierusalimschy
6828f6d427
new parameter 'majorinc' to control frequency of major collections
...
in generational mode
2010-09-03 11:14:01 -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
3eb1788bb4
new way to control GC speed (keeping a 'debt' counter)
2010-04-29 14:31:31 -03:00
Roberto Ierusalimschy
7dfa4cd655
first implementation of light C functions
2010-04-14 12:13:48 -03:00
Roberto Ierusalimschy
d20ff60615
new macro LUA_NUMTAGS
2010-04-12 13:07:29 -03:00
Roberto Ierusalimschy
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
2010-04-08 14:16:46 -03:00
Roberto Ierusalimschy
6abde1b05a
no need to keep "_ENV" name in global state (can be kept in lex state)
2010-04-05 13:35:37 -03:00
Roberto Ierusalimschy
a8d3aa14fd
global table now is only kept in the registry
2010-03-29 14:43:14 -03:00
Roberto Ierusalimschy
064e406f67
no more fenvs!
2010-03-26 17:58:11 -03:00
Roberto Ierusalimschy
5c87f61e6b
major collections in generational mode
2010-03-25 16:37:23 -03:00
Roberto Ierusalimschy
4433dbb5f5
userdata with finalizers are kept in a separated list ('udgc'), instead
...
of at the end of 'rootgc' (which was renamed to 'allgc', as it is not
"root" in the usual meaning for collectors)
2010-03-24 10:07:01 -03:00
Roberto Ierusalimschy
74123e9686
draft version of a generational mode for garbage collection. (Not well
...
tested; no major collections; ...)
2010-03-22 15:28:03 -03:00
Roberto Ierusalimschy
22ef84b6c8
'_ENV' name permanently stored in global state for easier access
2010-03-13 12:55:42 -03:00
Roberto Ierusalimschy
c8ff7de7f0
field 'oldtop' renamed to 'extra', as it can be used for other
...
purposes
2010-02-09 09:55:37 -02:00
Roberto Ierusalimschy
f84b575cfa
no more pseudoindex LUA_GLOBALSINDEX; global table now accessible
...
through registry
2009-12-22 13:32:50 -02:00
Roberto Ierusalimschy
3a9ae612a4
macro 'ngcotouv' is the same as 'gco2uv', so it was removed
2009-12-11 11:39:34 -02:00
Roberto Ierusalimschy
3c4d970a7b
comment typos
2009-11-26 09:39:20 -02:00
Roberto Ierusalimschy
b0f2b288a6
new scheme for debug info about tail calls: no more 'fake' stack entries,
...
but stack entry knows whether it was tail called
2009-11-25 13:27:51 -02:00
Roberto Ierusalimschy
ce444bff33
(huge) simplification of GC management
2009-11-18 11:13:47 -02:00
Roberto Ierusalimschy
5bc91c6405
no more one environment per thread: all threads share a single global
...
environment
2009-10-23 17:12:19 -02:00
Roberto Ierusalimschy
f76f4cb79d
new way to control stack overflow, controling only total size of the stack
2009-07-15 14:26:14 -03:00
Roberto Ierusalimschy
1d6ebce296
new function 'lua_version' (so that 'checkversion' can be implemented
...
in the auxiliary library)
2009-06-18 15:59:18 -03:00
Roberto Ierusalimschy
9423e22aa3
no more L->base + ci->base only for Lua functions (C functions may use
...
'func')
2009-06-01 16:09:26 -03:00
Roberto Ierusalimschy
d3037d97ec
several small improvements based on 'ci' being fixed now (including
...
erasing savedpc from lua_State)
2009-04-17 19:00:01 -03:00
Roberto Ierusalimschy
4f88418170
'CallInfo' stack implemented as double-linked list instead of an array
2009-04-17 11:28:06 -03:00
Roberto Ierusalimschy
70a63fa5ad
first implementation of yieldable 'pcall'
2009-04-08 15:04:33 -03:00
Roberto Ierusalimschy
6d0ae11c57
'context' added to suspendable calls
2009-03-23 11:26:12 -03:00
Roberto Ierusalimschy
ba484b9eb1
yielding across lua_call (first version)
2009-03-10 14:14:37 -03:00
Roberto Ierusalimschy
1817dfc301
initial separation, in CallInfo, of what is relevant only to Lua
...
functions or only to C functions
2009-03-04 10:32:29 -03:00
Roberto Ierusalimschy
d2ebdc045b
new macro 'lua_checkversion' to check whether core and application are
...
compatible
2009-02-18 14:20:56 -03:00
Roberto Ierusalimschy
f94cd2201c
better control of call status through CallInfo
2008-08-26 10:27:42 -03:00
Roberto Ierusalimschy
394646891c
new field 'status' in CallInfo structure
2008-08-13 14:01:33 -03:00
Roberto Ierusalimschy
0c8f5fc2fd
simplification in the handling of finalizers: no more 'tmudata' list +
...
no more GCSsweeptmu collector's state
2008-06-26 16:42:45 -03:00
Roberto Ierusalimschy
8fd28611d5
outdated comment
2008-06-23 13:51:08 -03:00
Roberto Ierusalimschy
e2b366c760
userdata with finalizers are kept in a separated list
2008-02-19 15:55:09 -03:00
Roberto Ierusalimschy
a73930228a
more options for 'kinds' of Garbage Collection
2008-02-11 13:45:30 -02:00
Roberto Ierusalimschy
5e8dd55574
first implementation of ephemerons
2007-10-31 13:41:19 -02:00
Roberto Ierusalimschy
0e961ad47a
some changes toward ephemerons
2007-10-29 14:51:20 -02:00
Roberto Ierusalimschy
593bfc9668
should not manipulate NULL pointers (even without accessing them)
2007-02-07 15:48:52 -02:00
Roberto Ierusalimschy
d1ef7e0ec6
avoid local "pc" in interpreter loop (tricky optimization with no real gain)
2006-09-19 10:57:50 -03:00
Roberto Ierusalimschy
93bf618504
BUG: there is only one C stack, so nCcalls must be global
2006-08-15 16:59:20 -03:00
Roberto Ierusalimschy
3ca9af51a4
emergency garbage collector (core forces a GC when allocation fails)
2006-07-11 12:53:29 -03:00
Roberto Ierusalimschy
ea2cc2bc47
small improvements for allignments
2006-02-06 16:27:59 -02:00
Roberto Ierusalimschy
e84b11a494
avoid names starting with '_'
2005-07-09 10:22:34 -03:00
Roberto Ierusalimschy
eca9fa02d2
small improvement
2005-06-03 17:16:16 -03:00
Roberto Ierusalimschy
6cf85dcc90
metatables for all types
2005-05-05 12:34:03 -03:00
Roberto Ierusalimschy
8718fda9b2
added LUAI_FUNC to functions not in the API
2005-04-25 16:24:10 -03:00
Roberto Ierusalimschy
7b6c3b463e
small optimizations
2005-04-05 10:41:29 -03:00
Roberto Ierusalimschy
390256edf7
better name for GC pause
2005-03-22 13:04:29 -03:00
Roberto Ierusalimschy
fb0f95a2b7
call limit may be larger than shorts
2005-03-18 15:55:09 -03:00
Roberto Ierusalimschy
d55bb795fa
details
2005-02-23 14:30:22 -03:00
Roberto Ierusalimschy
7d45a5f48f
C functions and userdata also have environments
2005-02-18 10:40:02 -02:00
Roberto Ierusalimschy
678d2fb2ac
all collected userdata must go to the end of the list of finalizers
2005-02-11 18:03:35 -02:00
Roberto Ierusalimschy
334ba8132b
cleaner way to remark open upvalues
2005-01-18 15:18:09 -02:00
Roberto Ierusalimschy
5be517602e
no more generational collector (and no more `noinc' mode)
2005-01-14 12:19:42 -02:00