mv src/HIR/Pipeline src/CompilerPipeline

Small reorganization to move Pipeline out of HIR since it's a compiler module. 
It used to make sense before to be in HIR since the old architecture was the 
still the primary, but no longer!
This commit is contained in:
Lauren Tan
2022-12-20 11:13:05 -05:00
parent f1af022be1
commit 9390e969e2
6 changed files with 62 additions and 21 deletions
+1 -1
View File
@@ -10,7 +10,7 @@
import type * as BabelCore from "@babel/core";
import type { PluginObj } from "@babel/core";
import jsx from "@babel/plugin-syntax-jsx";
import Pipeline from "../HIR/Pipeline";
import Pipeline from "../CompilerPipeline";
import { invariant } from "../Utils/CompilerError";
/**
@@ -6,24 +6,26 @@
*/
import { NodePath } from "@babel/traverse";
import * as t from "@babel/types";
import { lower } from "../HIR/BuildHIR";
import { Environment } from "../HIR/HIRBuilder";
import inferReferenceEffects from "../HIR/InferReferenceEffects";
import { buildReactiveFunction } from "../ReactiveScopes/BuildReactiveFunction";
import { codegenReactiveFunction } from "../ReactiveScopes/CodegenReactiveFunction";
import { flattenReactiveLoops } from "../ReactiveScopes/FlattenReactiveLoops";
import { inferReactiveScopes } from "../ReactiveScopes/InferReactiveScopes";
import { inferReactiveScopeVariables } from "../ReactiveScopes/InferReactiveScopeVariables";
import { printReactiveFunction } from "../ReactiveScopes/PrintReactiveFunction";
import { propagateScopeDependencies } from "../ReactiveScopes/PropagateScopeDependencies";
import { pruneUnusedLabels } from "../ReactiveScopes/PruneUnusedLabels";
import { eliminateRedundantPhi } from "../SSA/EliminateRedundantPhi";
import enterSSA from "../SSA/EnterSSA";
import { leaveSSA } from "../SSA/LeaveSSA";
import { logHIRFunction } from "../Utils/logger";
import { HIRFunction } from "./HIR";
import { inferMutableRanges } from "./InferMutableRanges";
import { inferTypes } from "./InferTypes";
import {
Environment,
HIRFunction,
inferMutableRanges,
inferReferenceEffects,
inferTypes,
lower,
} from "./HIR";
import {
buildReactiveFunction,
codegenReactiveFunction,
flattenReactiveLoops,
inferReactiveScopes,
inferReactiveScopeVariables,
printReactiveFunction,
propagateScopeDependencies,
pruneUnusedLabels,
} from "./ReactiveScopes";
import { eliminateRedundantPhi, enterSSA, leaveSSA } from "./SSA";
import { logHIRFunction } from "./Utils/logger";
export type CompilerFlags = {
eliminateRedundantPhi: boolean;
+14
View File
@@ -0,0 +1,14 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
export { lower } from "./BuildHIR";
export { HIRFunction } from "./HIR";
export { Environment } from "./HIRBuilder";
export { inferMutableRanges } from "./InferMutableRanges";
export { default as inferReferenceEffects } from "./InferReferenceEffects";
export { inferTypes } from "./InferTypes";
export { printFunction } from "./PrintHIR";
@@ -0,0 +1,15 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
export { buildReactiveFunction } from "./BuildReactiveFunction";
export { codegenReactiveFunction } from "./CodegenReactiveFunction";
export { flattenReactiveLoops } from "./FlattenReactiveLoops";
export { inferReactiveScopes } from "./InferReactiveScopes";
export { inferReactiveScopeVariables } from "./InferReactiveScopeVariables";
export { printReactiveFunction } from "./PrintReactiveFunction";
export { propagateScopeDependencies } from "./PropagateScopeDependencies";
export { pruneUnusedLabels } from "./PruneUnusedLabels";
+10
View File
@@ -0,0 +1,10 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
export { eliminateRedundantPhi } from "./EliminateRedundantPhi";
export { default as enterSSA } from "./EnterSSA";
export { leaveSSA } from "./LeaveSSA";
+2 -2
View File
@@ -14,8 +14,8 @@ import { wasmFolder } from "@hpcc-js/wasm";
import invariant from "invariant";
import path from "path";
import prettier from "prettier";
import run from "../HIR/Pipeline";
import { printFunction } from "../HIR/PrintHIR";
import run from "../CompilerPipeline";
import { printFunction } from "../HIR";
import { toggleLogging } from "../Utils/logger";
import generateTestsFromFixtures from "./test-utils/generateTestsFromFixtures";