Commit Graph

  • e94fac8956 bug: generational collection was not running collector! (must write a test for this...) Roberto Ierusalimschy 2010-06-02 15:36:58 -03:00
  • 2c1a5d678d factoring out common code in 'module' and 'luaL_openlib' Roberto Ierusalimschy 2010-05-31 13:34:19 -03:00
  • bd619b9311 new macro MAXUPVAL (maximum number of upvalues per closure) Roberto Ierusalimschy 2010-05-31 13:08:55 -03:00
  • aca84ee1a0 correct definition for 'lua_cpcall' (tested) Roberto Ierusalimschy 2010-05-28 11:27:07 -03:00
  • 5038e3c58c corrected compatibility macro 'lua_cpcall' (untested) Roberto Ierusalimschy 2010-05-27 09:06:42 -03:00
  • 5a7dee0c5d added class '%g' in patterns (for graphical characters) Roberto Ierusalimschy 2010-05-24 16:34:57 -03:00
  • ddf1f2a053 GC should not run when stopped, even in hard tests Roberto Ierusalimschy 2010-05-24 16:29:46 -03:00
  • e34d3c06b0 it is better to call open functions with lua_call to not mess the caller stack Roberto Ierusalimschy 2010-05-20 09:57:59 -03:00
  • e8a2c36909 more comments Roberto Ierusalimschy 2010-05-18 14:32:19 -03:00
  • 3c39a0e8cb bug: loadfile of binary files read first character twice Roberto Ierusalimschy 2010-05-18 14:21:24 -03:00
  • 3d45a8eb1c really stop collection during finalizers Roberto Ierusalimschy 2010-05-17 17:39:31 -03:00
  • 3d80aeab5a lua_pushstring may reallocate the stack, making 'o' a dangling pointer Roberto Ierusalimschy 2010-05-17 17:10:17 -03:00
  • 3811e23b32 detail (comment) Roberto Ierusalimschy 2010-05-17 15:30:27 -03:00
  • 12c764ed1e semicolons now represent the empty statement Roberto Ierusalimschy 2010-05-15 10:32:02 -03:00
  • e99e9a9473 patches for last two bugs (string.format and io.read) Roberto Ierusalimschy 2010-05-14 12:34:57 -03:00
  • f35ac38e1d updated depenency lists + eliminated duplication of definitions for MYCFLAGS, MYLDFLAGS, and MYLIBS. Roberto Ierusalimschy 2010-05-14 12:08:10 -03:00
  • 058279d548 comments Roberto Ierusalimschy 2010-05-14 12:03:43 -03:00
  • 69ba1ac441 new "instruction" 'absindex' Roberto Ierusalimschy 2010-05-14 10:15:54 -03:00
  • 4a925c1552 in 'absindex', do not need to call gettop (can inline it) Roberto Ierusalimschy 2010-05-14 10:15:26 -03:00
  • cf531912f2 one more macro (mvdispatch) to easy experiments with alternative dispatch methods Roberto Ierusalimschy 2010-05-13 16:53:05 -03:00
  • 0d00729e31 detail (breaking a long line) Roberto Ierusalimschy 2010-05-13 09:03:26 -03:00
  • b6e9fcbd70 use of macro ('vmcase') to format all cases in main switch of 'luaV_execute' (to facilitate experiences with direct threading) Roberto Ierusalimschy 2010-05-12 17:40:35 -03:00
  • 8554baeacf small changes in 'luaV_execute' to make cases more regularly formatted Roberto Ierusalimschy 2010-05-12 17:31:33 -03:00
  • f5b7f077ec added comments to '#else' and '#endif' in long conditionals Roberto Ierusalimschy 2010-05-12 11:17:36 -03:00
  • e924a7f9ea new API function 'lua_absindex' Roberto Ierusalimschy 2010-05-12 11:09:20 -03:00
  • 4fd76b8148 avoid "strong" cast Roberto Ierusalimschy 2010-05-11 17:49:26 -03:00
  • de0f51a02c wrong type being assigned (not detected because of obj2gco macro) Roberto Ierusalimschy 2010-05-11 17:48:36 -03:00
  • 0567221848 udata in 'tobefnz' list be have old bit on (it will be cleared when udata is moved to 'allgc' list) Roberto Ierusalimschy 2010-05-10 15:24:36 -03:00
  • 1c1a98e872 corrected some places where an old object could end up in front of a new one + minimal documentation about this problem Roberto Ierusalimschy 2010-05-10 15:23:45 -03:00
  • c006f085d9 new macro 'resetoldbit' Roberto Ierusalimschy 2010-05-10 13:46:49 -03:00
  • a48e330f37 macros 'lua_number2int' and 'lua_number2uint' for Visual Studio corrected and tested Roberto Ierusalimschy 2010-05-10 13:38:58 -03:00
  • dcc070683c avoid reserving LUA_RIDX_LAST slots in any table used by reference system. Store free list in a field indexed by a unique name, instead of using a numerical index. Roberto Ierusalimschy 2010-05-10 12:25:02 -03:00
  • 2d81cfa4e1 corrected definition of 'lua_register' (there is no LUA_ENVIRONINDEX anymore) Roberto Ierusalimschy 2010-05-10 10:50:20 -03:00
  • 0bccf03d7e slightly better definition for 'changenvalue' Roberto Ierusalimschy 2010-05-07 15:44:46 -03:00
  • ad2b5decc8 'lua_assert' can be empty when assertions are off Roberto Ierusalimschy 2010-05-07 15:44:12 -03:00
  • 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