ff1289a361
in 'luaD_call', use two functions instead of one with fixed boolean argument
Roberto Ierusalimschy2015-11-02 16:48:07 -02:00
cd73f3ccc5
now that we have a counter for CallInfos, use it for a more accurate value for the memory used by a thread
Roberto Ierusalimschy2015-11-02 14:19:29 -02:00
8c1fb91802
macro 'incr_top' replaced by function 'luaD_inctop'. (It is not used in critical time pathes, can save a few bytes without the macro)
Roberto Ierusalimschy2015-11-02 14:09:30 -02:00
33b366ec32
added counters for total and individual CallInfo entries (to allow better syncronization between CallInfo size and stack size)
Roberto Ierusalimschy2015-11-02 14:01:41 -02:00
c5363a1b58
in 'luaD_precall', in vararg functions, complete missing parameters only after moving them to final place (avoids checking the stack again)
Roberto Ierusalimschy2015-11-02 12:06:01 -02:00
ffd0d1232d
using more "conventional" loops in 'luaD_poscall' (probably a little more efficient?)
Roberto Ierusalimschy2015-11-02 09:48:59 -02:00
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.)
Roberto Ierusalimschy2015-11-02 09:43:17 -02:00
c874abac98
with 'fast tracks', there is no need to do raw accesses in 'ipairs'
Roberto Ierusalimschy2015-10-29 13:21:04 -02:00
96ec8671b1
macro 'buff2num' replaced by its body (it caused more harm than good to readability)
Roberto Ierusalimschy2015-10-28 16:51:47 -02:00
cc3a42b190
option 'c' in 'string.pack' accepts any string size (truncating if larger and padding if smaller)
Roberto Ierusalimschy2015-10-28 15:56:51 -02:00
6707ce6349
function prepares vararg only if it really uses them (chunks are always declared vararg but seldom uses them)
Roberto Ierusalimschy2015-10-28 15:28:40 -02:00
257961c601
OP_SELF can use 'luaV_fastget' specialized for strings, as it is applied only to string keys
Roberto Ierusalimschy2015-10-28 12:50:09 -02:00
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)
Roberto Ierusalimschy2015-10-22 12:40:47 -02:00
ee5ef0f295
hook test in 'luaV_execute' reduced to minimum (rest done in 'luaG_traceexec'
Roberto Ierusalimschy2015-10-22 12:40:47 -02:00
5bdee4f810
small changes to allow 'precall' to spend time preserving 'func' only when needed (that is, when stack actually changes)
Roberto Ierusalimschy2015-10-21 16:40:47 -02:00
48098c42ff
generic definitions for float types moved to before variable definitions (so that specific cases can redefine these generic definitions if needed)
Roberto Ierusalimschy2015-10-21 16:17:40 -02:00
f7670781cf
cleaner definition for 'luaC_condGC', using 'pre'/'pos' parameters
Roberto Ierusalimschy2015-10-20 15:56:21 -02:00
df8b996bcc
'Protect' in table operations is not needed in the fast track + removal of a few dead macros
Roberto Ierusalimschy2015-10-20 15:41:35 -02:00
75d5a8924c
macro 'addbuff' was using external variable name, instead of using its parameter name inside the macro.
Roberto Ierusalimschy2015-10-20 11:11:05 -02:00
880f82d089
'*' as a number means stack size, so that "return *" returns all values in the stack.
Roberto Ierusalimschy2015-10-12 13:38:19 -03:00
10fffcd80a
'gmatch' keeps its state in a userdata (keeping the same 'MatchState' across calls)
Roberto Ierusalimschy2015-09-28 15:05:01 -03:00
8264dbc2bb
implemented counter to abort non-linear behavior in pattern matching
Roberto Ierusalimschy2015-09-26 15:45:03 -03:00
9fae7b6d3f
code for string cache generalized for "associative sets" (compiler will optimize away or inline the extra loops)
Roberto Ierusalimschy2015-09-22 11:18:24 -03:00
0f1f51be4b
'table.move' tries to copy elements in increasing order whenever possible
Roberto Ierusalimschy2015-09-17 12:53:50 -03:00
ee5edb6b68
macros 'getaddrstr' and 'getstr' unified (they do the same thing)
Roberto Ierusalimschy2015-09-17 12:51:05 -03:00
bda83e22c0
'tablib' does not try to use raw operations when possible: fast track should make standard operations fast enough to forgo raw accesses
Roberto Ierusalimschy2015-09-09 12:42:30 -03:00
364cdbdbdb
'setobj2t' incorporated into 'luaV_fastset' + 'invalidateTMcache' is not needed in the fast track (as it does not create new entries) + small bug in 'auxsetstr' (calling barrier with wrong object) + using 'setobj2t' without side effects in its arguments
Roberto Ierusalimschy2015-09-09 10:45:50 -03:00
b91bc93fd3
'setobj2t' incorporated into 'luaV_fastset' + 'invalidateTMcache' is not needed in the fast track (as it does not create new entries)
Roberto Ierusalimschy2015-09-09 10:44:07 -03:00
eb0be12ceb
detail in macro 'checkliveness' + macro 'setobj2t' defined as an expression (to be used in macro 'luaV_fastset')
Roberto Ierusalimschy2015-09-08 13:54:52 -03:00
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)
Roberto Ierusalimschy2015-09-08 12:41:05 -03:00
ed19fe766c
added ';' at the end of "expression lines" ("return exp;") so that an extra ";" at the end is enough to stop Lua printing the result ("return exp;;" is not valid)
Roberto Ierusalimschy2015-08-14 16:11:20 -03:00
4af03c5ae1
better treatment for integer overflows + all errors throw an error (instead of returning nil)
Roberto Ierusalimschy2015-07-04 13:35:14 -03:00
bde17a419d
because of debt, 'totalbytes' can be negative (and therefore its type must be signed)
Roberto Ierusalimschy2015-07-04 13:33:17 -03:00
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)
Roberto Ierusalimschy2015-07-01 14:52:09 -03:00
5aabb7a891
buffer size changed from size_t to int (it is always small) + comments + assert that printf result fits in given buffer
Roberto Ierusalimschy2015-06-24 15:25:10 -03:00
95c3144393
redefine 'l_sprintf' to test correctness of buffer sizes given to 'snprintf'
Roberto Ierusalimschy2015-06-18 11:27:44 -03:00
19eb6ae580
using 'snprintf' in C99 (both for documentation of buffer sizes and some complains from tools)
Roberto Ierusalimschy2015-06-18 11:26:05 -03:00
e7f34ad395
better implementation for buffers (reallocated memory directly with allocation function; generates much less garbage)
Roberto Ierusalimschy2015-06-18 11:23:14 -03:00
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
Roberto Ierusalimschy2015-06-02 16:11:24 -03:00
6645bb2df4
'strcache' elements as arrays of 1 element hints that cache can be n-way (instead of direct mapped)
Roberto Ierusalimschy2015-06-01 13:34:37 -03:00
02aed045de
bug: return hook may not see correct values for active local variables when function returns
Roberto Ierusalimschy2015-05-22 16:32:42 -03:00
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)
Roberto Ierusalimschy2015-05-22 14:48:19 -03:00
6dc20ff293
'l <= r' for numbers has its own function, instead of using 'not (r < l)' (seems to be slightly more efficient)
Roberto Ierusalimschy2015-05-20 15:19:11 -03:00
99391e24ea
new configuration macro 'l_mathlim' (simplifies some dependencies on float type)
Roberto Ierusalimschy2015-05-20 14:39:23 -03:00
0ec12c1bd1
new semantics for numerical order (following math regardless representation)
Roberto Ierusalimschy2015-05-20 13:22:55 -03:00
a1935b9cba
error message ("too complex" -> "too many registers") + MAXREGS changed to 255 (no reason not to use maximum allowed)
Roberto Ierusalimschy2015-04-29 15:24:11 -03:00