Skip to content

Commit

Permalink
Merge pull request #906 from hash-org/scope-fxhash
Browse files Browse the repository at this point in the history
tir: use FxBuildHasher for scope hashing
  • Loading branch information
feds01 authored Jul 22, 2023
2 parents daaa2cd + f371349 commit 65abad0
Showing 1 changed file with 3 additions and 3 deletions.
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

0 comments on commit 65abad0

Please sign in to comment.