Roberto Ierusalimschy
81489beea1
functions may use many upvalues, to keep global values.
27 years ago
Roberto Ierusalimschy
45ccb0e881
"nupvalues" is kept in Closure, not in prototype (as a preparation
for C closures...)
27 years ago
Roberto Ierusalimschy
4be18fa889
details
27 years ago
Roberto Ierusalimschy
7c261a13b5
more uniform treatment to opcode variants.
27 years ago
Roberto Ierusalimschy
f6a9cc9a67
jumps are relative to next instruction
27 years ago
Roberto Ierusalimschy
28d47a0aaa
all jumps have byte variants; WHILE optimization
27 years ago
Roberto Ierusalimschy
a580480b07
new implementation for globals: Global value is stored in TaggedString
28 years ago
Roberto Ierusalimschy
0dd6d1080e
new opcode variants.
28 years ago
Roberto Ierusalimschy
d6c867ea50
better way to cope with opcode variants
28 years ago
Roberto Ierusalimschy
2079cfe8fa
new way to code globals, using const table instead of putting global
index inside the opcode.
28 years ago
Roberto Ierusalimschy
dfe03c7abe
small optimizations (bit scrubbing)
28 years ago
Roberto Ierusalimschy
8cd67ac676
Syntax analizer and code generator
28 years ago
Roberto Ierusalimschy
dd1aa28390
small optimization in opcodes for "and" and "or"
28 years ago
Roberto Ierusalimschy
abbf14cd32
small optimizations; try to find previous use when coding a real constant.
28 years ago
Roberto Ierusalimschy
0892f0e5b7
BIG CHANGE: functions have their own "constant table".
28 years ago
Roberto Ierusalimschy
2c580a0afb
new way to handle global state during compilation.
28 years ago
Roberto Ierusalimschy
a38f093f05
luaI_initTFunc initializes fileName.
28 years ago
Roberto Ierusalimschy
373363cb69
new name for old "mem.h" (conflicts with some compiler libraries)
28 years ago
Roberto Ierusalimschy
b8af9c56c9
new form for constructors: {[exp] = exp, ...}
28 years ago
Roberto Ierusalimschy
0b110f7922
small syntax error (yacc does not complain, but bison does).
28 years ago
Roberto Ierusalimschy
1143bf9286
better check when converting from float to int, to avoid overflow
(on some machines it may result in run-time error)
28 years ago
Roberto Ierusalimschy
f00d692445
small correction to avoid "wrong" default action
28 years ago
Roberto Ierusalimschy
a0e9bfbb48
syntax error function is in "lex.c" (it has the token)
28 years ago
Roberto Ierusalimschy
0af581f0bf
new way to handle pragmas (at the lexical level, instead of parsing).
29 years ago
Roberto Ierusalimschy
7b8166d7b3
a chunk may end with a return.
29 years ago
Roberto Ierusalimschy
7614b17e85
very small corrections
29 years ago
Roberto Ierusalimschy
9863223fbf
first version of vararg facility (plus new function "call").
29 years ago
Roberto Ierusalimschy
9284742a11
better control when growing arrays.
29 years ago
Roberto Ierusalimschy
621322a305
"PrintCode" now is defined in luac.
29 years ago
Roberto Ierusalimschy
d6e4c29733
fixed strings (not collectable) don't need to be inserted in the constant table.
29 years ago
Roberto Ierusalimschy
f935d3397e
check if jump is bigger than 2^16.
29 years ago
Roberto Ierusalimschy
45cf24485d
useless #include.
29 years ago
Roberto Ierusalimschy
0f4903a5d7
new header "lex.h".
29 years ago
Roberto Ierusalimschy
41259bff31
BIG CHANGE: new data structure for constants, strings and globals, using
an array of hash tables for all them.
29 years ago
Roberto Ierusalimschy
5a3a1fe458
debug interface functions to manipulated local variables:
"lua_getlocal" and "lua_setlocal".
29 years ago
Roberto Ierusalimschy
1431b52e76
improve of compiling error messages.
29 years ago
Roberto Ierusalimschy
2998049f51
local variable stack needs only the name of the variable (TreeNode);
this way is simpler and faster than old way.
29 years ago
Roberto Ierusalimschy
24ccc7c038
correction of some order dependencies in debug code.
29 years ago
Roberto Ierusalimschy
9d9f9c48ff
local variables may appear inside blocks in main code.
29 years ago
Roberto Ierusalimschy
15d48576ea
functions now may be declared with any "var" as a name;
therefore they do not have a "baptism" name.
Changes in debug API to acomodate that.
29 years ago
Roberto Ierusalimschy
39b071f7b1
new syntax for function declarations: "function a.x () ... "
new semantics for function declarations: function f () is valid only
at run-time.
29 years ago
Roberto Ierusalimschy
9efc257d9d
new method to keep debug line information: current line is stored on the
Lua stack, just below (new) base, with tag LUA_T_LINE.
SETLINE opcodes are generated by lex.
29 years ago
Roberto Ierusalimschy
2cffb08a5c
new style for debug information about functions: no more SETFUNCTION
opcodes. When a function is called, its entry in the stack is marked with
LUA_T_(C)MARK, so function 'luaD_stackedfunction' can find it if
needed.
Functions now have their file names in the headers, so there is no need
of 'addfile' and the like.
29 years ago
Roberto Ierusalimschy
68f337dfa6
Garbage collection of functions + header structure for functions
30 years ago
Roberto Ierusalimschy
97b2fd1ba1
syntax for {...;...} is more flexible now.
30 years ago
Waldemar Celes
8156604823
run-time stack now is controled at run time, instead of
compilation time.
30 years ago
Roberto Ierusalimschy
f4591397da
strdup is done via mem.c to control its memory allocation
30 years ago
Waldemar Celes
a8220feed2
bytecodes are indexed by integers, not Words, to allow bigger code on 32 bit machines
30 years ago
Waldemar Celes
8bc4b0d741
routines are defined before rules, to allow correct compilation with bison
30 years ago
Roberto Ierusalimschy
8cb8594a3b
better control of integer types and their limits
30 years ago