summaryrefslogtreecommitdiff
path: root/ljumptab.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* 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-2/+0
| | | | | | | | | | | 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.)
* Some bugs with stack reallocation by 'luaF_close'Roberto Ierusalimschy2018-11-241-1/+1
| | | | | | | (Long time without testing with '-DHARDSTACKTESTS'...) With the introduction of to-be-closed variables, calls to 'luaF_close' can move the stack, but some call sites where keeping pointers to the stack without correcting them.
* Added opcodes for arithmetic with K operandsRoberto Ierusalimschy2018-11-231-0/+7
| | | | | | | | 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').
* More uniformity in code generation for 'for' loopsRoberto Ierusalimschy2018-10-261-0/+1
| | | | | | | Added new instruction 'OP_TFORPREP' to prepare a generic for loop. Currently it is equivalent to a jump (but with a format 'iABx', similar to other for-loop preparing instructions), but soon it will be the place to create upvalues for closing loop states.
* Towards "to closed" local variablesRoberto Ierusalimschy2018-10-081-0/+1
| | | | | | | | | | | | Start of the implementation of "scoped variables" or "to be closed" variables, local variables whose '__close' (or themselves) are called when they go out of scope. This commit implements the syntax, the opcode, and the creation of the corresponding upvalue, but it still does not call the finalizations when the variable goes out of scope (the most important part). Currently, the syntax is 'local scoped name = exp', but that will probably change.
* Removed extra information from RCS keyword stringsRoberto Ierusalimschy2018-08-231-1/+1
| | | | | Version numbers and dates (mostly wrong) from RCS keyword strings removed from all source files; only the file name are kept.
* Added missing $Id$ to file 'ljumptab.h'Roberto Ierusalimschy2018-07-101-0/+7
|
* no more nil-in-tableRoberto Ierusalimschy2018-04-041-2/+0
|
* details (avoid using non-C89 '//' comment)Roberto Ierusalimschy2018-03-071-5/+6
|
* new experimental syntax using reserved word 'undef'Roberto Ierusalimschy2018-03-071-0/+2
|
* Jump Table for the interpreterRoberto Ierusalimschy2018-03-021-0/+98