Commit Graph

4975 Commits

Author SHA1 Message Date
Roberto Ierusalimschy a314409dba in generational mode, an emergency collection can turn any object black
during any memory allocation +
'luaT_getvarargs' may reallocate the stack, and therefore the top must
be correct.
2018-06-18 14:58:21 -03:00
Roberto Ierusalimschy 15ce8d0904 in generational mode, an emergency collection can turn any object black
during any memory allocation.
2018-06-18 14:57:20 -03:00
Roberto Ierusalimschy b43300c14f change in 'LUAI_DDEC' to allow variables to be static in 'onelua'
+ change in 'LUAMOD_API' as opening functions do not need to be global
2018-06-18 09:51:05 -03:00
Roberto Ierusalimschy af70905246 no need to check whether libraries and host use the same kernel;
Lua should work correctly with several copies of the kernel
2018-06-18 09:08:10 -03:00
Roberto Ierusalimschy b95e466218 new field 'nilvalue' in struct 'global_State' to avoid the use of
addresses of static variables
2018-06-15 16:31:22 -03:00
Roberto Ierusalimschy d406d3d05f removed unused macros 'isstackindex'/'api_checkstackindex' +
macro 'api_checkvalidindex' (used only once) expanded and removed
2018-06-15 14:30:52 -03:00
Roberto Ierusalimschy b6780ee41b detail (removed unused definition for 'LUA_QS') 2018-06-15 12:49:28 -03:00
Roberto Ierusalimschy 2c107e13a8 warning (comparison between signed and unsigned integers) 2018-06-15 11:18:40 -03:00
Roberto Ierusalimschy 6e600695f8 field 'sizearray' in struct 'Table' changed to 'alimit', which can
be used as a hint for '#t'
2018-06-15 11:14:20 -03:00
Roberto Ierusalimschy 06127927ff new macro 'ispow2' 2018-06-15 11:13:45 -03:00
Roberto Ierusalimschy aedcfb9414 type 'Rand64' may not be long long, so it should not use 'LL' in its
constants
2018-06-14 15:47:22 -03:00
Roberto Ierusalimschy 992b6d2712 no more 'TESTGRAYBIT' (to free this bit for real uses) 2018-06-11 11:19:50 -03:00
Roberto Ierusalimschy 588dfa4ce5 detail in comment 2018-06-08 16:07:27 -03:00
Roberto Ierusalimschy 6f2b8e21c4 added 'const' to 'Proto*' when possible 2018-06-08 16:06:59 -03:00
Roberto Ierusalimschy c5dc521d65 added patch for bug 5.3.4-7 2018-06-08 13:23:18 -03:00
Roberto Ierusalimschy 505fc91222 no more 'luaO_nilobject' to avoid comparison of global variable addresses
(now uses static variables)
2018-06-01 14:40:38 -03:00
Roberto Ierusalimschy fb8fa66136 no more 'luaH_emptyobject' and comparisons of addresses of global variables
(instead, use a different kind of nil to signal the fake entry returned
when a key is not found in a table)
2018-06-01 13:51:34 -03:00
Roberto Ierusalimschy b397064955 avoid craches when loading tampered code with NULL as a string constant 2018-06-01 13:45:58 -03:00
Roberto Ierusalimschy 34aa0c5bd7 new macros 'likely'/'unlikely' with hints for jump predictions
(used only in errors for now)
2018-05-30 11:25:52 -03:00
Roberto Ierusalimschy 97e394ba18 macro 'luai_makeseed' now controls the whole process of making the seed 2018-05-29 15:02:51 -03:00
Roberto Ierusalimschy 950fbcb971 detail ('l_castU2S' should only be used over lua_Unsigned values) 2018-05-29 15:01:50 -03:00
Roberto Ierusalimschy b2d4d06428 avoid possible overflows when checking sizes in 'string.unpack' 2018-05-25 10:39:32 -03:00
Roberto Ierusalimschy 3b8dba5279 added patches for two bugs (5.3.4-2 and 5.3.4-3) 2018-05-24 17:25:14 -03:00
Roberto Ierusalimschy 892aff2a07 avoid circular inclusion between ltm.h <-> lstate.h 2018-05-23 11:41:20 -03:00
Roberto Ierusalimschy 02ed0b2c30 in 'luaD_poscall', there is no need to compute 'firstResult' when 'nres==0' 2018-05-22 09:02:36 -03:00
Roberto Ierusalimschy de53c2ec7e using some weak "randomness" (time and memory address) to initialize
seeds for the PRNG
2018-05-16 08:27:59 -03:00
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