about summary refs log tree commit diff
path: root/src/comp/middle/ty.rs
diff options
context:
space:
mode:
authorMichael Sullivan <sully@msully.net>2011-07-21 15:32:31 -0700
committerMichael Sullivan <sully@msully.net>2011-07-21 17:39:06 -0700
commitf8bb5a3b580da660e2f55f0701a06798581c56ae (patch)
tree4decb936647c1209366878bb25870f8a79ad8131 /src/comp/middle/ty.rs
parenta9a1392b2c1fece9447a2b834896b4316c5dbfff (diff)
downloadrust-f8bb5a3b580da660e2f55f0701a06798581c56ae.tar.gz
rust-f8bb5a3b580da660e2f55f0701a06798581c56ae.zip
Make ty::ctxt be boxed.
Arguably we should leave ty_ctxt as a bare rec and just always work with
boxes of it. This winds up being simpler and prettier, though.
Diffstat (limited to 'src/comp/middle/ty.rs')
-rw-r--r--src/comp/middle/ty.rs57
1 files changed, 26 insertions, 31 deletions
diff --git a/src/comp/middle/ty.rs b/src/comp/middle/ty.rs
index 1228892077f..61e61579e67 100644
--- a/src/comp/middle/ty.rs
+++ b/src/comp/middle/ty.rs
@@ -207,20 +207,20 @@ type mt = rec(t ty, ast::mutability mut);
 type creader_cache = hashmap[tup(int, uint, uint), ty::t];
 
 type ctxt =
-    rec(@type_store ts,
-        session::session sess,
-        resolve::def_map def_map,
-        node_type_table node_types,
-        ast_map::map items,
-        freevars::freevar_map freevars,
-
-        //        constr_table fn_constrs,
-        type_cache tcache,
-        creader_cache rcache,
-        hashmap[t, str] short_names_cache,
-        hashmap[t, bool] has_pointer_cache,
-        hashmap[t, bool] owns_heap_mem_cache,
-        hashmap[@ast::ty, option::t[t]] ast_ty_to_ty_cache);
+    @rec(@type_store ts,
+         session::session sess,
+         resolve::def_map def_map,
+         node_type_table node_types,
+         ast_map::map items,
+         freevars::freevar_map freevars,
+
+         //        constr_table fn_constrs,
+         type_cache tcache,
+         creader_cache rcache,
+         hashmap[t, str] short_names_cache,
+         hashmap[t, bool] has_pointer_cache,
+         hashmap[t, bool] owns_heap_mem_cache,
+         hashmap[@ast::ty, option::t[t]] ast_ty_to_ty_cache);
 
 type ty_ctxt = ctxt;
 
@@ -405,23 +405,18 @@ fn mk_ctxt(session::session s, resolve::def_map dm,
     auto tcache = new_def_hash[ty::ty_param_count_and_ty]();
     auto ts = @interner::mk[@raw_t](hash_raw_ty, eq_raw_ty);
     auto cx =
-        rec(ts=ts,
-            sess=s,
-            def_map=dm,
-            node_types=ntt,
-            items=amap,
-            freevars=freevars,
-            tcache=tcache,
-            rcache=mk_rcache(),
-            short_names_cache=map::mk_hashmap[ty::t,
-                                              str](ty::hash_ty, ty::eq_ty),
-            has_pointer_cache=map::mk_hashmap[ty::t,
-                                              bool](ty::hash_ty, ty::eq_ty),
-            owns_heap_mem_cache=map::mk_hashmap[ty::t,
-                                                bool](ty::hash_ty, ty::eq_ty),
-            ast_ty_to_ty_cache=map::mk_hashmap[@ast::ty,
-                                               option::t[t]](ast::hash_ty,
-                                                             ast::eq_ty));
+        @rec(ts=ts,
+             sess=s,
+             def_map=dm,
+             node_types=ntt,
+             items=amap,
+             freevars=freevars,
+             tcache=tcache,
+             rcache=mk_rcache(),
+             short_names_cache=map::mk_hashmap(ty::hash_ty, ty::eq_ty),
+             has_pointer_cache=map::mk_hashmap(ty::hash_ty, ty::eq_ty),
+             owns_heap_mem_cache=map::mk_hashmap(ty::hash_ty, ty::eq_ty),
+             ast_ty_to_ty_cache=map::mk_hashmap(ast::hash_ty, ast::eq_ty));
     populate_type_store(cx);
     ret cx;
 }