aboutsummaryrefslogtreecommitdiff
path: root/lgc.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Small changes in macros that change GC colorsRoberto Ierusalimschy2020-08-131-11/+12
| | | | | | | | | | | | | - Macro 'gray2black' was renamed 'nw2black' (Non-White to black), as it was already being used on objects that could be already black. - Macros 'white2gray' and 'black2gray' were unified in 'set2gray'; no reason to have two macros when one will do and, again, 'black2gray' was already being used on objects that could be already gray. Moreover, macros 'maskcolors' and 'maskgcbits' were negated to have ones in the described bits, instead of zeros. (This naming seems more intuitive.)
* Better tests for gray listsRoberto Ierusalimschy2020-08-071-1/+4
| | | | | Test uses an extra bit in 'marked' to mark all elements in gray lists and then check against elements colored gray.
* Free bit 7 of GC 'marked' fieldRoberto Ierusalimschy2020-08-071-2/+1
| | | | | | | | Tables were using this bit to indicate their array sizes were real ('isrealasize'), but this bit can be useful for tests. Instead, they can use bit 7 of their 'flag' field for that purpose. (There are only six fast-access metamethods.) This 'flag' field only exists in tables, so this use does not affect other types.
* Avoid the creation of too many strings in 'package'Roberto Ierusalimschy2019-05-031-1/+1
| | | | | | | | | Both when setting a path and searching for a file ('searchpath'), this commit reduces the number of intermediate strings created in Lua. (For setting a path the change is not relevant, because this is done only twice when loading the module. Anyway, it is a nice example of how to use auxlib buffers to manipulate strings in the C API.)
* After a "bad collections", avoid switching back back to generationalRoberto Ierusalimschy2019-01-301-1/+8
| | | | | | | After a major bad collection (one that collects too few objects), next collection will be major again. In that case, avoid switching back to generational mode (as it will have to switch again to incremental to do next major collection).
* Removed internal cache for closuresRoberto Ierusalimschy2018-11-011-4/+0
| | | | | | | | | | | | | | | | | | | The mechanism of "caching the last closure created for a prototype to try to reuse it the next time a closure for that prototype is created" was removed. There are several reasons: - It is hard to find a natural example where this cache has a measurable impact on performance. - Programmers already perceive closure creation as something slow, so they tend to avoid it inside hot paths. (Any case where the cache could reuse a closure can be rewritten predefining the closure in some variable and using that variable.) - The implementation was somewhat complex, due to a bad interaction with the generational collector. (Typically, new closures are new, while prototypes are old. So, the cache breaks the invariant that old objects should not point to new ones.)
* Removed extra information from RCS keyword stringsRoberto Ierusalimschy2018-08-231-1/+1
| | | | | Version numbers and dates (mostly wrong) from RCS keyword strings removed from all source files; only the file name are kept.
* no more 'TESTGRAYBIT' (to free this bit for real uses)Roberto Ierusalimschy2018-06-111-3/+4
|
* more generic way to handle 'gclist'Roberto Ierusalimschy2018-02-191-2/+2
|
* default for minor collection intervals a little largerRoberto Ierusalimschy2018-02-051-4/+4
|
* janitor work on castsRoberto Ierusalimschy2018-01-281-3/+3
|
* some cleaning in GC parametersRoberto Ierusalimschy2017-10-111-4/+14
|
* revamping the incremental collectorRoberto Ierusalimschy2017-05-261-9/+11
| | | | | | 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
* barrier for prototype's cache (with new gray list 'protogray' to keepRoberto Ierusalimschy2017-05-041-1/+5
| | | | prototypes to have their caches visited again) + constant 'MAXMISS'
* Upvalues collected like everything else (with mark-sweep) insteadRoberto Ierusalimschy2017-04-111-9/+1
| | | | of reference count (simpler and better for generational mode)
* Comments for generational collectorRoberto Ierusalimschy2017-04-101-3/+3
|
* small changes in 'luaC_upvalbarrier'Roberto Ierusalimschy2017-04-061-4/+4
|
* generational collector (still not complete)Roberto Ierusalimschy2017-04-051-15/+39
|
* generational collection: new attempt (still incomplete)Roberto Ierusalimschy2017-02-231-3/+6
|
* avoid empty macro arguments (invalid in C89)Roberto Ierusalimschy2015-12-211-2/+2
|
* 'condchangemem' also may need to run 'pre'/'pos'Roberto Ierusalimschy2015-10-211-2/+3
|
* added commentsRoberto Ierusalimschy2015-10-201-1/+8
|
* cleaner definition for 'luaC_condGC', using 'pre'/'pos' parametersRoberto Ierusalimschy2015-10-201-4/+5
|
* barrier macros rewritten as expressionsRoberto Ierusalimschy2015-08-031-13/+13
|
* `name' in comments changed to 'name'Roberto Ierusalimschy2014-10-251-2/+2
|
* 'iswhite' and related macros now can work directly on any objectRoberto Ierusalimschy2014-07-191-4/+4
| | | | (no need to convert to 'GCObject')
* put the restriction that 'luaC_barrierback' works only on tablesRoberto Ierusalimschy2014-07-191-3/+3
| | | | in its prototype
* no need for field 'gch' anymoreRoberto Ierusalimschy2014-07-171-8/+8
|
* detail (removed unused prototype)Roberto Ierusalimschy2014-03-191-2/+1
|
* no need to keep threads in a different GC list, now that there is theRoberto Ierusalimschy2014-02-181-7/+6
| | | | 'twups' list
* change in the way 'collectgarbage("step", size)' interprets 'size'Roberto Ierusalimschy2014-02-141-2/+1
| | | | | (mimicking the way the GC itself behaves when Lua allocates 'size' Kbytes)
* better control for number of finalizers called at each GC cycleRoberto Ierusalimschy2014-02-131-2/+3
| | | | (increases progressively)
* no more local collectionRoberto Ierusalimschy2014-02-131-20/+11
|
* keep a single list of objects to be finalized (with local and non-localRoberto Ierusalimschy2014-02-111-8/+7
| | | | objects), to ensure finalization order
* detail (setmetatable do not need to use a back GC barrier)Roberto Ierusalimschy2013-09-111-5/+1
|
* new names and better order for GC states (sweep first lists thatRoberto Ierusalimschy2013-09-111-9/+9
| | | | can have dead objects)
* threads are kept in a separated GC list, linked after the main threadRoberto Ierusalimschy2013-09-111-4/+5
|
* objects in list 'tobefnz' have a GC life-cycle like all othersRoberto Ierusalimschy2013-09-111-3/+4
| | | | (specifically they are cleaned during sweep phase)
* 'luaC_newobj' does not handle special cases; only special caseRoberto Ierusalimschy2013-09-111-6/+5
| | | | now is threads, which do not use 'luaC_newobj' anymore.
* local collection now calls finalizersRoberto Ierusalimschy2013-09-031-5/+6
|
* new GC state to sweep 'localgc' list + small changes in sweep controlRoberto Ierusalimschy2013-08-301-5/+7
|
* details (a few casts moved from macro invocation to macro definition)Roberto Ierusalimschy2013-08-291-3/+3
|
* LOCALBLACK changed to LOCALMARK and used also to control whether objectRoberto Ierusalimschy2013-08-271-2/+2
| | | | | is in 'localgc' list + luaC_newobj by default puts object in 'localgc' list
* upvalues collected by reference countRoberto Ierusalimschy2013-08-271-4/+10
|
* C functions and strings now go to the local list; first versionRoberto Ierusalimschy2013-08-231-1/+2
| | | | of the local collector
* "fixed" objects kept in a separated list (instead of being kept inRoberto Ierusalimschy2013-08-211-3/+3
| | | | 'allgc' list with a bit marking them)
* change in string table: string table is now independent of GC lists; allRoberto Ierusalimschy2013-08-211-6/+5
| | | | strings live in 'normal' GC lists
* GC bits SEPARATED and FINALIZEDBIT mixed in FINALIZEDBIT (with simplerRoberto Ierusalimschy2013-08-201-5/+5
| | | | control)
* "barrier" for link prototype->cache changed to be consistent withRoberto Ierusalimschy2013-08-191-4/+1
| | | | GC behavior (link is cleared to preserve invariant)
* added 'local' bit (true => object is only refered by local variables)Roberto Ierusalimschy2013-08-161-6/+14
|