Commit Graph

63 Commits

Author SHA1 Message Date
Mike Pall
116cdd7e9a String buffer refactoring, part 2.
Switch to pointers for start/pos/end of buffer.
Abstract out some buffer writers.
2013-02-27 21:28:28 +01:00
Mike Pall
28cfcf7744 String buffer refactoring, part 1.
Move string buffer handling to lj_buf.*.
Use common buffer resizing function.
2013-02-27 17:29:35 +01:00
Mike Pall
4a44c4ff69 Bump copyright date to 2013. 2013-02-11 12:54:48 +01:00
Mike Pall
4eb4b8ab84 Keep line number for KPRI to KNIL optimization. 2013-01-31 12:36:23 +01:00
Mike Pall
f22d5d9eef Fix discharge order of comparisons in Lua parser. 2013-01-11 12:19:05 +01:00
Mike Pall
2ad9834df6 Add missing GC steps for template table creation. 2012-11-16 13:20:12 +01:00
Mike Pall
69906d15de Don't create unneeded array part for template tables. 2012-11-06 16:56:25 +01:00
Mike Pall
f6536c6696 Fix detection of immutable upvalues. 2012-10-21 13:51:12 +02:00
Mike Pall
2e9f4efd20 Fix scope for resolving break labels. 2012-10-03 11:53:18 +02:00
Mike Pall
550ac44e41 From Lua 5.2: Remove error for ambiguous function call syntax.
Needs -DLUAJIT_ENABLE_LUA52COMPAT.
2012-09-28 18:12:43 +02:00
Mike Pall
1afcea1435 From Lua 5.2: 'break' allowed anywhere.
Needs -DLUAJIT_ENABLE_LUA52COMPAT.
2012-09-19 16:33:39 +02:00
Mike Pall
ead325b0c9 From Lua 5.2: Add goto and :🏷️: statements. 2012-09-16 18:46:04 +02:00
Mike Pall
23932a6c8b Use 0/1 macro for Lua 5.2 compatibility. 2012-09-12 11:20:47 +02:00
Mike Pall
3636a720a5 Turn loads from immutable upvalues into constants. 2012-07-20 18:54:52 +02:00
Mike Pall
17d3fc47f3 Avoid pesky compiler warnings about C++ keywords (eh?). 2012-07-03 13:19:32 +02:00
Mike Pall
89f8c920c6 Expand array slots in template tables with mixed const/var initializers. 2012-06-30 20:58:19 +02:00
Mike Pall
0d1056eeed Create string hash slots in template tables even for non-const values. 2012-06-27 22:45:54 +02:00
Mike Pall
39112fd6fb Fix bytecode JMP slot range after const + and/or optimization. 2012-04-11 15:17:11 +02:00
Mike Pall
d621a6ccc2 Fix discharge order of comparisons in Lua parser. 2012-04-09 14:48:27 +02:00
Mike Pall
10ef109eef Bump copyright date to 2012. 2012-01-23 22:42:42 +01:00
Mike Pall
cecbe3c15f Specialize to prototype for non-monomorphic functions.
Solves the trace-explosion problem with closure-heavy programming.
2011-11-20 19:16:40 +01:00
Mike Pall
b6a7fc5330 Cleanup prototype flags. 2011-06-09 13:54:40 +02:00
Mike Pall
8c32b38ca3 Flatten and compress in-memory debug info (saves ~70%). 2011-06-09 01:27:37 +02:00
Mike Pall
693b629787 Improve bytecode optimization of and/or operators. 2011-05-05 15:49:11 +02:00
Mike Pall
cead25f928 DUALNUM: Handle integer type in x86/x64 interpreter and libraries. 2011-02-27 01:36:59 +01:00
Mike Pall
f83d58d6fb From Lua 5.2: Empty statement. Needs -DLUAJIT_ENABLE_LUA52COMPAT. 2011-02-20 20:38:36 +01:00
Mike Pall
03946ac978 DUALNUM: Add integer type to core VM. 2011-02-17 00:44:14 +01:00
Mike Pall
9c81c81ed5 Fix bytecode optimization of and/or operators. 2011-02-08 01:00:47 +01:00
Mike Pall
06f99fc3df Bump copyright date to 2011. 2011-01-09 17:12:53 +01:00
Mike Pall
461bf77331 FFI: Parse complex and 64 bit integer literals. 2010-12-24 01:31:39 +01:00
Mike Pall
4850865c57 Fix misnamed macro in Lua parser. 2010-12-24 01:23:42 +01:00
Mike Pall
7840d0b2b0 Shrink slots for 'break' statement to help data-flow analysis. 2010-11-25 12:13:23 +01:00
Mike Pall
ac76493df1 Specialize bytecode for pairs()/next() iterator. Speedup: 3.5x.
Parser predict pairs/next and emits specialized bytecode.
Bytecode is descpecialized at runtime if the prediction was wrong.
Store slot index in hidden control var to avoid key lookups.
2010-09-30 21:55:32 +02:00
Mike Pall
daafc0b2a2 Reduce minimum Lua frame size to 1. 2010-09-10 11:43:31 +02:00
Mike Pall
6fd315581c Optimize BC_VARG: use RC for numparams. 2010-09-10 11:34:29 +02:00
Mike Pall
fd63b05253 Use biased integer constant for TSETM array index. 2010-09-09 12:01:29 +02:00
Mike Pall
8876704e05 Improve coalescing of multiple KPRI instructions to KNIL. 2010-09-01 00:18:00 +02:00
Mike Pall
0a3329c581 Fix some compiler warnings. 2010-08-03 23:11:12 +02:00
Mike Pall
a6b7952f7e Use FuncState typedef in favor of struct. 2010-08-03 22:08:08 +02:00
Mike Pall
28cfccf748 Turn TValue setter macros into inline functions. 2010-04-26 00:28:44 +02:00
Mike Pall
41379126a2 Treat the tag of a TValue as unsigned everywhere. 2010-04-25 23:21:15 +02:00
Mike Pall
ab45481199 No longer let the GC replace dead keys with the LJ_TDEADKEY tag.
Important: this changes the semantics of the write barrier!
Carefully read the big comment block in lj_obj.h
This helps HREFK key slot specialization and allows safely hoisting
HREF/HREFK across GC steps, too (fix for a barely reproducible bug).
Dead keys are only removed during a table resize (as before).
2010-04-21 01:45:58 +02:00
Mike Pall
932cda0fe3 Replace on-trace GC frame syncing with interpreter exit.
Need to sync GC objects to stack only during atomic GC phase.
Need to setup a proper frame structure only for calling finalizers.
Force an exit to the interpreter and let it handle the uncommon cases.
Finally solves the "NYI: gcstep sync with frames" issue.
2010-04-19 00:43:35 +02:00
Mike Pall
c93138b59e Major redesign of function call handling.
Drop call gates. Use function headers, dispatched like bytecodes.
Emit BC_FUNCF/BC_FUNCV bytecode at PC 0 for all Lua functions.
C functions and ASM fast functions get extra bytecodes.
Modify internal calling convention: new base in BASE (formerly in RA).
Can now use better C function wrapper semantics (dynamic on/off).
Prerequisite for call hooks with zero-overhead if disabled.
Prerequisite for compiling recursive calls.
Prerequisite for efficient 32/64 bit prototype guards.
2010-02-13 04:51:56 +01:00
Mike Pall
4f8d7be8ea Extend scope of local vars in debug info beyond final return. 2010-02-12 16:17:42 +01:00
Mike Pall
d5a46621f9 Drop bc field in GCproto since the bytecode is colocated. 2010-02-08 20:17:34 +01:00
Mike Pall
2ddea3838d Fix constructor bytecode generation for conditional values. 2010-02-08 16:08:58 +01:00
Mike Pall
6194b1c896 Redesign of prototype generation, part 5: colocation of protoype arrays. 2010-02-08 05:30:57 +01:00
Mike Pall
f275a9d7ef Redesign of prototype generation, part 4: late creation of prototype. 2010-02-08 05:29:47 +01:00
Mike Pall
4424027844 Redesign of prototype generation, part 3: bc and lineinfo.
Use a growable, per-chunk bytecode instruction/line stack.
Collect bc/lineinfo for prototype at the end.
2010-02-08 05:28:57 +01:00