import type { ASTNode } from "../../ast/ASTNode"; import type { CPPConstruct, SuccessfullyCompiled } from "./CPPConstruct"; import { RuntimeConstruct } from "./CPPConstruct"; import { BasicCPPConstruct } from "./BasicCPPConstruct"; import type { SemanticContext, TranslationUnitContext } from "../compilation/contexts"; import type { FunctionEntity } from "../compilation/entities"; import { TemporaryObjectEntity } from "../compilation/entities"; import type { CompiledExpression, Expression, TypedExpression } from "./expressions/Expression"; import type { RuntimeFunction } from "../compilation/functions"; import { CompiledDirectInitializer, RuntimeDirectInitializer } from "./initializers/DirectInitializer"; import { DirectInitializer } from "./initializers/DirectInitializer"; import type { CPPObject } from "../runtime/objects"; import type { PotentialFullExpression } from "./PotentialFullExpression"; import type { AnalyticConstruct } from "../../analysis/predicates"; import type { CompiledTemporaryDeallocator } from "./TemporaryDeallocator"; import type { AtomicType, CompleteClassType, CompleteReturnType, FunctionType, ReferenceType, VoidType } from "../compilation/types"; export declare class FunctionCall extends BasicCPPConstruct { readonly construct_type = "FunctionCall"; readonly func: FunctionEntity>; readonly args: readonly Expression[]; readonly receiverType?: CompleteClassType; readonly argInitializers?: readonly DirectInitializer[]; readonly returnByValueTarget?: TemporaryObjectEntity; private readonly temporaryObjects; /** * A FunctionEntity must be provided to specify which function is being called. The * return type of that function must be complete (if it's not, such a function call * should generate an error - the constructs that use FunctionCall should take care * of checking for this before making the FunctionCall and generate an error otherwise). * * @param context * @param func Specifies which function is being called. * @param args Arguments to the function. * @param receiverType */ constructor(context: TranslationUnitContext, func: FunctionEntity>, args: readonly TypedExpression[], receiverType: CompleteClassType | undefined); mayManageTemporaryLifetimes(): this is FunctionCall; findFullExpression(): PotentialFullExpression | FunctionCall; addTemporaryObject(tempObjEnt: TemporaryObjectEntity): void; onAttach(parent: CPPConstruct): void; createRuntimeFunctionCall = FunctionType>(this: CompiledFunctionCall, parent: RuntimeConstruct, receiver: CPPObject | undefined): RuntimeFunctionCall; isReturnByValue(): this is TypedFunctionCall>; isReturnByReference(): this is TypedFunctionCall>; isReturnVoid(): this is TypedFunctionCall>; isSemanticallyEquivalent_impl(other: AnalyticConstruct, equivalenceContext: SemanticContext): boolean; } export interface TypedFunctionCall = FunctionType> extends FunctionCall, SuccessfullyCompiled { readonly returnByValueTarget: T["returnType"] extends (AtomicType | CompleteClassType) ? TemporaryObjectEntity : undefined; } export interface CompiledFunctionCall = FunctionType> extends TypedFunctionCall, SuccessfullyCompiled { readonly temporaryDeallocator?: CompiledTemporaryDeallocator; readonly args: readonly CompiledExpression[]; readonly argInitializers: readonly CompiledDirectInitializer[]; } export declare const INDEX_FUNCTION_CALL_PUSH = 0; export declare const INDEX_FUNCTION_CALL_ARGUMENTS = 1; export declare const INDEX_FUNCTION_CALL_CALL = 2; export declare const INDEX_FUNCTION_CALL_RETURN = 3; export declare class RuntimeFunctionCall = FunctionType> extends RuntimeConstruct> { readonly model: CompiledFunctionCall; readonly calledFunction: RuntimeFunction; readonly argInitializers: readonly RuntimeDirectInitializer[]; readonly receiver?: CPPObject; readonly index: typeof INDEX_FUNCTION_CALL_PUSH | typeof INDEX_FUNCTION_CALL_ARGUMENTS | typeof INDEX_FUNCTION_CALL_CALL | typeof INDEX_FUNCTION_CALL_RETURN; constructor(model: CompiledFunctionCall, parent: RuntimeConstruct, receiver?: CPPObject); protected upNextImpl(): void; protected stepForwardImpl(): void; isReturnByValue(): this is RuntimeFunctionCall>; }