Skip to main content

luaur_code_gen/enums/
code_gen_compilation_result.rs

1#[allow(non_camel_case_types)]
2#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
3#[repr(i32)]
4pub enum CodeGenCompilationResult {
5    Success = 0,
6    NothingToCompile = 1,
7    NotNativeModule = 2,
8    CodeGenNotInitialized = 3,
9    CodeGenOverflowInstructionLimit = 4,
10    CodeGenOverflowBlockLimit = 5,
11    CodeGenOverflowBlockInstructionLimit = 6,
12    CodeGenAssemblerFinalizationFailure = 7,
13    CodeGenLoweringFailure = 8,
14    AllocationFailed = 9,
15    Count = 10,
16}
17
18impl Default for CodeGenCompilationResult {
19    fn default() -> Self {
20        Self::Success
21    }
22}
23
24#[allow(non_upper_case_globals)]
25impl CodeGenCompilationResult {
26    pub const Success: Self = Self::Success;
27    pub const NothingToCompile: Self = Self::NothingToCompile;
28    pub const NotNativeModule: Self = Self::NotNativeModule;
29    pub const CodeGenNotInitialized: Self = Self::CodeGenNotInitialized;
30    pub const CodeGenOverflowInstructionLimit: Self = Self::CodeGenOverflowInstructionLimit;
31    pub const CodeGenOverflowBlockLimit: Self = Self::CodeGenOverflowBlockLimit;
32    pub const CodeGenOverflowBlockInstructionLimit: Self =
33        Self::CodeGenOverflowBlockInstructionLimit;
34    pub const CodeGenAssemblerFinalizationFailure: Self = Self::CodeGenAssemblerFinalizationFailure;
35    pub const CodeGenLoweringFailure: Self = Self::CodeGenLoweringFailure;
36    pub const AllocationFailed: Self = Self::AllocationFailed;
37    pub const Count: Self = Self::Count;
38}