luaur_bytecode/methods/
bytecode_graph_parser_bytecode_graph_parser.rs1use crate::records::bc_function::BcFunction;
2use crate::records::bc_op::BcOp;
3use crate::records::bytecode_graph_parser::BytecodeGraphParser;
4use alloc::vec::Vec;
5use luaur_common::records::dense_hash_map::DenseHashMap;
6
7impl<'a> BytecodeGraphParser<'a> {
8 pub fn bytecode_graph_parser_bytecode_graph_parser(func: &'a mut BcFunction) -> Self {
9 Self {
10 func,
11 block_by_pc: DenseHashMap::new(u32::MAX - 1),
12 producers: Vec::new(),
13 current_block: BcOp::new(),
14 }
15 }
16
17 pub fn new(func: &'a mut BcFunction) -> Self {
18 Self::bytecode_graph_parser_bytecode_graph_parser(func)
19 }
20}