Roberto Ierusalimschy
6eb53b7526
Details
Several details in code (e.g., moving a variable to the most inner
scope that encloses its uses), comments, parameter names, extra tests.
5 years ago
Roberto Ierusalimschy
40d8832ee0
Simplification in the call to 'constfolding'
5 years ago
Roberto Ierusalimschy
d6af81084d
New kind of expression VKSTR
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).
5 years ago
Roberto Ierusalimschy
758c1ef445
Unification of size representation in OP_NEWTABLE and OP_SETLIST
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).
5 years ago
Roberto Ierusalimschy
1fb4d53925
OP_NEWTABLE keeps exact size of arrays
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.)
5 years ago
Roberto Ierusalimschy
f6aab3ec1f
First implementation of constant propagation
Local constant variables initialized with compile-time constants
are optimized away from the code.
5 years ago
Roberto Ierusalimschy
54f7b46c1e
New implementation for constants
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.
5 years ago
Roberto Ierusalimschy
8eca21c2e8
First take on constant propagation
5 years ago
Roberto Ierusalimschy
a006514ea1
Big revamp in the implmentation of labels/gotos
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.
6 years ago
Roberto Ierusalimschy
f99509581e
Removed extra information from RCS keyword strings
Version numbers and dates (mostly wrong) from RCS keyword strings
removed from all source files; only the file name are kept.
6 years ago
Roberto Ierusalimschy
03c6a05ec8
no more nil-in-table
7 years ago
Roberto Ierusalimschy
6486762463
missing LUAI_FUNC in prototype for 'luaK_patchgoto'
7 years ago
Roberto Ierusalimschy
4a1612ff9b
new experimental syntax using reserved word 'undef'
7 years ago
Roberto Ierusalimschy
ab07005568
new auxiliary function 'luaK_isKint' + removal of 'luaK_needclose',
which was not being used anywhere.
7 years ago
Roberto Ierusalimschy
10b8c99bbb
small peephole optimizations
7 years ago
Roberto Ierusalimschy
a1ef58b3a5
eplicit 1-bit opcode operand 'k'
7 years ago
Roberto Ierusalimschy
722bdbe17d
no more 'getBMode'-'getCMode' (imprecise + we will need more space
for op mode) + better control of op modes
7 years ago
Roberto Ierusalimschy
80d9b09f35
jumps do not close upvalues (to be faster and simpler);
explicit instruction to close upvalues; command 'break' not
handled like a 'goto' (to optimize removal of uneeded 'close'
instructions)
7 years ago
Roberto Ierusalimschy
6a98aa0bb0
new opcode LOADI (for loading immediate integers)
8 years ago
Roberto Ierusalimschy
1f259be52a
'getcode' -> 'getinstruction'
9 years ago
Roberto Ierusalimschy
1ea2d20f74
first implementation of '<<', '>>', and '~' (bitwise not)
11 years ago
Roberto Ierusalimschy
c0edab0f6d
first implementation of bitwise operators '&' (band), '|' (bor),
and '~' (bxor)
11 years ago
Roberto Ierusalimschy
a948054a19
new order for binary operations (grouping them by type of result)
11 years ago
Roberto Ierusalimschy
a2f5c28a80
new operation '//' (integer division)
12 years ago
Roberto Ierusalimschy
5951c79ae1
default increment for 'for' loop is an integer (1, not 1.0)
12 years ago
Roberto Ierusalimschy
ca458f1f52
'luaK_goiffalse' exported
13 years ago
Roberto Ierusalimschy
427ee519db
new instruction OP_LOADKX (to replace OP_LOADK with extra argument)
14 years ago
Roberto Ierusalimschy
dd547c55c8
new scheme to close upvalues in 'break'; jump instructions may
do the close, avoiding the need for a OP_CLOSE instruction
14 years ago
Roberto Ierusalimschy
6a02bbe1e2
better organization for fields in struct 'expdesc'
15 years ago
Roberto Ierusalimschy
c066ac10a9
better line numbers for function calls and unary/binary operators +
null statement + no more "ambiguous syntax" restriction
15 years ago
Roberto Ierusalimschy
0fe2576a39
new instructions to optimize indexing on upvalues
15 years ago
Roberto Ierusalimschy
fcc46467fa
limit of constants per function changed to 2^26 using extra arguments
to opcodes LOADK, GETGLOBAL, and SETGLOBAL
15 years ago
Roberto Ierusalimschy
d7872dcf91
small optimization (reorder of BinOpr enum to unify some cases
in switches)
16 years ago
Roberto Ierusalimschy
2598138ece
new function 'luaK_codek' (detail)
16 years ago
Roberto Ierusalimschy
9e58e0df8f
some cleaning
16 years ago
Roberto Ierusalimschy
e1dda047b2
unused macro
19 years ago
Roberto Ierusalimschy
e43e95553f
more privacy
19 years ago
Roberto Ierusalimschy
6dd0c6ccbc
numeral expressions keep their values in struct 'expdesc'
19 years ago
Roberto Ierusalimschy
3b19af44b0
new method to handle tests without values (negative values)
19 years ago
Roberto Ierusalimschy
f21e9c172f
details
20 years ago
Roberto Ierusalimschy
8718fda9b2
added LUAI_FUNC to functions not in the API
20 years ago
Roberto Ierusalimschy
04bbd01171
new operation *t (for size of t) (may yet be removed...)
20 years ago
Roberto Ierusalimschy
7d57ea70bc
new `mod' (`%') operator
20 years ago
Roberto Ierusalimschy
5ee87acd6b
small optimization for boolean constants + new format for SETLIST opcode
20 years ago
Roberto Ierusalimschy
616438fe9a
new way to use `vararg' parameters (with `...')
21 years ago
Roberto Ierusalimschy
73517e86b0
OP_TFORLOOP uses extra stack space
22 years ago
Roberto Ierusalimschy
0052930ffe
details
23 years ago
Roberto Ierusalimschy
b55fded18c
details about jump optimization
23 years ago
Roberto Ierusalimschy
2dadc81822
cleaner implementation of code generation for jumps
23 years ago
Roberto Ierusalimschy
b487975344
optimization for `while' (first version)
23 years ago