Dan Klishch
ff44aea917
JSSpecCompiler: Add control flow building pass
2023-12-14 09:06:05 -07:00
Dan Klishch
61fa00d46c
JSSpecCompiler: Refactor CompilerPass
to accept TranslationUnitRef
2023-10-26 15:45:31 -06:00
Dan Klishch
567b1f6e7c
JSSpecCompiler: Adopt more C++ terminology
...
Let's not use strange names like `ExecutionContext`, which nobody will
understand in the future.
2023-10-02 21:15:08 +02:00
Dan Klishch
67e07fa4e2
JSSpecCompiler: Introduce ControlFlowOperator nodes
2023-09-17 16:04:42 -06:00
Dan Klishch
81519975c5
JSSpecCompiler: Add reference resolving pass
...
It replaces UnresolvedReference with Variable, FunctionPointer, or
SlotName nodes. Also, it gathers all variable names from their
declarations.
2023-09-17 16:04:42 -06:00
Dan Klishch
326bac19d9
JSSpecCompiler: Make nodes inherit from Statement or Expression
...
The distinction between them will become important during CFG building.
2023-09-17 16:04:42 -06:00
Dan Klishch
4c4e1e1aed
JSSpecCompiler: Add if branch merging pass
...
It merges standalone IfBranch/ElseIfBranch nodes into IfElseIfChain
nodes. This will ease CFG generation later.
2023-09-09 11:20:43 -06:00
Dan Klishch
1c4cd34320
JSSpecCompiler: Restrict usage of NodeSubtreePointer
...
This class stores a non-owning raw pointer to a member of `Node`, so
extra care is needed to ensure that referenced `Node`s will be alive
by the time `NodeSubtreePointer` is used. Since we only need to use this
class while traversing AST in `RecursiveASTVisitor`, access to class
methods can be restricted using `Badge<RecursiveASTVisitor>`.
2023-09-09 11:20:43 -06:00
Dan Klishch
cd8f4aaa7d
JSSpecCompiler: Introduce Function and ExecutionContext classes
...
Currently, they are not extremely useful, but the plan is to store
all function-local state in JSSpecCompiler::Function and all
"translation unit" state in ExecutionContext.
2023-09-02 19:57:06 +02:00
Dan Klishch
db0a03d1fb
JSSpecCompiler: Add infrastructure to parse <emu-clause> into AST
2023-08-31 11:00:31 +02:00
Dan Klishch
5846470a5f
JSSpecCompiler: Add stubs for AST types
2023-08-31 11:00:31 +02:00