From 1fb0aed6688e57c12c40ea9ef961ae8a88fe56e2 Mon Sep 17 00:00:00 2001 From: Joe Savona Date: Wed, 8 Mar 2023 20:49:32 -0800 Subject: [PATCH] Fix mapInstructionOperands() visitor Found while debugging the previous issue: `mapInstructionOperands()` should not look at lvalues. The previous version was causing us to create extra phi nodes, which interestingly weren't the actual problem behind the "SSA" bug, but sure looked like it at first. --- compiler/forget/src/HIR/visitors.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/compiler/forget/src/HIR/visitors.ts b/compiler/forget/src/HIR/visitors.ts index 359895c981..02bb3fd52a 100644 --- a/compiler/forget/src/HIR/visitors.ts +++ b/compiler/forget/src/HIR/visitors.ts @@ -293,12 +293,10 @@ export function mapInstructionOperands( break; } case "StoreLocal": { - instrValue.lvalue.place = fn(instrValue.lvalue.place); instrValue.value = fn(instrValue.value); break; } case "Destructure": { - mapPatternOperands(instrValue.lvalue.pattern, fn); instrValue.value = fn(instrValue.value); break; }