luaur_code_gen/methods/ir_builder_inst_ir_builder_alt_b.rs
1use crate::enums::ir_cmd::IrCmd;
2use crate::records::ir_builder::IrBuilder;
3use crate::records::ir_op::IrOp;
4
5impl IrBuilder {
6 pub fn inst_ir_cmd_ir_op(&mut self, cmd: IrCmd, a: IrOp) -> IrOp {
7 // C++ `inst(cmd, {a})` — a size-1 operand list. The original port padded
8 // it to two operands with `undef`, leaving a spurious `undef` operand
9 // (e.g. `RETURN 0u, undef`).
10 self.inst_ir_cmd_initializer_list_ir_op(cmd, &[a])
11 }
12}