luaur_bytecode/methods/call_inliner_map_vm_const_op.rs
1use crate::enums::bc_op_kind::BcOpKind;
2use crate::records::bc_op::BcOp;
3use luaur_common::macros::luau_assert::LUAU_ASSERT;
4
5pub fn call_inliner_map_vm_const_op(
6 caller_vm_const_size_before_inline: u32,
7 target_vm_const: BcOp,
8) -> BcOp {
9 LUAU_ASSERT!(target_vm_const.kind == BcOpKind::VmConst);
10 BcOp {
11 kind: BcOpKind::VmConst,
12 index: caller_vm_const_size_before_inline + target_vm_const.index,
13 }
14}