@samitouri / QOS-React-2 / commits / 1fb0aed668

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.

Joe Savona committed Mar 8, 2023 at 20:49 UTC 1fb0aed6688e57c12c40ea9ef961ae8a88fe56e2
1 file changed -2
compiler/forget/src/HIR/visitors.ts
-2
@@ -293,12 +293,10 @@ export function mapInstructionOperands(
293 break;
294 }
295 case "StoreLocal": {
296 - instrValue.lvalue.place = fn(instrValue.lvalue.place);
296 instrValue.value = fn(instrValue.value);
297 break;
298 }
299 case "Destructure": {
301 - mapPatternOperands(instrValue.lvalue.pattern, fn);
300 instrValue.value = fn(instrValue.value);
301 break;
302 }