mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
[hir] Remove unnecessary null check
This commit is contained in:
@@ -202,13 +202,10 @@ export default function enterSSA(func: HIRFunction) {
|
||||
for (const instr of block.instructions) {
|
||||
mapInstructionOperands(instr, (place) => builder.getPlace(place));
|
||||
|
||||
if (instr.lvalue != null) {
|
||||
const oldPlace = instr.lvalue.place;
|
||||
let newPlace: Place;
|
||||
newPlace = builder.definePlace(oldPlace);
|
||||
instr.lvalue.kind = InstructionKind.Const;
|
||||
instr.lvalue.place = newPlace;
|
||||
}
|
||||
const oldPlace = instr.lvalue.place;
|
||||
const newPlace = builder.definePlace(oldPlace);
|
||||
instr.lvalue.kind = InstructionKind.Const;
|
||||
instr.lvalue.place = newPlace;
|
||||
}
|
||||
|
||||
mapTerminalOperands(block.terminal, (place) => builder.getPlace(place));
|
||||
|
||||
Reference in New Issue
Block a user