Skip to main content

Normalizer

Struct Normalizer 

Source
pub struct Normalizer { /* private fields */ }

Implementations§

Source§

impl Normalizer

Source

pub fn cache_type_ids(&mut self, tys: TypeIds) -> *const TypeIds

Source§

impl Normalizer

Source

pub fn clear_caches(&mut self)

Source§

impl Normalizer

Source

pub fn clear_fuel(&mut self)

Source§

impl Normalizer

Source

pub fn clear_normal(&mut self, norm: &mut NormalizedType)

Source§

impl Normalizer

Source

pub fn consume_fuel(&mut self)

Source§

impl Normalizer

Source

pub fn initialize_fuel(&mut self) -> bool

Source§

impl Normalizer

Source

pub fn intersect_extern_types( &mut self, heres: &mut NormalizedExternType, theres: &NormalizedExternType, )

Source§

impl Normalizer

Source§

impl Normalizer

Source

pub fn intersect_extern_types_with_shape( &mut self, heres: &mut NormalizedExternType, there: TypeId, )

Source§

impl Normalizer

Source

pub fn intersect_functions( &mut self, heres: &mut NormalizedFunctionType, theres: &NormalizedFunctionType, )

Source§

impl Normalizer

Source§

impl Normalizer

Source

pub fn intersect_normal_with_negation_ty( &mut self, to_negate: TypeId, intersect: &mut NormalizedType, ) -> NormalizationResult

Source§

impl Normalizer

Source

pub fn intersect_normal_with_ty( &mut self, here: &mut NormalizedType, there: TypeId, seen_table_prop_pairs: &mut SeenTablePropPairs, seen_set_types: &mut DenseHashSet<TypeId>, ) -> NormalizationResult

Source§

impl Normalizer

Source

pub fn intersect_normals( &mut self, here: &mut NormalizedType, there: &NormalizedType, ignore_smaller_tyvars: i32, ) -> NormalizationResult

Source§

impl Normalizer

Source

pub fn intersect_strings( &mut self, here: &mut NormalizedStringType, there: &NormalizedStringType, )

Source§

impl Normalizer

Source

pub fn intersect_tables(&mut self, heres: &mut TypeIds, theres: &TypeIds)

Source§

impl Normalizer

Source

pub fn intersect_tables_with_table( &mut self, heres: &mut TypeIds, there: TypeId, seen_table_prop_pairs: &mut SeenTablePropPairs, seen_set_types: &mut DenseHashSet<TypeId>, )

Source§

impl Normalizer

Source

pub fn intersect_tyvars_with_ty( &mut self, here: &mut NormalizedTyvars, there: TypeId, seen_table_prop_pairs: &mut SeenTablePropPairs, seen_set_types: &mut DenseHashSet<TypeId>, ) -> NormalizationResult

Source§

impl Normalizer

Source

pub fn intersection_of_bools(&mut self, here: TypeId, there: TypeId) -> TypeId

Source§

impl Normalizer

Source

pub fn intersection_of_functions( &mut self, here: TypeId, there: TypeId, ) -> Option<TypeId>

Source§

impl Normalizer

Source

pub fn intersection_of_tables( &mut self, here: TypeId, there: TypeId, seen_table_prop_pairs: &mut SeenTablePropPairs, seen_set: &mut DenseHashSet<TypeId>, ) -> Option<TypeId>

Source§

impl Normalizer

Source

pub fn intersection_of_tops(&mut self, here: TypeId, there: TypeId) -> TypeId

Source§

impl Normalizer

Source§

impl Normalizer

Source§

impl Normalizer

Source

pub fn intersection_type(&mut self, here: TypeId, there: TypeId) -> TypeId

Source§

impl Normalizer

Source§

impl Normalizer

Source§

impl Normalizer

Source§

impl Normalizer

Source§

impl Normalizer

Source

pub fn is_intersection_inhabited_type_id_type_id( &mut self, left: TypeId, right: TypeId, ) -> NormalizationResult

C++ NormalizationResult Normalizer::isIntersectionInhabited(TypeId left, TypeId right). Builds the seen sets, initializes normalization fuel, and delegates to the seen-set overload. The Rust port does not model C++ exceptions; the NormalizerHitLimits path surfaces through the delegate’s return value.

Source§

impl Normalizer

Source§

impl Normalizer

Source

pub fn negate(&mut self, there: TypeId) -> TypeId

Source§

impl Normalizer

Source

pub fn negate_all(&mut self, theres: &TypeIds) -> TypeIds

Source§

impl Normalizer

Source§

impl Normalizer

Source

pub fn normalize(&mut self, ty: TypeId) -> Arc<NormalizedType>

Source

pub fn try_normalize(&mut self, ty: TypeId) -> Option<Arc<NormalizedType>>

Source§

impl Normalizer

Source

pub fn normalize_intersections( &mut self, intersections: &Vec<TypeId>, out_type: &mut NormalizedType, seen_table_prop_pairs: &mut SeenTablePropPairs, seen_set: &mut DenseHashSet<TypeId>, ) -> NormalizationResult

