Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Fixed small issue with constant propagation | Roberto Ierusalimschy | 2019-07-17 | 1 | -3/+15 |
| | | | | | | | | Constants directly assigned to other constants were not propagating: For instance, in local <const> k1 = 10 local <const> k2 = k1 'k2' were not treated as a compile-time constant. | ||||
* | New kind of expression VKSTR | Roberto Ierusalimschy | 2019-07-17 | 1 | -10/+25 |
| | | | | | | | String literal expressions have their own kind VKSTR, instead of the generic VK. This allows strings to "cross" functions without entering their constant tables (e.g., if they are used only by some nested function). | ||||
* | Micro optimization in OP_RETURN and OP_TAILCALL | Roberto Ierusalimschy | 2019-07-16 | 1 | -4/+4 |
| | | | | | Many functions are vararg but create no upvalues, so it is better to separate the tests for these two kinds of "extra work". | ||||
* | Unification of size representation in OP_NEWTABLE and OP_SETLIST | Roberto Ierusalimschy | 2019-07-15 | 1 | -12/+28 |
| | | | | | | Opcodes OP_NEWTABLE and OP_SETLIST use the same representation to store the size of the array part of a table. This new representation can go up to 2^33 (8 + 25 bits). | ||||
* | OP_NEWTABLE keeps exact size of arrays | Roberto Ierusalimschy | 2019-07-12 | 1 | -3/+3 |
| | | | | | | OP_NEWTABLE is followed by an OP_EXTRAARG, so that it can keep the exact size of the array part of the table to be created. (Functions 'luaO_int2fb'/'luaO_fb2int' were removed.) | ||||
* | First implementation of constant propagation | Roberto Ierusalimschy | 2019-07-12 | 1 | -1/+55 |
| | | | | | Local constant variables initialized with compile-time constants are optimized away from the code. | ||||
* | Towards constant propagation | Roberto Ierusalimschy | 2019-07-10 | 1 | -2/+2 |
| | | | | | | | This commit detaches the number of active variables from the number of variables in the stack, during compilation. Soon, compile-time constants will be propagated and therefore will not exist during run time (in the stack). | ||||
* | New implementation for constants | Roberto Ierusalimschy | 2019-07-09 | 1 | -47/+13 |
| | | | | | | | | | VLOCAL expressions keep a reference to their corresponding 'Vardesc', and 'Upvaldesc' (for upvalues) has a field 'ro' (read-only). So, it is easier to check whether a variable is read-only. The decoupling in VLOCAL between 'vidx' ('Vardesc' index) and 'sidx' (stack index) should also help the forthcoming implementation of compile-time constant propagation. | ||||
* | First take on constant propagation | Roberto Ierusalimschy | 2019-07-01 | 1 | -14/+48 |
| | |||||
* | First implementation for 'const' variables | Roberto Ierusalimschy | 2019-05-17 | 1 | -15/+21 |
| | | | | | A variable can be declared const, which means it cannot be assigned to, with the syntax 'local <const> name = exp'. | ||||
* | Keep correct type for immediate operands in comparisons | Roberto Ierusalimschy | 2019-03-22 | 1 | -19/+23 |
| | | | | | | | | | | | | 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 operands | Roberto Ierusalimschy | 2018-11-23 | 1 | -53/+73 |
| | | | | | | | | 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'). | ||||
* | Big revamp in the implmentation of labels/gotos | Roberto Ierusalimschy | 2018-10-29 | 1 | -34/+0 |
| | | | | | | | | Added restriction that, when a label is created, there cannot be another label with the same name visible. That allows backward goto's to be resolved when they are read. Backward goto's get a close if they jump out of the scope of some variable; labels get a close only if previous goto to it jumps out of the scope of some upvalue. | ||||
* | Towards "to closed" local variables | Roberto Ierusalimschy | 2018-10-08 | 1 | -2/+2 |
| | | | | | | | | | | | | 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. | ||||
* | Fixed bug in line info. when using 'not' operator | Roberto Ierusalimschy | 2018-07-11 | 1 | -23/+53 |
| | | | | | | | | | 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. | ||||
* | no more nil-in-table | Roberto Ierusalimschy | 2018-04-04 | 1 | -52/+3 |
| | |||||
* | FALLTHROUGH comment must be last "statement" | Roberto Ierusalimschy | 2018-03-16 | 1 | -3/+2 |
| | | | | (so it does not work when inside a block) | ||||
* | new experimental syntax using reserved word 'undef' | Roberto Ierusalimschy | 2018-03-07 | 1 | -3/+60 |
| | |||||
* | better names for macros for tags and types. | Roberto Ierusalimschy | 2018-02-26 | 1 | -2/+2 |
| | | | | | rttype -> rawtt; ttyperaw -> withvariant; ttype -> ttypetag; tnov -> ttype | ||||
* | new opcodes OP_GTI/OP_GEI | Roberto Ierusalimschy | 2018-02-21 | 1 | -18/+12 |
| | |||||
* | small reorganization of 'luaV_flttointeger'/'luaV_tointeger' | Roberto Ierusalimschy | 2018-02-21 | 1 | -4/+2 |
| | |||||
* | correct way to check stack space for vararg functions | Roberto Ierusalimschy | 2018-02-17 | 1 | -2/+2 |
| | |||||
* | some simplifications/optimizations in returns from Lua functions | Roberto Ierusalimschy | 2018-02-15 | 1 | -14/+18 |
| | |||||
* | vararg back to '...' (but with another implementation) | Roberto Ierusalimschy | 2018-02-09 | 1 | -13/+13 |
| | | | | new implementation should have zero overhead for non-vararg functions | ||||
* | janitor work on casts | Roberto Ierusalimschy | 2018-01-28 | 1 | -2/+2 |
| | |||||
* | OP_CONCAT does not move its result (to simplify its execution) | Roberto Ierusalimschy | 2018-01-27 | 1 | -32/+52 |
| | |||||
* | comments | Roberto Ierusalimschy | 2018-01-18 | 1 | -11/+13 |
| | |||||
* | keep more opcode arguments byte-aligned | Roberto Ierusalimschy | 2018-01-09 | 1 | -6/+6 |
| | |||||
* | assert cannot use instruction after the last | Roberto Ierusalimschy | 2017-12-22 | 1 | -2/+2 |
| | |||||
* | new macros 'isOT'/'isIT' | Roberto Ierusalimschy | 2017-12-22 | 1 | -7/+7 |
| | | | | | (plus exchanged parameters of OP_VARARG to make it similar to other 'isOT' instructions) | ||||
* | new auxiliary function 'luaK_isKint' + removal of 'luaK_needclose', | Roberto Ierusalimschy | 2017-12-18 | 1 | -16/+10 |
| | | | | which was not being used anywhere. | ||||
* | some cleaning on signed opcode parameters | Roberto Ierusalimschy | 2017-12-15 | 1 | -12/+32 |
| | |||||
* | 'VRELOCABLE' -> 'VRELOC' | Roberto Ierusalimschy | 2017-12-14 | 1 | -16/+16 |
| | |||||
* | new opcodes BANDK/BORK/BXORK. (They do not use immediate operands | Roberto Ierusalimschy | 2017-12-13 | 1 | -10/+42 |
| | | | | | 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 | -14/+55 |
| | |||||
* | warnings from Visual Studio /W3 | Roberto Ierusalimschy | 2017-11-30 | 1 | -2/+2 |
| | |||||
* | small peephole optimizations | Roberto Ierusalimschy | 2017-11-30 | 1 | -38/+53 |
| | |||||
* | new opcodes OP_RETURN0/OP_RETURN1 | Roberto Ierusalimschy | 2017-11-29 | 1 | -2/+12 |
| | |||||
* | order opcodes cannot use 'K' operands | Roberto Ierusalimschy | 2017-11-28 | 1 | -2/+2 |
| | |||||
* | using register 'k' for conditions in tests (we only need one bit there) | Roberto Ierusalimschy | 2017-11-28 | 1 | -36/+58 |
| | |||||
* | detail (typo in comments) | Roberto Ierusalimschy | 2017-11-23 | 1 | -2/+2 |
| | |||||
* | using 'A' for register instead of 'B' in relational opcodes | Roberto Ierusalimschy | 2017-11-22 | 1 | -5/+5 |
| | | | | ('R(A)' is already created by default for all instructions.) | ||||
* | new opcode 'OP_EQI' for equality with immediate numbers | Roberto Ierusalimschy | 2017-11-22 | 1 | -22/+51 |
| | |||||
* | new instruction 'OP_EQK' (for equality with constants) | Roberto Ierusalimschy | 2017-11-16 | 1 | -11/+44 |
| | |||||
* | new function 'luaV_flttointeger' to convert floats to integers (without | Roberto Ierusalimschy | 2017-11-08 | 1 | -3/+3 |
| | | | | | string coercions) + string operands to bitwise operations handled by string metamethods | ||||
* | new format for JUMP instructions (to allow larger offsets) | Roberto Ierusalimschy | 2017-11-07 | 1 | -10/+25 |
| | |||||
* | eplicit 1-bit opcode operand 'k' | Roberto Ierusalimschy | 2017-10-04 | 1 | -29/+45 |
| | |||||
* | new opcodes with immediate integer operand for all arithmetic operations | Roberto Ierusalimschy | 2017-10-04 | 1 | -19/+52 |
| | |||||
* | string constants (Kstr) must fit into 'B' register | Roberto Ierusalimschy | 2017-10-02 | 1 | -2/+2 |
| | |||||
* | avoid the use of bit 'Bk' ('B' will lose this bit soon) | Roberto Ierusalimschy | 2017-10-01 | 1 | -4/+4 |
| |