Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Stack indices changed to union's | Roberto Ierusalimschy | 2022-10-29 | 1 | -19/+19 |
| | | | | | That will allow to change pointers to offsets while reallocating the stack. | ||||
* | Broadening the use of branch hints | Roberto Ierusalimschy | 2021-02-24 | 1 | -2/+3 |
| | | | | | | More uses of macros 'likely'/'unlikely' (renamed to 'l_likely'/'l_unlikely'), both in range (extended to the libraries) and in scope (extended to hooks, stack growth). | ||||
* | Fixed bugs of stack reallocation x GC | Roberto Ierusalimschy | 2020-07-07 | 1 | -2/+2 |
| | | | | | | | | Macro 'checkstackGC' was doing a GC step after resizing the stack; the GC could shrink the stack and undo the resize. Moreover, macro 'checkstackp' also does a GC step, which could remove the preallocated CallInfo when calling a function. (Its name has been changed to 'checkstackGCp' to emphasize that it calls the GC.) | ||||
* | Clearer distinction between types and tags | Roberto Ierusalimschy | 2020-01-31 | 1 | -1/+1 |
| | | | | | LUA_T* represents only types; tags (types + Variants) are represented by LUA_V* constants. | ||||
* | Comment about LUA_COMPAT_LT_LE moved to proper place | Roberto Ierusalimschy | 2019-12-10 | 1 | -0/+9 |
| | |||||
* | Undo change in the handling of 'L->top' (commit b80077b8f3) | Roberto Ierusalimschy | 2019-08-29 | 1 | -2/+0 |
| | | | | | | With MMBIN instructions, there are fewer opcodes that need to update 'L->top', so that change does not seem to pay for the increased complexity. | ||||
* | First version of OP_MMBIN opcodes | Roberto Ierusalimschy | 2019-08-27 | 1 | -2/+2 |
| | | | | | | | | | | | In arithmetic/bitwise operators, the call to metamethods is made in a separate opcode following the main one. (The main opcode skips this next one when the operation succeeds.) This change reduces slightly the size of the binary and the complexity of the arithmetic/bitwise opcodes. It also simplfies the treatment of errors and yeld/resume in these operations, as there are much fewer cases to consider. (Only OP_MMBIN/OP_MMBINI/OP_MMBINK, instead of all variants of all arithmetic/bitwise operators.) | ||||
* | Change in the handling of 'L->top' when calling metamethods | Roberto Ierusalimschy | 2019-07-26 | 1 | -3/+9 |
| | | | | | | | Instead of updating 'L->top' in every place that may call a metamethod, the metamethod functions themselves (luaT_trybinTM and luaT_callorderTM) correct the top. (When calling metamethods from the C API, however, the callers must preserve 'L->top'.) | ||||
* | Details (typos in comments) | Roberto Ierusalimschy | 2019-07-05 | 1 | -6/+6 |
| | |||||
* | Keep correct type for immediate operands in comparisons | Roberto Ierusalimschy | 2019-03-22 | 1 | -2/+6 |
| | | | | | | | | | | | | When calling metamethods for things like 'a < 3.0', which generates the opcode OP_LTI, the C register tells that the operand was converted to an integer, so that it can be corrected to float when calling a metamethod. This commit also includes some other stuff: - file 'onelua.c' added to the project - opcode OP_PREPVARARG renamed to OP_VARARGPREP - comparison opcodes rewritten through macros | ||||
* | New macros for arithmetic/bitwise operations in 'luaV_execute' | Roberto Ierusalimschy | 2018-11-05 | 1 | -1/+1 |
| | | | | | | | The repetitive code of the arithmetic and bitwise operators in the main iterpreter loop was moved to appropriate macros. (As a detail, the function 'luaV_div' was renamed 'luaV_idiv', as it does an "integer division" (floor division). | ||||
* | First "complete" implementation of to-be-closed variables | Roberto Ierusalimschy | 2018-10-17 | 1 | -1/+1 |
| | | | | | | | Still missing: - handling of memory errors when creating upvalue (must run closing method all the same) - interaction with coroutines | ||||
* | Deprecated the emulation of '__le' using '__lt' | Roberto Ierusalimschy | 2018-08-24 | 1 | -0/+2 |
| | | | | | | | | | | | As hinted in the manual for Lua 5.3, the emulation of the metamethod for '__le' using '__le' has been deprecated. It is slow, complicates the logic, and it is easy to avoid this emulation by defining a proper '__le' function. Moreover, often this emulation was used wrongly, with a programmer assuming that an order is total when it is not (e.g., NaN in floating-point numbers). | ||||
* | Removed extra information from RCS keyword strings | Roberto Ierusalimschy | 2018-08-23 | 1 | -1/+1 |
| | | | | | Version numbers and dates (mostly wrong) from RCS keyword strings removed from all source files; only the file name are kept. | ||||
* | new field 'nilvalue' in struct 'global_State' to avoid the use of | Roberto Ierusalimschy | 2018-06-15 | 1 | -3/+2 |
| | | | | addresses of static variables | ||||
* | added 'const' to 'Proto*' when possible | Roberto Ierusalimschy | 2018-06-08 | 1 | -2/+2 |
| | |||||
* | no more 'luaO_nilobject' to avoid comparison of global variable addresses | Roberto Ierusalimschy | 2018-06-01 | 1 | -2/+3 |
| | | | | (now uses static variables) | ||||
* | no more nil-in-table | Roberto Ierusalimschy | 2018-04-04 | 1 | -29/+1 |
| | |||||
* | metamethods for 'removekey'/'keyin' | Roberto Ierusalimschy | 2018-02-27 | 1 | -1/+30 |
| | |||||
* | better names for macros for tags and types. | Roberto Ierusalimschy | 2018-02-26 | 1 | -4/+4 |
| | | | | | rttype -> rawtt; ttyperaw -> withvariant; ttype -> ttypetag; tnov -> ttype | ||||
* | first version of empty entries in tables | Roberto Ierusalimschy | 2018-02-23 | 1 | -4/+4 |
| | | | | (so that, in the future, tables can contain regular nil entries) | ||||
* | new opcodes OP_GTI/OP_GEI | Roberto Ierusalimschy | 2018-02-21 | 1 | -3/+2 |
| | |||||
* | correct way to check stack space for vararg functions | Roberto Ierusalimschy | 2018-02-17 | 1 | -3/+5 |
| | |||||
* | some simplifications/optimizations in returns from Lua functions | Roberto Ierusalimschy | 2018-02-15 | 1 | -4/+6 |
| | |||||
* | vararg back to '...' (but with another implementation) | Roberto Ierusalimschy | 2018-02-09 | 1 | -32/+23 |
| | | | | new implementation should have zero overhead for non-vararg functions | ||||
* | new opcode 'PREPVARARG' | Roberto Ierusalimschy | 2018-02-07 | 1 | -2/+3 |
| | | | | (avoids test for vararg function in all function calls) | ||||
* | bug in tailcall of vararg functions | Roberto Ierusalimschy | 2018-01-28 | 1 | -9/+8 |
| | | | | (when adjusting missing parameters) | ||||
* | calling a vararg function needs to check GC | Roberto Ierusalimschy | 2018-01-28 | 1 | -1/+3 |
| | | | | (because it creates a new table) | ||||
* | keep control of stack top in Lua functions concentrated in 'luaV_execute' | Roberto Ierusalimschy | 2017-12-28 | 1 | -17/+5 |
| | |||||
* | when running Lua code, there is no need to keep 'L->top' "correct"; | Roberto Ierusalimschy | 2017-12-20 | 1 | -7/+19 |
| | | | | set it only when needed. | ||||
* | new macro 'isLuacode' (to distinguish regular Lua code from | Roberto Ierusalimschy | 2017-12-19 | 1 | -3/+3 |
| | | | | hooks, where C code can run inside a Lua function). | ||||
* | 'Proto->numparams' does not include vararg parameter | Roberto Ierusalimschy | 2017-12-15 | 1 | -2/+2 |
| | | | | (one less subtraction when calling functions...) | ||||
* | new opcodes BANDK/BORK/BXORK. (They do not use immediate operands | Roberto Ierusalimschy | 2017-12-13 | 1 | -7/+12 |
| | | | | | because, too often, masks in bitwise operations are integers larger than one byte.) | ||||
* | warnings from Visual Studio /W3 | Roberto Ierusalimschy | 2017-11-30 | 1 | -2/+2 |
| | |||||
* | new opcodes 'OP_LTI' and 'OP_LEI' | Roberto Ierusalimschy | 2017-11-27 | 1 | -1/+15 |
| | |||||
* | small simplifications around 'luaT_callorderTM' | Roberto Ierusalimschy | 2017-11-23 | 1 | -4/+13 |
| | |||||
* | new function 'luaV_flttointeger' to convert floats to integers (without | Roberto Ierusalimschy | 2017-11-08 | 1 | -3/+2 |
| | | | | | string coercions) + string operands to bitwise operations handled by string metamethods | ||||
* | back to 'CallInfo' (no gains with its removal) | Roberto Ierusalimschy | 2017-11-07 | 1 | -3/+3 |
| | |||||
* | more fields moved out of 'CallInfo' | Roberto Ierusalimschy | 2017-11-03 | 1 | -3/+3 |
| | |||||
* | avoid warning about 'const' | Roberto Ierusalimschy | 2017-10-04 | 1 | -2/+2 |
| | |||||
* | new function 'luaT_trybiniTM' | Roberto Ierusalimschy | 2017-09-27 | 1 | -1/+13 |
| | | | | to handle tag methods for instructions with immediate integer arguments | ||||
* | no more reference 'memerrmsg' + new reference to "n" | Roberto Ierusalimschy | 2017-07-27 | 1 | -3/+3 |
| | | | | | | (both can be retrieved by 'luaS_newliteral' without creating anything, because they are fixed, but "n" deserves fast access while 'memerrmsg' does not) | ||||
* | new type 'StackValue' for stack elements | Roberto Ierusalimschy | 2017-06-29 | 1 | -17/+29 |
| | | | | (we may want to put extra info there in the future) | ||||
* | back to old-style vararg system (with vararg table collecting extra | Roberto Ierusalimschy | 2017-05-13 | 1 | -1/+39 |
| | | | | arguments) | ||||
* | detail ('luaT_callbinTM' does not need to be extern) | Roberto Ierusalimschy | 2017-05-08 | 1 | -5/+5 |
| | |||||
* | Upvalues collected like everything else (with mark-sweep) instead | Roberto Ierusalimschy | 2017-04-11 | 1 | -2/+2 |
| | | | | of reference count (simpler and better for generational mode) | ||||
* | detail (removing spaces at end of lines) | Roberto Ierusalimschy | 2016-12-22 | 1 | -2/+2 |
| | |||||
* | When available, use metafield '__name' in error messages | Roberto Ierusalimschy | 2016-02-26 | 1 | -1/+17 |
| | |||||
* | bug: despite its name, 'luaH_getstr' did not work for strings in | Roberto Ierusalimschy | 2015-11-03 | 1 | -3/+3 |
| | | | | general, but only for short strings | ||||
* | in 'luaD_call', use two functions instead of one with fixed boolean | Roberto Ierusalimschy | 2015-11-02 | 1 | -5/+10 |
| | | | | argument |