public static int GetParamSize(this InstructionType type) { if (NoParamInstructionTypes.Contains(type)) { return(0); } if (U32ParamInstructionTypes.Contains(type) || I32ParamInstructionTypes.Contains(type)) { return(1); } if (U64ParamInstructionTypes.Contains(type)) { return(2); } throw new Exception("unexpected instruction type"); }
public static bool IsSigned(this InstructionType type) { return(I32ParamInstructionTypes.Contains(type)); }