ff1289a361
in 'luaD_call', use two functions instead of one with fixed boolean argument
Roberto Ierusalimschy
2015-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 Ierusalimschy
2015-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 Ierusalimschy
2015-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 Ierusalimschy
2015-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 Ierusalimschy
2015-11-02 12:06:01 -02:00
332a06bbd1
'luaO_pushvfstring' now uses 'incr_top' to increment top.
Roberto Ierusalimschy
2015-11-02 12:02:35 -02:00
ffd0d1232d
using more "conventional" loops in 'luaD_poscall' (probably a little more efficient?)
Roberto Ierusalimschy
2015-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 Ierusalimschy
2015-11-02 09:43:17 -02:00
c874abac98
with 'fast tracks', there is no need to do raw accesses in 'ipairs'
Roberto Ierusalimschy
2015-10-29 13:21:04 -02:00
789e423b32
corrected comparisons of signed (int) with unsigned (size_t)
Roberto Ierusalimschy
2015-10-29 13:11:41 -02:00
96ec8671b1
macro 'buff2num' replaced by its body (it caused more harm than good to readability)
Roberto Ierusalimschy
2015-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 Ierusalimschy
2015-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 Ierusalimschy
2015-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 Ierusalimschy
2015-10-28 12:50:09 -02:00
ae515a346c
comments for luaD_precall/luaD_poscall
Roberto Ierusalimschy
2015-10-28 10:25:36 -02:00
3cdf1d676b
details (avoid 'case' inside block + avoid using one variable for two roles)
Roberto Ierusalimschy
2015-10-28 10:06:45 -02:00
82129b9266
use macro 'hasjumps' to test whether expression has jumps...
Roberto Ierusalimschy
2015-10-26 12:27:47 -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 Ierusalimschy
2015-10-22 12:40:47 -02:00
ee5ef0f295
hook test in 'luaV_execute' reduced to minimum (rest done in 'luaG_traceexec'
Roberto Ierusalimschy
2015-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 Ierusalimschy
2015-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 Ierusalimschy
2015-10-21 16:17:40 -02:00
3ad55386c4
'condchangemem' also may need to run 'pre'/'pos'
Roberto Ierusalimschy
2015-10-21 16:15:15 -02:00
f7670781cf
cleaner definition for 'luaC_condGC', using 'pre'/'pos' parameters
Roberto Ierusalimschy
2015-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 Ierusalimschy
2015-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 Ierusalimschy
2015-10-20 11:11:05 -02:00
880f82d089
'*' as a number means stack size, so that "return *" returns all values in the stack.
Roberto Ierusalimschy
2015-10-12 13:38:19 -03:00
1a741157cb
avoid (undefined behavior) integer 'overflow' in left shift
Roberto Ierusalimschy
2015-10-08 12:55:35 -03:00
0c78de0d6d
avoid calling write function with empty block
Roberto Ierusalimschy
2015-10-08 12:53:49 -03:00
10fffcd80a
'gmatch' keeps its state in a userdata (keeping the same 'MatchState' across calls)
Roberto Ierusalimschy
2015-09-28 15:05:01 -03:00
8264dbc2bb
implemented counter to abort non-linear behavior in pattern matching
Roberto Ierusalimschy
2015-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 Ierusalimschy
2015-09-22 11:18:24 -03:00
0f1f51be4b
'table.move' tries to copy elements in increasing order whenever possible
Roberto Ierusalimschy
2015-09-17 12:53:50 -03:00
ee5edb6b68
macros 'getaddrstr' and 'getstr' unified (they do the same thing)
Roberto Ierusalimschy
2015-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 Ierusalimschy
2015-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 Ierusalimschy
2015-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 Ierusalimschy
2015-09-09 10:44:07 -03:00
53be1451a8
new definition for macro 'checkliveness'
Roberto Ierusalimschy
2015-09-08 13:55:43 -03:00
eb0be12ceb
detail in macro 'checkliveness' + macro 'setobj2t' defined as an expression (to be used in macro 'luaV_fastset')
Roberto Ierusalimschy
2015-09-08 13:54:52 -03:00
1198d82530
'lua_longassert' defined as an expression (instead of a command)
Roberto Ierusalimschy
2015-09-08 13:53:56 -03:00
6556fcfe5a
small janitor work
Roberto Ierusalimschy
2015-09-08 12:49:25 -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 Ierusalimschy
2015-09-08 12:41:05 -03:00
502214f8a5
added assert for NULL pointer in 'lua_pushlstring'
Roberto Ierusalimschy
2015-08-25 15:50:37 -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 Ierusalimschy
2015-08-14 16:11:20 -03:00
8f25d08637
'invalidateTMcache' not needed in all 'settable' uses
Roberto Ierusalimschy
2015-08-03 17:40:26 -03:00
3b795541c4
fast track for 'settable'
Roberto Ierusalimschy
2015-08-03 16:50:49 -03:00
319ccfefbc
computations in numerical for loop must avoid overflows too
Roberto Ierusalimschy
2015-07-04 13:31:03 -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 Ierusalimschy
2015-07-01 14:52:09 -03:00
e89763e964
simpler code for 'luaO_fb2int'
Roberto Ierusalimschy
2015-06-26 16:32:07 -03:00
be63d995c1
tiny bug: 'randomseed' was calling 'rand' (instead of 'l_rand') to discard first value
Roberto Ierusalimschy
2015-06-26 16:30:32 -03:00
2b1fc1b38c
with string cache, it is not that important for 'type' to avoid 'lua_pushstring'
Roberto Ierusalimschy
2015-06-26 16:25:45 -03:00
f01c12c891
detail (cast to avoid mixing types in conditional expression)
Roberto Ierusalimschy
2015-06-25 11:00:01 -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 Ierusalimschy
2015-06-24 15:25:10 -03:00
95c3144393
redefine 'l_sprintf' to test correctness of buffer sizes given to 'snprintf'
Roberto Ierusalimschy
2015-06-18 11:27:44 -03:00
19eb6ae580
using 'snprintf' in C99 (both for documentation of buffer sizes and some complains from tools)
Roberto Ierusalimschy
2015-06-18 11:26:05 -03:00
cbe05b48bb
using 'lua_longassert' to avoid warnings
Roberto Ierusalimschy
2015-06-18 11:25:26 -03:00
e7f34ad395
better implementation for buffers (reallocated memory directly with allocation function; generates much less garbage)
Roberto Ierusalimschy
2015-06-18 11:23:14 -03:00
a5cbb7c3a7
detail (i + 1 > exp is simply i >= exp)
Roberto Ierusalimschy
2015-06-18 11:20:32 -03:00
dcad08b76d
details (use original type when saving variable's value)
Roberto Ierusalimschy
2015-06-18 11:19:52 -03:00
afbf5c5dab
missing ']]' in long string
Roberto Ierusalimschy
2015-06-18 11:05:28 -03:00
a1415c0d72
bug in order NaN x int (tests must ensure that NaN does not get converted to integer)
Roberto Ierusalimschy
2015-06-09 12:53:35 -03:00
2ecaf18138
using macros ('rttype' and 'settt_') to access "private" field 'tt_'
Roberto Ierusalimschy
2015-06-09 11:21:42 -03:00
6628012e9e
new release number (5.3.1)
Roberto Ierusalimschy
2015-06-03 10:03:38 -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 Ierusalimschy
2015-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 Ierusalimschy
2015-06-01 13:34:37 -03:00
02aed045de
bug: return hook may not see correct values for active local variables when function returns
Roberto Ierusalimschy
2015-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 Ierusalimschy
2015-05-22 14:48:19 -03:00
6142e663e4
reuse of 'addinfo' by lexical errors
Roberto Ierusalimschy
2015-05-22 14:45:56 -03:00
6dc20ff293
'l <= r' for numbers has its own function, instead of using 'not (r < l)' (seems to be slightly more efficient)
Roberto Ierusalimschy
2015-05-20 15:19:11 -03:00
99391e24ea
new configuration macro 'l_mathlim' (simplifies some dependencies on float type)
Roberto Ierusalimschy
2015-05-20 14:39:23 -03:00
0ec12c1bd1
new semantics for numerical order (following math regardless representation)
Roberto Ierusalimschy
2015-05-20 13:22:55 -03:00
04ba6ea83b
new semantics for equality int-float
Roberto Ierusalimschy
2015-04-29 15:27:16 -03:00
a1935b9cba
error message ("too complex" -> "too many registers") + MAXREGS changed to 255 (no reason not to use maximum allowed)
Roberto Ierusalimschy
2015-04-29 15:24:11 -03:00