Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Multiple errors in '__toclose' report the first one | Roberto Ierusalimschy | 2019-06-05 | 1 | -3/+6 |
| | | | | | | | | When there are multiple errors when closing objects, the error reported by the protected call is the first one, for two reasons: First, other errors may be caused by this one; second, the first error is handled in the original execution context, and therefore has the full traceback. | ||||
* | Details | Roberto Ierusalimschy | 2019-03-13 | 1 | -1/+2 |
| | | | | | | | | | | Several small improvements (code style, warnings, comments, more tests), in particular: - 'lua_topointer' extended to handle strings - raises an error in 'string.format("%10q")' ('%q' with modifiers) - in the manual for 'string.format', the term "option" replaced by "conversion specifier" (the term used by the C standard) | ||||
* | No more to-be-closed functions | Roberto Ierusalimschy | 2019-01-04 | 1 | -14/+10 |
| | | | | | | | | | | | | | | | | | | | To-be-closed variables must contain objects with '__toclose' metamethods (or nil). Functions were removed for several reasons: * Functions interact badly with sandboxes. If a sandbox raises an error to interrupt a script, a to-be-closed function still can hijack control and continue running arbitrary sandboxed code. * Functions interact badly with coroutines. If a coroutine yields and is never resumed again, its to-be-closed functions will never run. To-be-closed objects, on the other hand, will still be closed, provided they have appropriate finalizers. * If you really need a function, it is easy to create a dummy object to run that function in its '__toclose' metamethod. This comit also adds closing of variables in case of panic. | ||||
* | New functions 'lua_resetthread' and 'coroutine.kill' | Roberto Ierusalimschy | 2018-12-13 | 1 | -8/+10 |
| | | | | | | New functions to reset/kill a thread/coroutine, mainly (only?) to close any pending to-be-closed variable. ('lua_resetthread' also allows a thread to be reused...) | ||||
* | A to-be-closed variable must have a closable value (or be nil) | Roberto Ierusalimschy | 2018-11-29 | 1 | -0/+6 |
| | | | | | | | It is an error for a to-be-closed variable to have a non-closable non-nil value when it is being closed. This situation does not seem to be useful and often hints to an error. (Particularly in the C API, it is easy to change a to-be-closed index by mistake.) | ||||
* | Removed internal cache for closures | Roberto Ierusalimschy | 2018-11-01 | 1 | -2/+0 |
| | | | | | | | | | | | | | | | | | | | The mechanism of "caching the last closure created for a prototype to try to reuse it the next time a closure for that prototype is created" was removed. There are several reasons: - It is hard to find a natural example where this cache has a measurable impact on performance. - Programmers already perceive closure creation as something slow, so they tend to avoid it inside hot paths. (Any case where the cache could reuse a closure can be rewritten predefining the closure in some variable and using that variable.) - The implementation was somewhat complex, due to a bad interaction with the generational collector. (Typically, new closures are new, while prototypes are old. So, the cache breaks the invariant that old objects should not point to new ones.) | ||||
* | Closing methods should not interfere with returning values | Roberto Ierusalimschy | 2018-10-25 | 1 | -31/+33 |
| | | | | | | | | | | | | A closing method cannot be called in its own stack slot, as there may be returning values in the stack after that slot, and the call would corrupt those values. Instead, the closing method must be copied to the top of the stack to be called. Moreover, even when a function returns no value, its return istruction still has to have its position (which will set the stack top) after the local variables, otherwise a closing method might corrupt another not-yet-called closing method. | ||||
* | Handling of memory errors when creating to-be-closed upvalues | Roberto Ierusalimschy | 2018-10-18 | 1 | -32/+94 |
| | |||||
* | First "complete" implementation of to-be-closed variables | Roberto Ierusalimschy | 2018-10-17 | 1 | -3/+44 |
| | | | | | | | Still missing: - handling of memory errors when creating upvalue (must run closing method all the same) - interaction with coroutines | ||||
* | Removed extra information from RCS keyword strings | Roberto Ierusalimschy | 2018-08-23 | 1 | -1/+1 |
| | | | | | Version numbers and dates (mostly wrong) from RCS keyword strings removed from all source files; only the file name are kept. | ||||
* | new type 'StackValue' for stack elements | Roberto Ierusalimschy | 2017-06-29 | 1 | -6/+6 |
| | | | | (we may want to put extra info there in the future) | ||||
* | 'lineinfo' in prototypes saved as differences instead of absolute | Roberto Ierusalimschy | 2017-06-27 | 1 | -1/+4 |
| | | | | | | values, so that the array can use bytes instead of ints, reducing its size. (A new array 'abslineinfo' is used when line differences do not fit in a byte.) | ||||
* | bug: cannot reuse a dying upvalue | Roberto Ierusalimschy | 2017-05-24 | 1 | -2/+2 |
| | |||||
* | added 'cachemiss' field to prototype to avoid wasting time checking | Roberto Ierusalimschy | 2017-04-30 | 1 | -1/+2 |
| | | | | hits that fail too often | ||||
* | Upvalues collected like everything else (with mark-sweep) instead | Roberto Ierusalimschy | 2017-04-11 | 1 | -19/+28 |
| | | | | of reference count (simpler and better for generational mode) | ||||
* | small changes in 'luaC_upvalbarrier' | Roberto Ierusalimschy | 2017-04-06 | 1 | -4/+5 |
| | |||||
* | added include for 'lprefix.h', for stuff that must be added before | Roberto Ierusalimschy | 2014-11-02 | 1 | -4/+6 |
| | | | | any other header file | ||||
* | `name' in comments changed to 'name' | Roberto Ierusalimschy | 2014-10-25 | 1 | -3/+3 |
| | |||||
* | more precision between closure types ('LClosure' x 'CClosure') | Roberto Ierusalimschy | 2014-06-19 | 1 | -9/+9 |
| | |||||
* | use appropriate macros to convert GCObject to specific types | Roberto Ierusalimschy | 2014-06-18 | 1 | -4/+7 |
| | |||||
* | new list 'twups' to allow traversal of upvalues from dead threads | Roberto Ierusalimschy | 2014-02-18 | 1 | -4/+12 |
| | | | | (+ fixed some problems with cycles involving those upvalues) | ||||
* | field 'op' renamed to 'open' | Roberto Ierusalimschy | 2014-02-15 | 1 | -4/+4 |
| | |||||
* | no more local collection | Roberto Ierusalimschy | 2014-02-13 | 1 | -2/+1 |
| | |||||
* | 'luaC_newobj' does not handle special cases; only special case | Roberto Ierusalimschy | 2013-09-11 | 1 | -4/+4 |
| | | | | now is threads, which do not use 'luaC_newobj' anymore. | ||||
* | LOCALBLACK changed to LOCALMARK and used also to control whether object | Roberto Ierusalimschy | 2013-08-27 | 1 | -6/+4 |
| | | | | | is in 'localgc' list + luaC_newobj by default puts object in 'localgc' list | ||||
* | upvalues collected by reference count | Roberto Ierusalimschy | 2013-08-27 | 1 | -38/+27 |
| | |||||
* | Lua closures go to local, too | Roberto Ierusalimschy | 2013-08-26 | 1 | -5/+14 |
| | |||||
* | C functions and strings now go to the local list; first version | Roberto Ierusalimschy | 2013-08-23 | 1 | -2/+3 |
| | | | | of the local collector | ||||
* | added 'local' bit (true => object is only refered by local variables) | Roberto Ierusalimschy | 2013-08-16 | 1 | -1/+3 |
| | |||||
* | double-linked list of all upvalues elliminated and changed to a | Roberto Ierusalimschy | 2013-08-07 | 1 | -27/+7 |
| | | | | traversal of all non-marked threads | ||||
* | no more generational collection !!! | Roberto Ierusalimschy | 2013-08-05 | 1 | -2/+1 |
| | |||||
* | open upvalues cannot be old if thread is not old; when thread is old, | Roberto Ierusalimschy | 2012-10-03 | 1 | -2/+2 |
| | | | | | their list is not traversed anymore, and therefore can contain dead elements. | ||||
* | no more 'Proto' objects on the stack. Protos are anchored on outer | Roberto Ierusalimschy | 2012-05-08 | 1 | -4/+3 |
| | | | | Protos or on a Closure, which must be created before the Proto. | ||||
* | object tag keeps variant bits too -> no need for 'isC' field in | Roberto Ierusalimschy | 2012-01-20 | 1 | -12/+3 |
| | | | | Closures + more strick typing for closure variants | ||||
* | typo in comments | Roberto Ierusalimschy | 2010-06-30 | 1 | -2/+2 |
| | |||||
* | unused '#include' removed | Roberto Ierusalimschy | 2010-06-10 | 1 | -2/+1 |
| | |||||
* | Lua closures are cached for reuse | Roberto Ierusalimschy | 2010-06-04 | 1 | -2/+5 |
| | |||||
* | corrected some places where an old object could end up in front | Roberto Ierusalimschy | 2010-05-10 | 1 | -3/+5 |
| | | | | of a new one + minimal documentation about this problem | ||||
* | nasty GC bug: upvalue must be turned white when not keeping invariant, | Roberto Ierusalimschy | 2010-04-29 | 1 | -6/+2 |
| | | | | but barrier was not being called when uv->v were already white. | ||||
* | 'luaC_linkupval' embedded into call site | Roberto Ierusalimschy | 2010-04-29 | 1 | -4/+10 |
| | |||||
* | no more fenvs! | Roberto Ierusalimschy | 2010-03-26 | 1 | -5/+3 |
| | |||||
* | first version of _ENV; no more global variables | Roberto Ierusalimschy | 2010-03-12 | 1 | -2/+1 |
| | |||||
* | allocator function receives the tag of object being allocated in 'osize' | Roberto Ierusalimschy | 2009-12-17 | 1 | -19/+12 |
| | | | | when 'ptr' is NULL. | ||||
* | macro 'ngcotouv' is the same as 'gco2uv', so it was removed | Roberto Ierusalimschy | 2009-12-11 | 1 | -3/+3 |
| | |||||
* | comment typos | Roberto Ierusalimschy | 2009-11-26 | 1 | -2/+2 |
| | |||||
* | first implementation of lexical environments | Roberto Ierusalimschy | 2009-09-30 | 1 | -1/+3 |
| | |||||
* | information about upvalues (where they come from) kept in Proto structure, | Roberto Ierusalimschy | 2009-09-28 | 1 | -5/+4 |
| | | | | instead of sequence of pseudo-opcodes after OP_CLOSURE | ||||
* | 'luaM_freearray' does not need array type as argument | Roberto Ierusalimschy | 2009-04-17 | 1 | -7/+7 |
| | |||||
* | should not manipulate NULL pointers (even without accessing them) | Roberto Ierusalimschy | 2007-02-07 | 1 | -3/+3 |
| | |||||
* | small changes in casts | Roberto Ierusalimschy | 2005-12-22 | 1 | -3/+3 |
| |