2e2c109daf
type of 'refcount' changed to lu_mem (to ensure there will be no overflows)
Roberto Ierusalimschy2013-09-11 12:17:00 -03:00
6ca7b63bce
check for shrinking string table done only at the end of a GC cycle
Roberto Ierusalimschy2013-09-11 11:56:15 -03:00
4eeb1831be
new names and better order for GC states (sweep first lists that can have dead objects)
Roberto Ierusalimschy2013-09-11 11:47:08 -03:00
dd373a8f66
threads are kept in a separated GC list, linked after the main thread
Roberto Ierusalimschy2013-09-11 11:09:55 -03:00
7061fe1d56
detail: 'sweepstep' checks end of phase after calling 'sweeplist', so that phases with small lists return 0 at the first call to 'sweepstep'
Roberto Ierusalimschy2013-09-11 10:24:55 -03:00
d8aa8dd97e
objects in list 'tobefnz' have a GC life-cycle like all others (specifically they are cleaned during sweep phase)
Roberto Ierusalimschy2013-09-11 09:47:48 -03:00
1150873447
'luaC_newobj' does not handle special cases; only special case now is threads, which do not use 'luaC_newobj' anymore.
Roberto Ierusalimschy2013-09-11 09:26:14 -03:00
d3bbb34c24
back to open hashing for the string table (but with a different 'hnext' field, to strings are still collected like all other objects)
Roberto Ierusalimschy2013-09-05 16:31:49 -03:00
1bf4faec64
new GC state to sweep 'localgc' list + small changes in sweep control
Roberto Ierusalimschy2013-08-30 16:14:26 -03:00
8ef9e8460e
bug (GC can collect long identifier during parser) + change (using a single constant table for all functions in a chunk)
Roberto Ierusalimschy2013-08-30 13:01:37 -03:00
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
Roberto Ierusalimschy2013-08-27 17:04:00 -03:00
0df6635711
"fixed" objects kept in a separated list (instead of being kept in 'allgc' list with a bit marking them)
Roberto Ierusalimschy2013-08-21 17:09:51 -03:00
ae800656c9
change in string table: string table is now independent of GC lists; all strings live in 'normal' GC lists
Roberto Ierusalimschy2013-08-21 16:21:16 -03:00
8c68863960
initial size of string table (MINSTRTABSIZE) should be large enough to hold all strings needed by an empty Lua state
Roberto Ierusalimschy2013-08-21 16:02:30 -03:00
8f6b80aa1d
GC bits SEPARATED and FINALIZEDBIT mixed in FINALIZEDBIT (with simpler control)
Roberto Ierusalimschy2013-08-20 14:46:34 -03:00
9eff921f8f
"barrier" for link prototype->cache changed to be consistent with GC behavior (link is cleared to preserve invariant)
Roberto Ierusalimschy2013-08-19 11:18:43 -03:00
8e6b7ef9ab
new function 'isgclocal' + test for GC consistency of prototype's caches
Roberto Ierusalimschy2013-08-19 11:16:33 -03:00
caceeab750
'next' field for tables changed from pointer to integer (for better alignment on 64-bit machines)
Roberto Ierusalimschy2013-08-18 13:12:18 -03:00
439d74e29f
added 'local' bit (true => object is only refered by local variables)
Roberto Ierusalimschy2013-08-16 15:55:49 -03:00
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')
Roberto Ierusalimschy2013-08-13 14:36:44 -03:00
78b941039d
change to allow collector to stop when it goes to the atomic phase (just for debugging)
Roberto Ierusalimschy2013-08-07 12:39:09 -03:00
623e388bb4
double-linked list of all upvalues elliminated and changed to a traversal of all non-marked threads
Roberto Ierusalimschy2013-08-07 09:18:11 -03:00
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
Roberto Ierusalimschy2013-07-09 15:31:35 -03:00
5fa680d47f
no need for type 'b_uint' (lua_Unsigned must have at least 32 bits)
Roberto Ierusalimschy2013-07-09 14:49:50 -03:00
48735da0d0
When loading a file, Lua may call the reader function again after it returned end of input + luac listings choke on long strings
Roberto Ierusalimschy2013-07-05 15:02:28 -03:00
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)
Roberto Ierusalimschy2013-07-05 11:35:49 -03:00
5519c98655
'lua_cvtonum' -> 'lua_strtonum'; converts only strings to numbers
Roberto Ierusalimschy2013-07-05 11:29:51 -03:00
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
Roberto Ierusalimschy2013-06-27 15:32:33 -03:00
2b4975dca7
LUA_SMALL_* changed to LUA_*SIZE + added support for long double + better support for ANSI systems
Roberto Ierusalimschy2013-06-25 16:04:40 -03:00
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)
Roberto Ierusalimschy2013-06-25 15:57:18 -03:00
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*'...)
Roberto Ierusalimschy2013-06-25 11:02:18 -03:00
45f3797a5b
'long' may have more than 32 bits in some machines; use 'int' for small lua_Integer unless necessary to use 'long'
Roberto Ierusalimschy2013-06-21 14:42:28 -03:00
de6e5a5919
small bugs uncovered in a 64-bit machine (where 'long' has 64 bits)
Roberto Ierusalimschy2013-06-21 14:27:24 -03:00
6579bd4190
reorganization of warnings + update of explicit dependencies (gcc -MM)
Roberto Ierusalimschy2013-06-20 15:56:51 -03:00
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
Roberto Ierusalimschy2013-06-20 14:37:31 -03:00
7c4cc505db
added "reasonable" limit for 'string.rep' (otherwise it is too easy to crash the machine)
Roberto Ierusalimschy2013-06-20 12:06:51 -03:00
453450d687
new macro 'l_floor' (allows 'floorf' even when other math operations do not have an 'f' variant)
Roberto Ierusalimschy2013-06-20 12:02:49 -03:00
130c0e40e0
new constant 'MAX_SIZE', distinct from 'MAX_SIZET', for sizes visible from Lua; these must fit in a lua_Integer
Roberto Ierusalimschy2013-06-19 11:27:00 -03:00
6fb0b11350
string contatenation handles conversion of integers to strings + floats always format as floats (with decimal dot or exponent)
Roberto Ierusalimschy2013-06-04 16:36:42 -03:00
932e7fb0e1
'lua_tounsigned' takes number modulo 2^numbits as a result when number is a float (That may change...)
Roberto Ierusalimschy2013-06-04 16:34:51 -03:00
fc083f1138
removed all tricks for conversions + 'luai_hashnum' moved to ltable.c
Roberto Ierusalimschy2013-05-29 11:04:15 -03:00
ee865b9fe7
new implementation for 'lua_strx2number' to correct small problems with numbers like 0x10000...000p-100
Roberto Ierusalimschy2013-05-27 14:42:38 -03:00
1414b7123c
support for the case when 'l_mathop' does not conform to lua_Number (problem with pointers to lua_Number solved by a typedef selected automatically by 'l_mathop')
Roberto Ierusalimschy2013-05-26 10:45:24 -03:00
3563b3f519
first version of control for number sizes (still in 'local' section)
Roberto Ierusalimschy2013-05-26 10:35:52 -03:00
b5ec26101f
new API function 'lua_cvtonum' to convert a value (number or string) to a number, following the rules of the language to create integers or floats
Roberto Ierusalimschy2013-05-14 13:00:11 -03:00
36e8771076
'luaO_str2int' more generic: accepts white spaces around the numeral and handles signal
Roberto Ierusalimschy2013-05-14 12:59:04 -03:00