mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
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.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user