Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tir: use FxBuildHasher for scope hashing #906

Merged
merged 1 commit into from
Jul 22, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions compiler/hash-tir/src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use std::{

use derive_more::From;
use hash_storage::store::{statics::StoreId, SequenceStoreKey, StoreKey, TrivialSequenceStoreKey};
use hash_utils::itertools::Itertools;
use hash_utils::{fxhash::FxBuildHasher, itertools::Itertools};
use indexmap::IndexMap;

use crate::{
Expand Down Expand Up @@ -69,13 +69,13 @@ pub struct Scope {
/// The kind of the scope.
pub kind: ScopeKind,
/// The bindings of the scope
pub decls: RefCell<IndexMap<Symbol, Decl>>,
pub decls: RefCell<IndexMap<Symbol, Decl, FxBuildHasher>>,
}

impl Scope {
/// Create a new scope with the given kind.
pub fn with_empty_members(kind: ScopeKind) -> Self {
Self { kind, decls: RefCell::new(IndexMap::new()) }
Self { kind, decls: RefCell::new(IndexMap::default()) }
}

/// Add a binding to the scope.
Expand Down
Loading