luaur-code-gen 0.1.0

Native (A64/X64) code generation for Luau (Rust).
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use crate::enums::ir_op_kind::IrOpKind;
use crate::records::const_prop_state::ConstPropState;
use crate::records::ir_op::IrOp;

impl ConstPropState {
    pub fn try_get_value(&mut self, op: IrOp) -> IrOp {
        if let Some(info) = self.try_get_register_info(op) {
            return unsafe { (*info).value };
        }

        IrOp::ir_op_kind_u32(IrOpKind::None, 0)
    }
}