Commit Graph

374 Commits

Author SHA1 Message Date
Roberto Ierusalimschy 0567221848 udata in 'tobefnz' list be have old bit on (it will be cleared
when udata is moved to 'allgc' list)
2010-05-10 15:24:36 -03:00
Roberto Ierusalimschy fa2ddb070a details (to avoid too long strings in assertions) 2010-05-07 15:23:17 -03:00
Roberto Ierusalimschy 9c1347e647 more tests in 'lua_checkmemory' + more information in function
'gccolor'
2010-05-07 15:09:23 -03:00
Roberto Ierusalimschy 8c583c61a3 more tests in 'lua_checkmemory' 2010-05-06 15:16:57 -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 5d79c6684b removed commented-out debugging code 2010-04-29 18:42:33 -03:00
Roberto Ierusalimschy ee7478e884 improved 'lua_checkmemory', with better control over gray objects 2010-04-29 14:33:51 -03:00
Roberto Ierusalimschy 973d81efb3 complete control over number of each kind of object allocated 2010-04-19 13:38:25 -03:00
Roberto Ierusalimschy 1e6940f291 'gcstate' now also runs collector until given state + small changes
in 'testC' to test 'lua_topointer' and 'lua_tocfunction'
2010-04-16 14:42:49 -03:00
Roberto Ierusalimschy 7dfa4cd655 first implementation of light C functions 2010-04-14 12:13:48 -03:00
Roberto Ierusalimschy b2dd246b7a better control in 'totalmem' over choosing counters 2010-04-12 13:07:39 -03:00
Roberto Ierusalimschy d41b467320 check memory allows strings to live in the main GC list (it should
work ok).
2010-04-12 09:42:07 -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 3aa9598177 'mainthread' is not inserted in the 'allgc' list anymore, but swept
separately.
2010-03-25 10:06:36 -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 070d3743a7 "no value" added to array luaT_typenames + occurrences of "userdata"
in that array unified in a single address
2010-01-13 14:18:25 -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 c3a6f3fa1c 'lua_objlen' replaced by 'lua_rawlen', 'lua_len', and 'luaL_len' 2009-12-17 14:20:01 -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 a2a2abcba4 new function 'luaC_runtilstate' to advance GC until a "valid" state 2009-12-11 17:14:59 -02:00
Roberto Ierusalimschy 1375435e4a several new features in testC to allow better testing of lua_resume
at the C API level
2009-12-10 16:21:28 -02:00
Roberto Ierusalimschy df1dc3f1f5 strings in C scripts may be delimited by quotes + new functionality to
set C scripts as C hooks
2009-12-01 14:49:48 -02:00
Roberto Ierusalimschy cfa8bc3ca4 continuations may be upvalues too 2009-11-27 13:39:31 -02:00
Roberto Ierusalimschy 63a3b1a1eb macro 'checkvalref' redefined as function (to avoid too long macros) 2009-11-06 15:08:43 -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 916587508c parser keeps list of active local variables in a single dynamic array,
therefore saving C stack space
2009-10-11 17:02:19 -03:00
Roberto Ierusalimschy a5382b763c new function lua_copy 2009-10-05 13:44:33 -03:00
Roberto Ierusalimschy d119cf3035 a few more instructions to testC (func2udata and getfield) 2009-09-30 17:49:25 -03: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 67cae2854c 'lua_mainthread' replaced by new preregistered value LUA_RIDX_MAINTHREAD 2009-09-17 15:04:21 -03:00
Roberto Ierusalimschy 0e45ffb8e4 first implementation of 'lua_yieldk' (yield with continuation) 2009-09-14 11:30:39 -03:00
Roberto Ierusalimschy 071e54ae0b extra facilities to testC: comments + commands print, callk and yield +
Cfunc with extra upvalues
2009-09-09 17:44:10 -03:00
Roberto Ierusalimschy b2bb2f7f59 better machinery to test continuations in the C API 2009-08-26 14:41:26 -03:00
Roberto Ierusalimschy bd5fa9cc8f new macro 'getproto' 2009-07-15 15:37:19 -03: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 6980cb1aa7 new functions 'lua_arith' and 'lua_compare' 2009-06-17 14:53:14 -03:00
Roberto Ierusalimschy a21c89ddc8 new API function 'lua_mainthread' 2009-06-15 16:51:31 -03:00
Roberto Ierusalimschy 2258ec6bc9 'getline' renamed to 'getfuncline' (to avoid problems with POSIX) 2009-06-10 13:57:53 -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 8775f25830 new function 'T.makeCfunc' (for later use) 2009-04-14 16:10:17 -03:00
Roberto Ierusalimschy 7837e34e56 new states have a reasonable panic function +
testC may run code on different threads +
rename of some testC operations ('rawcall'->'call', 'call'->'pcall')
2009-03-03 15:52:36 -03:00
Roberto Ierusalimschy 6905ae900b Lua now uses "homemade" lctype (instead of ctype.h from ANSI C) 2009-02-19 14:33:51 -03:00
Roberto Ierusalimschy 81ede6bfce using light userdata to represent "remote" states 2009-02-18 11:52:51 -03:00
Roberto Ierusalimschy 690efef3de detail (added 'UNUSED' to unused argument) 2008-10-28 10:54:25 -02:00
Roberto Ierusalimschy f94cd2201c better control of call status through CallInfo 2008-08-26 10:27:42 -03:00
Roberto Ierusalimschy c1565c16ed small bug: lua_resume returning LUA_YIELD is not an error 2008-08-13 14:02:12 -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 93869acb2c "test trick" seems more useful with pointers instead of integers 2008-06-23 13:50:34 -03:00
Roberto Ierusalimschy 59e2973335 removed static variable lua_state (not used) 2008-06-13 14:07:10 -03:00
Roberto Ierusalimschy 860e285f31 'luaL_gsub' moved into 'testC' (all auxlib should be tested through 'testC') 2008-06-13 11:15:59 -03:00
Roberto Ierusalimschy 92a0d4c67f extra options in 'testC' for newmetatable and testudata 2008-06-12 11:20:49 -03:00
Roberto Ierusalimschy a4d3080fe3 SETLIST extra argument now is an "instruction" (OP_EXTRAARG) 2008-04-02 14:38:54 -03:00
Roberto Ierusalimschy e2b366c760 userdata with finalizers are kept in a separated list 2008-02-19 15:55:09 -03:00
Roberto Ierusalimschy 163f58dac5 in 'testC', booleans should be represented by booean values 2008-02-11 17:04:16 -02:00
Roberto Ierusalimschy dcee7d2fe0 new instructions 'newtable' and 'checkstack' in 'testC' 2008-02-11 16:04:26 -02:00
Roberto Ierusalimschy 658e7caf92 use prefix in extern names, even those in test files 2007-11-12 14:28:45 -02:00
Roberto Ierusalimschy 8d3dd04137 clearing some old compatibility code 2007-06-21 10:52:27 -03:00
Roberto Ierusalimschy 619be354c8 lua_pushstring/pushlstring return string 2007-04-17 10:19:53 -03:00
Roberto Ierusalimschy 585b81f91e remove of a non-used test function 2007-04-10 09:17:52 -03:00
Roberto Ierusalimschy afa0d0ac0d new constant LUA_OK 2006-10-10 14:40:17 -03: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 2b5c1f99e5 small simplifications 2006-06-05 16:35:57 -03:00
Roberto Ierusalimschy f8b7a5581e avoid unnecessary exports 2006-01-10 11:13:06 -02:00
Roberto Ierusalimschy dd1221582b details 2006-01-10 10:50:00 -02:00
Roberto Ierusalimschy c505f341d6 small changes in casts 2005-12-22 14:19:56 -02:00
Roberto Ierusalimschy e6bfbc38b5 'luaopen_package' was missing in new states 2005-10-06 17:47:32 -03:00
Roberto Ierusalimschy d8f1cca16e new function 'lua_setallocf' 2005-09-20 14:55:10 -03:00
Roberto Ierusalimschy 8dcc6bc532 avoid the use of global lock 2005-09-14 14:48:57 -03:00
Roberto Ierusalimschy 3390f9a35a detail 2005-08-26 14:36:32 -03:00
Roberto Ierusalimschy 9273fbd131 no more 'luaL_get/setfield' (replaced by more direct luaL_findtable) 2005-08-26 14:32:05 -03:00
Roberto Ierusalimschy 5e8a9e324c luaL_openlib -> luaL_register, luaL_putchar -> luaL_addchar 2005-08-15 11:12:32 -03:00
Roberto Ierusalimschy 80ac5e83fd details (alphabetical order for list of functions) 2005-07-12 11:32:08 -03:00
Roberto Ierusalimschy 64b57db377 new test function for conversion from num to int 2005-07-11 11:00:59 -03:00
Roberto Ierusalimschy d628795940 lua_objsize -> lua_objlen (more compatible with use of `len´ in other
places [opcode name, metamethod index, etc.])
2005-05-31 11:34:02 -03:00
Roberto Ierusalimschy b320d37a80 better tests for correctness of `savedpc' 2005-05-03 16:01:17 -03:00
Roberto Ierusalimschy ade585bdf9 no more LUA_FIRSTINDEX 2005-03-28 14:17:53 -03:00
Roberto Ierusalimschy 03fb3c39d4 change `#ifdef' for `#if defined' 2005-03-23 14:51:11 -03:00
Roberto Ierusalimschy 9ffae705ee new "primitive" getn 2005-03-16 13:58:41 -03:00
Roberto Ierusalimschy 7d45a5f48f C functions and userdata also have environments 2005-02-18 10:40:02 -02:00
Roberto Ierusalimschy 621ef9f767 better control over GC collors of upvalues 2005-01-19 13:54:26 -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 737ec947d3 better implementation for `floating-point bytes' 2004-11-01 12:06:50 -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 cf2a194edc better API for luaL_getfield/setfield 2004-09-29 18:00:25 -03:00
Roberto Ierusalimschy 6acfb91c8d new auxiliary functions to implement new package system 2004-09-21 13:54:32 -03:00
Roberto Ierusalimschy 32d4f304db first implementation of generational GC 2004-08-24 17:12:06 -03:00
Roberto Ierusalimschy 7a796a0682 new macro `luaL_typename' 2004-07-09 15:23:17 -03:00
Roberto Ierusalimschy fa38421cea `testC' can operate on other states 2004-06-02 16:08:52 -03:00
Roberto Ierusalimschy 0dfd04eb60 `lua_strlen' upgraded to `lua_objsize' (which also works with userdata) 2004-05-31 16:41:52 -03:00
Roberto Ierusalimschy 47eda6ebd8 main must return status from original main! 2004-05-31 15:50:48 -03:00
Roberto Ierusalimschy 7e41612eb2 code parameterized by LUA_FIRSTINDEX (first index of an array) 2004-05-10 14:50:51 -03:00
Roberto Ierusalimschy b4cd38ba6c new scheme for configuration through `luaconf.h' 2004-04-30 17:13:38 -03:00
Roberto Ierusalimschy 5008e3d7d1 new states must use controlled malloc, too 2004-03-23 14:07:53 -03:00
Roberto Ierusalimschy 48a8d78102 new tests to check memory consistency (for incremental GC) 2004-03-15 18:04:54 -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 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 8bc6c68021 details 2003-11-19 17:59:18 -02:00
Roberto Ierusalimschy fa198197a0 lua_(set)getglobal are ok to use 2003-11-05 09:59:14 -02:00
Roberto Ierusalimschy 03bab90303 new function `lua_getallocf' to retrieve allocation function and data 2003-10-20 10:25:23 -02:00
Roberto Ierusalimschy 10de467c79 new function `lua_createtable' 2003-10-10 10:29:28 -03:00
Roberto Ierusalimschy f04fe526cd new functions `lua_tointeger' and lua_pushinteger' 2003-10-07 17:13:41 -03:00
Roberto Ierusalimschy b97fb932ec Lua kernel does not use malloc/free functions. 2003-10-02 17:31:17 -03:00
Roberto Ierusalimschy 91bf77534c no need for a maximum number of parameters (maximum number of locals
take care of that).
2003-07-29 16:26:34 -03:00
Roberto Ierusalimschy 66ed154c89 details 2003-07-09 09:08:43 -03:00
Roberto Ierusalimschy 56c5e749cc no more compatibility code (`lua_pushupvalues') 2003-05-14 18:10:07 -03:00
Roberto Ierusalimschy c767747191 new (internal) macros for error handling 2003-05-13 16:22:19 -03:00
Roberto Ierusalimschy bcc5f1406b test function for lua_setgcthreshold 2003-04-28 16:58:06 -03:00
Roberto Ierusalimschy 2ad947fe03 new test options for luaL_getn/setn 2003-04-07 11:35:00 -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 70e2b7ab86 name changes to avoid name collision between macros and variables 2003-03-19 18:14:53 -03:00
Roberto Ierusalimschy 034de1fe73 new names for functions that open C libraries 2003-03-11 09:24:34 -03:00
Roberto Ierusalimschy e1a424e8a3 avoid the identifier `index' (clashes with BSD `index' function) 2003-02-27 09:33:07 -03:00
Roberto Ierusalimschy 60c83ded30 small optimization for sizes of array constructors 2003-02-18 13:02:56 -03:00
Roberto Ierusalimschy 3184314bf3 warning 2003-02-10 15:31:13 -02:00
Roberto Ierusalimschy 871166d7db test for panic function 2003-01-29 08:27:53 -02:00
Roberto Ierusalimschy 32fd039bb5 `openlib' functions return new module 2002-12-20 08:26:33 -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 38da8c0d7d new facilities to test memory overflow in main.c 2002-12-04 15:29:05 -02:00
Roberto Ierusalimschy 5f698f8b6f simpler interface to hooks + use of `int' to count hooks 2002-11-25 15:47:13 -02:00
Roberto Ierusalimschy f0185f7628 support for tests of yield inside hooks + better support for tests
with valgrind and other memory checkers
2002-11-18 13:24:27 -02:00
Roberto Ierusalimschy 94912d99fc details 2002-11-14 14:59:16 -02:00
Roberto Ierusalimschy 097edd3884 better names for auxiliar functions 2002-11-14 13:41:38 -02:00
Roberto Ierusalimschy 43d1a6af12 detail 2002-11-14 09:51:23 -02:00
Roberto Ierusalimschy 2f91f95d94 better control over GCObjects 2002-11-13 09:32:26 -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 f36038e42a assertion must be always valid (not only in debug mode) 2002-10-25 18:29:20 -03:00
Roberto Ierusalimschy 96e15b8501 threads now are real Lua objects, subject to garbage collection 2002-10-25 17:05:28 -03:00
Roberto Ierusalimschy 4fb9110a6e tests for compatibility functions lua_dostring/lua_dofile 2002-10-22 15:07:55 -03:00
Roberto Ierusalimschy 84e0b1bc97 small changes in type configuration facilities 2002-10-22 14:18:28 -03:00
Roberto Ierusalimschy 728fa167d2 cannot raise memory error when realloc to smaller block 2002-09-05 16:57:08 -03:00
Roberto Ierusalimschy fdafd4f4a8 new structure for collectable objects, sharing a common header 2002-08-30 16:09:21 -03:00
Roberto Ierusalimschy 2e38c6ae5a `luadebug.h' content now is included in `lua.h' 2002-08-06 15:01:50 -03:00
Roberto Ierusalimschy a2fa48a570 new (old?) error handling scheme 2002-08-06 12:32:22 -03:00
Roberto Ierusalimschy 390fc99a5c xpcall now is builtin + new macros `ttis*' 2002-08-05 11:10:10 -03:00
Roberto Ierusalimschy 79c8edb6c4 new names for light userdata operations 2002-07-17 13:25:13 -03:00
Roberto Ierusalimschy d88860131a new macro `lua_isudataval' (for completude) 2002-07-09 11:58:28 -03:00
Roberto Ierusalimschy 78c507b7b8 `lua_upcall' -> `lua_call' 2002-06-25 16:18:49 -03:00
Roberto Ierusalimschy 5610fdd776 avoid using obsolete lua_dostring 2002-06-20 17:40:38 -03:00
Roberto Ierusalimschy 1dbe708aa8 new protocol for error handling 2002-06-18 12:19:27 -03:00
Roberto Ierusalimschy eb3de8768a `rawcall' -> `upcall' (unprotected call) 2002-06-13 10:44:50 -03:00