Roberto Ierusalimschy
0acd55898d
Added gcc option '-Wconversion'
No warnings for standard numerical types. Still pending alternative
numerical types.
3 months ago
Roberto Ierusalimschy
413a393e62
Stack indices changed to union's
That will allow to change pointers to offsets while reallocating
the stack.
2 years ago
Roberto Ierusalimschy
196bb94d66
Bug: 'lua_settop' may use an invalid pointer to stack
2 years ago
Roberto Ierusalimschy
4e47f81188
New implementation for to-be-closed variables
To-be-closed variables are linked in their own list, embedded into the
stack elements. (Due to alignment, this information does not change
the size of the stack elements in most architectures.) This new list
does not produce garbage and avoids memory errors when creating tbc
variables.
4 years ago
Roberto Ierusalimschy
b07fc10e91
Allow yields inside '__close' metamethods
Initial implementation to allow yields inside '__close' metamethods.
This current version still does not allow a '__close' metamethod
to yield when called due to an error. '__close' metamethods from
C functions also are not allowed to yield.
4 years ago
Roberto Ierusalimschy
7af27ef59d
Cleaner handling of errors in '__close' metamethods
Instead of protecting each individual metamethod call, protect the
entire call to 'luaF_close'.
4 years ago
Roberto Ierusalimschy
5f83fb6582
Details
5 years ago
Roberto Ierusalimschy
9e6807c3c9
Do not collect open upvalues
Open upvalues are kept alive together with their corresponding
stack. This change makes a simpler and safer fix to the issue in
commit 440a5ee78c
, about upvalues in the list of open upvalues
being collected while others are being created. (That previous fix
may not be correct.)
5 years ago
Roberto Ierusalimschy
440a5ee78c
Fixed bug for emergency collection in upvalue creation
When creating an upvalue, an emergency collection can collect the
previous upvalue where the new one would be linked. The following
code can trigger the bug, using valgrind on Lua compiled with the
-DHARDMEMTESTS option:
local x; local y
(function () return y end)();
(function () return x end)()
5 years ago
Roberto Ierusalimschy
fdc25a1ebf
New functions 'lua_resetthread' and 'coroutine.kill'
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...)
6 years ago
Roberto Ierusalimschy
3c7dc52909
Handling of memory errors when creating to-be-closed upvalues
6 years ago
Roberto Ierusalimschy
bd96330d03
First "complete" implementation of to-be-closed variables
Still missing:
- handling of memory errors when creating upvalue (must run closing
method all the same)
- interaction with coroutines
6 years ago
Roberto Ierusalimschy
f99509581e
Removed extra information from RCS keyword strings
Version numbers and dates (mostly wrong) from RCS keyword strings
removed from all source files; only the file name are kept.
6 years ago
Roberto Ierusalimschy
38d3bc8909
using 'offsetof' to compute the size of parts of a structure
7 years ago
Roberto Ierusalimschy
e2b15aa21d
janitor work on casts
7 years ago
Roberto Ierusalimschy
f96497397a
new type 'StackValue' for stack elements
(we may want to put extra info there in the future)
7 years ago
Roberto Ierusalimschy
2376eb6347
barrier for prototype's cache (with new gray list 'protogray' to keep
prototypes to have their caches visited again) + constant 'MAXMISS'
8 years ago
Roberto Ierusalimschy
a3d36fe283
Upvalues collected like everything else (with mark-sweep) instead
of reference count (simpler and better for generational mode)
8 years ago
Roberto Ierusalimschy
cdd26700e8
definition for 'MAXUPVAL' moved for a more "private" place and its
value and comment corrected to reflect current implementation
10 years ago
Roberto Ierusalimschy
89b56e7d84
more precision between closure types ('LClosure' x 'CClosure')
11 years ago
Roberto Ierusalimschy
d764cc5522
new list 'twups' to allow traversal of upvalues from dead threads
(+ fixed some problems with cycles involving those upvalues)
11 years ago
Roberto Ierusalimschy
ffa96d988d
field 'op' renamed to 'open'
11 years ago
Roberto Ierusalimschy
2e2c109daf
type of 'refcount' changed to lu_mem (to ensure there will be no
overflows)
11 years ago
Roberto Ierusalimschy
af35c7f398
upvalues collected by reference count
11 years ago
Roberto Ierusalimschy
623e388bb4
double-linked list of all upvalues elliminated and changed to a
traversal of all non-marked threads
11 years ago
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.
13 years ago
Roberto Ierusalimschy
fd22ccd6d0
object tag keeps variant bits too -> no need for 'isC' field in
Closures + more strick typing for closure variants
13 years ago
Roberto Ierusalimschy
545f43065f
'luaF_newLclosure' gets prototype of new closure as argument
15 years ago
Roberto Ierusalimschy
064e406f67
no more fenvs!
15 years ago
Roberto Ierusalimschy
8718fda9b2
added LUAI_FUNC to functions not in the API
20 years ago
Roberto Ierusalimschy
7d45a5f48f
C functions and userdata also have environments
20 years ago
Roberto Ierusalimschy
334ba8132b
cleaner way to remark open upvalues
20 years ago
Roberto Ierusalimschy
47fc57a252
`TObject' renamed to `TValue' + other name changes and better assertions
for incremental garbage collection
21 years ago
Roberto Ierusalimschy
5ee63257f9
macros for closure sizes are global
21 years ago
Roberto Ierusalimschy
c51bcf4796
it's ok to dump functions with upvalues
21 years ago
Roberto Ierusalimschy
ab9e062928
name changes to avoid name collision between macros and variables
22 years ago
Roberto Ierusalimschy
3941af53ad
first implementation of independent global table per function
23 years ago
Roberto Ierusalimschy
413fc7334b
new implementation for lua upvalues (sugested by E.T.): simpler and solves
a bug for multi-stacks
23 years ago
Roberto Ierusalimschy
72659a0605
no more explicit support for wide-chars; too much troble...
23 years ago
Roberto Ierusalimschy
15462edb0f
new definitions for closure structures
23 years ago
Roberto Ierusalimschy
abdbe883a8
first implementation of unrestricted static scoping
24 years ago
Roberto Ierusalimschy
39b7978329
first (big) step to support wide chars
24 years ago
Roberto Ierusalimschy
0183b8030c
`free' gets size of the block: complete control over memory use
24 years ago
Roberto Ierusalimschy
dad808a73a
new way to count `nblocks' for GC (try to count bytes).
24 years ago
Roberto Ierusalimschy
afef009fce
new version of debug system
25 years ago
Roberto Ierusalimschy
73aa465a8e
some name changes
25 years ago
Roberto Ierusalimschy
acdb0b741e
comments.
25 years ago
Roberto Ierusalimschy
29ede6aa13
first implementation of multiple states (reentrant code).
25 years ago
Roberto Ierusalimschy
8e7451512f
some more `const's
25 years ago
Roberto Ierusalimschy
4343420d4d
simplified version of `gc' tag method (only for userdata now).
25 years ago