Commit Graph

  • 2af0d3b459 allocator function receives the tag of object being allocated in 'osize' when 'ptr' is NULL. Roberto Ierusalimschy 2009-12-16 14:42:58 -02:00
  • 9fbe0690fb base-level C use global table as its environment Roberto Ierusalimschy 2009-12-15 09:25:36 -02:00
  • a25b8ff69c detail ('lua_tolstring' instead of lua_objlen) Roberto Ierusalimschy 2009-12-15 09:25:16 -02:00
  • 15b823ce4f cleaner way to add extra space in a lua state. Roberto Ierusalimschy 2009-12-14 13:27:30 -02:00
  • 8da245bfd2 better to keep GC state numbers sequential, to optimize switch in 'singlestep' Roberto Ierusalimschy 2009-12-11 19:31:14 -02:00
  • a2a2abcba4 new function 'luaC_runtilstate' to advance GC until a "valid" state Roberto Ierusalimschy 2009-12-11 17:14:59 -02:00
  • 2e51792596 avoid using deprecated macros lua_[gs]etglobal Roberto Ierusalimschy 2009-12-11 11:40:44 -02:00
  • 3a9ae612a4 macro 'ngcotouv' is the same as 'gco2uv', so it was removed Roberto Ierusalimschy 2009-12-11 11:39:34 -02:00
  • 9db693a57c detail (comment) Roberto Ierusalimschy 2009-12-10 17:00:33 -02:00
  • 1375435e4a several new features in testC to allow better testing of lua_resume at the C API level Roberto Ierusalimschy 2009-12-10 16:21:28 -02:00
  • 2bb19ccf08 reordering of some functions + cleaner way to code lua_resume/resume + small bug in lua_resume (in case of calling errors lua_resume should remove only new arguments from the stack and push error message). Roberto Ierusalimschy 2009-12-10 16:20:07 -02:00
  • 64d5df7772 detail (lua_resume should empty coroutine stack even if they do not fit into caller stack) Roberto Ierusalimschy 2009-12-10 16:17:37 -02:00
  • 2643da67c6 error messages from 'lua_resume' must be generated in protected mode, to avoid raising memory errors Roberto Ierusalimschy 2009-12-08 16:59:24 -02:00
  • ed117bb42a lua_checkstack does not raise memory errors (instead it signals them) Roberto Ierusalimschy 2009-12-08 14:15:43 -02:00
  • a4472490bc new 'table.pack' function Roberto Ierusalimschy 2009-12-07 13:50:27 -02:00
  • 86312e1a7d lua_objlen calls __len metamethod on tables (if present) Roberto Ierusalimschy 2009-12-07 13:49:47 -02:00
  • df1dc3f1f5 strings in C scripts may be delimited by quotes + new functionality to set C scripts as C hooks Roberto Ierusalimschy 2009-12-01 14:49:48 -02:00
  • 513d0258d9 details Roberto Ierusalimschy 2009-12-01 14:31:04 -02:00
  • cfa8bc3ca4 continuations may be upvalues too Roberto Ierusalimschy 2009-11-27 13:39:31 -02:00
  • a654e82f5c coroutines may have C bodies Roberto Ierusalimschy 2009-11-27 13:38:51 -02:00
  • 3e41afcec5 extra api checks for number of returns of C functions and for lua_yield Roberto Ierusalimschy 2009-11-27 13:37:59 -02:00
  • 3acf5ec5a1 update of file dependencies (gcc -MM) Roberto Ierusalimschy 2009-11-27 12:39:31 -02:00
  • 93695db903 'table.maxn' deprecated Roberto Ierusalimschy 2009-11-26 15:35:13 -02:00
  • 9107dd115c no more compatibility code for 'string.gfind' Roberto Ierusalimschy 2009-11-26 14:49:28 -02:00
  • dc4c459546 a few new warnings Roberto Ierusalimschy 2009-11-26 14:36:55 -02:00
  • 19a6c38745 detail in 'currentpc' (only needs to work for Lua functions) Roberto Ierusalimschy 2009-11-26 13:34:15 -02:00
  • 3c4d970a7b comment typos Roberto Ierusalimschy 2009-11-26 09:39:20 -02:00
  • b0f2b288a6 new scheme for debug info about tail calls: no more 'fake' stack entries, but stack entry knows whether it was tail called Roberto Ierusalimschy 2009-11-25 13:27:51 -02:00
  • 2b25489b47 'notail' -> 'noextrachars' ('notail' may confuse with tail calls) Roberto Ierusalimschy 2009-11-24 16:05:12 -02:00
  • a6f465f558 new mark LUAMOD_API for all luaopen_* functions Roberto Ierusalimschy 2009-11-24 10:05:44 -02:00
  • 9a41506b8f 'os.exit' should close state only when second argument is true Roberto Ierusalimschy 2009-11-23 16:20:38 -02:00
  • 9a6d9ea57a GC may get stuck during a parser and avoids proper resizing of the string table, making its lists grow too much and degrading performance. Roberto Ierusalimschy 2009-11-23 12:59:30 -02:00
  • 062e809e54 new macros 'LUAI_DDEC'/'LUAI_DDEF' to better control declarations and definitions of non-static variables Roberto Ierusalimschy 2009-11-19 17:06:52 -02:00
  • b4c1824824 'luaV_arith' must be marked 'LUAI_FUNC' (as all non-static functions) Roberto Ierusalimschy 2009-11-19 17:04:58 -02:00
  • 2e5ef6a9fb new macro 'isdummy' Roberto Ierusalimschy 2009-11-19 15:54:07 -02:00
  • 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