summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* 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.)
* Fixed missing case in 'luaV_finishOp'Roberto Ierusalimschy2019-08-272-1/+7
| | | | | A metamethod call like '1 << a' was not being properly resumed if it got yielded.
* Fixed bug when yiedling inside OP_ADDK opcodeRoberto Ierusalimschy2019-08-212-0/+14
| | | | | | The family of opcodes OP_ADDK (arithmetic operators with K constant) were not being handled in 'luaV_finishOp', which completes their task after an yield.
* Default for warnings changed to "off"Roberto Ierusalimschy2019-08-2010-17/+23
| | | | | Warnings are mostly a tool to help developers (e.g., by showing hidden error messages); regular users usually don't need to see them.
* Detail (extra test for warnings when closing state)Roberto Ierusalimschy2019-08-191-0/+11
|
* Improvement in warn-mode '@store' (for testing)Roberto Ierusalimschy2019-08-185-31/+55
| | | | | | When using warn-mode '@store', from the test library, the tests ensure not only that the expected warnings were issued, but also that there was no extra warnings.
* Manual corrected with the new syntax for attributesRoberto Ierusalimschy2019-08-161-5/+5
| | | | | Commit 0d529138042, with the change in the syntax of attributes, did not update the manual accordingly.
* Added macro 'luaL_pushfail'Roberto Ierusalimschy2019-08-1620-154/+176
| | | | | | | | The macro 'luaL_pushfail' documents all places in the standard libraries that return nil to signal some kind of failure. It is defined as 'lua_pushnil'. The manual also got a notation (@fail) to document those returns. The tests were changed to be agnostic regarding whether 'fail' is 'nil' or 'false'.
* Supressed errors in '__close' generate warningsRoberto Ierusalimschy2019-08-1610-43/+164
|
* Added control messages to warningsRoberto Ierusalimschy2019-08-159-49/+161
| | | | | | | Added the concept of control messages to the warning system, plus the implementation of the controls "@on"/"@off" to turn warnings on/off. Moreover, the warning system in the test library adds some other controls to ease the test of warnings.
* Small optimization in 'convergeephemerons'Roberto Ierusalimschy2019-08-121-9/+20
| | | | | | When converging marks on ephemeron tables, change the direction the tables are traversed at each iteration, to try to avoid bad-case scenarios with linked lists of entries in a table.
* Detail in the manual (method 'file:setvbuf')Roberto Ierusalimschy2019-08-121-16/+8
| | | | | ANSI C is vague about 'setvbuf'; most details are implementation defined. So, the manual cannot give any guaranties, either.
* DetailsRoberto Ierusalimschy2019-08-012-8/+13
| | | | | - removed rule about RCS from makefile - comments and nitpicking in 'llex.c'
* Correction in the documentation of 'io.lines'Roberto Ierusalimschy2019-07-312-7/+5
| | | | | | The loop does not end on end of file, but when the iterator function fails to read a value. (In particular, the format "a" never fails, so a loop with 'io.lines(fname, "a")' never ends.)
* Tracebacks recognize metamethods '__close'Roberto Ierusalimschy2019-07-312-4/+20
|
* To-be-closed variables must be closed on initializationRoberto Ierusalimschy2019-07-316-41/+70
| | | | | | | | | When initializing a to-be-closed variable, check whether it has a '__close' metamethod (or is a false value) and raise an error if if it hasn't. This produces more accurate error messages. (The check before closing still need to be done: in the C API, the value is not constant; and the object may lose its '__close' metamethod during the block.)
* Fixed test in 'main.lua'Roberto Ierusalimschy2019-07-301-7/+10
| | | | | | | The test "to-be-closed variables in main chunk" was broken, as it used the removed feature of functions as to-be-closed values. The error was not detected because its expected result had no lines to be checked (due to missing new lines).
* Change in the syntax of attributesRoberto Ierusalimschy2019-07-3011-102/+103
| | | | | | | Attributes changed to posfixed ('x <const>', instead of '<const> x'), and "toclose" renamed to "close". Posfixed attributes seem to make it clearer that it applies to only one variable when there are multiple variables.
* Change in the handling of 'L->top' when calling metamethodsRoberto Ierusalimschy2019-07-2610-29/+75
| | | | | | | 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'.)
* Bug: 'Vardesc' array can be reallocated in 'localstat'Roberto Ierusalimschy2019-07-261-12/+15
| | | | | A reference to a 'Vardesc*' (as done by 'localstat') can be invalidated by the creation of any new variable.
* Small corrections when setting 'L->top'Roberto Ierusalimschy2019-07-254-6/+17
| | | | | | | | | - OP_NEWTABLE can use 'ra + 1' to set top (instead of ci->top); - OP_CLOSE doesn't need to set top ('Protect' already does that); - OP_TFORCALL must use 'ProtectNT', to preserve the top already set. (That was a small bug, because iterators could be called with extra parameters besides the state and the control variable.) - Comments and an extra test for the bug in previous item.
* Some improvements in date/time functionsRoberto Ierusalimschy2019-07-242-41/+100
| | | | | | - Range in date table extended to full 32 bits. - Easier support for times represented as floats. - Added more tests.