Delete old CompilerError module

This was a carryover from the old architecture; we can remove it now to get rid 
of the indirection.
This commit is contained in:
Lauren Tan
2023-01-12 19:35:19 -05:00
parent 321d7b7d00
commit 325987d744
12 changed files with 12 additions and 32 deletions
+1 -1
View File
@@ -7,7 +7,7 @@
import { NodePath, Scope } from "@babel/traverse";
import * as t from "@babel/types";
import { invariant } from "../Utils/CompilerError";
import invariant from "invariant";
import todo, { todoInvariant } from "../Utils/todo";
import { assertExhaustive } from "../Utils/utils";
import {
+1 -1
View File
@@ -6,7 +6,7 @@
*/
import * as t from "@babel/types";
import { invariant } from "../Utils/CompilerError";
import invariant from "invariant";
// *******************************************************************************************
// *******************************************************************************************
+1 -1
View File
@@ -6,7 +6,7 @@
*/
import * as t from "@babel/types";
import { invariant } from "../Utils/CompilerError";
import invariant from "invariant";
import { logHIR } from "../Utils/logger";
import { assertExhaustive } from "../Utils/utils";
import {
@@ -5,7 +5,7 @@
* LICENSE file in the root directory of this source tree.
*/
import { invariant } from "../Utils/CompilerError";
import invariant from "invariant";
import {
BlockId,
Effect,
@@ -5,8 +5,7 @@
* LICENSE file in the root directory of this source tree.
*/
import { invariant } from "../Utils/CompilerError";
import { assertExhaustive } from "../Utils/utils";
import invariant from "invariant";
import {
BasicBlock,
BlockId,
@@ -29,6 +28,7 @@ import {
eachTerminalOperand,
eachTerminalSuccessor,
} from "../HIR/visitors";
import { assertExhaustive } from "../Utils/utils";
/**
* For every usage of a value in the given function, infers the effect or action
@@ -5,6 +5,7 @@
* LICENSE file in the root directory of this source tree.
*/
import invariant from "invariant";
import {
InstructionId,
makeInstructionId,
@@ -14,7 +15,6 @@ import {
ReactiveValueBlock,
ScopeId,
} from "../HIR/HIR";
import { invariant } from "../Utils/CompilerError";
import { getInstructionScope, getPlaceScope } from "./BuildReactiveBlocks";
import { eachTerminalBlock, eachTerminalOperand } from "./visitors";
@@ -5,6 +5,7 @@
* LICENSE file in the root directory of this source tree.
*/
import invariant from "invariant";
import {
InstructionId,
InstructionValue,
@@ -17,7 +18,6 @@ import {
ScopeId,
} from "../HIR";
import { eachInstructionValueOperand } from "../HIR/visitors";
import { invariant } from "../Utils/CompilerError";
import DisjointSet from "../Utils/DisjointSet";
import { retainWhere } from "../Utils/utils";
import { getPlaceScope } from "./BuildReactiveBlocks";
@@ -5,6 +5,7 @@
* LICENSE file in the root directory of this source tree.
*/
import invariant from "invariant";
import {
ReactiveFunction,
ReactiveScopeBlock,
@@ -19,7 +20,6 @@ import {
printInstructionValue,
printPlace,
} from "../HIR/PrintHIR";
import { invariant } from "../Utils/CompilerError";
import { assertExhaustive } from "../Utils/utils";
export function printReactiveFunction(fn: ReactiveFunction): string {
@@ -5,6 +5,7 @@
* LICENSE file in the root directory of this source tree.
*/
import invariant from "invariant";
import {
Identifier,
IdentifierId,
@@ -14,7 +15,6 @@ import {
ReactiveValueBlock,
} from "../HIR/HIR";
import { eachInstructionValueOperand } from "../HIR/visitors";
import { invariant } from "../Utils/CompilerError";
import { assertExhaustive } from "../Utils/utils";
/**
+1 -1
View File
@@ -1,3 +1,4 @@
import invariant from "invariant";
import {
BasicBlock,
BlockId,
@@ -17,7 +18,6 @@ import {
mapInstructionOperands,
mapTerminalOperands,
} from "../HIR/visitors";
import { invariant } from "../Utils/CompilerError";
type IncompletePhi = {
oldId: Identifier;
@@ -1,20 +0,0 @@
/**
* 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.
*/
import invariant from "invariant";
// Record a bailout if there is an invariant violation and a recently created compiler context.
// Otherwise, just throws a regular invariant.
function compilerInvariant(
condition: unknown,
format: string,
...args: any[]
): asserts condition {
return invariant(condition, format, ...args);
}
export { compilerInvariant as invariant };
+1 -1
View File
@@ -5,7 +5,7 @@
* LICENSE file in the root directory of this source tree.
*/
import { invariant } from "./CompilerError";
import invariant from "invariant";
/**
* Represents items which form disjoint sets.