Commit Graph

  • 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) Roberto Ierusalimschy 2016-01-05 14:07:21 -02:00
  • a272fa66f0 bug: Metatable may access its own dealocated field when it has a self reference in __newindex + some refactoring Roberto Ierusalimschy 2016-01-04 14:44:50 -02:00
  • b12b635a90 more refactoring Roberto Ierusalimschy 2016-01-04 11:40:57 -02:00
  • 7cd7c2e0a1 Metatable may access its own dealocated field when it has a self reference in __newindex. Roberto Ierusalimschy 2016-01-04 11:35:56 -02:00
  • 07cf8415e3 more comments + reordeing of union inside 'expdesc' to allow static initialization of a VKINT value Roberto Ierusalimschy 2015-12-30 16:16:13 -02:00
  • c0836dda74 avoid empty macro arguments (invalid in C89) Roberto Ierusalimschy 2015-12-21 11:02:14 -02:00
  • 384d1b47b0 comments (*lots* of them) + asserts Roberto Ierusalimschy 2015-12-18 11:53:36 -02:00
  • 19770b03a9 comments. (More explanation about kinds of expressions.) Roberto Ierusalimschy 2015-12-17 13:44:50 -02:00
  • a01eba657e reordering of some functions + 'code_label' renamed to 'code_loadbool' Roberto Ierusalimschy 2015-12-17 13:02:44 -02:00
  • b7446ea88d detail ('while' -> 'for') in 'luaK_patchclose' Roberto Ierusalimschy 2015-12-17 12:52:53 -02:00
  • a051b3323e comments (about hooks vs signals) Roberto Ierusalimschy 2015-12-16 14:40:07 -02:00
  • c4e01c568a make 'hook' volatile (as it may be changed in signal handling) Roberto Ierusalimschy 2015-12-16 14:39:38 -02:00
  • bda090b961 comments + small code changes around stack usage when 'luaL_checkstack' raises an error (and needs the stack to create the error message...) Roberto Ierusalimschy 2015-12-14 09:59:27 -02:00
  • e383941652 in 'table.sort': 'typedef' for type of indices + removed stack check (recursion is in the C stack, not in the Lua stack!) Roberto Ierusalimschy 2015-12-14 09:57:38 -02:00
  • 656b3cea1b using 'sig_atomic_t' for 'hookmask' (as it can be changed inside a signal) Roberto Ierusalimschy 2015-12-14 09:54:49 -02:00
  • 2d1d57bc18 comments Roberto Ierusalimschy 2015-12-14 09:53:27 -02:00
  • 03412af06e detail (removed fixed argument to function 'callallpendingfinalizers') Roberto Ierusalimschy 2015-12-10 16:12:30 -02:00
  • 542dbd4c65 detail (moving bodies of 'while' to a separate line) Roberto Ierusalimschy 2015-12-09 13:21:28 -02:00
  • c25d59a6bd format "%s" in 'string.format' accepts embedded zeros when it has no modifiers v5.3.2 Roberto Ierusalimschy 2015-11-25 14:28:17 -02:00
  • 5936eb16d8 randomness in 'table.sort' used only when needed (big imbalance in partition result) + small refactoring Roberto Ierusalimschy 2015-11-25 10:48:57 -02:00
  • 7dc3ca7b8e handling 'clock_t' and 'time_t' correctly in ISO C point of view Roberto Ierusalimschy 2015-11-24 14:54:32 -02:00
  • 71344b5cac easy the way to accept other modifiers for 'mode' in 'io.open' Roberto Ierusalimschy 2015-11-23 09:36:11 -02:00
  • f230898ad6 tiny code refactoring in 'luaS_hash' Roberto Ierusalimschy 2015-11-23 09:32:51 -02:00
  • 3feb702df8 ensure argument to 'string.format("%s")' does not contain zeros Roberto Ierusalimschy 2015-11-23 09:31:21 -02:00
  • c5112f7b15 details (comments) Roberto Ierusalimschy 2015-11-23 09:30:45 -02:00
  • c231a5e2b6 using unsigned int (instead of int) in 'table.sort' to avoid overflows (when computing the pivot and in original table size) Roberto Ierusalimschy 2015-11-23 09:17:31 -02:00
  • dc9ac5b8c2 details (merging declarations with initialization) Roberto Ierusalimschy 2015-11-23 09:09:27 -02:00
  • 146508b28e randomness in pivot for 'table.sort' done by a macro (easier to change) Roberto Ierusalimschy 2015-11-20 10:30:20 -02:00
  • d103312661 details (typos in comments) Roberto Ierusalimschy 2015-11-19 17:16:22 -02:00
  • 2e8f8a18e4 detail Roberto Ierusalimschy 2015-11-17 14:00:28 -02:00
  • f5b0459aba details Roberto Ierusalimschy 2015-11-13 15:19:46 -02:00
  • d682b3c9ec added separator for bugs in 5.3.1 Roberto Ierusalimschy 2015-11-13 15:19:07 -02:00
  • fc085aa627 new release number (5.3.2) Roberto Ierusalimschy 2015-11-13 15:18:42 -02:00
  • 9a5d6aedb7 trying to optimize a little 'luaD_poscall' Roberto Ierusalimschy 2015-11-13 11:24:26 -02:00
  • 89e3a84344 removed field 'n' from 'CallInfo' (not being used right now) Roberto Ierusalimschy 2015-11-13 10:16:51 -02:00
  • 04587b6256 macro with empty argument can be seen as macro with no argument; better to avoid that Roberto Ierusalimschy 2015-11-12 16:08:58 -02:00
  • bde03eeb48 in 'table.sort': tighter checks for invalid order function + "random" pivot for larger intervals (to avoid attacks with bad data) Roberto Ierusalimschy 2015-11-12 16:07:25 -02:00
  • 330d426ffd avoid the use of deprecated functions 'luaL_checkunsigned'/ 'lua_pushunsigned' Roberto Ierusalimschy 2015-11-11 17:08:09 -02:00
  • 02340375be janitor work on 'table.sort': added comments, partition code moved to a separated function, code conventions updated, etc. No changes at all in the logic/algorithm Roberto Ierusalimschy 2015-11-06 14:07:14 -02:00
  • 5100bc8aa1 no need for a special case to get long strings (not that common) Roberto Ierusalimschy 2015-11-03 16:35:21 -02:00
  • ebb2afa54b allow 'set' macros to be used when 'L' is not available (as it was needed only for assertions) Roberto Ierusalimschy 2015-11-03 16:33:10 -02:00
  • 7485512384 added comment and assert about dead keys Roberto Ierusalimschy 2015-11-03 16:10:44 -02:00
  • 46de77b219 bug: despite its name, 'luaH_getstr' did not work for strings in general, but only for short strings Roberto Ierusalimschy 2015-11-03 13:47:30 -02:00
  • d356183402 new function 'luaS_hashlongstr' Roberto Ierusalimschy 2015-11-03 13:36:01 -02:00
  • e61ee8a036 in 'luaD_call', use two functions instead of one with fixed boolean argument + stack error handling in 'luaD_call' moved to a separated function Roberto Ierusalimschy 2015-11-02 16:48:49 -02:00
  • 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
  • caf8278710 added comments Roberto Ierusalimschy 2015-10-20 16:00:19 -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
  • df45f7118b detail (added assertion) Roberto Ierusalimschy 2015-10-08 12:53:31 -03:00
  • 880df57e52 detail (removed unreacheable 'break') Roberto Ierusalimschy 2015-10-08 12:53:05 -03:00
  • 8949904783 allow NULL string when length is zero in 'lua_pushlstring' and 'luaL_addlstring' Roberto Ierusalimschy 2015-10-06 13:10:22 -03:00
  • 9294466234 detail (string cache a bit smaller by default) Roberto Ierusalimschy 2015-10-06 11:29:49 -03:00
  • e290bd6760 in 'luaL_traceback', print correct number of levels even when initial level is not 1. Roberto Ierusalimschy 2015-10-02 12:46:49 -03:00
  • dc4232379d detail (ensure subtraction is done unsigned) Roberto Ierusalimschy 2015-10-02 12:39:23 -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
  • 20b9e59441 barrier macros rewritten as expressions Roberto Ierusalimschy 2015-08-03 16:40:42 -03:00
  • 935d9f7f90 new entry should not be commented out Roberto Ierusalimschy 2015-07-23 11:32:17 -03:00
  • e247c3ada3 implementation of fast track for gettable operations Roberto Ierusalimschy 2015-07-20 15:24:50 -03:00