Skip to content

Commit 7ee2f77

Browse files
committed
[compiler] Show outlined functions in logging, playground
ghstack-source-id: 035009f Pull Request resolved: #30344
1 parent a182079 commit 7ee2f77

File tree

2 files changed

+14
-1
lines changed
  • compiler
    • apps/playground/components/Editor
    • packages/babel-plugin-react-compiler/src/Entrypoint

2 files changed

+14
-1
lines changed

compiler/apps/playground/components/Editor/Output.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,12 @@ async function tabify(source: string, compilerOutput: CompilerOutput) {
9999
}
100100
}
101101
let lastPassOutput: string | null = null;
102-
let nonDiffPasses = ["HIR", "BuildReactiveFunction", "EnvironmentConfig"];
102+
let nonDiffPasses = [
103+
"HIR",
104+
"BuildReactiveFunction",
105+
"EnvironmentConfig",
106+
"OutlineFunctions (outlined)",
107+
];
103108
for (const [passName, text] of concattedResults) {
104109
tabs.set(
105110
passName,

compiler/packages/babel-plugin-react-compiler/src/Entrypoint/Pipeline.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,14 @@ function* runWithEnvironment(
246246
if (env.config.enableFunctionOutlining) {
247247
outlineFunctions(hir);
248248
yield log({ kind: "hir", name: "OutlineFunctions", value: hir });
249+
250+
for (const outlined of env.getOutlinedFunctions()) {
251+
yield log({
252+
kind: "hir",
253+
name: "OutlineFunctions (outlined)",
254+
value: outlined.fn,
255+
});
256+
}
249257
}
250258

251259
alignMethodCallScopes(hir);

0 commit comments

Comments
 (0)