@@ -15,19 +15,15 @@ use std::hash::{Hasher, Hash};
15
15
use std:: io;
16
16
use syntax:: ast;
17
17
18
- #[ cfg( not( stage0) ) ]
19
18
pub type FnvHashMap < K , V > = HashMap < K , V , FnvHasher > ;
20
19
21
20
pub type NodeMap < T > = FnvHashMap < ast:: NodeId , T > ;
22
21
pub type DefIdMap < T > = FnvHashMap < ast:: DefId , T > ;
23
22
24
- #[ cfg( not( stage0) ) ]
25
23
pub type NodeSet = HashSet < ast:: NodeId , FnvHasher > ;
26
- #[ cfg( not( stage0) ) ]
27
24
pub type DefIdSet = HashSet < ast:: DefId , FnvHasher > ;
28
25
29
26
// Hacks to get good names
30
- #[ cfg( not( stage0) ) ]
31
27
pub mod FnvHashMap {
32
28
use std:: hash:: Hash ;
33
29
use collections:: HashMap ;
@@ -45,53 +41,19 @@ pub mod DefIdMap {
45
41
super :: FnvHashMap :: new ( )
46
42
}
47
43
}
48
- #[ cfg( not( stage0) ) ]
49
44
pub mod NodeSet {
50
45
use collections:: HashSet ;
51
46
pub fn new ( ) -> super :: NodeSet {
52
47
HashSet :: with_hasher ( super :: FnvHasher )
53
48
}
54
49
}
55
- #[ cfg( not( stage0) ) ]
56
50
pub mod DefIdSet {
57
51
use collections:: HashSet ;
58
52
pub fn new ( ) -> super :: DefIdSet {
59
53
HashSet :: with_hasher ( super :: FnvHasher )
60
54
}
61
55
}
62
56
63
- #[ cfg( stage0) ]
64
- pub type FnvHashMap < K , V > = HashMap < K , V > ;
65
-
66
- #[ cfg( stage0) ]
67
- pub type NodeSet = HashSet < ast:: NodeId > ;
68
- #[ cfg( stage0) ]
69
- pub type DefIdSet = HashSet < ast:: DefId > ;
70
-
71
- // Hacks to get good names
72
- #[ cfg( stage0) ]
73
- pub mod FnvHashMap {
74
- use std:: hash:: Hash ;
75
- use collections:: HashMap ;
76
- pub fn new < K : Hash + Eq , V > ( ) -> super :: FnvHashMap < K , V > {
77
- HashMap :: new ( )
78
- }
79
- }
80
- #[ cfg( stage0) ]
81
- pub mod NodeSet {
82
- use collections:: HashSet ;
83
- pub fn new ( ) -> super :: NodeSet {
84
- HashSet :: new ( )
85
- }
86
- }
87
- #[ cfg( stage0) ]
88
- pub mod DefIdSet {
89
- use collections:: HashSet ;
90
- pub fn new ( ) -> super :: DefIdSet {
91
- HashSet :: new ( )
92
- }
93
- }
94
-
95
57
/// A speedy hash algorithm for node ids and def ids. The hashmap in
96
58
/// libcollections by default uses SipHash which isn't quite as speedy as we
97
59
/// want. In the compiler we're not really worried about DOS attempts, so we
0 commit comments