Add new pass to playground

This commit is contained in:
Joe Savona
2022-12-20 12:16:34 -08:00
parent af91a7ab86
commit 828fd81be3
2 changed files with 4 additions and 0 deletions
@@ -31,6 +31,7 @@ const {
printReactiveFunction,
propagateScopeDependencies,
pruneUnusedLabels,
pruneUnusedScopes,
} = HIR;
const MemoizedOutput = memo(Output);
@@ -97,6 +98,7 @@ function compile(source: string): CompilerOutput | CompilerError {
pruneUnusedLabels(reactiveFunction);
flattenReactiveLoops(reactiveFunction);
propagateScopeDependencies(reactiveFunction);
pruneUnusedScopes(reactiveFunction);
const reactiveFunctionOutput = printReactiveFunction(reactiveFunction);
const ast = codegenReactiveFunction(reactiveFunction);
+2
View File
@@ -28,6 +28,7 @@ import { inferReactiveScopeVariables } from "./ReactiveScopes/InferReactiveScope
import { printReactiveFunction } from "./ReactiveScopes/PrintReactiveFunction";
import { propagateScopeDependencies } from "./ReactiveScopes/PropagateScopeDependencies";
import { pruneUnusedLabels } from "./ReactiveScopes/PruneUnusedLabels";
import { pruneUnusedScopes } from "./ReactiveScopes/PruneUnusedScopes";
import { eliminateRedundantPhi } from "./SSA/EliminateRedundantPhi";
import enterSSA from "./SSA/EnterSSA";
import { leaveSSA } from "./SSA/LeaveSSA";
@@ -73,6 +74,7 @@ export const HIR = {
printHIR,
printReactiveFunction,
pruneUnusedLabels,
pruneUnusedScopes,
};
export default BabelPlugin;