Skip to main content

luaur_bytecode/methods/
call_inliner_get_var_arg_param.rs

1use crate::records::bc_op::BcOp;
2use crate::records::call_inliner::CallInliner;
3use luaur_common::macros::luau_assert::LUAU_ASSERT;
4
5impl<'a> CallInliner<'a> {
6    pub fn get_var_arg_param(&self, get_var_args_op: BcOp, idx: u32) -> BcOp {
7        let moves = self.var_arg_moves.get(&get_var_args_op);
8        LUAU_ASSERT!(moves.is_some() && idx < moves.unwrap().len() as u32);
9        moves.unwrap()[idx as usize]
10    }
11}