Skip to main content

luaur_bytecode/methods/
bc_block_append_instruction.rs

1use crate::enums::bc_op_kind::BcOpKind;
2use crate::records::bc_block::BcBlock;
3use crate::records::bc_op::BcOp;
4use luaur_common::macros::luau_assert::LUAU_ASSERT;
5
6impl BcBlock {
7    pub fn append_instruction(&mut self, inst: BcOp) {
8        LUAU_ASSERT!(inst.kind == BcOpKind::Inst);
9        self.ops.push_back(inst);
10    }
11}