UNPKG

cil-lexer

Version:
101 lines (100 loc) 2.48 kB
import { InstrTag } from "./tag.g"; export declare const enum Pop { Pop0 = 0, Pop1 = 1, PopI = 2, VarPop = 3, /** Pop1+Pop1 */ Pop1_Pop1 = 4, PopRef = 5, /** PopI+PopI+PopI */ PopI_PopI_PopI = 6, /** PopI+PopI */ PopI_PopI = 7, /** PopI+PopI8 */ PopI_PopI8 = 8, /** PopI+PopR4 */ PopI_PopR4 = 9, /** PopI+PopR8 */ PopI_PopR8 = 10, /** PopRef+Pop1 */ PopRef_Pop1 = 11, /** PopI+Pop1 */ PopI_Pop1 = 12, /** PopRef+PopI */ PopRef_PopI = 13, /** PopRef+PopI+PopI */ PopRef_PopI_PopI = 14, /** PopRef+PopI+PopI8 */ PopRef_PopI_PopI8 = 15, /** PopRef+PopI+PopR4 */ PopRef_PopI_PopR4 = 16, /** PopRef+PopI+PopR8 */ PopRef_PopI_PopR8 = 17, /** PopRef+PopI+PopRef */ PopRef_PopI_PopRef = 18, } export declare const enum Push { Push0 = 0, Push1 = 1, PushI = 2, PushI8 = 3, PushRef = 4, PushR4 = 5, PushR8 = 6, /** Push1+Push1 */ Push1_Push1 = 7, VarPush = 8, } export declare const enum Type { InlineNone = 0, InlineI = 1, InlineR = 2, InlineI8 = 3, InlineSig = 4, InlineMethod = 5, InlineVar = 6, InlineType = 7, InlineTok = 8, InlineBrTarget = 9, InlineSwitch = 10, InlineString = 11, InlineField = 12, ShortInlineVar = 13, ShortInlineI = 14, ShortInlineR = 15, ShortInlineBrTarget = 16, } export declare const enum Kind { IPrimitive = 0, IMacro = 1, IInternal = 2, IPrefix = 3, IObjModel = 4, } export declare const enum Flow { NEXT = 0, BREAK = 1, CALL = 2, RETURN = 3, BRANCH = 4, COND_BRANCH = 5, META = 6, THROW = 7, } export interface OpCodeDefinition { tag: InstrTag; baseTag?: InstrTag; name: string; type: Type; pop: Pop; push: Push; kind: Kind; length: 0 | 1 | 2; value1: number; value2: number; flow: Flow; } export declare const MOOT = -1; export declare function OPDEF(tag: InstrTag, name: string, pop: Pop, push: Push, type: Type, kind: Kind, length: 0 | 1 | 2, value1: number, value2: number, flow: Flow): OpCodeDefinition; export declare function OPALIAS(tag: InstrTag, baseTag: InstrTag, name: string, pop: Pop, push: Push, type: Type, kind: Kind, length: 0 | 1 | 2, value1: number, value2: number, flow: Flow): OpCodeDefinition;