Skip to content

Commit debb1c9

Browse files
eholkpaulstansifer
authored andcommitted
---
yaml --- r: 31433 b: refs/heads/dist-snap c: 94f29e0 h: refs/heads/master i: 31431: ca1b83a v: v3
1 parent d40ed56 commit debb1c9

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: d0c6ce338884ee21843f4b40bf6bf18d222ce5df
99
refs/heads/incoming: d9317a174e434d4c99fc1a37fd7dc0d2f5328d37
10-
refs/heads/dist-snap: 0a8b794a3aacab528c64a0a656105d0ad5f44ee3
10+
refs/heads/dist-snap: 94f29e0c9485e2867c6e48cdf74ff7ca1b764e4b
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/dist-snap/src/libstd/smallintmap.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ fn mk<T: copy>() -> smallintmap<T> {
2727
*/
2828
#[inline(always)]
2929
fn insert<T: copy>(self: smallintmap<T>, key: uint, val: T) {
30-
//#error("inserting key %?", key);
30+
//io::println(#fmt("%?", key));
3131
self.v.grow_set_elt(key, none, some(val));
3232
}
3333

branches/dist-snap/src/rustc/middle/typeck/check.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ type fn_ctxt_ =
109109

110110
in_scope_regions: isr_alist,
111111

112-
node_types: smallintmap::smallintmap<ty::t>,
112+
node_types: hashmap<ast::node_id, ty::t>,
113113
node_type_substs: hashmap<ast::node_id, ty::substs>,
114114

115115
ccx: @crate_ctxt};
@@ -132,7 +132,7 @@ fn blank_fn_ctxt(ccx: @crate_ctxt, rty: ty::t,
132132
mut region_lb: region_bnd,
133133
mut region_ub: region_bnd,
134134
in_scope_regions: @nil,
135-
node_types: smallintmap::mk(),
135+
node_types: map::int_hash(),
136136
node_type_substs: map::int_hash(),
137137
ccx: ccx})
138138
}
@@ -218,7 +218,7 @@ fn check_fn(ccx: @crate_ctxt,
218218
{infcx: infer::new_infer_ctxt(tcx),
219219
locals: int_hash(),
220220
purity: decl.purity,
221-
node_types: smallintmap::mk(),
221+
node_types: map::int_hash(),
222222
node_type_substs: map::int_hash()}
223223
}
224224
some(fcx) {
@@ -490,7 +490,7 @@ impl methods for @fn_ctxt {
490490
fn write_ty(node_id: ast::node_id, ty: ty::t) {
491491
#debug["write_ty(%d, %s) in fcx %s",
492492
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);
494494
}
495495
fn write_substs(node_id: ast::node_id, +substs: ty::substs) {
496496
if !ty::substs_is_noop(substs) {
@@ -515,7 +515,7 @@ impl methods for @fn_ctxt {
515515
}
516516

517517
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) {
519519
some(t) { t }
520520
none {
521521
self.tcx().sess.bug(#fmt["no type for expr %d (%s) in fcx %s",
@@ -524,7 +524,7 @@ impl methods for @fn_ctxt {
524524
}
525525
}
526526
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) {
528528
some(t) { t }
529529
none {
530530
self.tcx().sess.bug(

branches/dist-snap/src/rustc/middle/typeck/check/writeback.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ fn resolve_type_vars_for_node(wbcx: wb_ctxt, sp: span, id: ast::node_id)
5959
fn maybe_resolve_type_vars_for_node(wbcx: wb_ctxt, sp: span,
6060
id: ast::node_id)
6161
-> option<ty::t> {
62-
if wbcx.fcx.node_types.contains_key(id as uint) {
62+
if wbcx.fcx.node_types.contains_key(id) {
6363
resolve_type_vars_for_node(wbcx, sp, id)
6464
} else {
6565
none

0 commit comments

Comments
 (0)