Commit Graph

486 Commits

Author SHA1 Message Date
Roberto Ierusalimschy a8aede68c7 new definition for 'luai_nummod' (using 'fmod') 2014-04-09 14:05:11 -03:00
Roberto Ierusalimschy c7859a046d using 'volatile' in 'tofloat' to ensure result has the same precision
(lua_Number) of other computations
2014-04-08 11:28:04 -03:00
Roberto Ierusalimschy 7d514af0bc bug (in work version): comparisons should not try to convert
strings to numbers
2014-04-02 13:54:20 -03:00
Roberto Ierusalimschy 3d1c6730da detail ('1U' -> '1u', like other unsigned constants in the code) 2014-03-31 16:18:24 -03:00
Roberto Ierusalimschy ea69f17d98 macro 'tostring' is used only by 'luaV_concat' 2014-03-31 15:37:52 -03:00
Roberto Ierusalimschy 114d10cbc5 detail (comment) 2014-03-15 09:29:48 -03:00
Roberto Ierusalimschy 9f3f5b6f41 details 2014-03-14 13:54:08 -03:00
Roberto Ierusalimschy cd12410195 new macro 'cast_void' 2014-03-07 13:19:00 -03:00
Roberto Ierusalimschy 5ff1c18a71 back with 'L' for macros 'luai_num*', but now with a new macro
'luai_numinvalidop' to protect constant folding
2014-03-06 13:15:18 -03:00
Roberto Ierusalimschy d438e1379d insertion of ".0" in floats with integer values done by "luaL_tolstring",
not by the core
2014-02-05 17:14:53 -02:00
Roberto Ierusalimschy 86dd8bf3f5 no more 'L' in macros "luai_num*" (several places that use those macros
cannot throw errors anyway...)
2014-01-27 11:34:32 -02:00
Roberto Ierusalimschy 0a850e641d larger limit + better error messages for loop detection in inheritance 2014-01-22 18:02:04 -02:00
Roberto Ierusalimschy 1ea2d20f74 first implementation of '<<', '>>', and '~' (bitwise not) 2013-12-30 18:47:58 -02:00
Roberto Ierusalimschy c0edab0f6d first implementation of bitwise operators '&' (band), '|' (bor),
and '~' (bxor)
2013-12-18 12:12:03 -02:00
Roberto Ierusalimschy a8f8c7fd80 integer exponentiation with negative exponent is invalid 2013-12-16 12:30:22 -02: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 af35c7f398 upvalues collected by reference count 2013-08-27 15:53:35 -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 439d74e29f added 'local' bit (true => object is only refered by local variables) 2013-08-16 15:55:49 -03:00
Roberto Ierusalimschy 2f8c51a552 use unsigneds for unary minus, too 2013-07-10 14:15:12 -03:00
Roberto Ierusalimschy 453450d687 new macro 'l_floor' (allows 'floorf' even when other math operations
do not have an 'f' variant)
2013-06-20 12:02:49 -03:00
Roberto Ierusalimschy 130c0e40e0 new constant 'MAX_SIZE', distinct from 'MAX_SIZET', for sizes visible
from Lua; these must fit in a lua_Integer
2013-06-19 11:27:00 -03:00
Roberto Ierusalimschy 318575627f avoid adding '.0' to "numbers" like "nan" and "inf" 2013-06-07 16:02:05 -03:00
Roberto Ierusalimschy 6fb0b11350 string contatenation handles conversion of integers to strings +
floats always format as floats (with decimal dot or exponent)
2013-06-04 16:36:42 -03:00
Roberto Ierusalimschy d630daca1a "legal" way to convert a float to an integer in C 2013-05-27 09:43:37 -03:00
Roberto Ierusalimschy 8c883cb4e8 'objlen' can return integers 2013-05-26 11:47:51 -03:00
Roberto Ierusalimschy b22a4280c6 macro 'nvalue' removed + cast to void added to avoid warnings
with 'clang'
2013-05-06 14:17:09 -03:00
Roberto Ierusalimschy 6920a7f2e3 new macro 'intop' (to perform integer arithmetic on unsigned types) 2013-05-02 09:31:26 -03:00
Roberto Ierusalimschy 88bf2f83c0 new function 'tointeger' + 'luaV_arith' replaced by 'luaT_trybinTM' 2013-04-29 14:12:50 -03:00
Roberto Ierusalimschy 360587f319 favoring 'tonumber' over 'nvalue' 2013-04-26 16:51:17 -03:00
Roberto Ierusalimschy f79584faca detail 2013-04-26 13:06:53 -03:00
Roberto Ierusalimschy 4abe99dc34 new interface for 'tonumber' 2013-04-26 13:03:50 -03:00
Roberto Ierusalimschy a2f5c28a80 new operation '//' (integer division) 2013-04-26 10:08:29 -03:00
Roberto Ierusalimschy bb1851ce98 'for' loop uses integers when possible 2013-04-25 16:50:02 -03:00
Roberto Ierusalimschy e381c582de integer handling for order comparisons, power, and modulo operations 2013-04-25 16:12:41 -03:00
Roberto Ierusalimschy 9600c60df3 functions 'get_equalTM' and 'call_orderTM' moved to other files
to make 'lvm.c' smaller
2013-04-25 13:07:52 -03:00
Roberto Ierusalimschy 32bf6c9b27 functions 'traceexec', 'callTM', and 'call_binTM' moved to other
files to make 'lvm.c' a little smaller
2013-04-25 12:59:42 -03:00
Roberto Ierusalimschy d4f0c4435d a few more operations supporting integers (minus, umin, mult) 2013-04-16 15:43:05 -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 75250a237c typos in comments 2013-03-16 18:10:18 -03:00
Roberto Ierusalimschy a3e1c40d6d remove of unecessary luaD_checkstack. (In some cases, C should
ensure stack space; in others, Lua can use the extra slots for
temporary values.)
2012-08-16 14:34:28 -03:00
Roberto Ierusalimschy 53480f1163 details (remove of some extra spaces) 2012-08-14 15:12:34 -03:00
Roberto Ierusalimschy cc2a60ecb7 bugs in yields inside debug hooks 2012-06-08 12:14:04 -03:00
Roberto Ierusalimschy 5654763797 macro 'checkGC' takes care of setting 'top' to limit stack live values 2012-05-14 14:50:49 -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 9f1a8dbdd3 'eqstr' -> 'luaS_eqstr' 2012-01-23 21:05:18 -02:00
Roberto Ierusalimschy c82087b8dd cast from 'bool' to 'int' (for C++) 2011-12-07 12:43:55 -02:00
Roberto Ierusalimschy 8c62bde36f comment 2011-11-29 13:54:38 -02:00