luaur_analysis/records/
cfg_allocator.rs1use crate::records::block::Block;
4use crate::records::refinement_arena_control_flow_graph::RefinementArena;
5use crate::records::typed_allocator::TypedAllocator;
6use crate::type_aliases::definition::Definition;
7use crate::type_aliases::instruction::Instruction;
8
9#[allow(non_snake_case)]
10#[derive(Debug)]
11pub struct CfgAllocator {
12 pub refinement_arena: RefinementArena,
14 pub(crate) block: TypedAllocator<Block>,
16 pub(crate) instructions: TypedAllocator<Instruction>,
17 pub(crate) defs: TypedAllocator<Definition>,
18 pub(crate) frozen: bool,
19}
20
21impl Default for CfgAllocator {
22 fn default() -> Self {
23 Self {
24 refinement_arena: RefinementArena {
28 allocator: TypedAllocator::default(),
29 },
30 block: TypedAllocator::default(),
31 instructions: TypedAllocator::default(),
32 defs: TypedAllocator::default(),
33 frozen: false,
35 }
36 }
37}
38
39unsafe impl Send for CfgAllocator {}
40unsafe impl Sync for CfgAllocator {}