@samitouri / QOS-React-2 / commits / 6053703dbb

add missing pass to playground

It's pretty tedious to keep the playground in sync w `Pipeline` — we need some abstraction so we can write the sequence of passes once and reuse it (while inspecting intermediate states).

Joe Savona committed Dec 16, 2022 at 09:41 UTC 6053703dbbb3c59157d5e07126fb77416ad01844
1 file changed +2
compiler/forget/packages/playground/components/Editor/Output.tsx
+2
@@ -36,6 +36,7 @@ const {
36 printHIR,
37 printReactiveFunction,
38 propagateScopeDependencies,
39 + pruneUnusedLabels,
40 } = HIR;
41 const MemoizedOutput = memo(Output);
42
@@ -100,6 +101,7 @@ function compile(source: string): CompilerOutput | CompilerError {
101 const inferReactiveScopesOutput = printHIR(ir.body);
102
103 const reactiveFunction = buildReactiveFunction(ir);
104 + pruneUnusedLabels(reactiveFunction);
105 flattenReactiveLoops(reactiveFunction);
106 propagateScopeDependencies(reactiveFunction);
107 const reactiveFunctionOutput = printReactiveFunction(reactiveFunction);