luaur_bytecode/methods/bc_function_phi_op.rs
1use crate::enums::bc_op_kind::BcOpKind;
2use crate::records::bc_function::BcFunction;
3use crate::records::bc_op::BcOp;
4use crate::records::bc_phi::BcPhi;
5use luaur_common::macros::luau_assert::LUAU_ASSERT;
6
7impl BcFunction {
8 pub fn phi_op(&mut self, op: BcOp) -> &mut BcPhi {
9 LUAU_ASSERT!(op.kind == BcOpKind::Phi);
10 &mut self.phis[op.index as usize]
11 }
12}