luaur-code-gen 0.1.3

Native (A64/X64) code generation for Luau (Rust).
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use crate::enums::ir_const_kind::IrConstKind;
use crate::records::ir_const::IrConst;
use crate::records::ir_function::IrFunction;
use crate::records::ir_op::IrOp;

impl IrFunction {
    pub fn import_op(&self, op: IrOp) -> u32 {
        let value: IrConst = self.const_op(op);
        debug_assert!(value.kind == IrConstKind::Import);
        unsafe { value.value.value_uint }
    }
}