luaur_analysis/methods/
unifier_shared_state_unifier_shared_state.rs1use crate::records::internal_error_reporter::InternalErrorReporter;
3use crate::records::unifier_counters::UnifierCounters;
4use crate::records::unifier_shared_state::UnifierSharedState;
5use luaur_common::records::dense_hash_map::DenseHashMap;
6use luaur_common::records::dense_hash_set::DenseHashSet;
7
8impl UnifierSharedState {
9 pub fn unifier_shared_state(ice_handler: *mut InternalErrorReporter) -> Self {
10 Self {
11 ice_handler,
12 skip_cache_for_type: DenseHashMap::new(core::ptr::null()),
13 cached_unify: DenseHashSet::new((core::ptr::null(), core::ptr::null())),
14 cached_unify_error: DenseHashMap::new((core::ptr::null(), core::ptr::null())),
15 temp_seen_ty: DenseHashSet::new(core::ptr::null()),
16 temp_seen_tp: DenseHashSet::new(core::ptr::null()),
17 counters: UnifierCounters::default(),
18 reentrant_type_reduction: false,
19 }
20 }
21}