@@ -109,7 +109,7 @@ type fn_ctxt_ =
109
109
110
110
in_scope_regions : isr_alist ,
111
111
112
- node_types : smallintmap :: smallintmap < ty:: t > ,
112
+ node_types : hashmap < ast :: node_id , ty:: t > ,
113
113
node_type_substs : hashmap < ast:: node_id , ty:: substs > ,
114
114
115
115
ccx : @crate_ctxt } ;
@@ -132,7 +132,7 @@ fn blank_fn_ctxt(ccx: @crate_ctxt, rty: ty::t,
132
132
mut region_lb: region_bnd,
133
133
mut region_ub: region_bnd,
134
134
in_scope_regions: @nil,
135
- node_types: smallintmap :: mk ( ) ,
135
+ node_types: map :: int_hash ( ) ,
136
136
node_type_substs: map:: int_hash ( ) ,
137
137
ccx: ccx} )
138
138
}
@@ -218,7 +218,7 @@ fn check_fn(ccx: @crate_ctxt,
218
218
{ infcx : infer:: new_infer_ctxt ( tcx) ,
219
219
locals : int_hash ( ) ,
220
220
purity : decl. purity ,
221
- node_types : smallintmap :: mk ( ) ,
221
+ node_types : map :: int_hash ( ) ,
222
222
node_type_substs : map:: int_hash ( ) }
223
223
}
224
224
some ( fcx) {
@@ -490,7 +490,7 @@ impl methods for @fn_ctxt {
490
490
fn write_ty ( node_id : ast:: node_id , ty : ty:: t ) {
491
491
#debug[ "write_ty(%d, %s) in fcx %s" ,
492
492
node_id, ty_to_str ( self . tcx ( ) , ty) , self . tag ( ) ] ;
493
- self . node_types . insert ( node_id as uint , ty) ;
493
+ self . node_types . insert ( node_id, ty) ;
494
494
}
495
495
fn write_substs ( node_id : ast:: node_id , +substs : ty:: substs ) {
496
496
if !ty:: substs_is_noop ( substs) {
@@ -515,7 +515,7 @@ impl methods for @fn_ctxt {
515
515
}
516
516
517
517
fn expr_ty ( ex : @ast:: expr ) -> ty:: t {
518
- alt self . node_types . find ( ex. id as uint ) {
518
+ alt self . node_types . find ( ex. id ) {
519
519
some ( t) { t }
520
520
none {
521
521
self. tcx ( ) . sess . bug ( #fmt[ "no type for expr %d (%s) in fcx %s" ,
@@ -524,7 +524,7 @@ impl methods for @fn_ctxt {
524
524
}
525
525
}
526
526
fn node_ty ( id : ast:: node_id ) -> ty:: t {
527
- alt self . node_types . find ( id as uint ) {
527
+ alt self . node_types . find ( id) {
528
528
some ( t) { t }
529
529
none {
530
530
self. tcx ( ) . sess . bug (
0 commit comments