@@ -5,7 +5,6 @@ use petgraph::{algo::tarjan_scc, Direction::Incoming};
5
5
use rustc_hash:: { FxBuildHasher , FxHashMap , FxHashSet } ;
6
6
use swc_atoms:: { atom, Atom } ;
7
7
use swc_common:: {
8
- collections:: AHashSet ,
9
8
pass:: { CompilerPass , Repeated } ,
10
9
util:: take:: Take ,
11
10
Mark , SyntaxContext , DUMMY_SP ,
@@ -112,13 +111,10 @@ struct Data {
112
111
edges : Edges ,
113
112
/// Entrypoints.
114
113
entry_ids : FxHashSet < Id > ,
115
-
116
- graph_ix : IndexSet < Id , FxBuildHasher > ,
117
- graph_ix : IndexSet < Id , BuildHasherDefault < FxHasher > > ,
118
114
}
119
115
120
116
#[ derive( Default ) ]
121
- struct Edges ( IndexMap < ( Id , Id ) , VarInfo , RandomState > ) ;
117
+ struct Edges ( IndexMap < ( Id , Id ) , VarInfo , FxBuildHasher > ) ;
122
118
123
119
impl Data {
124
120
/// Add an edge to dependency graph
@@ -146,7 +142,7 @@ impl Data {
146
142
let edges = take ( & mut self . edges ) ;
147
143
148
144
let mut graph = FastDiGraphMap :: with_capacity ( self . used_names . len ( ) , edges. 0 . len ( ) ) ;
149
- let mut graph_ix: IndexMap < ( JsWord , SyntaxContext ) , u32 , RandomState > =
145
+ let mut graph_ix: IndexMap < ( JsWord , SyntaxContext ) , u32 , FxBuildHasher > =
150
146
IndexMap :: with_capacity_and_hasher ( self . used_names . len ( ) , Default :: default ( ) ) ;
151
147
152
148
let mut get_node = |id : Id | -> u32 {
@@ -161,7 +157,7 @@ impl Data {
161
157
. entry_ids
162
158
. iter ( )
163
159
. map ( |id| get_node ( id. clone ( ) ) )
164
- . collect :: < IndexSet < _ , RandomState > > ( ) ;
160
+ . collect :: < IndexSet < _ , FxBuildHasher > > ( ) ;
165
161
166
162
for ( ( src, dst) , info) in edges. 0 {
167
163
let src = get_node ( src) ;
0 commit comments