luaur_bytecode/methods/
call_inliner_is_get_var_arg.rs1use crate::enums::bc_op_kind::BcOpKind;
2use crate::records::bc_inst::BcInst;
3use crate::records::bc_op::BcOp;
4use crate::records::bc_ref::BcRef;
5use crate::records::call_inliner::CallInliner;
6use luaur_common::enums::luau_opcode::LuauOpcode;
7
8impl<'a> CallInliner<'a> {
9 pub fn is_get_var_arg(&mut self, target_op: BcOp) -> bool {
10 if target_op.kind != BcOpKind::Inst {
11 return false;
12 }
13 let inst: BcRef<BcInst> = self.target.inst(target_op);
14 inst.operator_deref().op == LuauOpcode::LOP_GETVARARGS
15 }
16}