mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Add new pass to playground
This commit is contained in:
@@ -31,6 +31,7 @@ const {
|
||||
printReactiveFunction,
|
||||
propagateScopeDependencies,
|
||||
pruneUnusedLabels,
|
||||
pruneUnusedScopes,
|
||||
} = HIR;
|
||||
const MemoizedOutput = memo(Output);
|
||||
|
||||
@@ -97,6 +98,7 @@ function compile(source: string): CompilerOutput | CompilerError {
|
||||
pruneUnusedLabels(reactiveFunction);
|
||||
flattenReactiveLoops(reactiveFunction);
|
||||
propagateScopeDependencies(reactiveFunction);
|
||||
pruneUnusedScopes(reactiveFunction);
|
||||
const reactiveFunctionOutput = printReactiveFunction(reactiveFunction);
|
||||
|
||||
const ast = codegenReactiveFunction(reactiveFunction);
|
||||
|
||||
@@ -28,6 +28,7 @@ import { inferReactiveScopeVariables } from "./ReactiveScopes/InferReactiveScope
|
||||
import { printReactiveFunction } from "./ReactiveScopes/PrintReactiveFunction";
|
||||
import { propagateScopeDependencies } from "./ReactiveScopes/PropagateScopeDependencies";
|
||||
import { pruneUnusedLabels } from "./ReactiveScopes/PruneUnusedLabels";
|
||||
import { pruneUnusedScopes } from "./ReactiveScopes/PruneUnusedScopes";
|
||||
import { eliminateRedundantPhi } from "./SSA/EliminateRedundantPhi";
|
||||
import enterSSA from "./SSA/EnterSSA";
|
||||
import { leaveSSA } from "./SSA/LeaveSSA";
|
||||
@@ -73,6 +74,7 @@ export const HIR = {
|
||||
printHIR,
|
||||
printReactiveFunction,
|
||||
pruneUnusedLabels,
|
||||
pruneUnusedScopes,
|
||||
};
|
||||
|
||||
export default BabelPlugin;
|
||||
|
||||
Reference in New Issue
Block a user