Commit Graph

4604 Commits

Author SHA1 Message Date
Roberto Ierusalimschy
e247c3ada3 implementation of fast track for gettable operations 2015-07-20 15:24:50 -03:00
Roberto Ierusalimschy
b5dc2f9b0c bug: 'io.lines' does not check maximum number of options 2015-07-20 13:37:12 -03:00
Roberto Ierusalimschy
5273477cb9 in 'lua_number2strx', use the call to 'l_sprintf' to add exponent
to result directly
2015-07-20 13:30:22 -03:00
Roberto Ierusalimschy
b9db9bd0ef 'lua_Number' added to 'L_Umaxalign' union 2015-07-15 12:57:13 -03:00
Roberto Ierusalimschy
050e8536bb bug: 'io.lines' does not check maximum number of options 2015-07-15 11:40:28 -03:00
Roberto Ierusalimschy
2b61360d82 avoid overflows (detected with 'clang -ftrapv') 2015-07-13 10:30:03 -03:00
Roberto Ierusalimschy
5b6ac971f9 detail (comment) 2015-07-07 14:03:34 -03:00
Roberto Ierusalimschy
403e181d81 'strftime' puts its result directly into 'lua_Buffer' 2015-07-06 12:16:51 -03:00
Roberto Ierusalimschy
4af03c5ae1 better treatment for integer overflows + all errors throw an error
(instead of returning nil)
2015-07-04 13:35:14 -03:00
Roberto Ierusalimschy
bde17a419d because of debt, 'totalbytes' can be negative (and therefore its
type must be signed)
2015-07-04 13:33:17 -03:00
Roberto Ierusalimschy
8950e0c049 avoid possibility of subtle arith. overflow 2015-07-04 13:32:34 -03:00
Roberto Ierusalimschy
8217e0d4fe avoid subtle possibility of arithmetic overflow 2015-07-04 13:31:42 -03:00
Roberto Ierusalimschy
319ccfefbc computations in numerical for loop must avoid overflows too 2015-07-04 13:31:03 -03:00
Roberto Ierusalimschy
6a8400ba4f using 'clang' by default + changes in warnings ('old-style-declaration'
removed because it is included in 'extra' + 'strict-aliasing' removed
because it is included in 'all' + 'aggregate-return' removed because
no one would do it by mistake)
2015-07-01 14:52:09 -03:00
Roberto Ierusalimschy
2de3361c6c detail 2015-07-01 14:47:12 -03:00
Roberto Ierusalimschy
e89763e964 simpler code for 'luaO_fb2int' 2015-06-26 16:32:07 -03:00
Roberto Ierusalimschy
be63d995c1 tiny bug: 'randomseed' was calling 'rand' (instead of 'l_rand')
to discard first value
2015-06-26 16:30:32 -03:00
Roberto Ierusalimschy
2b1fc1b38c with string cache, it is not that important for 'type' to avoid
'lua_pushstring'
2015-06-26 16:25:45 -03:00
Roberto Ierusalimschy
f01c12c891 detail (cast to avoid mixing types in conditional expression) 2015-06-25 11:00:01 -03:00
Roberto Ierusalimschy
5aabb7a891 buffer size changed from size_t to int (it is always small) +
comments + assert that printf result fits in given buffer
2015-06-24 15:25:10 -03:00
Roberto Ierusalimschy
cb1e451999 detail 2015-06-24 15:23:57 -03:00
Roberto Ierusalimschy
43cff79bf7 detail 2015-06-21 10:50:29 -03:00
Roberto Ierusalimschy
95c3144393 redefine 'l_sprintf' to test correctness of buffer sizes given
to 'snprintf'
2015-06-18 11:27:44 -03:00
Roberto Ierusalimschy
19eb6ae580 using 'snprintf' in C99 (both for documentation of buffer sizes
and some complains from tools)
2015-06-18 11:26:05 -03:00
Roberto Ierusalimschy
cbe05b48bb using 'lua_longassert' to avoid warnings 2015-06-18 11:25:26 -03:00
Roberto Ierusalimschy
e7f34ad395 better implementation for buffers (reallocated memory directly
with allocation function; generates much less garbage)
2015-06-18 11:23:14 -03:00
Roberto Ierusalimschy
a5cbb7c3a7 detail (i + 1 > exp is simply i >= exp) 2015-06-18 11:20:32 -03:00
Roberto Ierusalimschy
dcad08b76d details (use original type when saving variable's value) 2015-06-18 11:19:52 -03:00
Roberto Ierusalimschy
afbf5c5dab missing ']]' in long string 2015-06-18 11:05:28 -03:00
Roberto Ierusalimschy
a1415c0d72 bug in order NaN x int (tests must ensure that NaN does not get
converted to integer)
2015-06-09 12:53:35 -03:00
Roberto Ierusalimschy
2ecaf18138 using macros ('rttype' and 'settt_') to access "private" field 'tt_' 2015-06-09 11:21:42 -03:00
Roberto Ierusalimschy
cbef15f3ea comment (FALLTHROUGH position) 2015-06-09 11:21:13 -03:00
Roberto Ierusalimschy
16e8bb360b comment 2015-06-09 11:21:00 -03:00
Roberto Ierusalimschy
6628012e9e new release number (5.3.1) 2015-06-03 10:03:38 -03:00
Roberto Ierusalimschy
ed1fe28bb8 When comparing integers with floats, use float as common type when
possible (i.e., when integer fits in a float without losses); seems
to be more efficient in architectures with native support for used
Lua numbers
2015-06-02 16:11:24 -03:00
Roberto Ierusalimschy
6645bb2df4 'strcache' elements as arrays of 1 element hints that cache can
be n-way (instead of direct mapped)
2015-06-01 13:34:37 -03:00
Roberto Ierusalimschy
02aed045de bug: return hook may not see correct values for active local variables
when function returns
2015-05-22 16:32:42 -03:00
Roberto Ierusalimschy
72bd2ef6c5 dependencies updated 2015-05-22 16:29:43 -03:00
Roberto Ierusalimschy
d39bb51faa bug: interpreter cannot pop activation frame before calling return
hook (as it may want to access local variables active by the end
of the function)
2015-05-22 14:48:19 -03:00
Roberto Ierusalimschy
6142e663e4 reuse of 'addinfo' by lexical errors 2015-05-22 14:45:56 -03:00
Roberto Ierusalimschy
6dc20ff293 'l <= r' for numbers has its own function, instead of using
'not (r < l)' (seems to be slightly more efficient)
2015-05-20 15:19:11 -03:00
Roberto Ierusalimschy
99391e24ea new configuration macro 'l_mathlim' (simplifies some dependencies
on float type)
2015-05-20 14:39:23 -03:00
Roberto Ierusalimschy
0ec12c1bd1 new semantics for numerical order (following math regardless
representation)
2015-05-20 13:22:55 -03:00
Roberto Ierusalimschy
a71c0ab861 detail (removed useless '#include') 2015-05-20 13:22:30 -03:00
Roberto Ierusalimschy
04ba6ea83b new semantics for equality int-float 2015-04-29 15:27:16 -03:00
Roberto Ierusalimschy
a1935b9cba error message ("too complex" -> "too many registers") + MAXREGS
changed to 255 (no reason not to use maximum allowed)
2015-04-29 15:24:11 -03:00
Roberto Ierusalimschy
513c639bf9 patch for last bug corrected to be against last released version
(and not against last version in RCS...)
2015-04-13 13:13:25 -03:00
Roberto Ierusalimschy
69b5f7a410 some details in 'luaO_int2fb' + more consistent use of the locale
decimal point
2015-04-11 15:30:08 -03:00
Roberto Ierusalimschy
ae76c39712 Bug: suspended '__le' metamethod can give wrong result 2015-04-10 14:56:25 -03:00
Roberto Ierusalimschy
0d4a1f71db re-organization of initial configuration options 2015-04-10 14:41:04 -03:00