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
Roberto Ierusalimschy
fd80e63468
configuration for NaN trick big-endian + macro 'luai_checknum' to
...
ensure numbers comming from C are not "improper" (some kinds of
signaling NaNs)
2011-06-13 11:13:06 -03:00
Roberto Ierusalimschy
35391d9b1a
macro 'NNMARK' (mark for non-number values using the NaN trick)
2011-06-09 15:21:25 -03:00
Roberto Ierusalimschy
99b1b8e918
first version with 'NANTRICK' (packing all Lua values inside a 'double')
2011-06-07 16:02:33 -03:00
Roberto Ierusalimschy
3b44821334
stricter control (using tag variants) over closure kinds (Lua x C)
2011-06-02 16:31:40 -03:00
Roberto Ierusalimschy
0214dab989
yet another macro ('num_')
2011-05-31 16:15:01 -03:00
Roberto Ierusalimschy
9b7dddad7d
no need for two different implementations for equality (one raw and
...
one with metamethods)
2011-05-31 15:24:36 -03:00
Roberto Ierusalimschy
2a59a999d4
yet another macro abstracting TValue representation
2011-05-26 14:12:31 -03:00
Roberto Ierusalimschy
3cf1729a02
new macro 'lua_longassert' that is equivalent to an assertion without
...
a stringfication of the condition, to avoid too long string literals
(limited by C90 to ~510 characters)
2011-05-05 16:43:14 -03:00
Roberto Ierusalimschy
25b4e35ee8
new macros abstracting TValue representation (to easy change to
...
other representations)
2011-05-05 12:53:23 -03:00
Roberto Ierusalimschy
7e1facaa4e
detail in assertion
2011-05-04 14:04:06 -03:00
Roberto Ierusalimschy
ad2531a0ee
more complete (and hopefuly more correct) handling of 'sizeof(char)'
2011-05-03 13:01:57 -03:00
Roberto Ierusalimschy
a958b711f5
cleaner scheme of bits for variant types (light C functions) and
...
collectable types
2011-04-07 13:11:57 -03:00
Roberto Ierusalimschy
83abbac946
all names used internally by macros end with '_'
2011-04-05 11:24:07 -03:00
Roberto Ierusalimschy
98816d0ce5
small problems with 'luaone.c'
2011-02-28 14:32:10 -03:00
Roberto Ierusalimschy
b63b0928cf
prototype for 'luaO_ceillog2' was different from definition
2011-01-07 13:46:27 -02:00
Roberto Ierusalimschy
1aead7f553
'hexafloat' moved to 'lobject.c' (hexa conversion needs it too)
2010-12-10 12:53:15 -02:00
Roberto Ierusalimschy
ccc4fc9cf0
detection of erroneous numeric strings with \0 (such as "1\0")
2010-12-06 19:08:36 -02:00
Roberto Ierusalimschy
9b7a12c46d
finalizers (__gc) for tables
2010-11-26 12:32:31 -02:00
Roberto Ierusalimschy
78f9635111
several new comments
2010-07-26 12:53:23 -03:00
Roberto Ierusalimschy
575074fd85
Lua closures are cached for reuse
2010-06-04 10:25:10 -03:00
Roberto Ierusalimschy
0bccf03d7e
slightly better definition for 'changenvalue'
2010-05-07 15:44:46 -03:00
Roberto Ierusalimschy
53f9499f7f
"light C function" is a better name than "C-function pointer"
2010-04-18 10:22:48 -03:00
Roberto Ierusalimschy
7dfa4cd655
first implementation of light C functions
2010-04-14 12:13:48 -03:00
Roberto Ierusalimschy
d20ff60615
new macro LUA_NUMTAGS
2010-04-12 13:07:29 -03:00
Roberto Ierusalimschy
064e406f67
no more fenvs!
2010-03-26 17:58:11 -03:00
Roberto Ierusalimschy
25c557ec63
first version of _ENV; no more global variables
2010-03-12 16:14:06 -03:00
Roberto Ierusalimschy
1ebf109c53
'setobj' must assing fields one by one, to allow trick of using
...
pad space in table keys
2010-01-08 18:00:20 -02:00
Roberto Ierusalimschy
062e809e54
new macros 'LUAI_DDEC'/'LUAI_DDEF' to better control declarations and
...
definitions of non-static variables
2009-11-19 17:06:52 -02:00
Roberto Ierusalimschy
2583bac3d3
several small changes to simplify changing TValue if needed
2009-11-06 15:09:27 -02:00
Roberto Ierusalimschy
9756f56354
better control over accesses to TValue fields
2009-11-05 15:43:54 -02:00
Roberto Ierusalimschy
0ac3d07ea6
first implementation of lexical environments
2009-09-30 12:38:37 -03:00
Roberto Ierusalimschy
5938212748
information about upvalues (where they come from) kept in Proto structure,
...
instead of sequence of pseudo-opcodes after OP_CLOSURE
2009-09-28 13:32:50 -03:00
Roberto Ierusalimschy
bd5fa9cc8f
new macro 'getproto'
2009-07-15 15:37:19 -03:00
Roberto Ierusalimschy
a36c8e1718
new macro 'changenvalue'
2009-06-18 13:36:40 -03:00
Roberto Ierusalimschy
6a024df440
new function 'luaO_arith' to perform basic arithmetic operations
2009-06-17 14:48:34 -03:00
Roberto Ierusalimschy
3dbf305408
no more support for old-style varargs
2009-03-26 09:57:01 -03:00
Roberto Ierusalimschy
bb92ef23cb
bug: string at the end of TString must consider the entire TString
...
entity, not only its 'tsv' part
2008-08-05 16:26:23 -03:00
Roberto Ierusalimschy
a76fa25199
'ceillog2' now is exported (other modules may need it)
2008-01-30 16:05:23 -02:00
Roberto Ierusalimschy
94d40f3980
luaO_log2 can be private to ltable.c
2007-04-10 09:18:17 -03:00
Roberto Ierusalimschy
a7c9e45c64
avoid trailing white spaces
2006-09-11 11:07:24 -03:00
Roberto Ierusalimschy
440113bbe8
unused macro removed
2006-01-18 09:37:34 -02:00
Roberto Ierusalimschy
ffb798e1e2
avoids type punning for table keys
2006-01-10 10:51:53 -02:00
Roberto Ierusalimschy
c2bd68d2c3
detail
2005-10-24 15:37:33 -02:00
Roberto Ierusalimschy
0d1685d751
bug: last tag is not the number of tags...
2005-06-13 11:19:00 -03:00
Roberto Ierusalimschy
bf2b342ac1
better control for compatibility code for varargs
2005-06-13 11:15:54 -03:00
Roberto Ierusalimschy
d987cf1f81
new mark LUAI_DATA for extern data
2005-06-06 10:30:25 -03:00
Roberto Ierusalimschy
90de38bf1f
warnings in VS .Net
2005-05-31 11:25:18 -03:00
Roberto Ierusalimschy
1ab2b93462
debug information for last line of a function definition
2005-05-05 17:47:02 -03:00
Roberto Ierusalimschy
8718fda9b2
added LUAI_FUNC to functions not in the API
2005-04-25 16:24:10 -03:00
Roberto Ierusalimschy
7d45a5f48f
C functions and userdata also have environments
2005-02-18 10:40:02 -02:00
Roberto Ierusalimschy
334ba8132b
cleaner way to remark open upvalues
2005-01-18 15:18:09 -02:00
Roberto Ierusalimschy
e2498e079e
change in hash algorithm so that it does not need empty slot
...
(tables can be 100% full)
2005-01-05 16:20:51 -02:00
Roberto Ierusalimschy
531874f6ce
better (correct?) way to handle `next' over removed keys
2004-12-04 16:10:22 -02:00
Roberto Ierusalimschy
737ec947d3
better implementation for `floating-point bytes'
2004-11-01 12:06:50 -03:00
Roberto Ierusalimschy
bd38017ddf
small optimization for table size in machines with double allignment
2004-10-06 15:34:16 -03:00
Roberto Ierusalimschy
616438fe9a
new way to use vararg' parameters (with
...')
2004-05-31 15:51:50 -03:00
Roberto Ierusalimschy
a4e1230f95
better way to control open upvalues
2004-03-15 18:04:33 -03:00
Roberto Ierusalimschy
898e8a6794
added include to stdarg.h (as it uses vararg facilities)
2004-02-20 13:01:05 -03:00
Roberto Ierusalimschy
2aaf7394ad
more and better tools (assertions & inspectors) to check incremental GC
2004-02-16 16:09:52 -03:00
Roberto Ierusalimschy
47fc57a252
TObject' renamed to
TValue' + other name changes and better assertions
...
for incremental garbage collection
2003-12-10 10:13:36 -02:00
Roberto Ierusalimschy
366e4af3c9
towards incremental GC
2003-11-18 12:55:11 -02:00
Roberto Ierusalimschy
8332d5c8a5
parser fully reentrant(!)
2003-08-27 18:01:44 -03:00
Roberto Ierusalimschy
572a69df78
Lua does not need all those different types...
2003-04-28 16:26:16 -03:00
Roberto Ierusalimschy
ab9e062928
name changes to avoid name collision between macros and variables
2003-03-18 09:50:04 -03:00
Roberto Ierusalimschy
60c83ded30
small optimization for sizes of array constructors
2003-02-18 13:02:56 -03:00
Roberto Ierusalimschy
7a40cdbda0
different variables for number of upvalues and size of upvalue array
...
(makes code clearer)
2003-02-11 08:46:24 -02:00
Roberto Ierusalimschy
dd8edecae1
new functions to manipulate upvales (get/setupvalue)
2002-12-19 09:11:55 -02:00
Roberto Ierusalimschy
b40c9f7a3c
better code to signal write barriers
2002-11-14 14:16:21 -02:00
Roberto Ierusalimschy
5c5d9b2703
back to `__mode' metafield to specify weakness
2002-11-14 10:01:35 -02:00
Roberto Ierusalimschy
3010eb0536
all objects with several children (tables, closures, stacks, prototypes)
...
go to `gray' queue
2002-11-13 09:49:19 -02:00
Roberto Ierusalimschy
dff9be4224
new macros to distinguish different types of object moves (for future GC
...
evolution).
2002-11-07 13:37:10 -02:00
Roberto Ierusalimschy
6820da5096
detail
2002-11-04 10:31:44 -02:00
Roberto Ierusalimschy
96e15b8501
threads now are real Lua objects, subject to garbage collection
2002-10-25 17:05:28 -03:00
Roberto Ierusalimschy
84e0b1bc97
small changes in type configuration facilities
2002-10-22 14:18:28 -03:00
Roberto Ierusalimschy
c196348717
in case of memory allocation errors, sizecode and sizelineinfo can
...
be different
2002-10-16 17:40:58 -03:00
Roberto Ierusalimschy
b3d0682fb9
use of different buffers for scanner and concatenation
2002-10-08 15:46:08 -03:00
Roberto Ierusalimschy
565e6d74e1
state's buffer is used only for chars
2002-09-19 10:03:53 -03:00
Roberto Ierusalimschy
4964e7c8a0
details
2002-09-02 16:54:49 -03:00
Roberto Ierusalimschy
fdafd4f4a8
new structure for collectable objects, sharing a common header
2002-08-30 16:09:21 -03:00
Roberto Ierusalimschy
da19c436cc
cleaning the stage for generational collection
2002-08-16 11:45:55 -03:00
Roberto Ierusalimschy
634344d61f
new API for weak mode
2002-08-06 14:06:56 -03:00
Roberto Ierusalimschy
5037196f6f
new macros `ttis*'
2002-08-05 11:50:39 -03:00
Roberto Ierusalimschy
79c8edb6c4
new names for light userdata operations
2002-07-17 13:25:13 -03:00
Roberto Ierusalimschy
9f4b5b5232
weak keys are removed only after finalization
2002-07-01 14:06:58 -03:00
Roberto Ierusalimschy
fdfd5b44ee
TM_GETTABLE/TM_SETTABLE don't need fast access anymore
2002-06-24 17:18:38 -03:00
Roberto Ierusalimschy
e34f282365
`luaV_gettable' returns element position
2002-06-24 10:08:45 -03:00
Roberto Ierusalimschy
3941af53ad
first implementation of independent global table per function
2002-06-20 17:41:46 -03:00
Roberto Ierusalimschy
864c96f36c
new fallback for equality `__eq'
2002-06-13 10:39:55 -03:00
Roberto Ierusalimschy
eeab473fc8
new fallback __le (less equal), for partial order
2002-06-12 11:56:22 -03:00
Roberto Ierusalimschy
955def0348
new names for string formating functions
2002-05-16 15:39:46 -03:00
Roberto Ierusalimschy
b7a0503c1d
new format for error messages
2002-05-15 15:57:44 -03:00
Roberto Ierusalimschy
dea6b6da94
new function lua_vpushstr' to replace uses of
sprintf'
2002-05-07 14:36:56 -03:00
Roberto Ierusalimschy
0dbf0c5953
new format for test intructions (handle NaN correctly)
2002-05-06 12:51:41 -03:00
Roberto Ierusalimschy
237969724f
support for light' userdata + simpler support for
boxed' udata
2002-04-05 15:54:31 -03:00
Roberto Ierusalimschy
801aaf37b1
simpler implementation for line information
2002-03-25 14:47:14 -03:00
Roberto Ierusalimschy
b7ed502dea
configurable macros should live in llimits.h
2002-03-18 15:16:16 -03:00
Roberto Ierusalimschy
71c716e5a8
avoid C identifiers beginning with '_'
2002-03-11 09:45:00 -03:00
Roberto Ierusalimschy
8a1a512c64
lu_byte is enough for those fields (maxstack < 256)
2002-03-05 09:42:47 -03:00
Roberto Ierusalimschy
e01f5e6809
better order of record fields for 64-bit machines
2002-02-08 20:42:41 -02:00
Roberto Ierusalimschy
d6fd33e76f
eventtable' renamed to
metatable'
2002-01-30 15:26:44 -02:00
Roberto Ierusalimschy
b3bb0f132b
new interface for weak modes
2002-01-09 19:50:35 -02:00
Roberto Ierusalimschy
e04f7ed450
first version of Lua "stackless"
2001-12-18 18:52:30 -02:00
Roberto Ierusalimschy
9aff171f3b
new type `boolean'
2001-12-11 20:48:44 -02:00
Roberto Ierusalimschy
592a309177
tag system replaced by event tables
2001-12-05 18:15:18 -02:00
Roberto Ierusalimschy
413fc7334b
new implementation for lua upvalues (sugested by E.T.): simpler and solves
...
a bug for multi-stacks
2001-11-29 18:22:22 -02:00
Roberto Ierusalimschy
72659a0605
no more explicit support for wide-chars; too much troble...
2001-11-28 18:13:13 -02:00
Roberto Ierusalimschy
26bf2adace
optimizations for space in LClosures and time cleanning weak tables
2001-11-06 19:41:53 -02:00
Roberto Ierusalimschy
21aa7e55f2
optimization for array part of a Table
2001-10-25 17:14:14 -02:00
Roberto Ierusalimschy
15462edb0f
new definitions for closure structures
2001-10-02 13:45:03 -03:00
Roberto Ierusalimschy
8e9b1e4ae9
details
2001-09-25 14:08:46 -03:00
Roberto Ierusalimschy
abdbe883a8
first implementation of unrestricted static scoping
2001-09-07 14:39:10 -03:00
Roberto Ierusalimschy
e1d072571e
better syntax for type casts
2001-08-31 16:46:07 -03:00