Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Keep correct type for immediate operands in comparisons | Roberto Ierusalimschy | 2019-03-22 | 1 | -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' loop | Roberto Ierusalimschy | 2019-03-19 | 1 | -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.) | ||||
* | Added opcodes for arithmetic with K operands | Roberto Ierusalimschy | 2018-11-23 | 1 | -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' loops | Roberto Ierusalimschy | 2018-10-26 | 1 | -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 variables | Roberto Ierusalimschy | 2018-10-08 | 1 | -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 strings | Roberto Ierusalimschy | 2018-08-23 | 1 | -1/+1 |
| | | | | | Version numbers and dates (mostly wrong) from RCS keyword strings removed from all source files; only the file name are kept. | ||||
* | Opcode names moved to a new header file | Roberto Ierusalimschy | 2018-07-09 | 1 | -87/+1 |
| | | | | | | | The array with the names of the opcodes was moved to a header file ('lopnames.h'), as it is not used by the Lua kernel. Files that need that array ('luac.c' and 'ltests.c') include the header file to get a private (static) copy. | ||||
* | no need to define 'luaP_opnames' in regular builds | Roberto Ierusalimschy | 2018-04-19 | 1 | -1/+5 |
| | |||||
* | no more nil-in-table | Roberto Ierusalimschy | 2018-04-04 | 1 | -5/+1 |
| | |||||
* | new experimental syntax using reserved word 'undef' | Roberto Ierusalimschy | 2018-03-07 | 1 | -1/+5 |
| | |||||
* | new opcodes OP_GTI/OP_GEI | Roberto Ierusalimschy | 2018-02-21 | 1 | -1/+5 |
| | |||||
* | some simplifications/optimizations in returns from Lua functions | Roberto Ierusalimschy | 2018-02-15 | 1 | -3/+1 |
| | |||||
* | vararg back to '...' (but with another implementation) | Roberto Ierusalimschy | 2018-02-09 | 1 | -1/+3 |
| | | | | new implementation should have zero overhead for non-vararg functions | ||||
* | new opcode 'PREPVARARG' | Roberto Ierusalimschy | 2018-02-07 | 1 | -1/+3 |
| | | | | (avoids test for vararg function in all function calls) | ||||
* | new macros 'isOT'/'isIT' | Roberto Ierusalimschy | 2017-12-22 | 1 | -76/+76 |
| | | | | | (plus exchanged parameters of OP_VARARG to make it similar to other 'isOT' instructions) | ||||
* | new opcodes 'FORLOOP1'/'FORPREP1' for "basic for" (integer variable | Roberto Ierusalimschy | 2017-12-18 | 1 | -1/+5 |
| | | | | with increment of 1) | ||||
* | new opcodes BANDK/BORK/BXORK. (They do not use immediate operands | Roberto Ierusalimschy | 2017-12-13 | 1 | -1/+7 |
| | | | | | because, too often, masks in bitwise operations are integers larger than one byte.) | ||||
* | new opcodes OP_SHLI/OP_SHRI | Roberto Ierusalimschy | 2017-12-04 | 1 | -1/+5 |
| | |||||
* | new opcodes OP_RETURN0/OP_RETURN1 | Roberto Ierusalimschy | 2017-11-29 | 1 | -1/+5 |
| | |||||
* | new opcodes 'OP_LTI' and 'OP_LEI' | Roberto Ierusalimschy | 2017-11-27 | 1 | -1/+5 |
| | |||||
* | new opcode 'OP_EQI' for equality with immediate numbers | Roberto Ierusalimschy | 2017-11-22 | 1 | -1/+3 |
| | |||||
* | new instruction 'OP_EQK' (for equality with constants) | Roberto Ierusalimschy | 2017-11-16 | 1 | -1/+3 |
| | |||||
* | new format for JUMP instructions (to allow larger offsets) | Roberto Ierusalimschy | 2017-11-07 | 1 | -2/+2 |
| | |||||
* | new opcodes with immediate integer operand for all arithmetic operations | Roberto Ierusalimschy | 2017-10-04 | 1 | -1/+13 |
| | |||||
* | no more 'getBMode'-'getCMode' (imprecise + we will need more space | Roberto Ierusalimschy | 2017-09-28 | 1 | -59/+57 |
| | | | | for op mode) + better control of op modes | ||||
* | binary operators use R instead of RK | Roberto Ierusalimschy | 2017-09-26 | 1 | -16/+16 |
| | | | | | faster + nobody uses RK(B), so B can be smaller (freeing one bit for more opcodes, soon) | ||||
* | new opcode OP_LOADF (load immediate float) | Roberto Ierusalimschy | 2017-09-19 | 1 | -1/+3 |
| | |||||
* | detail (keep OP_LOADK and OP_LOADKX together) | Roberto Ierusalimschy | 2017-09-15 | 1 | -3/+3 |
| | |||||
* | jumps do not close upvalues (to be faster and simpler); | Roberto Ierusalimschy | 2017-09-13 | 1 | -2/+4 |
| | | | | | | explicit instruction to close upvalues; command 'break' not handled like a 'goto' (to optimize removal of uneeded 'close' instructions) | ||||
* | jumps in 'for' loops don't need to be signed | Roberto Ierusalimschy | 2017-08-14 | 1 | -4/+4 |
| | |||||
* | 'OP_VARARG' has the vararg parameter as an operand | Roberto Ierusalimschy | 2017-06-29 | 1 | -2/+2 |
| | |||||
* | new opcodes for table access with constant keys (strings and integers) | Roberto Ierusalimschy | 2017-04-28 | 1 | -5/+13 |
| | |||||
* | new opcode OP_ADDI (for immediate integer operand) (Experimental) | Roberto Ierusalimschy | 2017-04-26 | 1 | -1/+3 |
| | |||||
* | new opcode LOADI (for loading immediate integers) | Roberto Ierusalimschy | 2017-04-20 | 1 | -1/+3 |
| | |||||
* | includes 'stddef.h' (as it uses NULL) | Roberto Ierusalimschy | 2015-01-05 | 1 | -1/+3 |
| | |||||
* | added include for 'lprefix.h', for stuff that must be added before | Roberto Ierusalimschy | 2014-11-02 | 1 | -2/+3 |
| | | | | any other header file | ||||
* | first implementation of '<<', '>>', and '~' (bitwise not) | Roberto Ierusalimschy | 2013-12-30 | 1 | -1/+7 |
| | |||||
* | first implementation of bitwise operators '&' (band), '|' (bor), | Roberto Ierusalimschy | 2013-12-18 | 1 | -1/+7 |
| | | | | and '~' (bxor) | ||||
* | new order for binary operations (grouping them by type of result) | Roberto Ierusalimschy | 2013-12-16 | 1 | -5/+5 |
| | |||||
* | new operation '//' (integer division) | Roberto Ierusalimschy | 2013-04-26 | 1 | -1/+3 |
| | |||||
* | details (header comments) | Roberto Ierusalimschy | 2012-05-14 | 1 | -1/+2 |
| | |||||
* | change in opcode OP_LOADNIL: B is used as a counter instead of a | Roberto Ierusalimschy | 2011-04-19 | 1 | -2/+2 |
| | | | | | register. (Avoids an assignment to R(B), not present in any other instruction.) | ||||
* | small corrections in description of OP_TEST and OP_LOADKX | Roberto Ierusalimschy | 2011-04-12 | 1 | -3/+3 |
| | |||||
* | new instruction OP_LOADKX (to replace OP_LOADK with extra argument) | Roberto Ierusalimschy | 2011-04-07 | 1 | -1/+3 |
| | |||||
* | no more 'OP_CLOSE' instructions (use jumps to close upvalues) | Roberto Ierusalimschy | 2011-02-07 | 1 | -3/+1 |
| | |||||
* | details in opcode list | Roberto Ierusalimschy | 2010-10-13 | 1 | -3/+3 |
| | |||||
* | first version of _ENV; no more global variables | Roberto Ierusalimschy | 2010-03-12 | 1 | -5/+1 |
| | |||||
* | new instructions to optimize indexing on upvalues | Roberto Ierusalimschy | 2010-02-26 | 1 | -1/+5 |
| | |||||
* | new macros 'LUAI_DDEC'/'LUAI_DDEF' to better control declarations and | Roberto Ierusalimschy | 2009-11-19 | 1 | -3/+3 |
| | | | | definitions of non-static variables | ||||
* | generic for coded as two dedicated instructions to simplify resumption | Roberto Ierusalimschy | 2008-10-30 | 1 | -3/+5 |
| |