Skip to main content

luaur_bytecode/records/
bytecode_graph_parser.rs

1use crate::records::bc_function::BcFunction;
2use crate::records::bc_op::BcOp;
3use crate::records::block_producers::BlockProducers;
4use alloc::vec::Vec;
5use luaur_common::records::dense_hash_map::DenseHashMap;
6
7#[derive(Debug)]
8pub struct BytecodeGraphParser<'a> {
9    pub(crate) func: &'a mut BcFunction,
10    pub(crate) block_by_pc: DenseHashMap<u32, BcOp>,
11    pub(crate) producers: Vec<BlockProducers>,
12    pub(crate) current_block: BcOp,
13}
14
15impl<'a> BytecodeGraphParser<'a> {
16    pub(crate) const K_MAX_CFG_BLOCKS: u32 = 1000;
17}