Skip to main content

luaur_bytecode/methods/
bytecode_graph_serializer_get_vm_const_input_d.rs

1use crate::records::bc_inst::BcInst;
2use crate::records::bytecode_graph_serializer::BytecodeGraphSerializer;
3
4impl<'a> BytecodeGraphSerializer<'a> {
5    pub fn get_vm_const_input_d(&mut self, insn: &mut BcInst, index: u8) -> u16 {
6        let cid: u32 = self.get_vm_const_input_raw(insn, index);
7
8        if cid > 0xffff {
9            self.error = true;
10        }
11
12        cid as u16
13    }
14}