summaryrefslogtreecommitdiff
path: root/testes/db.lua (follow)
Commit message (Collapse)AuthorAgeFilesLines
* DetailsRoberto Ierusalimschy2020-02-271-0/+5
| | | | | Several details in code (e.g., moving a variable to the most inner scope that encloses its uses), comments, parameter names, extra tests.
* Use of 'MMBIN' opcodes extended to shift operatorsRoberto Ierusalimschy2019-08-281-2/+1
| | | | Plus, this commit removes useless 'tm' parameters in 'op_*' macros.
* Added macro 'luaL_pushfail'Roberto Ierusalimschy2019-08-161-3/+3
| | | | | | | | 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'.
* Avoid using addresses of static variables as unique keysRoberto Ierusalimschy2019-07-191-0/+4
| | | | | | The addresses of static variables may be different for different instances of Lua, making these instances incompatible if they use these addresses as unique keys in the registry (or other tables).
* Coroutines do not unwind the stack in case of errorsRoberto Ierusalimschy2019-05-091-4/+10
| | | | | | | | | | | Back to how it was, a coroutine does not unwind its stack in case of errors (and therefore do not close its to-be-closed variables). This allows the stack to be examined after the error. The program can use 'coroutine.kill' to close the variables. The function created by 'coroutine.wrap', however, closes the coroutine's variables in case of errors, as it is impossible to examine the stack any way.
* Keep correct type for immediate operands in comparisonsRoberto Ierusalimschy2019-03-221-1/+1
| | | | | | | | | | | | 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 semantics for the integer 'for' loopRoberto Ierusalimschy2019-03-191-1/+1
| | | | | | | | | | | The numerical 'for' loop over integers now uses a precomputed counter to control its number of iteractions. This change eliminates several weird cases caused by overflows (wrap-around) in the control variable. (It also ensures that every integer loop halts.) Also, the special opcodes for the usual case of step==1 were removed. (The new code is already somewhat complex for the usual case, but efficient.)
* A to-be-closed variable must have a closable value (or be nil)Roberto Ierusalimschy2018-11-291-10/+10
| | | | | | | It is an error for a to-be-closed variable to have a non-closable non-nil value when it is being closed. This situation does not seem to be useful and often hints to an error. (Particularly in the C API, it is easy to change a to-be-closed index by mistake.)
* Added opcodes for arithmetic with K operandsRoberto Ierusalimschy2018-11-231-0/+2
| | | | | | | | Added opcodes for all seven arithmetic operators with K operands (that is, operands that are numbers in the array of constants of the function). They cover the cases of constant float operands (e.g., 'x + .0.0', 'x^0.5') and large integer operands (e.g., 'x % 10000').
* Complete implementation of to-be-closed variablesRoberto Ierusalimschy2018-10-221-5/+4
|
* Added directory to test file names in '$Id:'Roberto Ierusalimschy2018-07-251-1/+1
| | | | | | | From the point of view of 'git', all names are relative to the root directory of the project. So, file names in '$Id:' also should be relative to that directory: the proper name for test file 'all.lua' is 'testes/all.lua'.
* Added manual and tests for version 5.4-w2Roberto Ierusalimschy2018-07-091-0/+948