Commit Graph

  • 32c1764b5d slightly better definition for 'isgray' Roberto Ierusalimschy 2010-05-07 15:43:51 -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
  • a4f20e3c8b comments Roberto Ierusalimschy 2010-05-06 15:17:22 -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
  • 7444b5a1d5 better documentation of GC costs Roberto Ierusalimschy 2010-05-05 10:39:58 -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
  • fde866e303 details (comments) Roberto Ierusalimschy 2010-05-04 14:25:19 -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
  • dc2b8a0073 detail Roberto Ierusalimschy 2010-04-30 15:36:22 -03:00
  • 9a9fe42deb wrong comment Roberto Ierusalimschy 2010-04-30 15:17:24 -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
  • 5d79c6684b removed commented-out debugging code Roberto Ierusalimschy 2010-04-29 18:42:33 -03:00
  • 3410dcd375 new way to control GC speed Roberto Ierusalimschy 2010-04-29 14:35:10 -03:00
  • 5a7a0c72d8 'luaC_linkupval' embedded into call site Roberto Ierusalimschy 2010-04-29 14:34:35 -03:00
  • ee7478e884 improved 'lua_checkmemory', with better control over gray objects Roberto Ierusalimschy 2010-04-29 14:33:51 -03:00
  • aaa5d7adab 'luaC_linkupval' moved into 'lfunc.c' code + new way to control GC speed Roberto Ierusalimschy 2010-04-29 14:32:40 -03:00
  • 3eb1788bb4 new way to control GC speed (keeping a 'debt' counter) Roberto Ierusalimschy 2010-04-29 14:31:31 -03:00
  • 00114a95b2 lots of new comments + small changes in loop controls + other small "janitor work" Roberto Ierusalimschy 2010-04-26 14:58:00 -03:00
  • 4aaf0ef75c "to-be-finalized" objects marked and sweeped like all other objects Roberto Ierusalimschy 2010-04-20 17:15:30 -03:00
  • ed720d09f3 upvalue barriers for Lua functions must act on the upvalue itself, not on its closure Roberto Ierusalimschy 2010-04-20 17:14:50 -03:00
  • 376e939ef6 missing parentheses around 'luaL_pushresultsize' declaration Roberto Ierusalimschy 2010-04-19 15:52:15 -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
  • b7be05ad27 invalid instructions "cannot" happen Roberto Ierusalimschy 2010-04-15 16:43: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
  • 28aa733c15 macro 'eqstr' was being used to compare non-string entities Roberto Ierusalimschy 2010-04-08 14:06:33 -03:00
  • 6abde1b05a no need to keep "_ENV" name in global state (can be kept in lex state) Roberto Ierusalimschy 2010-04-05 13:35:37 -03:00
  • d394d5536a new macro 'eqstr' Roberto Ierusalimschy 2010-04-05 13:26:37 -03:00
  • a2f98314a3 'lua_pushstring' now uses 'luaS_new' Roberto Ierusalimschy 2010-04-05 11:21:38 -03:00
  • a09c8d7beb cannot sweep main thread in sweepstring phase Roberto Ierusalimschy 2010-04-05 11:15:35 -03:00
  • f80ff7a336 'luaS_new' changed from macro to function Roberto Ierusalimschy 2010-04-03 17:24:18 -03:00
  • a08fc34ee4 avoid using 'luaS_new' when can use 'luaS_newlstr' Roberto Ierusalimschy 2010-04-02 12:39:07 -03:00
  • d00d2eaf51 small changes in 'luaO_pushvfstring' Roberto Ierusalimschy 2010-04-02 12:30:27 -03:00
  • 11126422d9 option to return GC to normal (incremental, non generational) mode Roberto Ierusalimschy 2010-04-02 12:19:19 -03:00
  • e54668b696 added proper code to trace garbage collection Roberto Ierusalimschy 2010-04-02 11:37:41 -03:00
  • 9eb832de54 work related to hooks moved from 'luaV_execute' to 'traceexec' Roberto Ierusalimschy 2010-03-29 17:45:49 -03:00
  • 82a1f5d354 comments Roberto Ierusalimschy 2010-03-29 14:44:31 -03:00
  • a8d3aa14fd global table now is only kept in the registry Roberto Ierusalimschy 2010-03-29 14:43:14 -03:00
  • 064e406f67 no more fenvs! Roberto Ierusalimschy 2010-03-26 17:58:11 -03:00
  • 5c87f61e6b major collections in generational mode Roberto Ierusalimschy 2010-03-25 16:37:23 -03:00
  • 3aa9598177 'mainthread' is not inserted in the 'allgc' list anymore, but swept separately. Roberto Ierusalimschy 2010-03-25 10:06:36 -03:00
  • 64d39ed1b6 generational mode no longer sweep old objects Roberto Ierusalimschy 2010-03-24 12:51:10 -03:00
  • 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) Roberto Ierusalimschy 2010-03-24 10:07:01 -03:00
  • 5cb128ea54 BUG: emergency collector might resize 'strt' (string table) when creating a new string + atomic and markroot steps has some cost + full collection must leave collector in proper state when mode is generational Roberto Ierusalimschy 2010-03-23 17:16:06 -03:00
  • 74123e9686 draft version of a generational mode for garbage collection. (Not well tested; no major collections; ...) Roberto Ierusalimschy 2010-03-22 15:28:03 -03:00
  • 9c196bebad detail (wrong comment about LUAI_GCPAUSE) Roberto Ierusalimschy 2010-03-22 14:45:55 -03:00
  • 28b2566c97 'lua_assert' not visible from libraries Roberto Ierusalimschy 2010-03-22 14:28:31 -03:00
  • caf74dd731 'cpcall' renamed to 'ccall' as it does not do a protected call Roberto Ierusalimschy 2010-03-19 18:04:17 -03:00
  • 62840c5fad 'ipairs' is deprecated Roberto Ierusalimschy 2010-03-19 12:52:48 -03:00
  • 5ca7cdd709 for compatibility only: 'module' changes the first upvalue of calling function to affect its environment Roberto Ierusalimschy 2010-03-19 12:02:34 -03:00
  • 1514e49d43 avoid using function environments in C libraries (as it probably will be deprecated) Roberto Ierusalimschy 2010-03-17 18:37:37 -03:00
  • 22ef84b6c8 '_ENV' name permanently stored in global state for easier access Roberto Ierusalimschy 2010-03-13 12:55:42 -03:00
  • 63a2b62468 must include 'string.h' because a macro uses 'strlen' Roberto Ierusalimschy 2010-03-13 12:55:01 -03:00
  • 489253d753 better definitions for lua_[gs]etglobal + less uses of ENVIRONINDEX Roberto Ierusalimschy 2010-03-13 00:57:46 -03:00
  • 25c557ec63 first version of _ENV; no more global variables Roberto Ierusalimschy 2010-03-12 16:14:06 -03:00
  • f292760f12 small optimization in luaL_addlstring (avoid adding chars one by one) (suggested by Chuck Coffing) Roberto Ierusalimschy 2010-03-12 15:59:32 -03:00
  • 1124cb1247 first step towards _ENV: all chunks have an puvalues _ENV with the global table Roberto Ierusalimschy 2010-03-08 13:55:52 -03:00
  • c295147874 when finding a 'name' for a function, handle the case when the function is a for iterator Roberto Ierusalimschy 2010-03-05 11:01:29 -03:00
  • e560ac4862 when searching for a variable name, look existing upvalues before goingg to upper levels Roberto Ierusalimschy 2010-03-04 15:12:57 -03:00
  • 915a9a912c just in case, better to flush error messages Roberto Ierusalimschy 2010-03-03 15:53:02 -03:00