UNPKG

@awayfl/avm2

Version:

Virtual machine for executing AS3 code

31 lines 1.13 kB
import { ExceptionInfo } from '../abc/lazy/ExceptionInfo'; import { MethodInfo } from '../abc/lazy/MethodInfo'; import { Instruction } from './Instruction'; import { COMPILATION_FAIL_REASON } from '../flags'; export interface IAnalyzeError { error: { message: string; reason: COMPILATION_FAIL_REASON; }; } export interface IAnalyseResult { jumps: Array<number>; set: Array<Instruction>; catchStart: NumberMap<ExceptionInfo[]>; catchEnd: NumberMap<ExceptionInfo[]>; } /** * Propogade stack for calculation real stack size for every instruction */ export declare function propagateStack(position: number, stack: number, q: Array<Instruction>): number; /** * Like as propogadeStack, only for scope */ export declare function propagateScope(position: number, scope: number, q: Array<Instruction>): void; export declare function propogateTree(q: Array<Instruction>, jumps: number[]): void; /** * Analyzing instruction set from method info * @param methodInfo */ export declare function analyze(methodInfo: MethodInfo): IAnalyseResult | IAnalyzeError; //# sourceMappingURL=analyze.d.ts.map