From 9daf3a1f0f9633d3b0fe48569a080562943e1c00 Mon Sep 17 00:00:00 2001 From: Aleksandr Penskoi Date: Sun, 21 Jan 2024 17:28:57 +0100 Subject: [PATCH 1/2] Fix UI output for constant folding refactoring. --- web/src/components/SubforestTables/Columns.tsx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/web/src/components/SubforestTables/Columns.tsx b/web/src/components/SubforestTables/Columns.tsx index 7a933c5cc..3dc580eca 100644 --- a/web/src/components/SubforestTables/Columns.tsx +++ b/web/src/components/SubforestTables/Columns.tsx @@ -218,12 +218,10 @@ export function showBreakLoop(decision: BreakLoop): ReactElement { export function showConstantFolding(d: ConstantFolding): ReactElement { return (
- {d.cRefOld.map((e: FView) => e.fvFun).join("\n")} -
+ {d.cRefOld.map((e: FView) => <> {e.fvFun}
)}
- {d.cRefNew.map((e: FView) => e.fvFun).join(", ")} -
+ {d.cRefNew.map((e: FView) => <> {e.fvFun}
)}
); } From b235f5f7ff645f1e827de934591af29e2decee16 Mon Sep 17 00:00:00 2001 From: Aleksandr Penskoi Date: Sun, 21 Jan 2024 17:29:07 +0100 Subject: [PATCH 2/2] Update bug related fixme --- test/NITTA/Model/ProcessorUnits/Tests/DSL/Tests.hs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/NITTA/Model/ProcessorUnits/Tests/DSL/Tests.hs b/test/NITTA/Model/ProcessorUnits/Tests/DSL/Tests.hs index 257b70367..732a4b64a 100644 --- a/test/NITTA/Model/ProcessorUnits/Tests/DSL/Tests.hs +++ b/test/NITTA/Model/ProcessorUnits/Tests/DSL/Tests.hs @@ -204,8 +204,11 @@ tests = , constant 2 ["!2#0"] , constant 1 ["!1#0"] ] + -- FIXME: https://github.com/ryukzak/nitta/issues/196 + -- should be: + -- [ constant 3 ["_0#d"] ] [ constant 3 ["_0#d"] - , constant 2 ["!2#0"] -- FIXME: Do we actually need this? + , constant 2 ["!2#0"] , constant 1 ["!1#0"] ] >>= \r -> assertRefactor r