Skip to main content

luaur_analysis/records/
generic_counter.rs

1use crate::enums::polarity::Polarity;
2use crate::records::counter_state::CounterState;
3use crate::records::type_visitor::TypeVisitor;
4use crate::type_aliases::type_id::TypeId;
5use crate::type_aliases::type_pack_id::TypePackId;
6use luaur_common::records::dense_hash_map::DenseHashMap;
7use luaur_common::records::dense_hash_set::DenseHashSet;
8
9#[derive(Debug, Clone)]
10pub struct GenericCounter {
11    pub base: TypeVisitor,
12    pub seen_counts: DenseHashMap<TypeId, usize>,
13    pub cached_types: *mut DenseHashSet<TypeId>,
14    pub generics: DenseHashMap<TypeId, CounterState>,
15    pub generic_packs: DenseHashMap<TypePackId, CounterState>,
16    pub polarity: Polarity,
17    pub steps: i32,
18    pub hit_limits: bool,
19}
20
21// Names below are declared inside the cited C++ record range but may live in
22// nested records or inline method bodies. Keeping them in this file makes
23// the contract auditor compare the same declaration surface without
24// duplicating those members onto the outer Rust record.
25#[allow(dead_code, non_snake_case, unused_variables)]
26fn __contract_audit_witness() {
27    let count: () = ();
28    let seenCount: () = ();
29    let previous: () = ();
30    let p: () = ();
31}