import { Opcode } from "../spec"; import { Instruction } from "./"; export interface SwitchInstruction extends Instruction { opcode: Opcode.TABLESWITCH | Opcode.LOOKUPSWITCH; defaultOffset: number; jumpOffsets: number[]; } export interface TableSwitchInstruction extends SwitchInstruction { opcode: Opcode.TABLESWITCH; lowCase: number; highCase: number; } export interface LookupSwitchInstruction extends SwitchInstruction { opcode: Opcode.LOOKUPSWITCH; cases: number[]; } export declare const readSwitch: (insn: Instruction) => SwitchInstruction; export declare const writeSwitch: (insn: SwitchInstruction, initialSize?: number) => Instruction; export declare const switchValue: (insn: SwitchInstruction, jumpIndex: number) => number;