Commit Graph

4092 Commits

Author SHA1 Message Date
Roberto Ierusalimschy cbe4998bc2 'math.random(n,m)' interval restricted in size, to avoid using conversion
between 'double' and 'unsigned' (which can be slow and unreliable)
2014-04-17 13:09:40 -03:00
Roberto Ierusalimschy 0172c9552c comment 2014-04-17 11:41:11 -03:00
Roberto Ierusalimschy 3d4913f703 back to larger sizes for 'dumpint/undumpint' (small Lua should
be able to dump/undump long-long integers)
2014-04-16 15:48:31 -03:00
Roberto Ierusalimschy c27ef1b79c correct integer limits for Windows + small adjustments for short
option
2014-04-16 15:45:51 -03:00
Roberto Ierusalimschy 4422b97472 keep 'luaL_checkversion_' with its signature in version 5.2, for
correct error messages in case of version mixings
2014-04-15 15:25:49 -03:00
Roberto Ierusalimschy 2f02d264e9 initial '*' in 'io.read' formats is deprecated 2014-04-15 13:46:45 -03:00
Roberto Ierusalimschy 037a70dfea cast_u2s/cast_s2u renamed l_castS2U/l_castU2S to be configurable from
outside (mostly for testing)
2014-04-15 13:32:49 -03:00
Roberto Ierusalimschy 8f961da3db macros cast_integer/cast_unsigned replaced by cast_u2s/cast_s2u, that
should be used only between lua_Integer and lua_Unsigned
2014-04-15 11:29:30 -03:00
Roberto Ierusalimschy 5c46b7b8cf instructions in 'runC' sorted alphabetically + new instructions
'tointeger'/'tounsigned'
2014-04-14 15:42:44 -03:00
Roberto Ierusalimschy a2c094fe2d size of strings in 'string.rep' should be limited by the size of
lua_Integer, not of 'int'
2014-04-14 13:59:46 -03:00
Roberto Ierusalimschy f767f29d87 using predefined limits (instead of computing min/max values for each
type) + some comments
2014-04-14 13:58:54 -03:00
Roberto Ierusalimschy 675530c4d8 maximum size of array part of a table now is restricted not only by
the size of an 'int', but also by the size of a 'lua_Integer'
2014-04-13 18:11:19 -03:00
Roberto Ierusalimschy ab964ad7c6 new macro LUA_MAXUNSIGNED + support for 'short' integers (for tests only) 2014-04-12 11:51:53 -03:00
Roberto Ierusalimschy ef789d4161 new global macro 'LUA_MAXUNSIGNED' 2014-04-12 11:45:10 -03:00
Roberto Ierusalimschy b390d7c168 detail (avoid "casting down" in case lua_Integer is smaller than int) 2014-04-12 11:43:50 -03:00
Roberto Ierusalimschy 218f358461 errors like 1e100 << "2" were giving wrong messages 2014-04-11 17:17:39 -03:00
Roberto Ierusalimschy bf06e22b6a correct definition for 'MAX_SIZE' (using singed integers as the limit,
not unsigned ones) + new type 'l_uacInt'
2014-04-11 16:56:04 -03:00
Roberto Ierusalimschy d99ffa920d new type 'LUAI_UACINT' (result of an 'usual argument conversion' of
a lua_Integer)
2014-04-11 16:53:45 -03:00
Roberto Ierusalimschy 2771050dfa 'MIN/MAX_INTEGER' replaced by 'LUA_MIN/MAXINTEGER' 2014-04-11 16:02:16 -03:00
Roberto Ierusalimschy e1daf10e4c details in comments 2014-04-11 15:19:07 -03:00
Roberto Ierusalimschy 115fa77009 maximum size for dump of integers is size of lua_Integer (which
means that there is no overflows when undumping)
2014-04-10 16:45:43 -03:00
Roberto Ierusalimschy 561030c211 pack/unpack functions renamed dump/undump 2014-04-10 15:24:12 -03:00
Roberto Ierusalimschy 5336cc9d6a math.random: use 'random' when available + changes to work correctly
for any integer interval (up to [minint,maxint])
2014-04-10 14:53:33 -03:00
Roberto Ierusalimschy fdd137276b more precision for PI + no more RADIANS_PER_DEGREE +
'min/maxint' -> 'min/maxinteger'
2014-04-09 14:29:46 -03:00
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 4a24883674 'GCmemtrav' does not need to track the entire collection, only each
single step individually
2014-04-04 14:01:04 -03:00
Roberto Ierusalimschy 9737832641 'int' -> 'lua_Integer' in several functions 2014-04-04 13:38:11 -03:00
Roberto Ierusalimschy 8b45d9806a new constants 'math.maxint'/'math.minint' 2014-04-03 11:18:19 -03:00
Roberto Ierusalimschy be52f784d9 new macros LUA_MAXINTEGER/LUA_MININTEGER 2014-04-03 11:18:02 -03:00
Roberto Ierusalimschy 144afa4d47 several changes in 'utf8.offset' 2014-04-03 10:45:09 -03:00
Roberto Ierusalimschy 007f66408d bug: compiler can optimize away overflow check in 'table.concat' 2014-04-03 10:30:23 -03:00
Roberto Ierusalimschy 48c745a611 avoid constant overflow when shifting left signed integers until
their last bit
2014-04-03 10:29:24 -03:00
Roberto Ierusalimschy 3a044de5a1 new implementation for 'utf8.len' 2014-04-02 14:01:22 -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 f61ceee708 LUAI_FUNC is being used only in header files 2014-04-02 13:44:42 -03:00
Roberto Ierusalimschy 5aeb57f11f detail (error message for conversion from float to integer) 2014-04-01 15:55:06 -03:00
Roberto Ierusalimschy 493b3fdd65 added an 'api_check' for negative sizes in 'lua_checkstack' 2014-04-01 15:51:23 -03:00
Roberto Ierusalimschy 315c5bf7b7 bug: compiler could optimize away overflow check (+ changing indices
from 'int' to 'lua_Integer')
2014-04-01 15:50:34 -03:00
Roberto Ierusalimschy 607be77ec8 some details to avoid warnings 2014-04-01 11:39:55 -03:00
Roberto Ierusalimschy 0d745ed04c more precise estimation (GCestimate) for total bytes in use after
a GC cycle
2014-04-01 11:06:59 -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 66b7b9b582 math.abs, math.max, and math.min work for integers, too. 2014-03-31 16:00:52 -03:00
Roberto Ierusalimschy 8ef9117924 fancier way to do sign extension 2014-03-31 15:38:26 -03:00
Roberto Ierusalimschy ea69f17d98 macro 'tostring' is used only by 'luaV_concat' 2014-03-31 15:37:52 -03:00
Roberto Ierusalimschy 420cc62fac missplelling in comments/function names (endianess -> endianness) 2014-03-27 12:58:05 -03:00
Roberto Ierusalimschy 1a3ebc203a definition of LUA_REAL_* and LUA_INT_* moved to the beginning of
configurations
2014-03-21 11:27:16 -03:00
Roberto Ierusalimschy 2d5e2212d4 native lua_Number may be neither float nor double (in pack/unpackfloat) 2014-03-21 11:26:44 -03:00
Roberto Ierusalimschy da4811238a details (typos in comments) 2014-03-21 10:52:33 -03:00
Roberto Ierusalimschy f96872a534 copyright year -> 2014 2014-03-20 16:42:35 -03:00