Source§

impl Normalizer

Source

pub fn normalizer_normalizer(_other: &Normalizer)

@delete

Source§

impl Normalizer

Source

pub fn normalizer_normalizer_mut(&mut self)

In C++, this method is deleted to prevent move construction. In Rust, Normalizer does not implement Copy, and move construction is handled by the language’s move semantics.

Source§

impl Normalizer

Source

pub fn normalizer(&mut self)

In C++, the default constructor is deleted. In Rust, we represent this by providing a method that panics if called.

Source§

impl Normalizer

Source

pub fn normalizer_destructor(&mut self)

Source§

impl Normalizer

Source

pub fn new( arena: *mut TypeArena, builtin_types: *mut BuiltinTypes, shared_state: *mut UnifierSharedState, solver_mode: SolverMode, cache_inhabitance: bool, ) -> Self

C++ Normalizer::Normalizer(TypeArena*, NotNull<BuiltinTypes>, NotNull<UnifierSharedState>, SolverMode, bool cacheInhabitance = false) (Analysis/src/Normalize.cpp:858). Owned constructor: the five collaborators are stored; every cache is default-empty (the DenseHashMaps take their nullptr empty-key, matching the C++ member initializers {nullptr} / {{nullptr, nullptr}}).

Source

pub fn normalizer_type_arena_not_null_builtin_types_not_null_unifier_shared_state_solver_mode_bool( &mut self, arena: *mut TypeArena, builtin_types: *mut BuiltinTypes, shared_state: *mut UnifierSharedState, solver_mode: SolverMode, cache_inhabitance: bool, )

Source§

impl Normalizer

Source

pub fn operator_assign_mut(&mut self)

In C++, this method is deleted to prevent move assignment. In Rust, Normalizer does not implement Clone or Copy, and move assignment is prevented by not implementing Copy.

Source§

impl Normalizer

Source

pub fn operator_assign(&mut self, _other: &mut Normalizer) -> &mut Normalizer

In C++, this method is deleted to prevent copying. In Rust, Normalizer does not implement Clone or Copy, so an explicit assignment operator is not provided.

Source§

impl Normalizer

Source

pub fn subtract_primitive(&mut self, here: &mut NormalizedType, ty: TypeId)

Source§

impl Normalizer

Source

pub fn subtract_singleton(&mut self, here: &mut NormalizedType, ty: TypeId)

Source§

impl Normalizer

Source

pub fn type_from_normal(&mut self, norm: &NormalizedType) -> TypeId

Source§

impl Normalizer

Source

pub fn union_extern_types_type_ids_type_ids( &mut self, heres: &mut TypeIds, theres: &TypeIds, )

Source§

impl Normalizer

Source§

impl Normalizer

Source§

impl Normalizer

Source§

impl Normalizer

Source

pub fn union_functions( &mut self, heres: &mut NormalizedFunctionType, theres: &NormalizedFunctionType, )

Source§

impl Normalizer

Source

pub fn union_functions_with_function( &mut self, heres: &mut NormalizedFunctionType, there: TypeId, )

Source§

impl Normalizer

Source

pub fn union_normal_with_ty( &mut self, here: &mut NormalizedType, there: TypeId, seen_table_prop_pairs: &mut SeenTablePropPairs, seen_set_types: &mut DenseHashSet<TypeId>, ignore_smaller_tyvars: i32, ) -> NormalizationResult

Source§

impl Normalizer

Source

pub fn union_normals( &mut self, here: &mut NormalizedType, there: &NormalizedType, ignore_smaller_tyvars: i32, ) -> NormalizationResult

Source§

impl Normalizer

Source

pub fn union_of_bools(&mut self, here: TypeId, there: TypeId) -> TypeId

Source§

impl Normalizer

Source

pub fn union_of_functions( &mut self, here: TypeId, there: TypeId, ) -> Option<TypeId>

Source§

impl Normalizer

Source

pub fn union_of_tops(&mut self, here: TypeId, there: TypeId) -> TypeId

Source§

impl Normalizer

Source

pub fn union_of_type_packs( &mut self, here: TypePackId, there: TypePackId, ) -> Option<TypePackId>

Source§

impl Normalizer

Source

pub fn union_saturated_functions( &mut self, here: TypeId, there: TypeId, ) -> Option<TypeId>

Source§

impl Normalizer

Source

pub fn union_strings( &mut self, here: &mut NormalizedStringType, there: &NormalizedStringType, )

Source§

impl Normalizer

Source

pub fn union_tables(&mut self, heres: &mut TypeIds, theres: &TypeIds)

Source§

impl Normalizer

Source

pub fn union_tables_with_table(&mut self, heres: &mut TypeIds, there: TypeId)

Source§

impl Normalizer

Source

pub fn union_type(&mut self, here: TypeId, there: TypeId) -> TypeId

Source§

impl Normalizer

Source§

impl Normalizer

Source

pub fn within_resource_limits(&mut self) -> bool

Trait Implementations§

Source§

impl Clone for Normalizer

Source§

fn clone(&self) -> Normalizer

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Normalizer

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.