aboutsummaryrefslogtreecommitdiff
path: root/testes/events.lua (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Avoid excessive name pollution in test filesRoberto Ierusalimschy2022-12-281-0/+3
| | | | | Test files are more polite regarding the use of globals when locals would do, and when globals are necessary deleting them after use.
* Free bit 7 of GC 'marked' fieldRoberto Ierusalimschy2020-08-071-0/+11
| | | | | | | | Tables were using this bit to indicate their array sizes were real ('isrealasize'), but this bit can be useful for tests. Instead, they can use bit 7 of their 'flag' field for that purpose. (There are only six fast-access metamethods.) This 'flag' field only exists in tables, so this use does not affect other types.
* DetailsRoberto Ierusalimschy2020-02-271-0/+1
| | | | | Several details in code (e.g., moving a variable to the most inner scope that encloses its uses), comments, parameter names, extra tests.
* Comments (mosty typos)Roberto Ierusalimschy2019-12-301-1/+1
|
* Change in the handling of 'L->top' when calling metamethodsRoberto Ierusalimschy2019-07-261-2/+13
| | | | | | | 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'.)
* Keep correct type for immediate operands in comparisonsRoberto Ierusalimschy2019-03-221-54/+45
| | | | | | | | | | | | 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
* 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').
* Removed extra information from RCS keyword strings in testsRoberto Ierusalimschy2018-10-221-1/+1
| | | | | Version numbers and dates (mostly wrong) from RCS keyword strings removed from all test files; only the file name are kept.
* Deprecated the emulation of '__le' using '__lt'Roberto Ierusalimschy2018-08-241-19/+15
| | | | | | | | | | | As hinted in the manual for Lua 5.3, the emulation of the metamethod for '__le' using '__le' has been deprecated. It is slow, complicates the logic, and it is easy to avoid this emulation by defining a proper '__le' function. Moreover, often this emulation was used wrongly, with a programmer assuming that an order is total when it is not (e.g., NaN in floating-point numbers).
* 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/+476