Commit Graph

272 Commits

Author SHA1 Message Date
Roberto Ierusalimschy
2ecaf18138 using macros ('rttype' and 'settt_') to access "private" field 'tt_' 2015-06-09 11:21:42 -03:00
Roberto Ierusalimschy
6ffe006f5c detail (removed unused macro VARBITS) 2015-04-02 18:10:53 -03:00
Roberto Ierusalimschy
2b37f2150e comments 2015-03-14 14:58:57 -03:00
Roberto Ierusalimschy
6408bc0b7f new macros 'chgfltvalue'/'chgivalue' (numerical for loop does
not need to set the type of its internal variable at each iteration)
2015-03-02 13:04:52 -03:00
Roberto Ierusalimschy
7e2015a46d size of short strings stored in a single byte, to reduce the size
of struct 'TString'
2015-01-16 14:54:37 -02:00
Roberto Ierusalimschy
3c55790ebe 'setkey' -> 'setnodekey' (to avoid conflicts with POSIX) 2015-01-05 11:52:37 -02:00
Roberto Ierusalimschy
2b83711fba new macro 'nvalue' (to convert an object to a float when we know
object is a number)
2014-12-19 11:36:32 -02:00
Roberto Ierusalimschy
bdf566a8a3 `name' in comments changed to 'name' 2014-10-25 09:50:46 -02:00
Roberto Ierusalimschy
34b6664dcb better to use 'long' to represent UTF-8 code points 2014-10-01 08:52:33 -03:00
Roberto Ierusalimschy
3a15c7ce43 size for array part of a table ('sizearray') changed from 'int' to
'unsigned int', which allows twice as many elements in the array part
2014-09-04 15:15:29 -03:00
Roberto Ierusalimschy
34ac039fb8 new macro 'cvt2str' to better control whether numbers are convertible
to strings
2014-07-30 11:00:14 -03:00
Roberto Ierusalimschy
07c7fdb9df simpler definition for 'setobj' (trust the compiler for the assignment) 2014-07-29 13:22:24 -03:00
Roberto Ierusalimschy
bb12903120 type 'Udata' refers directly to structure inside the union (union
used only for aligning purposes now)
2014-07-18 11:46:47 -03:00
Roberto Ierusalimschy
ca41b43f53 type 'TString' refers directly to the structure inside the union
(union used only for size purposes)
2014-07-18 10:36:14 -03:00
Roberto Ierusalimschy
56137d58ff added check for conversion 'obj2gco' (and corrections for small
problems detected by this check)
2014-07-18 09:17:54 -03:00
Roberto Ierusalimschy
9aec500a26 no need for field 'gch' anymore 2014-07-17 14:27:49 -03:00
Roberto Ierusalimschy
5a9cc57a5e change in GCObject: instead of being a union, it is now a structure
with the common header of all collectable objects; union is used
only for conversions. (Goal is to be able to check that the cast
'obj2gco' can have a check to ensure that object being converted
is really a collectable object.). This is the first step in the
change.
2014-07-17 14:09:50 -03:00
Roberto Ierusalimschy
0e6229a953 use proper macros to convert 'GCObject' to other objects + better
type cheking in 'set*value' macros
2014-06-19 15:39:36 -03:00
Roberto Ierusalimschy
5ebdd326b6 detail (to avoid warnings of unused variable) 2014-05-29 16:30:07 -03:00
Roberto Ierusalimschy
0aa32fa0cb small changes in field order in some structs to reduce padding 2014-05-15 17:41:27 -03:00
Roberto Ierusalimschy
8927c14317 removed macro 'luai_checknum' (as NaN trick is not doable now) 2014-05-15 17:28:39 -03:00
Roberto Ierusalimschy
77e7ebca0a better alignments (for 64-bit arquitectures) for structures 'Table' and
'TString'
2014-05-07 08:12:51 -03:00
Roberto Ierusalimschy
c549d4fe64 'lua_strtonum' (and 'luaO_str2num') now return string size, instead of
receiving it
2014-05-01 15:18:06 -03:00
Roberto Ierusalimschy
5388aa9fc0 'luaO_str2d' + 'luaO_str2int' replaced by 'luaO_str2num' (which converts
to float or integer according to the string syntax)
2014-04-30 13:48:44 -03:00
Roberto Ierusalimschy
ffa43df3cd 'setnvalue' -> 'setfltvalue' (for consitency with 'fltvalue') 2014-04-29 15:14:16 -03:00
Roberto Ierusalimschy
c86b9da022 userdata can have any Lua value as uservalue 2014-02-19 10:52:42 -03:00
Roberto Ierusalimschy
4ea60463f5 UTF-8 encoding exported as format '%U' in 'lua_pushfstring' 2014-02-06 13:59:24 -02:00
Roberto Ierusalimschy
cac1ebd1e0 detail ('ttisuserdata' renamed to 'ttisfulluserdata') 2013-12-04 10:15:22 -02:00
Roberto Ierusalimschy
d3bbb34c24 back to open hashing for the string table (but with a different
'hnext' field, to strings are still collected like all other
objects)
2013-09-05 16:31:49 -03:00
Roberto Ierusalimschy
af35c7f398 upvalues collected by reference count 2013-08-27 15:53:35 -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
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
36e8771076 'luaO_str2int' more generic: accepts white spaces around the numeral
and handles signal
2013-05-14 12:59:04 -03:00
Roberto Ierusalimschy
fa6ea831b3 macro 'nvalue' removed (direct conversion from integer to double,
without an intermediate variable, can cause "excessive precision"
2013-05-06 14:17:09 -03:00
Roberto Ierusalimschy
67532d5a10 constant folding and API arithmetic with integers 2013-05-02 09:37:24 -03:00
Roberto Ierusalimschy
00744a2729 'luaO_arith' -> 'luaO_numarith' 2013-04-29 13:57:48 -03:00
Roberto Ierusalimschy
1294b09d8e first implementation of literal integers (no constant folding yet) 2013-04-16 15:46:28 -03:00
Roberto Ierusalimschy
07f861385e first steps in the support of integers: basic representation + table indexing + basic API ops (tointeger/pushinteger) + equality + a few extra stuff 2013-04-15 12:44:46 -03:00
Roberto Ierusalimschy
8f8665fffa 'ttypenv' -> 'ttnov' 2013-04-12 16:07:09 -03:00
Roberto Ierusalimschy
cf160abcf9 no more macro 'changenvalue' 2012-09-11 15:21:44 -03:00
Roberto Ierusalimschy
77cbd817d1 better(?) handling of '#define's for IEEE-related tricks + avoid using
IEEE trick for 64-bit integer types (lua_Integer on 64-bit machines)
2012-05-11 11:10:50 -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
a4b96ce9a3 first implementation of long strings 2012-01-25 19:05:40 -02:00
Roberto Ierusalimschy
291f564485 field 'reserved' -> 'extra' (may be used for other purposes too) 2012-01-23 21:05:51 -02:00
Roberto Ierusalimschy
28f8ed9113 new macro 'checktype' 2012-01-20 20:47:11 -02:00
Roberto Ierusalimschy
fd22ccd6d0 object tag keeps variant bits too -> no need for 'isC' field in
Closures + more strick typing for closure variants
2012-01-20 20:05:50 -02:00
Roberto Ierusalimschy
87cf2bf711 extra comments about what fields are optional debug information 2011-10-31 15:48:22 -02:00
Roberto Ierusalimschy
1350a2bcb5 more macros to try to make NaN trick work with other sizes of
IEEE float numbers. (It has not been tested with such different
sizes...)
2011-10-17 12:46:13 -02:00
Roberto Ierusalimschy
87912786af dead objects are not collectable. 2011-09-24 18:12:01 -03:00
Roberto Ierusalimschy
9e89a55a4f NILCONSTANT also depends no endianess (with NaN trick) 2011-07-04 17:29:02 -03:00