Roberto Ierusalimschy
1bf4faec64
new GC state to sweep 'localgc' list + small changes in sweep control
2013-08-30 16:14:26 -03:00
Roberto Ierusalimschy
8ef9e8460e
bug (GC can collect long identifier during parser) + change (using
...
a single constant table for all functions in a chunk)
2013-08-30 13:01:37 -03:00
Roberto Ierusalimschy
4f292d753c
bug: GC can collect a long string still in use during parser
2013-08-30 12:51:12 -03:00
Roberto Ierusalimschy
26629d0af1
details (a few casts moved from macro invocation to macro definition)
2013-08-29 10:49:57 -03:00
Roberto Ierusalimschy
b5e75fde4e
bug: local collection must clear rest of stack
2013-08-29 10:34:16 -03:00
Roberto Ierusalimschy
9a871dd3db
tables and userdata all go to local list, too
2013-08-28 15:30:26 -03:00
Roberto Ierusalimschy
90972ff136
LOCALBLACK changed to LOCALMARK and used also to control whether object
...
is in 'localgc' list + luaC_newobj by default puts object in 'localgc'
list
2013-08-27 17:04:00 -03:00
Roberto Ierusalimschy
af35c7f398
upvalues collected by reference count
2013-08-27 15:53:35 -03:00
Roberto Ierusalimschy
742b7377d3
Lua closures go to local, too
2013-08-26 09:41:10 -03:00
Roberto Ierusalimschy
50955e27f5
C functions and strings now go to the local list; first version
...
of the local collector
2013-08-23 10:34:54 -03:00
Roberto Ierusalimschy
33c49f7fa0
some details over new implementation of string table
2013-08-22 12:21:48 -03:00
Roberto Ierusalimschy
0df6635711
"fixed" objects kept in a separated list (instead of being kept in
...
'allgc' list with a bit marking them)
2013-08-21 17:09:51 -03:00
Roberto Ierusalimschy
ae800656c9
change in string table: string table is now independent of GC lists; all
...
strings live in 'normal' GC lists
2013-08-21 16:21:16 -03:00
Roberto Ierusalimschy
8c68863960
initial size of string table (MINSTRTABSIZE) should be large enough
...
to hold all strings needed by an empty Lua state
2013-08-21 16:02:30 -03:00
Roberto Ierusalimschy
8f6b80aa1d
GC bits SEPARATED and FINALIZEDBIT mixed in FINALIZEDBIT (with simpler
...
control)
2013-08-20 14:46:34 -03:00
Roberto Ierusalimschy
9eff921f8f
"barrier" for link prototype->cache changed to be consistent with
...
GC behavior (link is cleared to preserve invariant)
2013-08-19 11:18:43 -03:00
Roberto Ierusalimschy
8e6b7ef9ab
new function 'isgclocal' + test for GC consistency of prototype's caches
2013-08-19 11:16:33 -03:00
Roberto Ierusalimschy
caceeab750
'next' field for tables changed from pointer to integer (for better
...
alignment on 64-bit machines)
2013-08-18 13:12:18 -03:00
Roberto Ierusalimschy
3991312b94
details
2013-08-16 16:02:31 -03:00
Roberto Ierusalimschy
439d74e29f
added 'local' bit (true => object is only refered by local variables)
2013-08-16 15:55:49 -03:00
Roberto Ierusalimschy
3679d33b02
barrier conditions rewritten to test first 'isblack' and then 'iswhite'
...
(during a pause all objects are white, so 'isblack' fails much more
often than 'iswhite')
2013-08-13 14:36:44 -03:00
Roberto Ierusalimschy
78b941039d
change to allow collector to stop when it goes to the atomic phase
...
(just for debugging)
2013-08-07 12:39:09 -03:00
Roberto Ierusalimschy
623e388bb4
double-linked list of all upvalues elliminated and changed to a
...
traversal of all non-marked threads
2013-08-07 09:18:11 -03:00
Roberto Ierusalimschy
677d90165f
no more generational collection !!!
2013-08-05 13:58:28 -03:00
Roberto Ierusalimschy
4244da96bf
'debug.subtype' -> 'math.type' (to distinguish integers and floats)
2013-07-22 13:05:53 -03:00
Roberto Ierusalimschy
fcf99bf788
'math.isfloat' replaced by 'debug.subtype'
2013-07-10 17:57:05 -03:00
Roberto Ierusalimschy
98d76cdcae
bug: Wrong error message in some short-cut expressions
2013-07-10 17:32:36 -03:00
Roberto Ierusalimschy
2f8c51a552
use unsigneds for unary minus, too
2013-07-10 14:15:12 -03:00
Roberto Ierusalimschy
b5f5fcd782
use different constants (instead of different values for the same constant)
...
to define number sizes (LUA_INT_INT/LUA_INT_LONG/LUA_INT_LONGLONG and
LUA_REAL_FLOAT/LUA_REAL_DOUBLE/LUA_REAL_LONGDOUBLE) + use __int64 and
I64 instead of long long (and ll) for Windows
2013-07-09 15:31:35 -03:00
Roberto Ierusalimschy
2ef9bcfd11
avoid undefined shift of LUA_NBITS in rotate operation
2013-07-09 15:31:01 -03:00
Roberto Ierusalimschy
5fa680d47f
no need for type 'b_uint' (lua_Unsigned must have at least 32 bits)
2013-07-09 14:49:50 -03:00
Roberto Ierusalimschy
48735da0d0
When loading a file, Lua may call the reader function again after
...
it returned end of input + luac listings choke on long strings
2013-07-05 15:02:28 -03:00
Roberto Ierusalimschy
2b4bd21585
'tonumber': base must be a number
2013-07-05 11:39:15 -03:00
Roberto Ierusalimschy
beff5b078a
'tonumber': does not accept numbers when given a base + convertion from
...
strings to numbers with a base moved to a separated function (more
modular)
2013-07-05 11:35:49 -03:00
Roberto Ierusalimschy
5519c98655
'lua_cvtonum' -> 'lua_strtonum'; converts only strings to numbers
2013-07-05 11:29:51 -03:00
Roberto Ierusalimschy
cbe164191c
new function 'ifloor'
2013-07-03 14:23:19 -03:00
Roberto Ierusalimschy
66d046833d
no need to check "bad conversion number->int;" in luaL_checkversion,
...
as now Lua does not use tricks for the conversion, but there is a
need to check the sizes of number types, as they can be different
in two modules
2013-06-27 15:32:33 -03:00
Roberto Ierusalimschy
15fdbd26fe
'numbits' moved from 'math' to 'debug' library
2013-06-25 16:37:00 -03:00
Roberto Ierusalimschy
2b4975dca7
LUA_SMALL_* changed to LUA_*SIZE + added support for long double + better
...
support for ANSI systems
2013-06-25 16:04:40 -03:00
Roberto Ierusalimschy
e39da66c8c
macro 'lua_strx2number' does not need to be global
2013-06-25 15:58:32 -03:00
Roberto Ierusalimschy
483c2ccd0f
avoid using raw representation of numbers for hashing, as number may
...
not use all its space (e.g., long double can have sizeof=12 but
use only 10 bytes)
2013-06-25 15:57:18 -03:00
Roberto Ierusalimschy
982aa7058f
'luaL_len' returns lua_Integer instead of 'int'
2013-06-25 11:05:26 -03:00
Roberto Ierusalimschy
80cdf39d0e
avoid using 'modf' in the implementation of 'math.modf', to avoid
...
problems with 'double*'. (When using 'float' as lua_Number,
'float*' is not compatible with 'double*'...)
2013-06-25 11:02:18 -03:00
Roberto Ierusalimschy
45f3797a5b
'long' may have more than 32 bits in some machines; use 'int' for
...
small lua_Integer unless necessary to use 'long'
2013-06-21 14:42:28 -03:00
Roberto Ierusalimschy
de6e5a5919
small bugs uncovered in a 64-bit machine (where 'long' has 64 bits)
2013-06-21 14:27:24 -03:00
Roberto Ierusalimschy
81102d3689
try to avoid warnings when converting int to pointer
2013-06-20 18:59:13 -03:00
Roberto Ierusalimschy
6579bd4190
reorganization of warnings + update of explicit dependencies (gcc -MM)
2013-06-20 15:56:51 -03:00
Roberto Ierusalimschy
f45177f2d3
In the table that hashes constants, use a light userdata as keys
...
to integer values to avoid collisions with floats with the same
numerical value
2013-06-20 14:37:31 -03:00
Roberto Ierusalimschy
d6f5fb2d2c
avoid warning for unary minus over an unsigned value
2013-06-20 12:12:43 -03:00
Roberto Ierusalimschy
7c4cc505db
added "reasonable" limit for 'string.rep' (otherwise it is too easy
...
to crash the machine)
2013-06-20 12:06:51 -03:00