Commit Graph

3107 Commits

Author SHA1 Message Date
Roberto Ierusalimschy fbf866a1a5 macro 'gkey' returns a "real" TValue* 2009-11-06 15:07:48 -02:00
Roberto Ierusalimschy 49a67c6d3f new macro 'NILCONSTANT' to initialize nil constants 2009-11-06 15:07:12 -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 155dd01163 avoid using 'ttype' when there is an explicit test 2009-11-06 15:05:34 -02:00
Roberto Ierusalimschy 599789a907 better to enclose macros in 'if' bodies with brackets 2009-11-06 15:03:37 -02:00
Roberto Ierusalimschy 9756f56354 better control over accesses to TValue fields 2009-11-05 15:43:54 -02:00
Roberto Ierusalimschy b7d5f18d71 api functions to manipulate upvalues do not need to check their
arguments (the caller must check them before calling)
2009-11-05 15:26:00 -02:00
Roberto Ierusalimschy 5598b2bc55 new functions to identify and join upvalues 2009-11-05 14:48:31 -02:00
Roberto Ierusalimschy 77077b39d5 comment explaining OP_VARARG was wrong (and corresponding code was not
very clear)
2009-10-28 10:20:07 -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 f5073de0a7 'ipairs' goes until length of array instead of stopping at the first nil 2009-10-23 10:50:25 -02:00
Roberto Ierusalimschy f6ed285cf2 new hash for doubles based on frexp, to avoid low-level tricks 2009-10-23 10:31:12 -02:00
Roberto Ierusalimschy 1448e736f0 better documentation for constructor syntax 2009-10-14 13:43:11 -03:00
Roberto Ierusalimschy 6e415e9387 local function definition does not need to correct debug information 2009-10-13 16:35:42 -03:00
Roberto Ierusalimschy b114c99a60 two small bugs: 'debug.getinfo' did not consider negative indices as out
of range + 'debug.[gs]etlocal' crash on tail calls
2009-10-13 16:07:40 -03: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 ba21aa8b2b 'cpcall' must ensure correct environment for called function 2009-09-30 17:49:47 -03:00
Roberto Ierusalimschy d119cf3035 a few more instructions to testC (func2udata and getfield) 2009-09-30 17:49:25 -03:00
Roberto Ierusalimschy 0ac3d07ea6 first implementation of lexical environments 2009-09-30 12:38:37 -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 1829911d7c some operations may shrink g->totalbytes so g->estimate must be
more flexible
2009-09-28 10:50:34 -03:00
Roberto Ierusalimschy bed2cb725a initialize g->estimate (just in case) 2009-09-28 10:50:19 -03:00
Roberto Ierusalimschy ab75bd23ee handle extended opcodes (with OP_EXTRAARG) when checking metamethod
calls
2009-09-28 09:37:17 -03:00
Roberto Ierusalimschy cee94df6e0 function list in luaL_register may be NULL for an empty list 2009-09-28 09:36:40 -03:00
Roberto Ierusalimschy fcc46467fa limit of constants per function changed to 2^26 using extra arguments
to opcodes LOADK, GETGLOBAL, and SETGLOBAL
2009-09-23 17:33:05 -03:00
Roberto Ierusalimschy f8e354e240 detail (space between function name and its parameter list) 2009-09-23 17:14:00 -03:00
Roberto Ierusalimschy a650378822 'cpcall' reimplemented as a predefined value in the registry 2009-09-21 09:09:52 -03:00
Roberto Ierusalimschy 99182c6872 references must start after predefined values in the registry 2009-09-18 15:58:45 -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 a68494fb32 'debug.[gs]etupvalue' should be able to access C upvalues too 2009-09-09 17:32:19 -03:00
Roberto Ierusalimschy 4b44793dc5 "bug": lua_createtable with sizes changed (array <-> record) 2009-09-07 11:24:12 -03:00
Roberto Ierusalimschy 90e2a716c8 details + comments 2009-09-05 09:39:29 -03:00
Roberto Ierusalimschy d9fbbe1f23 "file:write" returns "file" in case of success 2009-09-01 16:10:48 -03:00
Roberto Ierusalimschy 4a714cebd1 API checks now have explanatory messages 2009-08-31 11:26:28 -03:00
Roberto Ierusalimschy 5b6be84106 ensures that argument 'mode' to 'io.open' matches "[rwa]%+?b?", to
avoid passing invalid modes to 'fopen'.
2009-08-28 10:51:57 -03:00
Roberto Ierusalimschy b2bb2f7f59 better machinery to test continuations in the C API 2009-08-26 14:41:26 -03:00
Roberto Ierusalimschy f096ab5421 correct way to check arguments to 'strftime' 2009-08-25 16:58:08 -03:00
Roberto Ierusalimschy 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).
2009-08-10 17:41:04 -03:00
Roberto Ierusalimschy bc439e21cd avoid an unprotected call to 'lua_tostring' which theoretically may
cause a panicked exit
2009-08-10 13:23:19 -03:00
Roberto Ierusalimschy 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.
2009-08-10 12:31:44 -03:00
Roberto Ierusalimschy 42167804b8 luaH_[gs]etnum renamed to luaH_[gs]etint (as they only accept integers,
not generic numbers).
2009-08-07 14:53:28 -03:00
Roberto Ierusalimschy 3135a6bbab luaH_[gs]etnum renamed to luaH_[gs]etint (as they only accept integers,
not generic numbers)
2009-08-07 13:17:41 -03:00
Roberto Ierusalimschy 95cbc402dc "But" -> "Bug" (misspelling) 2009-08-05 10:09:38 -03:00
Roberto Ierusalimschy decada8dc2 'debug.getfenv' does not check whether it has an argument 2009-08-04 15:51:19 -03:00
Roberto Ierusalimschy ee5d03b42a small bug: debug.getfenv should check whether it has an argument 2009-08-04 15:27:57 -03:00
Roberto Ierusalimschy 323f33d014 'collectgarbage"count"' returns a second argument with the count%1024. 2009-08-04 15:20:18 -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