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::functions::remove_block_use::remove_block_use;
use crate::functions::remove_inst_use::remove_inst_use;
use crate::records::ir_function::IrFunction;
use crate::records::ir_op::IrOp;

pub fn remove_use(function: &mut IrFunction, op: IrOp) {
    if op.kind() == IrOpKind::Inst {
        remove_inst_use(function, op.index());
    } else if op.kind() == IrOpKind::Block {
        remove_block_use(function, op.index());
    }
}