Skip to content

Commit

Permalink
[compiler] Show outlined functions in logging, playground
Browse files Browse the repository at this point in the history
ghstack-source-id: 76fb581022e9f8a3ebb280472eb967a878975020
Pull Request resolved: #30344
  • Loading branch information
josephsavona committed Jul 16, 2024
1 parent a182079 commit 1554708
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
7 changes: 6 additions & 1 deletion compiler/apps/playground/components/Editor/Output.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,12 @@ async function tabify(source: string, compilerOutput: CompilerOutput) {
}
}
let lastPassOutput: string | null = null;
let nonDiffPasses = ["HIR", "BuildReactiveFunction", "EnvironmentConfig"];
let nonDiffPasses = [
"HIR",
"BuildReactiveFunction",
"EnvironmentConfig",
"Outlined",
];
for (const [passName, text] of concattedResults) {
tabs.set(
passName,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import {
lower,
mergeConsecutiveBlocks,
mergeOverlappingReactiveScopesHIR,
printFunction,
pruneUnusedLabelsHIR,
} from "../HIR";
import {
Expand Down Expand Up @@ -246,6 +247,14 @@ function* runWithEnvironment(
if (env.config.enableFunctionOutlining) {
outlineFunctions(hir);
yield log({ kind: "hir", name: "OutlineFunctions", value: hir });

for (const outlined of env.getOutlinedFunctions()) {
yield log({
kind: "debug",
name: "Outlined",
value: printFunction(outlined.fn),
});
}
}

alignMethodCallScopes(hir);
Expand Down

0 comments on commit 1554708

Please sign in to comment.