dillon1000/react

Commit

Codegen from ReactiveFunction (no memoization yet)

Currently codegen operates from HIR using a tree visitor, but for scope 
construction we're converting the HIR (CFG) into a ReactiveFunction (AST-like). 
Our original idea for codegen was that we would convert the ReactiveFunction 
back to HIR, and then codegen from there. However, the ReactiveFunction is 
already in tree form...which makes it very straightforward to generate code 
from. 

So this PR implements codegen from ReactiveFunction. The output is _identical_ 
thanks in large part to reusing as much logic from Codegen.ts as possible. The 
next PR will add memoization logic.
Browse files
Changed paths4 files
First-parent comparison
M compiler/forget/src/HIR/Codegen.ts ModifiedA compiler/forget/src/HIR/CodegenReactiveFunction.ts AddedM compiler/forget/src/HIR/Pipeline.ts ModifiedM compiler/forget/src/__tests__/hir-test.ts Modified
Patch

Files changed

Rendering syntax-highlighted changes…