Commit Graph

  • 1dea393058 small corrections for 'luaall.c' Roberto Ierusalimschy 2009-11-19 14:26:52 -02:00
  • 45dec34597 comments Roberto Ierusalimschy 2009-11-19 14:26:29 -02:00
  • b40a38a8ac remove declaration of removed function Roberto Ierusalimschy 2009-11-19 14:24:41 -02:00
  • ac899a6307 'debug.joinupvalue' -> 'debug.upvaluejoin' Roberto Ierusalimschy 2009-11-18 13:50:18 -02:00
  • ce444bff33 (huge) simplification of GC management Roberto Ierusalimschy 2009-11-18 11:13:47 -02:00
  • 2d5931ebc8 ensure that reader function cannot yield during parsing Roberto Ierusalimschy 2009-11-17 14:46:44 -02:00
  • 35fa276099 parser/scanner keep GC running Roberto Ierusalimschy 2009-11-17 14:33:38 -02:00
  • b51d76ce8d when doing hard memory tests, perform a full GC at every possible step Roberto Ierusalimschy 2009-11-17 09:56:03 -02:00
  • 95020afb63 'module' returns the new module (to be used with lexical environments) Roberto Ierusalimschy 2009-11-16 13:51:19 -02:00
  • c5050b1c41 functions 'getfenv' and 'setfenv' are deprecated Roberto Ierusalimschy 2009-11-16 13:51:03 -02:00
  • b9063a08f5 new function 'loadin' Roberto Ierusalimschy 2009-11-13 15:01:40 -02:00
  • 7fe405739c renaming: 'lua_upvaladdr' -> 'lua_upvalueid', 'lua_upvaljoin' -> 'lua_upvaluejoin' Roberto Ierusalimschy 2009-11-09 17:10:48 -02:00
  • 1ce819333d new option 'isrunning' for 'lua_gc' (and 'collectgarbage') Roberto Ierusalimschy 2009-11-09 16:55:17 -02:00
  • 88eb901f81 registry and global table may be changed through the API without a write barrier, so GC should visit them in the atomic phase. Roberto Ierusalimschy 2009-11-09 16:29:21 -02:00
  • 2583bac3d3 several small changes to simplify changing TValue if needed Roberto Ierusalimschy 2009-11-06 15:09:27 -02:00
  • 63a3b1a1eb macro 'checkvalref' redefined as function (to avoid too long macros) Roberto Ierusalimschy 2009-11-06 15:08:43 -02:00
  • fbf866a1a5 macro 'gkey' returns a "real" TValue* Roberto Ierusalimschy 2009-11-06 15:07:48 -02:00
  • 49a67c6d3f new macro 'NILCONSTANT' to initialize nil constants Roberto Ierusalimschy 2009-11-06 15:07:12 -02:00
  • a921d81033 avoid using 'ttype' when there is an explicit test + macro 'checkdeadkey' to avoid repetitions Roberto Ierusalimschy 2009-11-06 15:06:19 -02:00
  • 155dd01163 avoid using 'ttype' when there is an explicit test Roberto Ierusalimschy 2009-11-06 15:05:34 -02:00
  • 599789a907 better to enclose macros in 'if' bodies with brackets Roberto Ierusalimschy 2009-11-06 15:03:37 -02:00
  • 9756f56354 better control over accesses to TValue fields Roberto Ierusalimschy 2009-11-05 15:43:54 -02:00
  • b7d5f18d71 api functions to manipulate upvalues do not need to check their arguments (the caller must check them before calling) Roberto Ierusalimschy 2009-11-05 15:26:00 -02:00
  • 5598b2bc55 new functions to identify and join upvalues Roberto Ierusalimschy 2009-11-05 14:48:31 -02:00
  • 77077b39d5 comment explaining OP_VARARG was wrong (and corresponding code was not very clear) Roberto Ierusalimschy 2009-10-28 10:20:07 -02:00
  • 5bc91c6405 no more one environment per thread: all threads share a single global environment Roberto Ierusalimschy 2009-10-23 17:12:19 -02:00
  • f5073de0a7 'ipairs' goes until length of array instead of stopping at the first nil Roberto Ierusalimschy 2009-10-23 10:50:25 -02:00
  • f6ed285cf2 new hash for doubles based on frexp, to avoid low-level tricks Roberto Ierusalimschy 2009-10-23 10:31:12 -02:00
  • 1448e736f0 better documentation for constructor syntax Roberto Ierusalimschy 2009-10-14 13:43:11 -03:00
  • 6e415e9387 local function definition does not need to correct debug information Roberto Ierusalimschy 2009-10-13 16:35:42 -03:00
  • b114c99a60 two small bugs: 'debug.getinfo' did not consider negative indices as out of range + 'debug.[gs]etlocal' crash on tail calls Roberto Ierusalimschy 2009-10-13 16:07:40 -03:00
  • 916587508c parser keeps list of active local variables in a single dynamic array, therefore saving C stack space Roberto Ierusalimschy 2009-10-11 17:02:19 -03:00
  • a5382b763c new function lua_copy Roberto Ierusalimschy 2009-10-05 13:44:33 -03:00
  • ba21aa8b2b 'cpcall' must ensure correct environment for called function Roberto Ierusalimschy 2009-09-30 17:49:47 -03:00
  • d119cf3035 a few more instructions to testC (func2udata and getfield) Roberto Ierusalimschy 2009-09-30 17:49:25 -03:00
  • 0ac3d07ea6 first implementation of lexical environments Roberto Ierusalimschy 2009-09-30 12:38:37 -03:00
  • 5938212748 information about upvalues (where they come from) kept in Proto structure, instead of sequence of pseudo-opcodes after OP_CLOSURE Roberto Ierusalimschy 2009-09-28 13:32:50 -03:00
  • 1829911d7c some operations may shrink g->totalbytes so g->estimate must be more flexible Roberto Ierusalimschy 2009-09-28 10:50:34 -03:00
  • bed2cb725a initialize g->estimate (just in case) Roberto Ierusalimschy 2009-09-28 10:50:19 -03:00
  • ab75bd23ee handle extended opcodes (with OP_EXTRAARG) when checking metamethod calls Roberto Ierusalimschy 2009-09-28 09:37:17 -03:00
  • cee94df6e0 function list in luaL_register may be NULL for an empty list Roberto Ierusalimschy 2009-09-28 09:36:40 -03:00
  • fcc46467fa limit of constants per function changed to 2^26 using extra arguments to opcodes LOADK, GETGLOBAL, and SETGLOBAL Roberto Ierusalimschy 2009-09-23 17:33:05 -03:00
  • f8e354e240 detail (space between function name and its parameter list) Roberto Ierusalimschy 2009-09-23 17:14:00 -03:00
  • a650378822 'cpcall' reimplemented as a predefined value in the registry Roberto Ierusalimschy 2009-09-21 09:09:52 -03:00
  • 99182c6872 references must start after predefined values in the registry Roberto Ierusalimschy 2009-09-18 15:58:45 -03:00
  • 67cae2854c 'lua_mainthread' replaced by new preregistered value LUA_RIDX_MAINTHREAD Roberto Ierusalimschy 2009-09-17 15:04:21 -03:00
  • 0e45ffb8e4 first implementation of 'lua_yieldk' (yield with continuation) Roberto Ierusalimschy 2009-09-14 11:30:39 -03:00
  • 071e54ae0b extra facilities to testC: comments + commands print, callk and yield + Cfunc with extra upvalues Roberto Ierusalimschy 2009-09-09 17:44:10 -03:00
  • a68494fb32 'debug.[gs]etupvalue' should be able to access C upvalues too Roberto Ierusalimschy 2009-09-09 17:32:19 -03:00
  • 4b44793dc5 "bug": lua_createtable with sizes changed (array <-> record) Roberto Ierusalimschy 2009-09-07 11:24:12 -03:00
  • 90e2a716c8 details + comments Roberto Ierusalimschy 2009-09-05 09:39:29 -03:00
  • d9fbbe1f23 "file:write" returns "file" in case of success Roberto Ierusalimschy 2009-09-01 16:10:48 -03:00
  • 4a714cebd1 API checks now have explanatory messages Roberto Ierusalimschy 2009-08-31 11:26:28 -03:00
  • 5b6be84106 ensures that argument 'mode' to 'io.open' matches "[rwa]%+?b?", to avoid passing invalid modes to 'fopen'. Roberto Ierusalimschy 2009-08-28 10:51:57 -03:00
  • b2bb2f7f59 better machinery to test continuations in the C API Roberto Ierusalimschy 2009-08-26 14:41:26 -03:00
  • f096ab5421 correct way to check arguments to 'strftime' Roberto Ierusalimschy 2009-08-25 16:58:08 -03:00
  • 4e1ffc482a test for 'fs' being NULL at the end of 'close_func' is useless ('fs' cannot be NULl and the new ls->fs can only be NULL when the token is EOS, in which case anchor_token has no effect). Roberto Ierusalimschy 2009-08-10 17:41:04 -03:00
  • bc439e21cd avoid an unprotected call to 'lua_tostring' which theoretically may cause a panicked exit Roberto Ierusalimschy 2009-08-10 13:23:19 -03:00
  • 1b4480003b "stange numbers" (-0 and NaN) also go to the constant table (as strings with their binary representation). Therefore, constant folding may produce these results. Roberto Ierusalimschy 2009-08-10 12:31:44 -03:00
  • 42167804b8 luaH_[gs]etnum renamed to luaH_[gs]etint (as they only accept integers, not generic numbers). Roberto Ierusalimschy 2009-08-07 14:53:28 -03:00
  • 3135a6bbab luaH_[gs]etnum renamed to luaH_[gs]etint (as they only accept integers, not generic numbers) Roberto Ierusalimschy 2009-08-07 13:17:41 -03:00
  • 95cbc402dc "But" -> "Bug" (misspelling) Roberto Ierusalimschy 2009-08-05 10:09:38 -03:00
  • decada8dc2 'debug.getfenv' does not check whether it has an argument Roberto Ierusalimschy 2009-08-04 15:51:19 -03:00
  • ee5d03b42a small bug: debug.getfenv should check whether it has an argument Roberto Ierusalimschy 2009-08-04 15:27:57 -03:00
  • 323f33d014 'collectgarbage"count"' returns a second argument with the count%1024. Roberto Ierusalimschy 2009-08-04 15:20:18 -03:00
  • 55dc7fb240 bug: stack must be cleared until its end (including extra size) + control of stack size moved to 'ldo.c' Roberto Ierusalimschy 2009-07-16 13:26:09 -03:00
  • 11d7ba79f2 tail calls do not need to move whole new frame down, only its slice up to last parameter (the rest has not been used yet) Roberto Ierusalimschy 2009-07-15 15:38:16 -03:00
  • bd5fa9cc8f new macro 'getproto' Roberto Ierusalimschy 2009-07-15 15:37:19 -03:00
  • 2658c94925 detail (comment: 'correspoding' -> 'corresponding') Roberto Ierusalimschy 2009-07-15 14:57:30 -03:00
  • 215885768c 'index2adr' -> 'index2addr' (correct spelling) Roberto Ierusalimschy 2009-07-15 14:57:03 -03:00
  • a5f68589c0 avoid using 'UNUSED' (not defined outside the kernel) Roberto Ierusalimschy 2009-07-15 14:49:48 -03:00
  • 28419c4383 'luaL_tolstring' uses 'lua_tolstring' instead of 'lua_tostring' and 'lua_objlen' Roberto Ierusalimschy 2009-07-15 14:47:34 -03:00
  • 5bff2aaf47 calls with LUA_MULTRET may leave no free slots in the stack Roberto Ierusalimschy 2009-07-15 14:35:20 -03:00
  • f76f4cb79d new way to control stack overflow, controling only total size of the stack Roberto Ierusalimschy 2009-07-15 14:26:14 -03:00
  • abb85fc059 new definition for 'luaD_checkstack' to avoid possible overflows Roberto Ierusalimschy 2009-07-08 13:06:51 -03:00
  • aabe3ddbf4 errors in 'resume' should be all protected Roberto Ierusalimschy 2009-07-08 13:06:07 -03:00
  • 0c258c8492 smart use of varargs may create functions that return too many arguments and overflow the stack of C functions. Roberto Ierusalimschy 2009-07-02 16:57:34 -03:00
  • d57c9cdefc BUG: 'luaV_settable' may invalidate a reference to a table and try to reuse it. Roberto Ierusalimschy 2009-07-01 18:10:33 -03:00
  • afb3f7e754 bug: 'luaV_settable' may invalidate a reference to a table and try to reuse it. Roberto Ierusalimschy 2009-07-01 17:31:25 -03:00
  • 88564c3aec Standard library for bitwise operations Roberto Ierusalimschy 2009-07-01 13:17:08 -03:00
  • 3abe3da9fb new module 'lbitlib.c' for bitwise operations Roberto Ierusalimschy 2009-07-01 13:16:40 -03:00
  • eb8499c8e0 use of LUAI_UINT32 replaced by 'unsigned LUA_INT32' (one less definition needed) Roberto Ierusalimschy 2009-07-01 13:14:15 -03:00
  • 47c562435b better error messages for luaL_checkversion Roberto Ierusalimschy 2009-06-19 11:21:57 -03:00
  • 02504d86d3 l_version may be local to 'lua_version' Roberto Ierusalimschy 2009-06-19 11:21:23 -03:00
  • 4a818f068a 'checkversion' implemented in the auxiliary library Roberto Ierusalimschy 2009-06-18 15:59:58 -03:00
  • 1d6ebce296 new function 'lua_version' (so that 'checkversion' can be implemented in the auxiliary library) Roberto Ierusalimschy 2009-06-18 15:59:18 -03:00
  • bc3e02a1b7 default paths have dot option as the last one (to improve security) Roberto Ierusalimschy 2009-06-18 15:19:36 -03:00
  • f4eed60ca9 better treatment of integer formats in string.format Roberto Ierusalimschy 2009-06-18 13:51:03 -03:00
  • c1de1fdac6 small optimization in 'lua_arith' (avoids overhead in the common case of both arguments being numbers) Roberto Ierusalimschy 2009-06-18 13:36:40 -03:00
  • a36c8e1718 new macro 'changenvalue' Roberto Ierusalimschy 2009-06-18 13:36:40 -03:00
  • d7872dcf91 small optimization (reorder of BinOpr enum to unify some cases in switches) Roberto Ierusalimschy 2009-06-18 13:35:05 -03:00
  • 14115170bc lua_objlen should not work for numbers (according to the manual) Roberto Ierusalimschy 2009-06-17 15:38:54 -03:00
  • ec52149485 'lua_lessthan' replaced by more generic 'lua_compare' Roberto Ierusalimschy 2009-06-17 14:53:50 -03:00
  • 6980cb1aa7 new functions 'lua_arith' and 'lua_compare' Roberto Ierusalimschy 2009-06-17 14:53:14 -03:00
  • 59a59fafc6 exports luaV_arith to be used by lua_arith Roberto Ierusalimschy 2009-06-17 14:51:07 -03:00
  • 2bdd194f43 exports luaV_arith to be used by lua_arith + uses 'luaO_arith' to perform basic arith. operations Roberto Ierusalimschy 2009-06-17 14:50:09 -03:00
  • 96fa34ec32 constant folding uses 'luaO_arith' to perform basic operations Roberto Ierusalimschy 2009-06-17 14:49:09 -03:00
  • 6a024df440 new function 'luaO_arith' to perform basic arithmetic operations Roberto Ierusalimschy 2009-06-17 14:48:34 -03:00
  • 77fd93188e 'lessequal' renamed 'luaV_lessequal' and exported to be used by 'lua_compare' Roberto Ierusalimschy 2009-06-17 13:17:14 -03:00
  • a21c89ddc8 new API function 'lua_mainthread' Roberto Ierusalimschy 2009-06-15 16:51:31 -03:00