import { Call, FunctionJp, Statement, WrapperStmt } from "@specs-feup/clava/api/Joinpoints.js"; import { AdvancedTransform } from "../AdvancedTransform.js"; export declare class Outliner extends AdvancedTransform { private defaultPrefix; constructor(silent?: boolean); /** * Sets the prefix used for the autogenerated names of the outlined functions * @param {string} prefix - the prefix to be used */ setDefaultPrefix(prefix: string): void; /** * Applies function outlining to a code region delimited by two statements. * Function outlining is the process of removing a section of code from a function and placing it in a new function. * The beginning and end of the code region must be at the same scope level. * @param {statement} begin - the first statement of the outlining region * @param {statement} end - the last statement of the outlining region * @returns an array with the joinpoints of the outlined function and the call to it. * These values are merely references, and all changes have already been committed to the AST at this point */ outline(begin: Statement, end: Statement, outlineAllDecls?: boolean): [FunctionJp, Call] | [null, null]; outlineWithWrappers(begin: WrapperStmt, end: WrapperStmt, outlineAllDecls?: boolean): [FunctionJp, Call] | [null, null]; /** * Applies function outlining to a code region delimited by two statements. * Function outlining is the process of removing a section of code from a function and placing it in a new function. * The beginning and end of the code region must be at the same scope level. * @param {statement} begin - the first statement of the outlining region * @param {statement} end - the last statement of the outlining region * @param {string} functionName - the name to give to the outlined function * @returns an array with the joinpoints of the outlined function and the call to it. * These values are merely references, and all changes have already been committed to the AST at this point */ outlineWithName(begin: Statement, end: Statement, functionName: string, outlineAllDecls?: boolean): [FunctionJp, Call] | [null, null]; private transformPointerReassignments; private flattenScopes; private removeContinues; private removeBreaks; private removeRedundancies; /** * Verifies if a code region can undergo function outlining. * This check is performed automatically by the outliner itself, but it can be invoked manually if desired. * @param {statement} begin - the first statement of the outlining region * @param {statement} end - the last statement of the outlining region * @returns true if the outlining region is valid, false otherwise */ checkOutline(begin: Statement, end: Statement): boolean; private checkOutOfRegionGotos; private ensureVoidReturn; private wrapBeginAndEnd; private findGlobalVars; private createCall; private createArgs; private createFunction; private findNonvoidReturnStmts; private scalarsToPointers; private createParams; private findRefsInRegion; private declInPath; private isValidVarref; private findDeclsWithDependency; private splitRegions; private generateFunctionName; } //# sourceMappingURL=Outliner.d.ts.map