Commit Graph

3133 Commits

Author SHA1 Message Date
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
Roberto Ierusalimschy
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)
2009-07-15 15:38:16 -03:00
Roberto Ierusalimschy
bd5fa9cc8f new macro 'getproto' 2009-07-15 15:37:19 -03:00
Roberto Ierusalimschy
2658c94925 detail (comment: 'correspoding' -> 'corresponding') 2009-07-15 14:57:30 -03:00
Roberto Ierusalimschy
215885768c 'index2adr' -> 'index2addr' (correct spelling) 2009-07-15 14:57:03 -03:00
Roberto Ierusalimschy
a5f68589c0 avoid using 'UNUSED' (not defined outside the kernel) 2009-07-15 14:49:48 -03:00
Roberto Ierusalimschy
28419c4383 'luaL_tolstring' uses 'lua_tolstring' instead of 'lua_tostring' and
'lua_objlen'
2009-07-15 14:47:34 -03:00
Roberto Ierusalimschy
5bff2aaf47 calls with LUA_MULTRET may leave no free slots in the stack 2009-07-15 14:35:20 -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
abb85fc059 new definition for 'luaD_checkstack' to avoid possible overflows 2009-07-08 13:06:51 -03:00
Roberto Ierusalimschy
aabe3ddbf4 errors in 'resume' should be all protected 2009-07-08 13:06:07 -03:00
Roberto Ierusalimschy
0c258c8492 smart use of varargs may create functions that return too
many arguments and overflow the stack of C functions.
2009-07-02 16:57:34 -03:00
Roberto Ierusalimschy
d57c9cdefc BUG: 'luaV_settable' may invalidate a reference to a table and try
to reuse it.
2009-07-01 18:10:33 -03:00
Roberto Ierusalimschy
afb3f7e754 bug: 'luaV_settable' may invalidate a reference to a table and try
to reuse it.
2009-07-01 17:31:25 -03:00
Roberto Ierusalimschy
88564c3aec Standard library for bitwise operations 2009-07-01 13:17:08 -03:00
Roberto Ierusalimschy
3abe3da9fb new module 'lbitlib.c' for bitwise operations 2009-07-01 13:16:40 -03:00
Roberto Ierusalimschy
eb8499c8e0 use of LUAI_UINT32 replaced by 'unsigned LUA_INT32' (one less
definition needed)
2009-07-01 13:14:15 -03:00
Roberto Ierusalimschy
47c562435b better error messages for luaL_checkversion 2009-06-19 11:21:57 -03:00
Roberto Ierusalimschy
02504d86d3 l_version may be local to 'lua_version' 2009-06-19 11:21:23 -03:00
Roberto Ierusalimschy
4a818f068a 'checkversion' implemented in the auxiliary library 2009-06-18 15:59:58 -03:00
Roberto Ierusalimschy
1d6ebce296 new function 'lua_version' (so that 'checkversion' can be implemented
in the auxiliary library)
2009-06-18 15:59:18 -03:00
Roberto Ierusalimschy
bc3e02a1b7 default paths have dot option as the last one (to improve security) 2009-06-18 15:19:36 -03:00
Roberto Ierusalimschy
f4eed60ca9 better treatment of integer formats in string.format 2009-06-18 13:51:03 -03:00
Roberto Ierusalimschy
c1de1fdac6 small optimization in 'lua_arith' (avoids overhead in the common case
of both arguments being numbers)
2009-06-18 13:36:40 -03:00
Roberto Ierusalimschy
a36c8e1718 new macro 'changenvalue' 2009-06-18 13:36:40 -03:00