Dan Klishch
5825eaa264
JSSpecCompiler: Save references to return value and function arguments
2024-01-14 16:05:51 -07:00
Dan Klishch
7f47340c82
JSSpecCompiler: Create FunctionDeclaration
s for all external functions
2024-01-14 16:05:51 -07:00
Dan Klishch
5338cdd153
JSSpecCompiler: Add bare-bones DCE pass
...
Right now the only dead code it eliminates is the unused phi nodes.
2024-01-14 16:05:51 -07:00
Dan Klishch
fbdb1a3d61
JSSpecCompiler: Add SSA form building pass
2024-01-12 16:22:22 -07:00
Dan Klishch
0aeb7a26e9
JSSpecCompiler: Prepare for building SSA
...
This commit introduces NamedVariableDeclaration and
SSAVariableDeclaration and allows storing both of them in Variable node.
Also, it adds additional structures in FunctionDefinition and
BasicBlock, which will be used to store SSA form related information.
2024-01-04 12:06:56 -07:00
Dan Klishch
23164bc570
JSSpecCompiler: Replace all declarations with assignments
...
We assume that variable shadowing is impossible, so then there is no
reason to keep distinct Declaration and Assignment operators after
ReferenceResolvingPass.
2024-01-04 12:06:56 -07:00
Dan Klishch
12072dbac5
JSSpecCompiler: Add control flow graph simplification pass
...
It removes empty `BasicBlock`s with an unconditional jump continuation
and then removes unreferenced blocks from the graph.
2024-01-04 12:06:56 -07:00
Dan Klishch
ff44aea917
JSSpecCompiler: Add control flow building pass
2023-12-14 09:06:05 -07:00
Dan Klishch
6ed069ea8d
JSSpecCompiler: Provide an adequate command line interface
2023-10-26 15:45:31 -06:00
Dan Klishch
867ce0df52
JSSpecCompiler: Move passes to Passes subdirectory of Compiler/
2023-10-26 15:45:31 -06:00