From 69fbdfc7cd81e50815fafaaf927c9cb3250a1d20 Mon Sep 17 00:00:00 2001 From: Sathya Gunasekaran Date: Tue, 20 Dec 2022 14:55:56 +0000 Subject: [PATCH] [typer] Add inferTypes pass to playground --- .../packages/playground/components/Editor/Output.tsx | 11 +++++++++++ .../packages/playground/components/TabbedWindow.tsx | 1 + compiler/forget/src/index.ts | 2 ++ 3 files changed, 14 insertions(+) diff --git a/compiler/forget/packages/playground/components/Editor/Output.tsx b/compiler/forget/packages/playground/components/Editor/Output.tsx index 3214ab5edf..07ddfe04cf 100644 --- a/compiler/forget/packages/playground/components/Editor/Output.tsx +++ b/compiler/forget/packages/playground/components/Editor/Output.tsx @@ -20,6 +20,7 @@ const { enterSSA, Environment, flattenReactiveLoops, + inferTypes, inferMutableRanges, inferReactiveScopes, inferReactiveScopeVariables, @@ -47,6 +48,7 @@ type CompilerOutput = { ssaOutput: string; hirOutput: string; eliminateRedundantPhiOutput: string; + inferTypesOutput: string; inferReferenceEffectsOutput: string; inferMutableRangesOutput: string; inferReactiveScopeVariablesOutput: string; @@ -79,6 +81,9 @@ function compile(source: string): CompilerOutput | CompilerError { eliminateRedundantPhi(ir); const eliminateRedundantPhiOutput = printHIR(ir.body); + inferTypes(ir); + const inferTypesOutput = printHIR(ir.body); + inferReferenceEffects(ir); const inferReferenceEffectsOutput = printHIR(ir.body); @@ -124,6 +129,7 @@ function compile(source: string): CompilerOutput | CompilerError { hirOutput, ssaOutput, eliminateRedundantPhiOutput, + inferTypesOutput, inferReferenceEffectsOutput, inferMutableRangesOutput, inferReactiveScopeVariablesOutput, @@ -165,6 +171,11 @@ function Output({ store, setTabsOpen, tabsOpen }: Props) { output={compilerOutput.eliminateRedundantPhiOutput} > ), + InferTypes: ( + + ), InferReferenceEffects: (