From 4014ea595ebf0942770afe8b6a568d68e25889d6 Mon Sep 17 00:00:00 2001 From: NISHIZAWA Shuntaro Date: Thu, 20 Jun 2024 11:10:25 +0900 Subject: [PATCH 1/3] Fix to pass source to diff when HIR --- compiler/apps/playground/components/Editor/Output.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/apps/playground/components/Editor/Output.tsx b/compiler/apps/playground/components/Editor/Output.tsx index 128fcca83a932..af4c28347337b 100644 --- a/compiler/apps/playground/components/Editor/Output.tsx +++ b/compiler/apps/playground/components/Editor/Output.tsx @@ -104,7 +104,7 @@ async function tabify(source: string, compilerOutput: CompilerOutput) { passName, ); From 0bd04cf5638f9ce646de01a5b77afe858d54553a Mon Sep 17 00:00:00 2001 From: NISHIZAWA Shuntaro Date: Thu, 20 Jun 2024 13:42:15 +0900 Subject: [PATCH 2/3] Fix to pass null in case of HIR --- compiler/apps/playground/components/Editor/Output.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/apps/playground/components/Editor/Output.tsx b/compiler/apps/playground/components/Editor/Output.tsx index af4c28347337b..f0d950d192c21 100644 --- a/compiler/apps/playground/components/Editor/Output.tsx +++ b/compiler/apps/playground/components/Editor/Output.tsx @@ -104,7 +104,7 @@ async function tabify(source: string, compilerOutput: CompilerOutput) { passName, ); From df682f8da78c91e6a884c3ded91734891eaee7e3 Mon Sep 17 00:00:00 2001 From: NISHIZAWA Shuntaro Date: Thu, 20 Jun 2024 13:43:11 +0900 Subject: [PATCH 3/3] Fix to not add to changedPasses in case of HIR --- compiler/apps/playground/components/Editor/Output.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/apps/playground/components/Editor/Output.tsx b/compiler/apps/playground/components/Editor/Output.tsx index f0d950d192c21..3b2b26c8804e7 100644 --- a/compiler/apps/playground/components/Editor/Output.tsx +++ b/compiler/apps/playground/components/Editor/Output.tsx @@ -195,7 +195,7 @@ function Output({ store, compilerOutput }: Props) { if (result.kind === "hir" || result.kind === "reactive") { currResult += `function ${result.fnName}\n\n${result.value}`; } - if (currResult !== lastResult) { + if (passName !== "HIR" && currResult !== lastResult) { changedPasses.add(passName); } lastResult = currResult;