1
0
mirror of https://github.com/lua/lua.git synced 2025-01-28 06:03:00 +08:00

82 Commits

Author SHA1 Message Date
Roberto Ierusalimschy
e78cf96c97 first version of Cclosures. 1997-10-24 15:17:24 -02:00
Roberto Ierusalimschy
81489beea1 functions may use many upvalues, to keep global values. 1997-10-18 14:46:39 -02:00
Roberto Ierusalimschy
45ccb0e881 "nupvalues" is kept in Closure, not in prototype (as a preparation
for C closures...)
1997-10-16 08:59:34 -02:00
Roberto Ierusalimschy
4be18fa889 details 1997-10-15 18:16:00 -02:00
Roberto Ierusalimschy
7c261a13b5 more uniform treatment to opcode variants. 1997-10-13 20:12:04 -02:00
Roberto Ierusalimschy
f6a9cc9a67 jumps are relative to next instruction 1997-10-06 12:51:11 -02:00
Roberto Ierusalimschy
28d47a0aaa all jumps have byte variants; WHILE optimization 1997-10-01 17:05:34 -03:00
Roberto Ierusalimschy
a580480b07 new implementation for globals: Global value is stored in TaggedString 1997-09-26 12:02:26 -03:00
Roberto Ierusalimschy
0dd6d1080e new opcode variants. 1997-09-24 16:43:11 -03:00
Roberto Ierusalimschy
d6c867ea50 better way to cope with opcode variants 1997-09-22 17:53:20 -03:00
Roberto Ierusalimschy
2079cfe8fa new way to code globals, using const table instead of putting global
index inside the opcode.
1997-09-19 18:17:52 -03:00
Roberto Ierusalimschy
dfe03c7abe small optimizations (bit scrubbing) 1997-09-19 15:40:32 -03:00
Roberto Ierusalimschy
8cd67ac676 Syntax analizer and code generator 1997-09-16 16:33:21 -03:00
Roberto Ierusalimschy
dd1aa28390 small optimization in opcodes for "and" and "or" 1997-08-04 16:15:05 -03:00
Roberto Ierusalimschy
abbf14cd32 small optimizations; try to find previous use when coding a real constant. 1997-07-31 17:46:59 -03:00
Roberto Ierusalimschy
0892f0e5b7 BIG CHANGE: functions have their own "constant table". 1997-07-30 19:00:50 -03:00
Roberto Ierusalimschy
2c580a0afb new way to handle global state during compilation. 1997-07-29 17:38:45 -03:00
Roberto Ierusalimschy
a38f093f05 luaI_initTFunc initializes fileName. 1997-06-19 14:46:12 -03:00
Roberto Ierusalimschy
373363cb69 new name for old "mem.h" (conflicts with some compiler libraries) 1997-03-31 11:19:01 -03:00
Roberto Ierusalimschy
b8af9c56c9 new form for constructors: {[exp] = exp, ...} 1997-03-06 14:30:55 -03:00
Roberto Ierusalimschy
0b110f7922 small syntax error (yacc does not complain, but bison does). 1997-02-13 14:18:39 -02:00
Roberto Ierusalimschy
1143bf9286 better check when converting from float to int, to avoid overflow
(on some machines it may result in run-time error)
1997-01-31 12:27:11 -02:00
Roberto Ierusalimschy
f00d692445 small correction to avoid "wrong" default action 1997-01-15 14:11:37 -02:00
Roberto Ierusalimschy
a0e9bfbb48 syntax error function is in "lex.c" (it has the token) 1996-11-08 10:49:35 -02:00
Roberto Ierusalimschy
0af581f0bf new way to handle pragmas (at the lexical level, instead of parsing). 1996-09-25 18:52:00 -03:00
Roberto Ierusalimschy
7b8166d7b3 a chunk may end with a return. 1996-09-24 14:29:50 -03:00
Roberto Ierusalimschy
7614b17e85 very small corrections 1996-07-24 11:38:12 -03:00
Roberto Ierusalimschy
9863223fbf first version of vararg facility (plus new function "call"). 1996-05-28 18:07:32 -03:00
Roberto Ierusalimschy
9284742a11 better control when growing arrays. 1996-03-21 13:33:47 -03:00
Roberto Ierusalimschy
621322a305 "PrintCode" now is defined in luac. 1996-03-08 09:02:37 -03:00
Roberto Ierusalimschy
d6e4c29733 fixed strings (not collectable) don't need to be inserted in the constant table. 1996-02-26 18:00:27 -03:00
Roberto Ierusalimschy
f935d3397e check if jump is bigger than 2^16. 1996-02-26 14:07:20 -03:00
Roberto Ierusalimschy
45cf24485d useless #include. 1996-02-14 15:25:04 -03:00
Roberto Ierusalimschy
0f4903a5d7 new header "lex.h". 1996-02-13 14:30:39 -03:00
Roberto Ierusalimschy
41259bff31 BIG CHANGE: new data structure for constants, strings and globals, using
an array of hash tables for all them.
1996-02-12 15:32:40 -03:00
Roberto Ierusalimschy
5a3a1fe458 debug interface functions to manipulated local variables:
"lua_getlocal" and "lua_setlocal".
1996-02-07 16:10:27 -02:00
Roberto Ierusalimschy
1431b52e76 improve of compiling error messages. 1996-02-05 11:26:01 -02:00
Roberto Ierusalimschy
2998049f51 local variable stack needs only the name of the variable (TreeNode);
this way is simpler and faster than old way.
1996-01-23 15:50:29 -02:00
Roberto Ierusalimschy
24ccc7c038 correction of some order dependencies in debug code. 1996-01-22 16:39:37 -02:00
Roberto Ierusalimschy
9d9f9c48ff local variables may appear inside blocks in main code. 1995-10-26 15:02:50 -02:00
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.
1995-10-26 12:21:56 -02:00
Roberto Ierusalimschy
39b071f7b1 new syntax for function declarations: "function a.x () ... "
new semantics for function declarations: function f () is valid only
at run-time.
1995-10-25 12:33:25 -02:00
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.
1995-10-25 11:05:51 -02:00
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.
1995-10-17 09:58:41 -02:00
Roberto Ierusalimschy
68f337dfa6 Garbage collection of functions + header structure for functions 1995-10-04 14:13:02 -03:00
Roberto Ierusalimschy
97b2fd1ba1 syntax for {...;...} is more flexible now. 1995-06-08 16:47:28 -03:00
Waldemar Celes
8156604823 run-time stack now is controled at run time, instead of
compilation time.
1995-04-11 14:56:30 -03:00
Roberto Ierusalimschy
f4591397da strdup is done via mem.c to control its memory allocation 1995-01-14 13:40:26 -02:00
Waldemar Celes
a8220feed2 bytecodes are indexed by integers, not Words, to allow bigger code on 32 bit machines 1994-12-27 18:41:11 -02:00
Waldemar Celes
8bc4b0d741 routines are defined before rules, to allow correct compilation with bison 1994-12-27 18:04:29 -02:00