"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.noEmit = exports.fast = void 0;
const parsing_1 = __importDefault(require("./parsing"));
const codegen_1 = __importDefault(require("./codegen"));
const toEsTree_1 = __importDefault(require("./toEsTree"));
const fixImports_1 = __importDefault(require("./fixImports"));
const writeFiles_1 = __importDefault(require("./writeFiles"));
const controlFlowToExpressions_1 = __importDefault(require("./controlFlowToExpressions"));
const checkReferences_1 = __importDefault(require("./checkReferences"));
const createRuntime_1 = __importDefault(require("./createRuntime"));
const runtimeTypeChecking_1 = __importDefault(require("./runtimeTypeChecking"));
const semanticAnalysis_1 = __importDefault(require("./semanticAnalysis"));
const inheritBaseClasses_1 = __importDefault(require("./inheritBaseClasses"));
const addTypedStructArrays_1 = __importDefault(require("./addTypedStructArrays"));
const toModuleFiles_1 = __importDefault(require("./toModuleFiles"));
exports.fast = [
    parsing_1.default,
    controlFlowToExpressions_1.default,
    addTypedStructArrays_1.default,
    runtimeTypeChecking_1.default,
    createRuntime_1.default,
    toEsTree_1.default,
    codegen_1.default,
    toModuleFiles_1.default,
    writeFiles_1.default,
];
const defaultPhases = [
    parsing_1.default,
    semanticAnalysis_1.default,
    fixImports_1.default,
    inheritBaseClasses_1.default,
    controlFlowToExpressions_1.default,
    checkReferences_1.default,
    // createConditionalDeclarations,
    // // addDataClassConstructors,    // removed as part of refactoring to isolated file compilation with Data.properties
    // inferTypes,
    addTypedStructArrays_1.default,
    // we could skip this.
    runtimeTypeChecking_1.default,
    createRuntime_1.default,
    toEsTree_1.default,
    codegen_1.default,
    toModuleFiles_1.default,
    // no emit
    writeFiles_1.default,
];
exports.default = defaultPhases;
// we remove the last 6 phases if we're not emitting.
exports.noEmit = defaultPhases.slice(0, -1);
