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_cmd::IrCmd;
use crate::records::ir_builder::IrBuilder;
use crate::records::ir_op::IrOp;

impl IrBuilder {
    pub fn inst_ir_cmd_ir_op(&mut self, cmd: IrCmd, a: IrOp) -> IrOp {
        // C++ `inst(cmd, {a})` — a size-1 operand list. The original port padded
        // it to two operands with `undef`, leaving a spurious `undef` operand
        // (e.g. `RETURN 0u, undef`).
        self.inst_ir_cmd_initializer_list_ir_op(cmd, &[a])
    }
}