Skip to main content

luaur_code_gen/enums/
ir_op_kind.rs

1#[allow(non_camel_case_types)]
2#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
3#[repr(u32)]
4pub enum IrOpKind {
5    None,
6    Undef,
7    Constant,
8    Condition,
9    Inst,
10    Block,
11    VmReg,
12    VmConst,
13    VmUpvalue,
14    VmExit,
15}
16
17impl Default for IrOpKind {
18    fn default() -> Self {
19        Self::None
20    }
21}
22
23#[allow(non_upper_case_globals)]
24impl IrOpKind {
25    pub const None: Self = Self::None;
26    pub const Undef: Self = Self::Undef;
27    pub const Constant: Self = Self::Constant;
28    pub const Condition: Self = Self::Condition;
29    pub const Inst: Self = Self::Inst;
30    pub const Block: Self = Self::Block;
31    pub const VmReg: Self = Self::VmReg;
32    pub const VmConst: Self = Self::VmConst;
33    pub const VmUpvalue: Self = Self::VmUpvalue;
34    pub const VmExit: Self = Self::VmExit;
35}