[hir] Encapsulate pipeline from rest of Forget

Future passes will lead to inconsistent state between passes and will require
passes to run in a specific order, so let's make sure no one will misconfigure
the passes.
This commit is contained in:
Sathya Gunasekaran
2023-09-06 14:12:11 +01:00
parent 31f0f426e1
commit a93aa8f322
@@ -7,7 +7,7 @@
import { NodePath } from "@babel/traverse";
import * as t from "@babel/types";
import { lowerUseState } from "../Forest";
import { lowerToForest } from "../Forest";
import {
HIRFunction,
ReactiveFunction,
@@ -247,12 +247,7 @@ export function* run(
});
if (config?.enableForest) {
lowerUseState(reactiveFunction);
yield log({
kind: "reactive",
name: "LowerUseState",
value: reactiveFunction,
});
yield* lowerToForest(reactiveFunction);
}
promoteUsedTemporaries(reactiveFunction);