b397064955
avoid craches when loading tampered code with NULL as a string constant
Roberto Ierusalimschy2018-06-01 13:45:58 -03:00
34aa0c5bd7
new macros 'likely'/'unlikely' with hints for jump predictions (used only in errors for now)
Roberto Ierusalimschy2018-05-30 11:25:52 -03:00
97e394ba18
macro 'luai_makeseed' now controls the whole process of making the seed
Roberto Ierusalimschy2018-05-29 15:02:51 -03:00
950fbcb971
detail ('l_castU2S' should only be used over lua_Unsigned values)
Roberto Ierusalimschy2018-05-29 15:01:50 -03:00
02ed0b2c30
in 'luaD_poscall', there is no need to compute 'firstResult' when 'nres==0'
Roberto Ierusalimschy2018-05-22 09:02:36 -03:00
de53c2ec7e
using some weak "randomness" (time and memory address) to initialize seeds for the PRNG
Roberto Ierusalimschy2018-05-16 08:27:59 -03:00
80bd4a8940
correction on xoshiro256** algorithm (should use state[1] instead of state[0] for output)
Roberto Ierusalimschy2018-05-09 11:54:37 -03:00
3e7415e846
reorganization of '#if's for sellecting a type for 'Rand64' + comments
Roberto Ierusalimschy2018-05-04 17:01:45 -03:00
e64e20ac81
minimizing the code ran by 'vmfetch' + no more 'vra' (the code is simpler without 'vra' and conversion is a no-op)
Roberto Ierusalimschy2018-05-02 15:17:59 -03:00
deb807837c
'luaO_pushvfstring' does not need to reallocate stack (less error cases in the API)
Roberto Ierusalimschy2018-04-25 13:26:20 -03:00
b8a04658b2
PRNG changed from 'xoroshiro128+' to 'xoshiro256**' + "I' renamed 'Rand64' + implementation can use integer types larger than 64 (or 32) bits
Roberto Ierusalimschy2018-04-06 12:41:29 -03:00
b44787652b
using 'xoroshiro128+' for PRNG (plus a rotate at the final result to have better lower bits)
Roberto Ierusalimschy2018-04-04 13:12:53 -03:00
3d0b5edfe4
using unsigned comparison in 'l_intfitsf' (avoids one comparison)
Roberto Ierusalimschy2018-04-02 14:52:07 -03:00
8d50a998e3
definition for LUA_UNSIGNEDBITS (number of bits in a LUA_UNSIGNED)
Roberto Ierusalimschy2018-04-02 10:58:33 -03:00
bdd10a08b1
in 'random', uses high-order bits instead of low-order (better statistical properties)
Roberto Ierusalimschy2018-03-26 16:48:46 -03:00
c5e3b2f814
in random/'project', remove the special case for "small" intervals; it is slower than the general case.
Roberto Ierusalimschy2018-03-22 16:54:49 -03:00
4907444db9
'fTransfer' -> 'ftransfer' / 'nTransfer' -> 'ntransfer' (keep the standard of names in lower case)
Roberto Ierusalimschy2018-03-16 12:33:34 -03:00
c3cb31fa9a
some extra goodies for 'readline' ('rl_readline_name' and 'rl_inhibit_completion')
Roberto Ierusalimschy2018-03-16 11:23:08 -03:00
0c7738240e
FALLTHROUGH comment must be last "statement" (so it does not work when inside a block)
Roberto Ierusalimschy2018-03-16 11:22:09 -03:00
7b0b6b3b39
cannot use 'defined' inside a macro + call to 'luaT_keydef' must be protected
Roberto Ierusalimschy2018-03-16 11:21:20 -03:00
89da4168df
avoid functions named 'pack' (name too common, may collide when doing 'onelua.c')
Roberto Ierusalimschy2018-03-16 11:18:18 -03:00
e3388ebfad
more explicit casts when converting an integer to a random float (to ensure computations are done with all bits)
Roberto Ierusalimschy2018-03-11 11:48:09 -03:00
75efc6722b
avoid variant tags with the same value of the original type (to expose bugs more easily)
Roberto Ierusalimschy2018-02-25 09:52:32 -03:00
d766e2ae17
first (parcial) implementation of 'keyin'/'removekey' (still no metamethods, no raw verssions)
Roberto Ierusalimschy2018-02-25 09:48:16 -03:00
f055a9dffd
added check in 'obj2gco' to prevent its use in non Lua-object pointers (otherwise its cast is blind, casting any value given to it)
Roberto Ierusalimschy2018-02-25 09:43:52 -03:00
9243c414d9
first version of empty entries in tables (so that, in the future, tables can contain regular nil entries)
Roberto Ierusalimschy2018-02-23 10:16:18 -03:00
c72ac048b9
conditional jumps "deunified" (if a jump table is used, the unification may harm jump prediction.)
Roberto Ierusalimschy2018-02-21 16:43:44 -03:00
b03dddf9e4
removed coercion string->number in bitwise operations (can be done with a Lua module)
Roberto Ierusalimschy2018-02-21 14:48:31 -03:00
422318f677
two new fields 'fTransfer'/'nTransfer' in 'lua_Debug' structure (for information about values being given and returned in function calls)
Roberto Ierusalimschy2018-02-17 17:29:29 -02:00
104d249ffb
in return hook, 'top' must be corrected only if smaller than 'ci->top'. (It may be larger when returning multiple values, and then it must be larger to preserve that stack slice.)
Roberto Ierusalimschy2018-02-17 16:22:00 -02:00
b1379936cf
vararg back to '...' (but with another implementation) new implementation should have zero overhead for non-vararg functions
Roberto Ierusalimschy2018-02-09 13:16:06 -02:00
fc3eaa2559
GC default mode for the stand-alone interpreter is generational mode
Roberto Ierusalimschy2018-02-06 13:32:36 -02:00
daff7c3b4d
small corrections in generational mode (cannot call finalizers in emergency collections + should set everything before calling finalizers)
Roberto Ierusalimschy2018-02-05 15:14:54 -02:00
d2fb34ac88
'OP_TAILCALL' calling C functions finishes the call and returns (instead of waiting for following 'OP_RETURN')
Roberto Ierusalimschy2018-01-14 15:27:50 -02:00