luaur-bytecode 0.1.3

Luau bytecode format and builder (Rust).
Documentation
1
2
3
4
5
6
7
8
9
10
use crate::records::bc_inst::BcInst;
use crate::records::bc_inst_helper::BcInstHelper;
use luaur_common::macros::luau_assert::LUAU_ASSERT;

impl<'a> BcInstHelper<'a> {
    pub fn operator_deref(&self) -> &BcInst {
        LUAU_ASSERT!((self.inst.op.index as usize) < self.inst.vec.len());
        &self.inst.vec[self.inst.op.index as usize]
    }
}