mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
EnterSSA traverses function expressions
This commit is contained in:
+1
-2
@@ -17,7 +17,7 @@ import {
|
||||
ReactiveScopeDependency,
|
||||
} from "../HIR";
|
||||
import { constantPropagation } from "../Optimization";
|
||||
import { eliminateRedundantPhi, enterSSA } from "../SSA";
|
||||
import { eliminateRedundantPhi } from "../SSA";
|
||||
import { inferTypes } from "../TypeInference";
|
||||
import { logHIRFunction } from "../Utils/logger";
|
||||
import { inferMutableRanges } from "./InferMutableRanges";
|
||||
@@ -89,7 +89,6 @@ export default function analyseFunctions(func: HIRFunction): void {
|
||||
}
|
||||
|
||||
function lower(func: HIRFunction): void {
|
||||
enterSSA(func);
|
||||
eliminateRedundantPhi(func);
|
||||
constantPropagation(func);
|
||||
inferTypes(func);
|
||||
|
||||
@@ -232,6 +232,10 @@ export default function enterSSA(func: HIRFunction): void {
|
||||
for (const instr of block.instructions) {
|
||||
mapInstructionLValues(instr, (lvalue) => builder.definePlace(lvalue));
|
||||
mapInstructionOperands(instr, (place) => builder.getPlace(place));
|
||||
|
||||
if (instr.value.kind === "FunctionExpression") {
|
||||
enterSSA(instr.value.loweredFunc);
|
||||
}
|
||||
}
|
||||
|
||||
mapTerminalOperands(block.terminal, (place) => builder.getPlace(place));
|
||||
|
||||
Reference in New Issue
Block a user