Roberto Ierusalimschy
2376eb6347
barrier for prototype's cache (with new gray list 'protogray' to keep
prototypes to have their caches visited again) + constant 'MAXMISS'
8 years ago
Roberto Ierusalimschy
8634b2a011
added 'cachemiss' field to prototype to avoid wasting time checking
hits that fail too often
8 years ago
Roberto Ierusalimschy
502a1d1108
new opcodes for table access with constant keys (strings and integers)
8 years ago
Roberto Ierusalimschy
173e41b2eb
new opcode OP_ADDI (for immediate integer operand) (Experimental)
8 years ago
Roberto Ierusalimschy
cb3d5dce30
opcodes 'OP_GETTABUP'/'OP_SETTABUP' operate only with string keys,
so they can use fast-track table access
8 years ago
Roberto Ierusalimschy
6a98aa0bb0
new opcode LOADI (for loading immediate integers)
8 years ago
Roberto Ierusalimschy
a3d36fe283
Upvalues collected like everything else (with mark-sweep) instead
of reference count (simpler and better for generational mode)
8 years ago
Roberto Ierusalimschy
2331e1beec
small changes in 'luaC_upvalbarrier'
8 years ago
Roberto Ierusalimschy
fd51651684
new macro 'vmfetch' to help changing code to computed goto's (macro
abstracts the code to run before each instruction)
9 years ago
Roberto Ierusalimschy
1a44e82200
'luaV_fastget' only treats the real fast case (table with a non-nil
value at given key, so that it does not need to check metamethods)
9 years ago
Roberto Ierusalimschy
a272fa66f0
bug: Metatable may access its own dealocated field when
it has a self reference in __newindex + some refactoring
9 years ago
Roberto Ierusalimschy
c5112f7b15
details (comments)
9 years ago
Roberto Ierusalimschy
d103312661
details (typos in comments)
9 years ago
Roberto Ierusalimschy
2e8f8a18e4
detail
9 years ago
Roberto Ierusalimschy
9a5d6aedb7
trying to optimize a little 'luaD_poscall'
9 years ago
Roberto Ierusalimschy
04587b6256
macro with empty argument can be seen as macro with no argument; better
to avoid that
9 years ago
Roberto Ierusalimschy
ff1289a361
in 'luaD_call', use two functions instead of one with fixed boolean
argument
9 years ago
Roberto Ierusalimschy
c5363a1b58
in 'luaD_precall', in vararg functions, complete missing parameters
only after moving them to final place (avoids checking the stack
again)
9 years ago
Roberto Ierusalimschy
07a2dcacbf
flag CIST_REENTRY changed to CIST_FRESH (its negation); fresh invocations
seem to be less frequent than reentries. (So, avoid setting flag on
the frequent case.)
9 years ago
Roberto Ierusalimschy
257961c601
OP_SELF can use 'luaV_fastget' specialized for strings, as it
is applied only to string keys
9 years ago
Roberto Ierusalimschy
8004ab756f
hook test in 'luaV_execute' reduced to minimum (rest done in
'luaG_traceexec'; no difference in performance for the non-hook
case, but keeps 'luaV_execute' a little simpler) + 'base' updates
replaced by 'Protect' (which serves this rule)
9 years ago
Roberto Ierusalimschy
f7670781cf
cleaner definition for 'luaC_condGC', using 'pre'/'pos' parameters
9 years ago
Roberto Ierusalimschy
df8b996bcc
'Protect' in table operations is not needed in the fast track
+ removal of a few dead macros
9 years ago
Roberto Ierusalimschy
ee5edb6b68
macros 'getaddrstr' and 'getstr' unified (they do the same thing)
9 years ago
Roberto Ierusalimschy
b91bc93fd3
'setobj2t' incorporated into 'luaV_fastset' + 'invalidateTMcache'
is not needed in the fast track (as it does not create new
entries)
9 years ago
Roberto Ierusalimschy
41964648ee
long strings are created directly in final position when possible
(instead of using an auxiliar buffer to first create the string
and then allocate the final string and copy result there)
9 years ago
Roberto Ierusalimschy
8f25d08637
'invalidateTMcache' not needed in all 'settable' uses
9 years ago
Roberto Ierusalimschy
3b795541c4
fast track for 'settable'
9 years ago
Roberto Ierusalimschy
e247c3ada3
implementation of fast track for gettable operations
9 years ago
Roberto Ierusalimschy
319ccfefbc
computations in numerical for loop must avoid overflows too
9 years ago
Roberto Ierusalimschy
f01c12c891
detail (cast to avoid mixing types in conditional expression)
10 years ago
Roberto Ierusalimschy
a1415c0d72
bug in order NaN x int (tests must ensure that NaN does not get
converted to integer)
10 years ago
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
10 years ago
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)
10 years ago
Roberto Ierusalimschy
6dc20ff293
'l <= r' for numbers has its own function, instead of using
'not (r < l)' (seems to be slightly more efficient)
10 years ago
Roberto Ierusalimschy
0ec12c1bd1
new semantics for numerical order (following math regardless
representation)
10 years ago
Roberto Ierusalimschy
04ba6ea83b
new semantics for equality int-float
10 years ago
Roberto Ierusalimschy
ae76c39712
Bug: suspended '__le' metamethod can give wrong result
10 years ago
Roberto Ierusalimschy
abb2f5511d
detail ('b + base' -> 'base + b' to follow all other similar uses)
10 years ago
Roberto Ierusalimschy
4ba0cb4580
always use macros to operate on lua_Numbers
10 years ago
Roberto Ierusalimschy
6408bc0b7f
new macros 'chgfltvalue'/'chgivalue' (numerical for loop does
not need to set the type of its internal variable at each iteration)
10 years ago
Roberto Ierusalimschy
81245b1ad5
'numisinteger' (for table keys) replaced by 'luaV_tointeger' (old
'tointeger_aux'), which can do the same job.
10 years ago
Roberto Ierusalimschy
c8d6cb0136
macros 'luai_num*' (for float arithmetic operations) moved to
llimits.h.
10 years ago
Roberto Ierusalimschy
7e2015a46d
size of short strings stored in a single byte, to reduce the size
of struct 'TString'
10 years ago
Roberto Ierusalimschy
50e2eb8954
change in macro 'vmcase', avoding code inside it. (Code inside the
macro harms tools such as debuggers.)
10 years ago
Roberto Ierusalimschy
2b83711fba
new macro 'nvalue' (to convert an object to a float when we know
object is a number)
10 years ago
Roberto Ierusalimschy
049cf14cf9
'x//y' extended to floats + more comments about module and floor
division operations
10 years ago
Roberto Ierusalimschy
5d628519d3
simpler definition for 'luaV_tonumber_'
10 years ago
Roberto Ierusalimschy
bde14c3adc
macro to change method of conversion from float to integer (make it
use floor intead of requiring an exact integral value)
10 years ago
Roberto Ierusalimschy
28fdbcf393
added include for 'lprefix.h', for stuff that must be added before
any other header file
10 years ago