aboutsummaryrefslogtreecommitdiff
path: root/testes/errors.lua (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Wrong assertion in 'getbaseline'Roberto Ierusalimschy2021-03-051-0/+8
| | | | | The assertion cannot compute 'f->abslineinfo[i]' when the initial estimate 'i' is -1.
* Bug (kind of) in 'isinstack'Roberto Ierusalimschy2021-02-251-0/+7
| | | | | | | The function 'isinstack' tried to work around the undefined behavior of subtracting two pointers that do not point to the same object, but the compiler killed to trick. (It optimizes out the safety check, because in a correct execution it will be always true.)
* Better error messages for calling non-callable objectsRoberto Ierusalimschy2020-12-291-1/+13
| | | | | | | 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.
* Added test cases for error messages about goto/labelRoberto Ierusalimschy2020-12-031-0/+21
|
* Avoid GCs when testing stack overflowRoberto Ierusalimschy2020-10-121-6/+14
| | | | | A GC step may invoke some finalizer, which may error and emit a warning due to stack overflfow.
* Revision of stackless implementationRoberto Ierusalimschy2020-10-121-1/+2
| | | | | | - more organized handling of 'nCcalls' - comments - deprecation of 'setcstacklimit'
* Back to a stackless implementationRoberto Ierusalimschy2020-10-121-4/+3
| | | | | | | | | | | | | A "with stack" implementation gains too little in performance to be worth all the noise from C-stack overflows. This commit is almost a sketch, to test performance. There are several pending stuff: - review control of C-stack overflow and error messages; - what to do with setcstacklimit; - review comments; - review unroll of Lua calls.
* Added macro 'luaL_pushfail'Roberto Ierusalimschy2019-08-161-5/+5
| | | | | | | | 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'.
* New function 'setCstacklimit'Roberto Ierusalimschy2019-06-181-6/+10
| | | | | Added new functions to dynamically set the C-stack limit ('lua_setCstacklimit' in the C-API, 'debug.setCstacklimit' in Lua).
* Fixed wrong error message in 'return math.seed(0)'Roberto Ierusalimschy2019-04-041-0/+4
| | | | | | Bug introduced in commit 28d829c8: OP_TAILCALL might raise an error without saving 'pc'. (This commit also fixes a detail in 'testes/uf8.lua'.)
* Better error messages for invalid operands in numeric 'for'Roberto Ierusalimschy2018-10-301-0/+10
| | | | | | "Better" and similar to error messages for invalid function arguments. *old message: 'for' limit must be a number *new message: bad 'for' limit (number expected, got table)
* 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'.
* Fixed bug in line info. when using 'not' operatorRoberto Ierusalimschy2018-07-111-2/+19
| | | | | | | | | When creating code for a jump on a 'not' condition, the code generator was removing an instruction (the OP_NOT) without adjusting its corresponding line information. This fix also added tests for this case and extra functionality in the test library to debug line info. structures.
* Added manual and tests for version 5.4-w2Roberto Ierusalimschy2018-07-091-0/+554