about summary refs log tree commit diff
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2012-04-24 20:47:00 -0700
committerBrian Anderson <banderson@mozilla.com>2012-04-24 20:47:00 -0700
commitb88ecec08c9998c08ef8fafe5ac49c17bc99c516 (patch)
treefaa71bc8c5098d6b69468b39bbbe55362a309148
parent06afe21c033abf370825034f3b1639a80386da6d (diff)
downloadrust-b88ecec08c9998c08ef8fafe5ac49c17bc99c516.tar.gz
rust-b88ecec08c9998c08ef8fafe5ac49c17bc99c516.zip
Revert "rustc: Cache normalized types"
This reverts commit 06afe21c033abf370825034f3b1639a80386da6d.
-rw-r--r--src/rustc/middle/ty.rs15
1 files changed, 3 insertions, 12 deletions
diff --git a/src/rustc/middle/ty.rs b/src/rustc/middle/ty.rs
index 7f459da1561..909370e008f 100644
--- a/src/rustc/middle/ty.rs
+++ b/src/rustc/middle/ty.rs
@@ -227,8 +227,7 @@ type ctxt =
       iface_method_cache: hashmap<def_id, @[method]>,
       ty_param_bounds: hashmap<ast::node_id, param_bounds>,
       inferred_modes: hashmap<ast::node_id, ast::mode>,
-      borrowings: hashmap<ast::node_id, ()>,
-      normalized_cache: hashmap<t, t>};
+      borrowings: hashmap<ast::node_id, ()>};
 
 type t_box = @{struct: sty,
                id: uint,
@@ -462,8 +461,7 @@ fn mk_ctxt(s: session::session, dm: resolve::def_map, amap: ast_map::map,
       iface_method_cache: new_def_hash(),
       ty_param_bounds: map::int_hash(),
       inferred_modes: map::int_hash(),
-      borrowings: map::int_hash(),
-      normalized_cache: new_ty_hash()}
+      borrowings: map::int_hash()}
 }
 
 
@@ -2682,11 +2680,6 @@ fn ty_params_to_tys(tcx: ty::ctxt, tps: [ast::ty_param]) -> [t] {
 Returns an equivalent type with all the typedefs and self regions removed
 "]
 fn normalize_ty(cx: ctxt, t: t) -> t {
-    alt cx.normalized_cache.find(t) {
-      some(t) { ret t; }
-      none { }
-    }
-
     let t = alt get(t).struct {
         ty_enum(did, r) {
             alt r.self_r {
@@ -2700,9 +2693,7 @@ fn normalize_ty(cx: ctxt, t: t) -> t {
         _ { t }
     };
     let sty = fold_sty(get(t).struct) {|t| normalize_ty(cx, t) };
-    let t_norm = mk_t(cx, sty);
-    cx.normalized_cache.insert(t, t_norm);
-    ret t_norm;
+    mk_t(cx, sty)
 }
 
 // Local Variables: