import { SourceLocation, ConcreteType } from "../ast"; import { StructMap } from "../typecheck/structs"; export declare type Instruction = { tag: "DUP"; } | { tag: "POP"; } | { tag: "SWAP"; } | { tag: "IADD"; } | { tag: "IAND"; } | { tag: "IDIV"; } | { tag: "IMUL"; } | { tag: "IOR"; } | { tag: "IREM"; } | { tag: "ISHL"; } | { tag: "ISHR"; } | { tag: "ISUB"; } | { tag: "IXOR"; } | { tag: "VLOAD"; argument: string; } | { tag: "VSTORE"; argument: string; } | { tag: "ACONST_NULL"; } | { tag: "BPUSH"; argument: boolean; } | { tag: "CPUSH"; argument: string; } | { tag: "IPUSH"; argument: number; } | { tag: "SPUSH"; argument: string; } | { tag: "LABEL"; argument: string; } | { tag: "POSITION"; argument: SourceLocation; } | { tag: "IF"; argument: string; } | { tag: "IF_ACMPEQ"; argument: string; } | { tag: "IF_BCMPEQ"; argument: string; } | { tag: "IF_ICMPEQ"; argument: string; } | { tag: "IF_ICMPLT"; argument: string; } | { tag: "IF_ICMPLE"; argument: string; } | { tag: "IF_CCMPEQ"; argument: string; } | { tag: "IF_CCMPLT"; argument: string; } | { tag: "IF_CCMPLE"; argument: string; } | { tag: "GOTO"; argument: string; } | { tag: "ATHROW"; } | { tag: "ABORT"; argument: null | "assert" | "requires" | "ensures" | "loop_invariant"; } | { tag: "INVOKESTATIC"; argument: string; } | { tag: "INVOKEDYNAMIC"; argument: number; } | { tag: "RETURN"; } | { tag: "NEW"; argument: ConcreteType; } | { tag: "NEWARRAY"; argument: ConcreteType; } | { tag: "ARRAYLENGTH"; } | { tag: "AADDF"; struct: string; field: string; } | { tag: "AADDS"; } | { tag: "BMLOAD"; } | { tag: "BMSTORE"; } | { tag: "CMLOAD"; } | { tag: "CMSTORE"; } | { tag: "IMLOAD"; } | { tag: "IMSTORE"; } | { tag: "AMLOAD"; } | { tag: "AMSTORE"; } | { tag: "SMLOAD"; } | { tag: "SMSTORE"; } | { tag: "FUNCTIONADDRESS"; argument: string; } | { tag: "UNTAG"; } | { tag: "ADDTAG"; cast: string; } | { tag: "CHECKTAG"; cast: string; } | { tag: "IF_TAGEQ"; cast: string; argument: string; }; export interface Function { args: string[]; code: Instruction[]; labels: Map; } export interface Program { native_pool: Map; function_pool: Map; struct_pool: StructMap; } export declare const empty: Program; export declare function instructionToString(instr: Instruction): string;