aboutsummaryrefslogtreecommitdiff
path: root/testes/db.lua (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Another way to compile goto'sRoberto Ierusalimschy2025-01-101-1/+1
| | | | | | | | | | | | The compilation of a goto or a label just create an entry and generate boilerplate code for the gotos. As we don't know yet whether it needs a CLOSE, we code a jump followed by a CLOSE, which is then dead code. When a block ends (and then we know for sure whether there are variables that need to be closed), we check the goto's against the labels of that block. When closing a goto against a label, if it needs a CLOSE, the compiler swaps the order of the jump and the CLOSE, making the CLOSE active.
* Debug information about extra arguments from __callRoberto Ierusalimschy2024-11-191-0/+3
| | | | | | 'debug.getinfo' can return number of extra arguments added to a call by a chain of __call metavalues. That information is being used to improve error messages about errors in these extra arguments.
* Bug: Active-lines for stripped vararg functionsRoberto Ierusalimschy2024-06-041-0/+9
| | | | | Lua seg. faults when asked to create the 'activelines' table for a vararg function with no debug information.
* More control over encoding of test filesRoberto Ierusalimschy2023-08-171-3/+3
| | | | | The few UTF-8 test files are commented as such, and there is only one non UTF-8 test file (to test non UTF-8 sources).
* Small improvements in testsRoberto Ierusalimschy2023-05-151-1/+1
|
* Avoid excessive name pollution in test filesRoberto Ierusalimschy2022-12-281-9/+18
| | | | | Test files are more polite regarding the use of globals when locals would do, and when globals are necessary deleting them after use.
* Fix debug information about finalizersRoberto Ierusalimschy2021-12-141-1/+1
| | | | | | The flag CIST_FIN does not mark a finalizer, but the function that was running when the finalizer was called. (So, the function did not call the finalizer, but it looks that way in the stack.)
* Wrong assert in 'collectvalidlines'Roberto Ierusalimschy2021-11-251-1/+1
|
* Avoid OP_VARARGPREP for active linesRoberto Ierusalimschy2021-11-101-0/+43
| | | | | when building the table 'activelines' for a vararg function, this first instruction does not make the first line active.
* Bug: cannot allow the call 'debug.getinfo(0, ">")'Roberto Ierusalimschy2021-02-151-0/+1
| | | | | | A 'what' argument starting with '>' indicates that there is a function in the C stack, which won't be there if the first argument is not a function.
* Better error messages for calling non-callable objectsRoberto Ierusalimschy2020-12-291-2/+4
| | | | | | | When available, use the calling code to find a suitable name for what was being called; this is particularly useful for errors of non-callable metamethods. This commit also improved the debug information for order metamethods.
* Fixed wrong trace of vararg functionsRoberto Ierusalimschy2020-10-191-0/+10
| | | | | Trace of vararg functions was skipping an instruction when returning from a call. (Bug introduced by commit 5d8ce05b3.)
* Fixed bug: line hooks in stripped functionsRoberto Ierusalimschy2020-07-271-1/+18
| | | | | Line-hook handling was accessing debug info. without checking whether it was present.
* 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