aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* Tag values don't need to be different from type valuesRoberto Ierusalimschy2020-01-311-18/+19
| | | | Variants can use zero for first variant.
* Clearer distinction between types and tagsRoberto Ierusalimschy2020-01-3122-212/+230
| | | | | LUA_T* represents only types; tags (types + Variants) are represented by LUA_V* constants.
* New macro 'makevariant' to codify variant tagsRoberto Ierusalimschy2020-01-061-11/+14
|
* Changed internal representation of booleansRoberto Ierusalimschy2020-01-0614-52/+87
| | | | | | | Instead of an explicit value (field 'b'), true and false use different tag variants. This avoids reading an extra field and results in more direct code. (Most code that uses booleans needs to distinguish between true and false anyway.)
* Fixed bug in 'aux_rawset'Roberto Ierusalimschy2019-12-301-1/+1
| | | | | In 'aux_rawset', top must be decremented after the barrier, which refers to top-1. (Bug introduced in commit c646e57fd.)
* Comments (mosty typos)Roberto Ierusalimschy2019-12-3015-21/+28
|
* Copyright year changed to 2020Roberto Ierusalimschy2019-12-272-3/+3
|
* Joined common code in 'lua_rawset' and 'lua_rawsetp'Roberto Ierusalimschy2019-12-173-21/+23
|
* Easy way to allow Unicode characters in identifiersRoberto Ierusalimschy2019-12-171-16/+25
| | | | For those that want to try it...
* Added test for NULL in string.format("%p")Roberto Ierusalimschy2019-12-171-0/+2
| | | | | | ISO C states that standard library functions should not be called with NULL arguments, unless stated otherwise. 'sprintf' does not state otherwise, and it doesn't hurt to be on the safe side.
* Small correction in assertionRoberto Ierusalimschy2019-12-132-2/+2
|
* Comment about LUA_COMPAT_LT_LE moved to proper placeRoberto Ierusalimschy2019-12-102-6/+12
|
* Simplifications in 'op_arith*' family of macrosRoberto Ierusalimschy2019-12-051-47/+27
|
* Using an enumeration for float->integer coercion modesRoberto Ierusalimschy2019-12-054-22/+30
|
* 'l_mathlim' renamed to 'l_floatatt'Roberto Ierusalimschy2019-12-054-8/+8
| | | | That macro is applied to float attributes, not to limits.
* Better comments about the use of 'k' in opcodesRoberto Ierusalimschy2019-12-052-30/+34
|
* Manual a little more clear about string->number coersionsRoberto Ierusalimschy2019-12-051-16/+25
|
* Code reorganization for opcodes OP_FORPREP and OP_FORLOOPRoberto Ierusalimschy2019-12-041-75/+116
| | | | | Parts of the code for opcodes OP_FORPREP and OP_FORLOOP were moved to functions outside the interpreter loop.
* Removed some wrong commentsRoberto Ierusalimschy2019-11-281-8/+6
| | | | | Both 'tonumber' and 'tointeger' cannot change the out parameter when the conversion fails.
* More generic pattern when testing 'string.format'Roberto Ierusalimschy2019-11-221-2/+2
| | | | | The result of 'string.format("%a", 0.0)' can have multiple zeros after the dot.
* DetailsRoberto Ierusalimschy2019-11-186-15/+16
|
* Using 'metavalues' for "metamethods" that are not methodsRoberto Ierusalimschy2019-11-081-21/+26
| | | | | | Several "metamethods" are not required to be methods (functions), so it seems clearer not to call them metamethods. The manual now uses the word 'metavalue' for those values.
* Comments in 'lopcodes.h'Roberto Ierusalimschy2019-11-071-92/+92
| | | | | Both 'R' and 'K' are arrays, so the comments should use square brackets to index them.
* File 'bugs' no longer tracked by gitRoberto Ierusalimschy2019-10-301-4052/+0
| | | | | | | The file 'bugs' reports bugs in several different versions (corresponding to different branches in the repository), without a clear division of "this bugs belongs to this version". So, it doesn't make sense to track it along with one (or many) versions.
* Fixed bug in tail calls of __call chainsRoberto Ierusalimschy2019-10-282-2/+26
| | | | | A tail call of a __call chain (a __call metamethod that itself is also not a function) was being perfomed as a regular call.
* Fixed warnings from Keil compilerRoberto Ierusalimschy2019-10-252-7/+4
|
* Change in the prefix of messages from searchersRoberto Ierusalimschy2019-10-242-5/+32
| | | | | | The initial "\n\t" to properly indent a searcher message is being added by 'findloader' when building the error message, instead of being included in the original message by each searcher itself.
* Added function 'luaL_buffsub'Roberto Ierusalimschy2019-10-232-9/+19
|
* Several enhancements in the manualRoberto Ierusalimschy2019-10-231-43/+54
|
* More pious implementation of 'string.dump'Roberto Ierusalimschy2019-10-231-8/+24
| | | | | | | In 'str__dump', the call to 'lua_dump' assumes the function is on the top of the stack, but the manual allows 'luaL_buffinit' to push stuff on the stack (although the current implementation does not). So, the call to 'luaL_buffinit' must come after the call to 'lua_dump'.
* Changed definition of macro 'l_isfalse'Roberto Ierusalimschy2019-10-221-1/+1
| | | | | | The old definition did one test for nil, but three tests for the all too common booleans (and two tests for other values); this definition does two tests for all values.
* Details (mostly comments)Roberto Ierusalimschy2019-10-224-9/+28
|
* Larger C-stack limits for new threadsRoberto Ierusalimschy2019-10-171-1/+1
| | | | | | New threads were being created with very small C-stack limits. This is not a problem for coroutines, because 'lua_resume' sets a new limit, but not all threads are coroutines.
* Easy redefinition of valid flags for 'string.format'Roberto Ierusalimschy2019-10-171-3/+6
|
* Improvements in the manual around metamethodsv5.4-betaRoberto Ierusalimschy2019-10-081-35/+42
|
* No coercion string->number in arithmetic with LUA_NOCVTS2NRoberto Ierusalimschy2019-10-081-0/+13
|
* Makefile compiles the Lua compiler with '-Os'Roberto Ierusalimschy2019-10-081-0/+10
| | | | | | The performance of the Lua compiler is not critical for Lua performance, but it is a big component in the source. So, it makes sense to trade speed for size in this component.
* Fixed a warning and other minor issuesRoberto Ierusalimschy2019-10-046-8/+9
| | | | Fixed some minor issues from the feedback for 5.4-beta rc1.
* Script 'packtests' gets Lua version as a parameterRoberto Ierusalimschy2019-10-021-1/+3
|
* Janitorial workRoberto Ierusalimschy2019-10-014-58/+62
| | | | | | | - Several details in 'lcode.c' - A few more tests for code generation - Bug in assert in 'lcode.c' ("=" x "==") - Comments in 'lopcodes.h' and 'ltable.c'
* Details in the makefile (warning options)Roberto Ierusalimschy2019-09-241-8/+8
|
* Subtraction of small constant integers optimized with OP_ADDIRoberto Ierusalimschy2019-09-244-31/+46
|
* 'setCstacklimit' renamed to 'setcstacklimit'Roberto Ierusalimschy2019-09-245-23/+23
| | | | Function names in the API use only lowercase letters.
* Janitorial work in 'lcode.c'Roberto Ierusalimschy2019-09-192-38/+33
|
* Simplification in the call to 'constfolding'Roberto Ierusalimschy2019-09-112-17/+21
|
* Removed arithmetic opcodes with immediate operandRoberto Ierusalimschy2019-09-107-65/+17
| | | | | | | The difference in performance between immediate operands and K operands does not seem to justify all those extra opcodes. We only keep OP_ADDI, due to its ubiquity and because the difference is a little more relevant. (Later, OP_SUBI will be implemented by OP_ADDI, negating the constant.)
* Added macro 'testMMMode'Roberto Ierusalimschy2019-09-063-94/+95
| | | | Macro 'testMMMode' checks whether opcode is an MM opcode.
* Undo change in the handling of 'L->top' (commit b80077b8f3)Roberto Ierusalimschy2019-08-294-16/+9
| | | | | | 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.
* Use of 'MMBIN' opcodes extended to shift operatorsRoberto Ierusalimschy2019-08-285-87/+60
| | | | Plus, this commit removes useless 'tm' parameters in 'op_*' macros.
* First version of OP_MMBIN opcodesRoberto Ierusalimschy2019-08-2711-104/+132
| | | | | | | | | | | 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.)