From 6053703dbbb3c59157d5e07126fb77416ad01844 Mon Sep 17 00:00:00 2001 From: Joe Savona Date: Fri, 16 Dec 2022 09:41:47 -0800 Subject: [PATCH] add missing pass to playground MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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). --- .../forget/packages/playground/components/Editor/Output.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/compiler/forget/packages/playground/components/Editor/Output.tsx b/compiler/forget/packages/playground/components/Editor/Output.tsx index 85d1d1b314..3740984245 100644 --- a/compiler/forget/packages/playground/components/Editor/Output.tsx +++ b/compiler/forget/packages/playground/components/Editor/Output.tsx @@ -36,6 +36,7 @@ const { printHIR, printReactiveFunction, propagateScopeDependencies, + pruneUnusedLabels, } = HIR; const MemoizedOutput = memo(Output); @@ -100,6 +101,7 @@ function compile(source: string): CompilerOutput | CompilerError { const inferReactiveScopesOutput = printHIR(ir.body); const reactiveFunction = buildReactiveFunction(ir); + pruneUnusedLabels(reactiveFunction); flattenReactiveLoops(reactiveFunction); propagateScopeDependencies(reactiveFunction); const reactiveFunctionOutput = printReactiveFunction(reactiveFunction);