Commit Graph

  • fcf99bf788 'math.isfloat' replaced by 'debug.subtype' Roberto Ierusalimschy 2013-07-10 17:57:05 -03:00
  • 98d76cdcae bug: Wrong error message in some short-cut expressions Roberto Ierusalimschy 2013-07-10 17:32:36 -03:00
  • 2f8c51a552 use unsigneds for unary minus, too Roberto Ierusalimschy 2013-07-10 14:15:12 -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 Ierusalimschy 2013-07-09 15:31:35 -03:00
  • 2ef9bcfd11 avoid undefined shift of LUA_NBITS in rotate operation Roberto Ierusalimschy 2013-07-09 15:31:01 -03:00
  • 42cf5f8214 avoid undefined shift of LUA_NBITS in rotate operations Roberto Ierusalimschy 2013-07-09 15:01:41 -03:00
  • 5fa680d47f no need for type 'b_uint' (lua_Unsigned must have at least 32 bits) Roberto Ierusalimschy 2013-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 Ierusalimschy 2013-07-05 15:02:28 -03:00
  • 2b4bd21585 'tonumber': base must be a number Roberto Ierusalimschy 2013-07-05 11:39:15 -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 Ierusalimschy 2013-07-05 11:35:49 -03:00
  • 5519c98655 'lua_cvtonum' -> 'lua_strtonum'; converts only strings to numbers Roberto Ierusalimschy 2013-07-05 11:29:51 -03:00
  • cbe164191c new function 'ifloor' Roberto Ierusalimschy 2013-07-03 14:23:19 -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 Ierusalimschy 2013-06-27 15:32:33 -03:00
  • 15fdbd26fe 'numbits' moved from 'math' to 'debug' library Roberto Ierusalimschy 2013-06-25 16:37:00 -03:00
  • 2b4975dca7 LUA_SMALL_* changed to LUA_*SIZE + added support for long double + better support for ANSI systems Roberto Ierusalimschy 2013-06-25 16:04:40 -03:00
  • e39da66c8c macro 'lua_strx2number' does not need to be global Roberto Ierusalimschy 2013-06-25 15:58:32 -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 Ierusalimschy 2013-06-25 15:57:18 -03:00
  • 982aa7058f 'luaL_len' returns lua_Integer instead of 'int' Roberto Ierusalimschy 2013-06-25 11:05:26 -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 Ierusalimschy 2013-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 Ierusalimschy 2013-06-21 14:42:28 -03:00
  • de6e5a5919 small bugs uncovered in a 64-bit machine (where 'long' has 64 bits) Roberto Ierusalimschy 2013-06-21 14:27:24 -03:00
  • 81102d3689 try to avoid warnings when converting int to pointer Roberto Ierusalimschy 2013-06-20 18:59:13 -03:00
  • 6579bd4190 reorganization of warnings + update of explicit dependencies (gcc -MM) Roberto Ierusalimschy 2013-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 Ierusalimschy 2013-06-20 14:37:31 -03:00
  • d6f5fb2d2c avoid warning for unary minus over an unsigned value Roberto Ierusalimschy 2013-06-20 12:12:43 -03:00
  • 7c4cc505db added "reasonable" limit for 'string.rep' (otherwise it is too easy to crash the machine) Roberto Ierusalimschy 2013-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 Ierusalimschy 2013-06-20 12:02:49 -03:00
  • 55f566bd22 use lua_Integer for integer parameters to avoid truncation Roberto Ierusalimschy 2013-06-19 11:29:01 -03:00
  • 130c0e40e0 new constant 'MAX_SIZE', distinct from 'MAX_SIZET', for sizes visible from Lua; these must fit in a lua_Integer Roberto Ierusalimschy 2013-06-19 11:27:00 -03:00
  • c72fb1cf8e detail (removed 'assert') Roberto Ierusalimschy 2013-06-14 17:46:40 -03:00
  • 138e69cc55 correct error message for floating-point values out of (integer) range Roberto Ierusalimschy 2013-06-14 15:34:49 -03:00
  • 53210d7e5b correct way (I hope) to convert floats to unsigned int Roberto Ierusalimschy 2013-06-14 15:32:45 -03:00
  • 0394314c7a avoid using a negative value to test 'lua_tounsigned' Roberto Ierusalimschy 2013-06-14 15:12:53 -03:00
  • 0beeb4f6fa configuration of number sizes goes "mainstream" Roberto Ierusalimschy 2013-06-13 16:35:08 -03:00
  • 788b251157 'math.random' operates with integers when used for integer results (1 or 2 parameters) Roberto Ierusalimschy 2013-06-13 16:32:52 -03:00
  • 318575627f avoid adding '.0' to "numbers" like "nan" and "inf" Roberto Ierusalimschy 2013-06-07 16:02:05 -03:00
  • a14992992a new version (5.3) Roberto Ierusalimschy 2013-06-07 16:01:50 -03:00
  • 48adb6984c 'io.write' writes integers directly (and correctly) Roberto Ierusalimschy 2013-06-07 16:01:35 -03:00
  • c5069528e1 details ('Type* id' -> 'Type *id') Roberto Ierusalimschy 2013-06-07 11:51:10 -03:00
  • 6fb0b11350 string contatenation handles conversion of integers to strings + floats always format as floats (with decimal dot or exponent) Roberto Ierusalimschy 2013-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 Ierusalimschy 2013-06-04 16:34:51 -03:00
  • 188192ce9a 'luai_hashnum' "inlined" into 'hashfloat' Roberto Ierusalimschy 2013-05-29 11:05:03 -03:00
  • fc083f1138 removed all tricks for conversions + 'luai_hashnum' moved to ltable.c Roberto Ierusalimschy 2013-05-29 11:04:15 -03:00
  • ee865b9fe7 new implementation for 'lua_strx2number' to correct small problems with numbers like 0x10000...000p-100 Roberto Ierusalimschy 2013-05-27 14:42:38 -03:00
  • d630daca1a "legal" way to convert a float to an integer in C Roberto Ierusalimschy 2013-05-27 09:43:37 -03:00
  • 8c883cb4e8 'objlen' can return integers Roberto Ierusalimschy 2013-05-26 11:47:51 -03:00
  • c75cca0559 detail (case '%d' of 'luaO_pushvfstring' should use integers) Roberto Ierusalimschy 2013-05-26 11:43:35 -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 Ierusalimschy 2013-05-26 10:45:24 -03:00
  • 3563b3f519 first version of control for number sizes (still in 'local' section) Roberto Ierusalimschy 2013-05-26 10:35:52 -03:00
  • d46ed54646 no more IEEE tricks Roberto Ierusalimschy 2013-05-26 10:26:34 -03:00
  • e2c8c756ee removed 'IEEE tricks' (should not be needed in Lua with integers) Roberto Ierusalimschy 2013-05-23 18:27:06 -03:00
  • 5ca5086c19 'tonumber' now works with integers too Roberto Ierusalimschy 2013-05-16 15:35:57 -03:00
  • d2209c0741 bug: Wrong error message in some short-cut expressions Roberto Ierusalimschy 2013-05-16 13:04:15 -03:00
  • 2d6a0ae149 added patch to last bug Roberto Ierusalimschy 2013-05-16 13:03:50 -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 Ierusalimschy 2013-05-14 13:00:11 -03:00
  • 36e8771076 'luaO_str2int' more generic: accepts white spaces around the numeral and handles signal Roberto Ierusalimschy 2013-05-14 12:59:04 -03:00
  • 27f09415e3 new read format "*i" for reading integers Roberto Ierusalimschy 2013-05-14 12:57:43 -03:00
  • 4ad9970649 uses integers for time Roberto Ierusalimschy 2013-05-14 12:57:11 -03:00
  • bef345a4b8 bug: Wrong error message in some short-cut expressions Roberto Ierusalimschy 2013-05-13 13:17:47 -03:00
  • 0ce3018109 'pushnum' pushes a "number" (float) + new C instruction 'pushint' Roberto Ierusalimschy 2013-05-07 16:01:16 -03:00
  • 0233ce0815 new function 'math.numbits' (not a final decision) Roberto Ierusalimschy 2013-05-06 14:22:55 -03:00
  • 1f2b82bf25 correct way to avoid compile-time errors in integer divisions Roberto Ierusalimschy 2013-05-06 14:22:16 -03:00
  • f2043b7a58 correct error message for conversion errors from float to int Roberto Ierusalimschy 2013-05-06 14:21:59 -03:00
  • 2b1c2c61b0 bug: Wrong assert when reporting concatenation errors. Roberto Ierusalimschy 2013-05-06 14:21:28 -03:00
  • 39808bb970 bug: Wrong assert when reporting concatenation errors. Roberto Ierusalimschy 2013-05-06 14:20:22 -03:00
  • fa6ea831b3 macro 'nvalue' removed (direct conversion from integer to double, without an intermediate variable, can cause "excessive precision" Roberto Ierusalimschy 2013-05-06 14:17:09 -03:00
  • b22a4280c6 macro 'nvalue' removed + cast to void added to avoid warnings with 'clang' Roberto Ierusalimschy 2013-05-06 14:17:09 -03:00
  • 29fe3abda2 new function 'math.isfloat' Roberto Ierusalimschy 2013-05-02 14:31:54 -03:00
  • 6347004be9 stack overflow in vararg functions + garbage collector in recursive loops Roberto Ierusalimschy 2013-05-02 13:13:27 -03:00
  • 67532d5a10 constant folding and API arithmetic with integers Roberto Ierusalimschy 2013-05-02 09:37:24 -03:00
  • 6920a7f2e3 new macro 'intop' (to perform integer arithmetic on unsigned types) Roberto Ierusalimschy 2013-05-02 09:31:26 -03:00
  • 88bf2f83c0 new function 'tointeger' + 'luaV_arith' replaced by 'luaT_trybinTM' Roberto Ierusalimschy 2013-04-29 14:12:50 -03:00
  • 8fff05f6d0 integer division operates only on integers Roberto Ierusalimschy 2013-04-29 14:12:12 -03:00
  • 9b9becf384 added 'const' to parameters of 'luaG_concaterror' Roberto Ierusalimschy 2013-04-29 13:58:10 -03:00
  • 00744a2729 'luaO_arith' -> 'luaO_numarith' Roberto Ierusalimschy 2013-04-29 13:57:48 -03:00
  • b4be507578 new function 'luaT_trybinTM' Roberto Ierusalimschy 2013-04-29 13:56:50 -03:00
  • 360587f319 favoring 'tonumber' over 'nvalue' Roberto Ierusalimschy 2013-04-26 16:51:17 -03:00
  • eee51492e2 dumping and undumping integers Roberto Ierusalimschy 2013-04-26 15:48:35 -03:00
  • c37b7b3cca bug: garbage collector can trigger too many times in recursive loops, because it was not computing the size of CallInfo structures in threads Roberto Ierusalimschy 2013-04-26 15:26:49 -03:00
  • dcd35b4595 bug: garbage collector can trigger too many times in recursive loops, because it was not computing the size of CallInfo structures in threads Roberto Ierusalimschy 2013-04-26 15:22:05 -03:00
  • f79584faca detail Roberto Ierusalimschy 2013-04-26 13:06:53 -03:00
  • 4abe99dc34 new interface for 'tonumber' Roberto Ierusalimschy 2013-04-26 13:03:50 -03:00
  • d4e6b75098 "integer" keys in tables are now lua_Integer, not 'int'. Roberto Ierusalimschy 2013-04-26 12:39:25 -03:00
  • a2f5c28a80 new operation '//' (integer division) Roberto Ierusalimschy 2013-04-26 10:08:29 -03:00
  • a80a2b5e56 new cast macros for lua_Integer and lua_Unsigned Roberto Ierusalimschy 2013-04-25 18:15:37 -03:00
  • bb1851ce98 'for' loop uses integers when possible Roberto Ierusalimschy 2013-04-25 16:50:02 -03:00
  • 5951c79ae1 default increment for 'for' loop is an integer (1, not 1.0) Roberto Ierusalimschy 2013-04-25 16:35:19 -03:00
  • e381c582de integer handling for order comparisons, power, and modulo operations Roberto Ierusalimschy 2013-04-25 16:12:41 -03:00
  • 9600c60df3 functions 'get_equalTM' and 'call_orderTM' moved to other files to make 'lvm.c' smaller Roberto Ierusalimschy 2013-04-25 13:07:52 -03:00
  • 32bf6c9b27 functions 'traceexec', 'callTM', and 'call_binTM' moved to other files to make 'lvm.c' a little smaller Roberto Ierusalimschy 2013-04-25 12:59:42 -03:00
  • 9c43d6a24e new format "%I" in 'lua_pushfstring' for lua_Integer Roberto Ierusalimschy 2013-04-25 10:53:13 -03:00
  • 01b6fe0cbf new API function 'lua_isinteger' Roberto Ierusalimschy 2013-04-25 10:52:49 -03:00
  • 944709c77b more definitions to support integer formatting Roberto Ierusalimschy 2013-04-25 10:52:13 -03:00
  • 52cb90ec75 detail Roberto Ierusalimschy 2013-04-24 16:41:48 -03:00
  • fa3b126a23 BUG: stack overflow in vararg functions with many fixed parameters called with few arguments Roberto Ierusalimschy 2013-04-19 18:05:04 -03:00
  • c2ea18726a BUG: stack overflow in vararg functions with many fixed parameters called with few arguments Roberto Ierusalimschy 2013-04-19 18:03:23 -03:00
  • 1294b09d8e first implementation of literal integers (no constant folding yet) Roberto Ierusalimschy 2013-04-16 15:46:28 -03:00
  • d4f0c4435d a few more operations supporting integers (minus, umin, mult) Roberto Ierusalimschy 2013-04-16 15:43:05 -03:00
  • 44358e0206 extra trim applied to 'replace' argument (in case lua_Unsigned is larger than 32 bits) Roberto Ierusalimschy 2013-04-16 15:39:37 -03:00
  • 07f861385e first steps in the support of integers: basic representation + table indexing + basic API ops (tointeger/pushinteger) + equality + a few extra stuff Roberto Ierusalimschy 2013-04-15 12:44:46 -03:00