Skip to main content

luaur_analysis/records/
unifier_shared_state.rs

1use crate::records::internal_error_reporter::InternalErrorReporter;
2use crate::records::type_id_pair_hash::TypeIdPairHash;
3use crate::records::unifier_counters::UnifierCounters;
4use crate::type_aliases::type_error_data::TypeErrorData;
5use crate::type_aliases::type_id::TypeId;
6use crate::type_aliases::type_pack_id::TypePackId;
7use luaur_common::records::dense_hash_map::DenseHashMap;
8use luaur_common::records::dense_hash_set::DenseHashSet;
9
10#[derive(Debug)]
11pub struct UnifierSharedState {
12    pub(crate) ice_handler: *mut InternalErrorReporter,
13    pub(crate) skip_cache_for_type: DenseHashMap<TypeId, bool>,
14    pub(crate) cached_unify: DenseHashSet<(TypeId, TypeId), TypeIdPairHash>,
15    pub(crate) cached_unify_error: DenseHashMap<(TypeId, TypeId), TypeErrorData, TypeIdPairHash>,
16    pub(crate) temp_seen_ty: DenseHashSet<TypeId>,
17    pub(crate) temp_seen_tp: DenseHashSet<TypePackId>,
18    pub(crate) counters: UnifierCounters,
19    pub(crate) reentrant_type_reduction: bool,
20}