Commit Graph

482 Commits

Author SHA1 Message Date
Roberto Ierusalimschy
4fd76b8148 avoid "strong" cast 2010-05-11 17:49:26 -03:00
Roberto Ierusalimschy
1c1a98e872 corrected some places where an old object could end up in front
of a new one + minimal documentation about this problem
2010-05-10 15:23:45 -03:00
Roberto Ierusalimschy
c006f085d9 new macro 'resetoldbit' 2010-05-10 13:46:49 -03:00
Roberto Ierusalimschy
de97177744 avoid 'else assert' (which may result in an empty else) 2010-05-07 15:43:24 -03:00
Roberto Ierusalimschy
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')
2010-05-07 15:19:36 -03:00
Roberto Ierusalimschy
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)
2010-05-06 15:18:07 -03:00
Roberto Ierusalimschy
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)
2010-05-05 15:58:36 -03:00
Roberto Ierusalimschy
7444b5a1d5 better documentation of GC costs 2010-05-05 10:39:58 -03:00
Roberto Ierusalimschy
3e662cec89 full GC must run finalizers only after finishing everything else
(including a return to generational mode if needed)
2010-05-04 15:09:06 -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
0c27de2e7b no more 'finalize' phase in GC; finalizers are called along the
entire cycle
2010-05-03 14:33:39 -03:00
Roberto Ierusalimschy
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).
2010-05-03 08:55:40 -03:00
Roberto Ierusalimschy
4d871ee973 "gray lists" only need to be valid when 'keepinvariant' is true 2010-04-30 15:37:14 -03:00
Roberto Ierusalimschy
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.
2010-04-29 18:43:36 -03:00
Roberto Ierusalimschy
aaa5d7adab 'luaC_linkupval' moved into 'lfunc.c' code + new way to control GC speed 2010-04-29 14:32:40 -03:00
Roberto Ierusalimschy
00114a95b2 lots of new comments + small changes in loop controls + other small
"janitor work"
2010-04-26 14:58:00 -03:00
Roberto Ierusalimschy
4aaf0ef75c "to-be-finalized" objects marked and sweeped like all other objects 2010-04-20 17:15:30 -03:00
Roberto Ierusalimschy
d20ff60615 new macro LUA_NUMTAGS 2010-04-12 13:07:29 -03:00
Roberto Ierusalimschy
a09c8d7beb cannot sweep main thread in sweepstring phase 2010-04-05 11:15:35 -03:00
Roberto Ierusalimschy
e54668b696 added proper code to trace garbage collection 2010-04-02 11:37:41 -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
3aa9598177 'mainthread' is not inserted in the 'allgc' list anymore, but swept
separately.
2010-03-25 10:06:36 -03:00
Roberto Ierusalimschy
64d39ed1b6 generational mode no longer sweep old objects 2010-03-24 12:51:10 -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
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
2010-03-23 17:16:06 -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
f84b575cfa no more pseudoindex LUA_GLOBALSINDEX; global table now accessible
through registry
2009-12-22 13:32:50 -02:00
Roberto Ierusalimschy
0bbdddc86b allocator function receives the tag of object being allocated in 'osize'
when 'ptr' is NULL.
2009-12-17 13:46:44 -02:00
Roberto Ierusalimschy
8da245bfd2 better to keep GC state numbers sequential, to optimize switch in
'singlestep'
2009-12-11 19:31:14 -02:00
Roberto Ierusalimschy
a2a2abcba4 new function 'luaC_runtilstate' to advance GC until a "valid" state 2009-12-11 17:14:59 -02:00
Roberto Ierusalimschy
3c4d970a7b comment typos 2009-11-26 09:39:20 -02:00
Roberto Ierusalimschy
ce444bff33 (huge) simplification of GC management 2009-11-18 11:13:47 -02:00
Roberto Ierusalimschy
88eb901f81 registry and global table may be changed through the API without a
write barrier, so GC should visit them in the atomic phase.
2009-11-09 16:29:21 -02:00
Roberto Ierusalimschy
a921d81033 avoid using 'ttype' when there is an explicit test + macro 'checkdeadkey'
to avoid repetitions
2009-11-06 15:06:19 -02:00
Roberto Ierusalimschy
9756f56354 better control over accesses to TValue fields 2009-11-05 15:43:54 -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
5938212748 information about upvalues (where they come from) kept in Proto structure,
instead of sequence of pseudo-opcodes after OP_CLOSURE
2009-09-28 13:32:50 -03:00
Roberto Ierusalimschy
1829911d7c some operations may shrink g->totalbytes so g->estimate must be
more flexible
2009-09-28 10:50:34 -03:00
Roberto Ierusalimschy
55dc7fb240 bug: stack must be cleared until its end (including extra size) +
control of stack size moved to 'ldo.c'
2009-07-16 13:26:09 -03:00
Roberto Ierusalimschy
4a67e48611 new macro 'condmovestack' instead of 'condhardstacktests' 2009-06-08 16:35:59 -03:00
Roberto Ierusalimschy
019ebcb85f errors in finalizers are propagated with code LUA_ERRGCMM (ERRor in
__gc MetaMethod)
2009-05-21 17:06:11 -03:00
Roberto Ierusalimschy
673c456cba resize string hash table only when new size is smaller than current one 2009-04-29 14:09:41 -03:00
Roberto Ierusalimschy
e091a254df new way to GC stacks: the entire stack must be correct all the times;
the 'dead' part of a stack (after the top) must have only nil's, so
that 'top' may go up without cleaning the stack.
2009-04-28 16:04:36 -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
ba484b9eb1 yielding across lua_call (first version) 2009-03-10 14:14:37 -03:00
Roberto Ierusalimschy
d07abcc6c7 finalizers always called protected 2009-02-17 16:47:58 -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
c3525610fe bug: when closing the state, 'luaC_separateudata' might mark
userdata in the wrong phase of collection, therefore avoiding
their traversal
2008-06-23 19:07:44 -03:00
Roberto Ierusalimschy
7ba62e2985 code reorganization (only changed comments and order of functions) 2008-06-23 13:51:28 -03:00
Roberto Ierusalimschy
e2b366c760 userdata with finalizers are kept in a separated list 2008-02-19 15:55:09 -03:00
Roberto Ierusalimschy
5f0a2f6248 more options for 'kinds' of Garbage Collection + more agressive
shrinking of stacks and string hash
2008-02-11 13:46:03 -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
a7c9e45c64 avoid trailing white spaces 2006-09-11 11:07:24 -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
0079efc479 bug: collector did not compensate enough for userdata with finalizers 2006-05-24 11:34:06 -03:00
Roberto Ierusalimschy
c505f341d6 small changes in casts 2005-12-22 14:19:56 -02:00
Roberto Ierusalimschy
4ff1e5b4e1 details 2005-08-24 14:06:36 -03:00
Roberto Ierusalimschy
680fc88cc2 a small bug 2005-08-04 10:37:38 -03:00
Roberto Ierusalimschy
746a1d612b small bug (type error) 2005-06-07 15:53:45 -03:00
Roberto Ierusalimschy
90de38bf1f warnings in VS .Net 2005-05-31 11:25:18 -03:00
Roberto Ierusalimschy
6cf85dcc90 metatables for all types 2005-05-05 12:34:03 -03:00
Roberto Ierusalimschy
390256edf7 better name for GC pause 2005-03-22 13:04:29 -03:00
Roberto Ierusalimschy
4494094031 detail 2005-03-16 17:02:48 -03:00
Roberto Ierusalimschy
370d31a559 luac´ -> luai' (to avoid confusion with other luac stuff) 2005-03-09 13:28:07 -03:00
Roberto Ierusalimschy
f8df21bd20 `luaconf.h´ exports all its definitions always (so all of them
must have a lua/LUA prefix).
2005-03-08 17:10:05 -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
73d7640244 more secure way to stop GC cycles during finalizers 2005-02-14 11:19:50 -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
4df8800a01 cleaner way to free all objects 2005-02-10 11:25:02 -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
Roberto Ierusalimschy
e2498e079e change in hash algorithm so that it does not need empty slot
(tables can be 100% full)
2005-01-05 16:20:51 -02:00
Roberto Ierusalimschy
c6254dceff a different option for the GC 2004-12-13 10:15:11 -02:00
Roberto Ierusalimschy
39a8082f50 more options for controling the GC 2004-12-06 15:53:42 -02:00
Roberto Ierusalimschy
0e002005b1 better names for `luaM_free...' macros 2004-11-24 17:20:21 -02:00
Roberto Ierusalimschy
2f82bf6fe9 better support for 64-bit machines 2004-11-24 16:55:56 -02:00
Roberto Ierusalimschy
6f1ea817f5 better control over memory-size overflows 2004-11-19 13:52:40 -02:00
Roberto Ierusalimschy
8050e75f9d bug: gc metamethod must disable GC steps (to avoid nested calls) 2004-10-08 13:00:34 -03:00
Roberto Ierusalimschy
bd38017ddf small optimization for table size in machines with double allignment 2004-10-06 15:34:16 -03:00
Roberto Ierusalimschy
0e54d2be36 bug: barrier was wrong for generational phase 2004-09-15 17:38:15 -03:00
Roberto Ierusalimschy
0de2065f4e tighter tests for stack overflow 2004-09-08 11:23:09 -03:00
Roberto Ierusalimschy
0b06241483 better control for GC cycles 2004-08-30 10:44:44 -03:00
Roberto Ierusalimschy
32d4f304db first implementation of generational GC 2004-08-24 17:12:06 -03:00
Roberto Ierusalimschy
26ae992129 less conservative write barrier for tables 2004-08-10 16:17:23 -03:00
Roberto Ierusalimschy
b4cd38ba6c new scheme for configuration through `luaconf.h' 2004-04-30 17:13:38 -03:00
Roberto Ierusalimschy
178246062c reuse `sweeplist' for all lists 2004-03-23 09:57:12 -03:00
Roberto Ierusalimschy
a4e1230f95 better way to control open upvalues 2004-03-15 18:04:33 -03:00
Roberto Ierusalimschy
b876ec61c0 new (temporary?) API for garbage collector 2004-03-09 14:34:35 -03:00
Roberto Ierusalimschy
2aaf7394ad more and better tools (assertions & inspectors) to check incremental GC 2004-02-16 16:09:52 -03:00
Roberto Ierusalimschy
beb2aa5a46 atomic operations are not GC "states" 2003-12-12 16:29:34 -02:00
Roberto Ierusalimschy
47fc57a252 TObject' renamed to TValue' + other name changes and better assertions
for incremental garbage collection
2003-12-10 10:13:36 -02:00
Roberto Ierusalimschy
df429f163a First version of incremental GC 2003-12-09 14:56:11 -02:00
Roberto Ierusalimschy
fe595a45c2 `grayagain' list 2003-12-04 16:52:23 -02:00
Roberto Ierusalimschy
9db1942bac sweep of strings also incremental 2003-12-04 15:22:42 -02:00
Roberto Ierusalimschy
c6eac44a94 two different white flags (to distinguish dead elements from new ones) 2003-12-03 18:03:07 -02:00
Roberto Ierusalimschy
8878554b85 single list for all collectible objects, with udata separated at the
end of the list
2003-12-03 10:30:41 -02:00
Roberto Ierusalimschy
af850484a9 default metatable can be NULL 2003-12-01 16:22:56 -02:00
Roberto Ierusalimschy
1d10acb355 incremental GC phases 2003-12-01 14:33:30 -02:00
Roberto Ierusalimschy
57b6ed6815 initial implementation of white/gray/black coloring 2003-11-19 17:41:57 -02:00
Roberto Ierusalimschy
366e4af3c9 towards incremental GC 2003-11-18 12:55:11 -02:00
Roberto Ierusalimschy
ab7d9bfd0c cleaner code for manipulation of `marked' field 2003-11-17 17:50:05 -02:00
Roberto Ierusalimschy
8332d5c8a5 parser fully reentrant(!) 2003-08-27 18:01:44 -03:00
Roberto Ierusalimschy
a0a384a6b1 bug: userdata to be collected still counts into new GC threshold,
increasing memory consumption
2003-07-29 16:25:37 -03:00
Roberto Ierusalimschy
fa26d294ae new way to control `pc' of running functions 2003-07-16 17:49:02 -03:00
Roberto Ierusalimschy
9e05503ffa bug: C functions also may have stacks larger than current top 2003-07-07 10:32:19 -03:00
Roberto Ierusalimschy
ecf5730c0c (much) smarter way to clear weak tables 2003-05-16 15:58:39 -03:00
Roberto Ierusalimschy
572a69df78 Lua does not need all those different types... 2003-04-28 16:26:16 -03:00
Roberto Ierusalimschy
0d88545b82 warnings from several compilers (mainly typecasts when lua_Number is float) 2003-04-03 10:35:34 -03:00
Roberto Ierusalimschy
ab9e062928 name changes to avoid name collision between macros and variables 2003-03-18 09:50:04 -03:00
Roberto Ierusalimschy
7a40cdbda0 different variables for number of upvalues and size of upvalue array
(makes code clearer)
2003-02-11 08:46:24 -02:00
Roberto Ierusalimschy
6f207b15fb resist errors in finalizers during lua_close 2003-02-10 15:32:50 -02:00
Roberto Ierusalimschy
dd8edecae1 new functions to manipulate upvales (get/setupvalue) 2002-12-19 09:11:55 -02:00
Roberto Ierusalimschy
27c6b4d422 each .c file defines its own name 2002-12-04 15:38:31 -02:00
Roberto Ierusalimschy
c75c3cfd19 avoid names `str...' (may conflict with string.h) 2002-12-02 10:06:10 -02:00
Roberto Ierusalimschy
e47baca75a warnings from Visual C++ 2002-11-25 10:38:47 -02:00
Roberto Ierusalimschy
dbc5451bea comments 2002-11-22 16:01:46 -02:00
Roberto Ierusalimschy
5142e630bf new macro `condhardstacktests' to control hard stack tests 2002-11-21 15:19:11 -02:00
Roberto Ierusalimschy
2e4e888de0 Lua functions must have a frame or a saved pc. 2002-11-21 13:46:20 -02:00
Roberto Ierusalimschy
aff97fffc4 C functions cannot increase its top without filling the stack 2002-11-21 12:17:15 -02:00
Roberto Ierusalimschy
43013b39cc new representation for hooks (to allow asynchronous calls to sethook) 2002-11-18 09:01:55 -02:00
Roberto Ierusalimschy
5c5d9b2703 back to `__mode' metafield to specify weakness 2002-11-14 10:01:35 -02:00
Roberto Ierusalimschy
3010eb0536 all objects with several children (tables, closures, stacks, prototypes)
go to `gray' queue
2002-11-13 09:49:19 -02:00
Roberto Ierusalimschy
ac27b7a842 avoid traversing extra elements when cleaning weak tables 2002-11-11 09:52:43 -02:00
Roberto Ierusalimschy
dff9be4224 new macros to distinguish different types of object moves (for future GC
evolution).
2002-11-07 13:37:10 -02:00
Roberto Ierusalimschy
96e15b8501 threads now are real Lua objects, subject to garbage collection 2002-10-25 17:05:28 -03:00
Roberto Ierusalimschy
81bc5711a8 only one instance of registry and default metatable per global state 2002-10-22 14:58:14 -03:00
Roberto Ierusalimschy
b3d0682fb9 use of different buffers for scanner and concatenation 2002-10-08 15:46:08 -03:00
Roberto Ierusalimschy
6fb0fd5063 avoid `reclearing' weak tables 2002-09-19 16:54:22 -03:00
Roberto Ierusalimschy
afe1305b1a avoid luaS_resize (which may need extra memory) during `main' activities 2002-09-05 16:57:40 -03:00
Roberto Ierusalimschy
4964e7c8a0 details 2002-09-02 16:54:49 -03:00
Roberto Ierusalimschy
fdafd4f4a8 new structure for collectable objects, sharing a common header 2002-08-30 16:09:21 -03:00
Roberto Ierusalimschy
ecc7769de2 names... 2002-08-16 17:00:28 -03:00
Roberto Ierusalimschy
da19c436cc cleaning the stage for generational collection 2002-08-16 11:45:55 -03:00
Roberto Ierusalimschy
634344d61f new API for weak mode 2002-08-06 14:06:56 -03:00
Roberto Ierusalimschy
5037196f6f new macros `ttis*' 2002-08-05 11:50:39 -03:00
Roberto Ierusalimschy
79c8edb6c4 new names for light userdata operations 2002-07-17 13:25:13 -03:00
Roberto Ierusalimschy
39b2d58c39 new interface for debug hooks 2002-07-08 15:21:33 -03:00
Roberto Ierusalimschy
1ede98157d strings are always `strong' in weaktables 2002-07-04 14:58:02 -03:00
Roberto Ierusalimschy
9f4b5b5232 weak keys are removed only after finalization 2002-07-01 14:06:58 -03:00
Roberto Ierusalimschy
9d6556fd87 userdata are removed from weaktables before invoking their GC fallbacks 2002-06-25 16:17:42 -03:00
Roberto Ierusalimschy
2394604d10 assertion may fail when closing a state 2002-06-24 14:19:43 -03:00
Roberto Ierusalimschy
3941af53ad first implementation of independent global table per function 2002-06-20 17:41:46 -03:00
Roberto Ierusalimschy
01f1ac36b1 `global' tables (registry, etc.) stored in proper place, not in the stack 2002-05-08 14:34:23 -03:00
Roberto Ierusalimschy
383e8b9e77 use of a common `dummynode' for all empty tables 2002-04-23 12:04:39 -03:00
Roberto Ierusalimschy
237969724f support for light' userdata + simpler support for boxed' udata 2002-04-05 15:54:31 -03:00
Roberto Ierusalimschy
0b9b53e21c details 2002-03-26 15:55:50 -03:00
Roberto Ierusalimschy
19ac0fadc9 don't need to mark the stacks twice ;-) 2002-03-20 15:54:29 -03:00
Roberto Ierusalimschy
ca2ceef659 simpler solution for finalizing udata 2002-03-20 15:37:28 -03:00
Roberto Ierusalimschy
8f837e83b2 using `ci->top' to control acceptable indices in C calls 2002-03-07 15:14:29 -03:00
Roberto Ierusalimschy
457d88eaaa configurable minimum size for the string table 2002-03-05 13:22:54 -03:00
Roberto Ierusalimschy
1a3f175640 small optimization 2002-03-04 18:32:34 -03:00
Roberto Ierusalimschy
d6fd33e76f eventtable' renamed to metatable' 2002-01-30 15:26:44 -02:00
Roberto Ierusalimschy
50e2952593 first version of dynamic stack 2002-01-25 20:14:54 -02:00
Roberto Ierusalimschy
d56d4cf776 distinct functions to create/destroy states and threads 2002-01-11 18:26:52 -02:00
Roberto Ierusalimschy
b3bb0f132b new interface for weak modes 2002-01-09 19:50:35 -02:00
Roberto Ierusalimschy
e04f7ed450 first version of Lua "stackless" 2001-12-18 18:52:30 -02:00
Roberto Ierusalimschy
21259a50e1 run GC tag methods in protected mod 2001-12-12 15:47:33 -02:00
Roberto Ierusalimschy
9aff171f3b new type `boolean' 2001-12-11 20:48:44 -02:00
Roberto Ierusalimschy
ed9be5e1f0 reentrant implementation of garbage collection 2001-12-11 14:52:57 -02:00
Roberto Ierusalimschy
592a309177 tag system replaced by event tables 2001-12-05 18:15:18 -02:00
Roberto Ierusalimschy
413fc7334b new implementation for lua upvalues (sugested by E.T.): simpler and solves
a bug for multi-stacks
2001-11-29 18:22:22 -02:00
Roberto Ierusalimschy
72659a0605 no more explicit support for wide-chars; too much troble... 2001-11-28 18:13:13 -02:00
Roberto Ierusalimschy
26bf2adace optimizations for space in LClosures and time cleanning weak tables 2001-11-06 19:41:53 -02:00
Roberto Ierusalimschy
af59848219 tables of globals accessible through pseudo-index in C API 2001-10-31 17:58:11 -02:00
Roberto Ierusalimschy
21aa7e55f2 optimization for array part of a Table 2001-10-25 17:14:14 -02:00
Roberto Ierusalimschy
1e81da51ba new API for registry and C upvalues + new implementation for references 2001-10-17 19:12:57 -02:00
Roberto Ierusalimschy
15462edb0f new definitions for closure structures 2001-10-02 13:45:03 -03:00
Roberto Ierusalimschy
abdbe883a8 first implementation of unrestricted static scoping 2001-09-07 14:39:10 -03:00
Roberto Ierusalimschy
e1d072571e better syntax for type casts 2001-08-31 16:46:07 -03:00
Roberto Ierusalimschy
770954510f rename of kproto' to p' 2001-06-28 11:57:17 -03:00
Roberto Ierusalimschy
37f3a1c045 too much optimization to "break" keys in tables; keep them as TObjects... 2001-06-26 10:20:45 -03:00
Roberto Ierusalimschy
777061e441 resurect userdata before calling its GC tag method 2001-06-21 13:41:34 -03:00
Roberto Ierusalimschy
8e586c13fc cleaner way to ensure alignment for strings and userdata 2001-06-15 17:36:57 -03:00
Roberto Ierusalimschy
eadf2aaaff small optimizations 2001-06-15 16:17:33 -03:00
Roberto Ierusalimschy
a3fbf5f5fd details 2001-06-13 15:51:20 -03:00
Roberto Ierusalimschy
89e8303f4e more robust treatment of GC tag methods (now they can create new
objects while running...)
2001-06-12 15:43:13 -03:00
Roberto Ierusalimschy
cbc59592ff new definition for luaD_call' and luaD_adjusttop' 2001-06-08 16:01:38 -03:00
Roberto Ierusalimschy
ba11831d35 smaller structs for udata and for strings 2001-06-07 12:01:21 -03:00
Roberto Ierusalimschy
d5b83ead90 new implementation for userdatas, without `keys' 2001-06-06 15:00:19 -03:00
Roberto Ierusalimschy
943b8f5b18 details 2001-06-05 16:41:24 -03:00
Roberto Ierusalimschy
762d059a13 new implementation for the Virtual Machine 2001-06-05 15:17:01 -03:00
Roberto Ierusalimschy
beee01b170 re-implementation of refs through weak tables 2001-04-17 14:35:54 -03:00
Roberto Ierusalimschy
0e0e4a480e first implementation for weak tables 2001-04-11 11:42:41 -03:00
Roberto Ierusalimschy
dd3a63c205 new way to handle `profiles' 2001-03-26 11:31:49 -03:00
Roberto Ierusalimschy
6048c4f74d better way to link callinfo's and stack 2001-03-07 15:09:25 -03:00
Roberto Ierusalimschy
7b84f9e65c lower-case for macros with arguments 2001-03-02 14:27:50 -03:00
Roberto Ierusalimschy
39b7978329 first (big) step to support wide chars 2001-02-23 14:17:25 -03:00
Roberto Ierusalimschy
5f37134e64 avoid '...' and "..." inside comments 2001-02-22 15:59:59 -03:00
Roberto Ierusalimschy
888f91fa24 code check for upvalues 2001-02-20 15:28:11 -03:00
Roberto Ierusalimschy
099442c41f better separation between basic types 2001-02-20 15:15:33 -03:00
Roberto Ierusalimschy
7178a5e34a new way to handle top x L->top 2001-02-07 16:13:49 -02:00
Roberto Ierusalimschy
1f9e3731d1 back to the basics (well-behaved variant record...) 2001-02-02 14:32:00 -02:00
Roberto Ierusalimschy
42224ca553 loop of 'dostring' may never reclaim memory 2001-02-02 14:23:20 -02:00
Roberto Ierusalimschy
426d3e43bd lock/unlock may use L + better structure for internal debug stuff 2001-02-02 13:13:05 -02:00
Roberto Ierusalimschy
e506b864cd no need for tags in boxed values :-( 2001-02-01 15:40:48 -02:00
Roberto Ierusalimschy
63a822c8e1 all boxed types start with their tags 2001-01-29 17:34:02 -02:00
Roberto Ierusalimschy
6b71a9cfe5 smaller tables for machines with 8-bit alignment 2001-01-29 15:17:26 -02:00
Roberto Ierusalimschy
9b45439860 details 2001-01-26 12:16:24 -02:00
Roberto Ierusalimschy
7959f3aebb easier way to erase 'dead' keys 2001-01-26 11:18:00 -02:00
Roberto Ierusalimschy
a53d9b66ca first implementation for type names 2001-01-25 14:45:36 -02:00
Roberto Ierusalimschy
6fda6a5302 support for multiple stacks sharing the same global environment 2001-01-22 16:01:38 -02:00
Roberto Ierusalimschy
4ac58853dc thead-specific state separated from "global" state 2001-01-19 11:20:30 -02:00
Roberto Ierusalimschy
f2c451d745 all accesses to TObjects done through macros 2001-01-18 13:59:09 -02:00
Roberto Ierusalimschy
0183b8030c `free' gets size of the block: complete control over memory use 2000-12-28 10:55:41 -02:00
Roberto Ierusalimschy
8c49e19865 explicit control of size for growing vectors 2000-12-26 16:46:09 -02:00
Roberto Ierusalimschy
96253ed8ce better support for 64-bit machines (avoid excessive use of longs) 2000-11-24 15:39:56 -02:00
Roberto Ierusalimschy
b892f0a877 new API function `createuserdata' 2000-10-26 10:47:05 -02:00
Roberto Ierusalimschy
046a3d6173 tag methods are always functions, so don't need to store a whole object 2000-10-05 10:00:17 -03:00
Roberto Ierusalimschy
001f2bdd0e new definition for types-tags 2000-10-05 09:14:08 -03:00
Roberto Ierusalimschy
78bc8e553d new API for garbage collector 2000-10-02 11:47:43 -03:00
Roberto Ierusalimschy
dad808a73a new way to count `nblocks' for GC (try to count bytes). 2000-09-29 09:42:13 -03:00
Roberto Ierusalimschy
c9c6f9747c GC may crash when checking C closures 2000-09-25 11:52:10 -03:00
Roberto Ierusalimschy
5ed3bcd4ea warnings in Solaris 2000-09-19 05:42:35 -03:00
Roberto Ierusalimschy
787a78f83e new scheme for buffers 2000-09-11 14:38:42 -03:00
Roberto Ierusalimschy
9fdf73bc9a first version for new API 2000-08-28 14:57:04 -03:00
Roberto Ierusalimschy
c85162be27 new way to store local-variable information. 2000-08-22 14:44:17 -03:00
Roberto Ierusalimschy
e238efc536 default now is multi-state 2000-08-09 16:16:57 -03:00
Roberto Ierusalimschy
0802a9df9e no more options for debug information: it is always on 2000-08-08 17:42:07 -03:00
Roberto Ierusalimschy
d9e61e8cea new algorithm for traversing in GC to avoid deep recursion calls 2000-08-07 17:21:34 -03:00
Roberto Ierusalimschy
cfba572076 remove dummy argument in LUA_ASSERT 2000-06-30 11:35:17 -03:00
Roberto Ierusalimschy
afef009fce new version of debug system 2000-06-26 16:28:31 -03:00
Roberto Ierusalimschy
1de5587184 `lua.h' is included before any other Lua header file 2000-06-12 10:52:05 -03:00
Roberto Ierusalimschy
8ca9534d04 access to `values' in TObject always through macros 2000-06-08 15:27:13 -03:00
Roberto Ierusalimschy
c542aac0b9 collect dead indices in tables 2000-06-05 17:07:53 -03:00
Roberto Ierusalimschy
dbfb810267 cleansing of lparser.c 2000-06-05 11:56:18 -03:00
Roberto Ierusalimschy
7e30900def better field name 2000-05-30 16:00:31 -03:00
Roberto Ierusalimschy
50a82ec1b9 gc tag methods for udata are called in (reverse) tag order 2000-05-30 15:54:49 -03:00
Roberto Ierusalimschy
ef62b340e0 code cleaner for 16 bits. 2000-05-24 10:54:49 -03:00
Roberto Ierusalimschy
b803c0600e details 2000-05-11 15:57:19 -03:00
Roberto Ierusalimschy
330e51bed3 string hash uses one single hash table 2000-05-10 13:33:20 -03:00
Roberto Ierusalimschy
11a7022067 global variables are stored in a Lua table 2000-05-08 16:32:53 -03:00
Roberto Ierusalimschy
870f61d299 code redistribution 2000-04-14 15:12:35 -03:00
Roberto Ierusalimschy
8f0f54ec38 name change 2000-03-30 17:55:50 -03:00
Roberto Ierusalimschy
a69356e9e0 no more special cases for closures with 0 upvalues (performance is the same,
memory use a little higher, code much simpler).
2000-03-29 17:19:20 -03:00
Roberto Ierusalimschy
b53dc0c485 TAG_ARRAY -> TAG_TABLE 2000-03-27 17:10:21 -03:00
Roberto Ierusalimschy
102a1be615 no more support for gc TM for tables 2000-03-27 17:08:02 -03:00
Roberto Ierusalimschy
73aa465a8e some name changes 2000-03-10 15:37:44 -03:00
Roberto Ierusalimschy
1f691a4fcd renaming of some opcodes and fields 2000-01-28 14:53:00 -02:00
Roberto Ierusalimschy
d11e5adf55 `const' array in protos breaked in 3 arrays (for strings, numbers, and
prototypes).
2000-01-25 11:57:18 -02:00
Roberto Ierusalimschy
acdb0b741e comments. 1999-12-27 15:33:22 -02:00
Roberto Ierusalimschy
b1b0c219f5 new ttypes to distinguish between C closures and Lua closures. 1999-12-23 16:19:57 -02:00
Roberto Ierusalimschy
6c79a0a80d new way to control hooks inside hooks (now the control is done inside Lua) 1999-12-21 16:04:41 -02:00
Roberto Ierusalimschy
1b15206cf9 many details + code redistribution 1999-12-14 16:33:29 -02:00
Roberto Ierusalimschy
fe237ad808 fixed stack; first version. 1999-12-01 17:50:08 -02:00
Roberto Ierusalimschy
d015f1fc02 table sizes don't need to be primes; power of 2 gives the same performance. 1999-11-26 16:59:20 -02:00
Roberto Ierusalimschy
e5743adb21 macros key', val', and `node' don't need the state 1999-11-23 11:58:02 -02:00