Rerumu
5e955efcbd
Refactor some messy code
2022-04-25 18:07:40 -04:00
Rerumu
e7b36a7d94
Unify integer types and simplify some code
2022-04-22 21:57:43 -04:00
Rerumu
233aee2c5e
Simplify type and local handling
2022-04-22 04:01:10 -04:00
Rerumu
a97bd899da
Simplify name extraction
2022-04-21 04:37:40 -04:00
Rerumu
891851bcb8
Add pop_many to reduce redundancy
2022-02-09 18:47:25 -05:00
Rerumu
5ad07b930c
Remove leftover
2022-02-09 06:13:26 -05:00
Rerumu
80a9230767
Rename fallible operations
2022-02-09 05:32:51 -05:00
Rerumu
bc24765ba9
Fix gen_call_indirect ordering
2022-02-09 05:27:38 -05:00
Rerumu
d6b77b287e
Simplify new_stored_body
2022-02-09 04:55:22 -05:00
Rerumu
fbd23e05b6
Simplify value instantiation
2022-02-09 04:48:51 -05:00
Rerumu
460f363c91
Refactor Builder behavior and stack emulation
2022-02-09 04:45:28 -05:00
Rerumu
22ea8910ad
Re-structure and decouple AST from generator
2022-02-08 17:39:14 -05:00
Rerumu
9d2d8aa69b
Refactor local flattening
2022-02-07 21:32:32 -05:00
Rerumu
66818a8566
Add small Luau optimizations
2022-01-20 04:44:18 -05:00
Rerumu
d3fc1fc891
Add experimental i64
2022-01-20 04:41:28 -05:00
Rerumu
02232b46ca
Disambiguate allocator and memory
2022-01-17 01:59:02 -05:00
Rerumu
5fb7899c7e
Reformat using StyLua
2022-01-17 01:49:17 -05:00
Rerumu
b3a68742a9
Make clippy happy
2022-01-05 19:59:32 -05:00
Rerumu
d5b327cf64
Rename visit.rs to base.rs
2021-12-31 15:30:34 -05:00
Rerumu
822465cd70
Add runtime to Transpiler
2021-12-31 15:28:59 -05:00
Rerumu
25e2730a0c
Add typed locals
2021-12-22 00:23:02 -05:00
Rerumu
76b8810712
Reorder LuaJIT temp
2021-12-20 15:44:40 -05:00
Rerumu
4e4cffeb8f
Simplify return emit
2021-12-20 15:36:15 -05:00
Rerumu
8e474ab17c
Fix Luau jump table
2021-12-19 22:10:33 -05:00
Rerumu
cea3cca7c7
Simplify more LuaJIT functions
2021-12-19 22:09:41 -05:00
Rerumu
d6461d574a
Localize some reuse
2021-12-18 22:59:23 -05:00
Rerumu
d55441e5fb
Refactor front end
2021-12-14 18:49:30 -05:00
Rerumu
84e688877b
Remove unused require
2021-12-14 18:49:30 -05:00
Rerumu
3a9617fd5f
Add arcane JIT incantation
2021-12-14 04:31:53 -05:00
Rerumu
27f503ee1f
Draft out part of Luau runtime
2021-12-14 04:08:33 -05:00
Rerumu
d7df9fb5b4
Refactored and decoupled BinOp and CmpOp
2021-12-14 04:03:03 -05:00
Rerumu
e568baee1d
Remove dead code for LuaJIT
2021-12-13 19:24:03 -05:00
Rerumu
3832402b68
Clippify it all
2021-12-13 17:52:13 -05:00
Rerumu
7654de7497
Refactor LuaJIT conditional generation
2021-12-13 17:51:25 -05:00
Rerumu
dc1116c3e5
Remove implicit recursive cloning of AST
2021-12-13 16:25:33 -05:00
Rerumu
59d0abeb41
Add some separators in LuaJIT runtime
2021-12-13 14:12:54 -05:00
Rerumu
194f489209
Refactor LuaJIT table allocation
2021-12-12 22:31:20 -05:00
Rerumu
c5543cfc2e
Fix out of bounds initialization
2021-12-12 22:12:27 -05:00
Rerumu
d483b9a669
Simplify some code
2021-12-12 04:06:33 -05:00
Rerumu
19350d1aef
Some JIT tuning
2021-12-12 02:28:53 -05:00
Rerumu
78d4f12bde
Fix #4
...
This fixes the long standing bug with strict aliasing that caused heavily JITed code to miscompile. It stemmed first from pointer reinterpretation which is simply undefined behavior. After fixing that with an `union` and `ffi.copy`, the issue manifested in a different way. Further debugging showed that it was likely that `ffi.copy` (and `ffi.C.memcpy`) would still alias pointers through coercion, more undefined behavior. Now, memory is handled with an `Any` type instead, so aliasing does not occur although unaligned reads and writes may be a problem in the future. I hope this doesn't break. It was very painful to debug.
2021-12-12 01:56:54 -05:00
Rerumu
415f61cb2a
Keep consistency
2021-12-11 14:52:42 -05:00
Rerumu
babb4f0af1
Make clippy happy again
2021-12-01 22:26:47 -05:00
Rerumu
740cfd9b4c
Reduce code duplication and add function names
2021-12-01 22:26:47 -05:00
Rerumu
977c5bb6cc
Fix strict aliasing issues
2021-12-01 22:26:07 -05:00
Rerumu
7146d83cd4
Simplify LuaJIT memory grow
2021-12-01 05:37:20 -05:00
Rerumu
65374481ff
Reorder LuaJIT runtime
2021-12-01 05:36:50 -05:00
Rerumu
508fff73ef
Use C calls for LuaJIT memory allocation
2021-11-30 21:09:35 -05:00
Rerumu
e101290b11
Simplify memory size operation
2021-11-30 20:47:44 -05:00
Rerumu
b7dd849eca
Update limit max to be reasonable
2021-11-30 20:44:18 -05:00
Rerumu
b4901e72e1
Inline LuaJIT reinterpret
2021-11-30 20:43:36 -05:00
Rerumu
d2648b2e96
Add number equality to runtime
2021-11-30 17:49:32 -05:00
Rerumu
0ab0a9e921
Fix whitespace consistency
2021-11-30 17:47:10 -05:00
Rerumu
e59014bb8d
Prefer assertions in runtime
2021-11-30 17:46:20 -05:00
Rerumu
c841011328
Add LuaJIT i64 sign extension
2021-11-30 17:35:42 -05:00
Rerumu
76db2b4063
Remove excessive LuaJIT scoping
2021-11-30 15:37:15 -05:00
Rerumu
e80f1ffedd
Simplify LuaJIT label generation
2021-11-30 15:28:51 -05:00
Rerumu
03a73395be
Fix Luau table branching
2021-11-30 03:48:04 -05:00
Rerumu
92e79213fc
Rename fuzz targets
2021-11-30 03:29:22 -05:00
Rerumu
96a27c9626
Refactor the codebase and organize files
2021-11-30 03:27:17 -05:00
Rerumu
82e97ad643
Add more fuzz targets
2021-11-28 16:14:07 -05:00
Rerumu
cbf212b636
Adjust gitignore
2021-11-28 15:30:55 -05:00
Rerumu
dd55770f43
Add fuzz target
2021-11-28 15:30:11 -05:00
Rerumu
c323b35961
Fix empty expression evaluation
2021-11-28 15:26:37 -05:00
Rerumu
53bba14c00
Drop unreachable code
2021-11-28 14:47:25 -05:00
Rerumu
7f0158ef00
Improve constant expression generation
2021-11-28 06:46:15 -05:00
Rerumu
16ce3eca98
Refactor transformer interface
2021-11-28 06:40:25 -05:00
Rerumu
21b87f352c
Clean up redundant code
2021-11-28 06:39:59 -05:00
Rerumu
16ba82775b
Add sign extension support
2021-11-28 03:47:00 -05:00
Rerumu
ea639ed420
Add block multi-value support
2021-11-28 03:35:58 -05:00
Rerumu
8d7340af64
Set parity-wasm to latest version
2021-11-28 03:34:21 -05:00
Rerumu
a1894e492c
Refactor as Rust workspace
2021-11-28 03:33:00 -05:00
Rerumu
185799eecc
Satisfy clippy
2021-11-27 04:14:12 -05:00
Rerumu
820588b5e7
Add JIT optimization booster shot
2021-11-27 03:14:01 -05:00
Rerumu
504e2e0ee8
Reorganize some code
2021-11-27 03:13:48 -05:00
Rerumu
e9642ef776
Fix wrapping integer operations
2021-11-27 00:43:25 -05:00
Rerumu
fa649f26c1
Fix conversion not zeroing upper bits
2021-11-27 00:22:40 -05:00
Rerumu
9126b43b1f
Implement truncate operations
2021-11-26 22:31:44 -05:00
Rerumu
c0a5d0c7dd
Refactor limits emit and memory growing
2021-11-26 20:13:41 -05:00
Rerumu
2746c1e3d1
Fixed LuaJIT shift operations
2021-11-26 18:58:58 -05:00
Rerumu
ce59f77f22
Improve runtime localizing
2021-11-26 16:05:03 -05:00
Rerumu
55df4c39ca
Improve nomenclature for Transformer
2021-11-26 15:02:11 -05:00
Rerumu
83d3f16b42
Fix dropped memory grow
2021-11-26 14:54:28 -05:00
Rerumu
703e6b8e47
Improve element fill emit
2021-11-26 12:15:32 -05:00
Rerumu
586ebf1ac4
Improve LuaJIT runtime conversions
2021-11-26 12:09:58 -05:00
Rerumu
bf7ccdae32
Improve LuaJIT runtime locals
2021-11-24 15:55:52 -05:00
Rerumu
c7e4add0c0
Add LuaJIT conversion operations
2021-11-24 02:15:59 -05:00
Rerumu
be80da8163
Fix else emit
2021-11-24 02:08:02 -05:00
Rerumu
0fb0aee536
Fix UnOp name order emit
2021-11-24 01:22:18 -05:00
Rerumu
748798d294
Add LuaJIT floating point memory access
2021-11-24 00:52:29 -05:00
Rerumu
f9f7379beb
Add LuaJIT type reinterpretation
2021-11-24 00:51:29 -05:00
Rerumu
8b52af9651
Fix jump table emit
2021-11-24 00:22:55 -05:00
Rerumu
19922f1a4a
Fix floating point emit
2021-11-24 00:22:40 -05:00
Rerumu
387cc1c670
Add u64 division to LuaJIT
2021-11-23 21:02:04 -05:00
Rerumu
2a9c03249c
Improve if statement and top-level jump handling
2021-11-23 17:46:12 -05:00
Rerumu
704060703b
Organize Luau runtime
2021-11-23 15:24:34 -05:00
Rerumu
f4a6cb9c89
Fix LuaJIT 64 bit memory
2021-11-23 15:24:34 -05:00
Rerumu
c09d1c7261
Extend LuaJIT runtime
2021-11-23 15:24:34 -05:00
Rerumu
028f953918
Fix copysign emit
2021-11-23 15:24:34 -05:00
Rerumu
3e3f3c813d
Extend Luau runtime
2021-11-23 15:24:34 -05:00