Commit Graph

341 Commits

Author SHA1 Message Date
Roberto Ierusalimschy
7a8eb83b4a bug: attempting to resume the running coroutine makes it unyieldable 2013-11-08 16:16:33 -02:00
Roberto Ierusalimschy
4c6dfc342b CallInfo lists shrinks together with their associated stacks 2013-09-17 12:40:06 -03:00
Roberto Ierusalimschy
af35c7f398 upvalues collected by reference count 2013-08-27 15:53:35 -03:00
Roberto Ierusalimschy
fa3b126a23 BUG: stack overflow in vararg functions with many fixed
parameters called with few arguments
2013-04-19 18:05:04 -03:00
Roberto Ierusalimschy
b157f3546e BUG: 'pcall' may not restore previous error function when
inside coroutines
2012-10-01 11:05:04 -03:00
Roberto Ierusalimschy
2dc91ca5ee checks garbage collector every time it calls a function (as the
stack can grow and so allocates more memory)
2012-08-28 15:30:45 -03:00
Roberto Ierusalimschy
b926472312 change in error message 2012-06-29 16:23:33 -03:00
Roberto Ierusalimschy
cc2a60ecb7 bugs in yields inside debug hooks 2012-06-08 12:14:04 -03:00
Roberto Ierusalimschy
3cadc37f47 no more 'Proto' objects on the stack. Protos are anchored on outer
Protos or on a Closure, which must be created before the Proto.
2012-05-08 10:53:33 -03:00
Roberto Ierusalimschy
a94ce68e0a bug: wrong handling of 'nCcalls' in coroutines 2012-04-26 17:41:18 -03:00
Roberto Ierusalimschy
3617e04e97 'lua_load' has an extra argument 'mode' 2011-11-29 13:55:08 -02:00
Roberto Ierusalimschy
217e67cb22 new type 'l_noret' for function that do not return 2011-10-07 17:45:19 -03:00
Roberto Ierusalimschy
ec431ce5db comment 2011-09-12 17:33:03 -03:00
Roberto Ierusalimschy
3dc5475e23 'nCcalls' should be local to each thread, as each thread may have its
own C stack (with LuaThreads or something similar)
2011-08-23 14:24:34 -03:00
Roberto Ierusalimschy
f180822fa6 back to internal table for 'ctype', no more locale manipulation 2011-06-28 12:42:04 -03:00
Roberto Ierusalimschy
136f8e148d added cast to void to calls to 'setlocale' (to easy redefining it as
a constant)
2011-06-20 13:36:03 -03:00
Roberto Ierusalimschy
cb4950a6d8 parser must work with C locale, but external locale must be preserved 2011-06-18 14:08:58 -03:00
Roberto Ierusalimschy
3b44821334 stricter control (using tag variants) over closure kinds (Lua x C) 2011-06-02 16:31:40 -03:00
Roberto Ierusalimschy
3f04a9f2c0 code is simpler without 'goto' here 2011-05-30 13:36:38 -03:00
Roberto Ierusalimschy
7482e8f914 no need of lookahead in Zio 2011-02-23 10:13:10 -03:00
Roberto Ierusalimschy
f079749287 some reorganization of dynamic data structures used by the parser 2011-02-07 15:14:50 -02:00
Roberto Ierusalimschy
7cc0e63d8a first implementation of 'goto' 2011-02-04 15:34:43 -02:00
Roberto Ierusalimschy
4590a89b32 corrected warnings from different compilers (mostly casts and small
details)
2010-10-25 17:01:37 -02:00
Roberto Ierusalimschy
ffff9a49da 'nresults' in CallInfo now refers to number of results that the current
function returns (and not what it expects from a call)
2010-09-30 14:21:31 -03:00
Roberto Ierusalimschy
545f43065f 'luaF_newLclosure' gets prototype of new closure as argument 2010-06-04 10:06:15 -03:00
Roberto Ierusalimschy
237f755dca typos in comments 2010-05-05 15:49:56 -03:00
Roberto Ierusalimschy
53f9499f7f "light C function" is a better name than "C-function pointer" 2010-04-18 10:22:48 -03:00
Roberto Ierusalimschy
e7ffb1b501 macro LUA_USE_LONGJMP allows choosing longjmp when compiling Lua as
C++ code
2010-04-18 09:41:35 -03:00
Roberto Ierusalimschy
7dfa4cd655 first implementation of light C functions 2010-04-14 12:13:48 -03:00
Roberto Ierusalimschy
055104f5b6 keep memory-error message in the global state, so that its use
does not depend on Lua internalizing strings to avoid a string
creation on memory errors
2010-04-08 14:16:46 -03:00
Roberto Ierusalimschy
064e406f67 no more fenvs! 2010-03-26 17:58:11 -03:00
Roberto Ierusalimschy
4c54cd3a10 when yielding, original 'func' value must be kept and restored so
that 'poscall' puts results in the right slot.
2010-02-09 09:56:29 -02:00
Roberto Ierusalimschy
0c7de97d47 correct error message when yielding from outside a coroutine 2010-01-13 14:17:32 -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
e0f9d1c8f5 removed export of function only for coco 2009-12-17 10:28:57 -02:00
Roberto Ierusalimschy
de6fc75d63 several configuration options that do not change often moved out of
luaconf.h and into more internal files
2009-12-17 10:26:09 -02:00
Roberto Ierusalimschy
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).
2009-12-10 16:20:07 -02:00
Roberto Ierusalimschy
2643da67c6 error messages from 'lua_resume' must be generated in protected mode,
to avoid raising memory errors
2009-12-08 16:59:24 -02:00
Roberto Ierusalimschy
3e41afcec5 extra api checks for number of returns of C functions and for lua_yield 2009-11-27 13:37:59 -02:00
Roberto Ierusalimschy
b0f2b288a6 new scheme for debug info about tail calls: no more 'fake' stack entries,
but stack entry knows whether it was tail called
2009-11-25 13:27:51 -02:00
Roberto Ierusalimschy
2d5931ebc8 ensure that reader function cannot yield during parsing 2009-11-17 14:46:44 -02:00
Roberto Ierusalimschy
35fa276099 parser/scanner keep GC running 2009-11-17 14:33:38 -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
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
0e45ffb8e4 first implementation of 'lua_yieldk' (yield with continuation) 2009-09-14 11:30:39 -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
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
019ebcb85f errors in finalizers are propagated with code LUA_ERRGCMM (ERRor in
__gc MetaMethod)
2009-05-21 17:06:11 -03:00
Roberto Ierusalimschy
e091a254df new way to GC stacks: the entire stack must be correct all the times;
the 'dead' part of a stack (after the top) must have only nil's, so
that 'top' may go up without cleaning the stack.
2009-04-28 16:04:36 -03:00