Commit Graph

4999 Commits

Author SHA1 Message Date
Roberto Ierusalimschy 80bd4a8940 correction on xoshiro256** algorithm
(should use state[1] instead of state[0] for output)
2018-05-09 11:54:37 -03:00
Roberto Ierusalimschy 3e7415e846 reorganization of '#if's for sellecting a type for 'Rand64' +
comments
2018-05-04 17:01:45 -03:00
Roberto Ierusalimschy e64e20ac81 minimizing the code ran by 'vmfetch' + no more 'vra'
(the code is simpler without 'vra' and conversion is a no-op)
2018-05-02 15:17:59 -03:00
Roberto Ierusalimschy deb807837c 'luaO_pushvfstring' does not need to reallocate stack
(less error cases in the API)
2018-04-25 13:26:20 -03:00
Roberto Ierusalimschy 26eb144541 no need to define 'luaP_opnames' in regular builds 2018-04-19 12:42:41 -03:00
Roberto Ierusalimschy f9c3d6fdbe use test mode to test the interpreter without jump tables 2018-04-11 13:49:36 -03:00
Roberto Ierusalimschy 762baf0548 detail (trim constants are unsigned) 2018-04-06 14:52:42 -03:00
Roberto Ierusalimschy b8a04658b2 PRNG changed from 'xoroshiro128+' to 'xoshiro256**' + "I' renamed 'Rand64'
+ implementation can use integer types larger than 64 (or 32) bits
2018-04-06 12:41:29 -03:00
Roberto Ierusalimschy b44787652b using 'xoroshiro128+' for PRNG
(plus a rotate at the final result to have better lower bits)
2018-04-04 13:12:53 -03:00
Roberto Ierusalimschy 03c6a05ec8 no more nil-in-table 2018-04-04 11:23:41 -03:00
Roberto Ierusalimschy 3d0b5edfe4 using unsigned comparison in 'l_intfitsf' (avoids one comparison) 2018-04-02 14:52:07 -03:00
Roberto Ierusalimschy 8d50a998e3 definition for LUA_UNSIGNEDBITS (number of bits in a LUA_UNSIGNED) 2018-04-02 10:58:33 -03:00
Roberto Ierusalimschy bdd10a08b1 in 'random', uses high-order bits instead of low-order
(better statistical properties)
2018-03-26 16:48:46 -03:00
Roberto Ierusalimschy c5e3b2f814 in random/'project', remove the special case for "small" intervals;
it is slower than the general case.
2018-03-22 16:54:49 -03:00
Roberto Ierusalimschy 6486762463 missing LUAI_FUNC in prototype for 'luaK_patchgoto' 2018-03-19 17:03:44 -03:00
Roberto Ierusalimschy 4907444db9 'fTransfer' -> 'ftransfer' / 'nTransfer' -> 'ntransfer'
(keep the standard of names in lower case)
2018-03-16 12:33:34 -03:00
Roberto Ierusalimschy c3cb31fa9a some extra goodies for 'readline'
('rl_readline_name' and 'rl_inhibit_completion')
2018-03-16 11:23:08 -03:00
Roberto Ierusalimschy 0c7738240e FALLTHROUGH comment must be last "statement"
(so it does not work when inside a block)
2018-03-16 11:22:09 -03:00
Roberto Ierusalimschy 7b0b6b3b39 cannot use 'defined' inside a macro +
call to 'luaT_keydef' must be protected
2018-03-16 11:21:20 -03:00
Roberto Ierusalimschy 89da4168df avoid functions named 'pack'
(name too common, may collide when doing 'onelua.c')
2018-03-16 11:18:18 -03:00
Roberto Ierusalimschy 6b01b6cf6a 'lu_int32' may not be 'int' 2018-03-12 09:39:03 -03:00
Roberto Ierusalimschy e3388ebfad more explicit casts when converting an integer to a random float
(to ensure computations are done with all bits)
2018-03-11 11:48:09 -03:00
Roberto Ierusalimschy 9e3db70482 details (casts between 'lua_Number' and 'double') 2018-03-09 16:24:45 -03:00
Roberto Ierusalimschy dbec41f34c random floats of different sizes get exactly needed number of random bits
(up to 64)
2018-03-09 16:23:39 -03:00
Roberto Ierusalimschy 0b3db69e41 slight simplification in 'xorshift128plus' 2018-03-09 12:05:13 -03:00
Roberto Ierusalimschy 80ae1c1c16 fairer projection of random integers into an integer interval 2018-03-09 11:56:25 -03:00
Roberto Ierusalimschy 40683b4934 added definition for LUA_MAXUNSIGNED 2018-03-09 11:56:02 -03:00
Roberto Ierusalimschy 6480e73599 details (avoid using non-C89 '//' comment) 2018-03-07 13:26:01 -03:00
Roberto Ierusalimschy 4a1612ff9b new experimental syntax using reserved word 'undef' 2018-03-07 12:55:38 -03:00
Roberto Ierusalimschy 464658b16a better modularization of the code for the REPL 2018-03-06 17:30:17 -03:00
Roberto Ierusalimschy bdcde45d05 updated to use jump tables 2018-03-05 11:26:18 -03:00
Roberto Ierusalimschy 8b0434e5e6 both 'fTransfer' and 'nTransfer' may not fit in a 'char' 2018-03-05 11:15:32 -03:00
Roberto Ierusalimschy 8b0b675149 added casts (warnings in VS) 2018-03-05 11:15:04 -03:00
Roberto Ierusalimschy 8c429311a3 typo in comment 2018-03-05 11:13:55 -03:00
Roberto Ierusalimschy 66b7b075a6 'math.random' using the xorshift128+ algorithm 2018-03-05 11:07:48 -03:00
Roberto Ierusalimschy 62a392ff46 using jump tables when available 2018-03-02 15:59:19 -03:00
Roberto Ierusalimschy 893f382e94 Jump Table for the interpreter 2018-03-02 15:56:14 -03:00
Roberto Ierusalimschy 0eb10c6303 'LUA_USE_READLINE' moved to the make file 2018-03-02 15:31:51 -03:00
Roberto Ierusalimschy 00008b8ed0 back to one format per argument 2018-03-02 15:25:00 -03:00
Roberto Ierusalimschy df49384516 year in copyright changed to 2018 2018-03-02 13:30:47 -03:00
Roberto Ierusalimschy fbea553ca2 'lua_setiuservalue' removes value from the stack even in case of error 2018-02-27 17:01:55 -03:00
Roberto Ierusalimschy 34b00c16e2 removed compatibility code with older versions 2018-02-27 15:47:32 -03:00
Roberto Ierusalimschy 12110dec0e module has been deprecated. 2018-02-27 15:46:26 -03:00
Roberto Ierusalimschy 4105cafb84 no more 'bitlib' 2018-02-27 15:27:30 -03:00
Roberto Ierusalimschy 76ff55750e no optimizations in test mode + no more compat with 5.2 + a few more
options in comments
2018-02-27 15:24:23 -03:00
Roberto Ierusalimschy b7edf5d2d8 metamethods for 'removekey'/'keyin' 2018-02-27 14:48:28 -03:00
Roberto Ierusalimschy ef8263f81f better names for macros for tags and types.
rttype -> rawtt; ttyperaw -> withvariant; ttype -> ttypetag;
tnov -> ttype
2018-02-26 11:16:05 -03:00
Roberto Ierusalimschy 2952bc5fc9 special compact representation for userdata with no user values
(a common case)
2018-02-26 10:35:03 -03:00
Roberto Ierusalimschy 38d3bc8909 using 'offsetof' to compute the size of parts of a structure 2018-02-25 10:40:00 -03:00
Roberto Ierusalimschy 75efc6722b avoid variant tags with the same value of the original type
(to expose bugs more easily)
2018-02-25 09:52:32 -03:00