luaur_bytecode/methods/bc_inst_helper_prepend_to.rs
1use crate::records::bc_function::BcFunction;
2use crate::records::bc_inst::BcInst;
3use crate::records::bc_inst_helper::BcInstHelper;
4use crate::records::bc_op::BcOp;
5use crate::records::bc_ref::BcRef;
6
7impl BcInstHelper<'_> {
8 pub fn prepend_to(&mut self, block: BcOp) {
9 unsafe {
10 (*self.inst.operator_arrow()).block = block;
11 }
12 let block_mut = self.graph.block_op(block);
13 block_mut.ops.push_front(self.inst.op);
14 }
15}