aboutsummaryrefslogtreecommitdiff
path: root/src/comp/middle
diff options
context:
space:
mode:
authorPatrick Walton <[email protected]>2011-05-11 15:56:23 -0700
committerPatrick Walton <[email protected]>2011-05-11 15:56:23 -0700
commitdf914e89041bd6a133c6fb642144668bafae5a80 (patch)
tree89a782c25693e1da037f868c5f65eeb6a693d7f4 /src/comp/middle
parentrustc: Hoist derived type descriptors to the top of the function (diff)
downloadrust-df914e89041bd6a133c6fb642144668bafae5a80.tar.xz
rust-df914e89041bd6a133c6fb642144668bafae5a80.zip
rustc: Intern all types. 4s regression.
Diffstat (limited to 'src/comp/middle')
-rw-r--r--src/comp/middle/ty.rs18
1 files changed, 1 insertions, 17 deletions
diff --git a/src/comp/middle/ty.rs b/src/comp/middle/ty.rs
index 455e280a..04adb690 100644
--- a/src/comp/middle/ty.rs
+++ b/src/comp/middle/ty.rs
@@ -362,12 +362,6 @@ fn mk_ty_full(&sty st, &Option.t[str] cname) -> t {
fn gen_ty_full(&ctxt cx, &sty st, &Option.t[str] cname) -> t {
auto new_type = mk_ty_full(st, cname);
- // Do not intern anything with locals or vars; it'll be nearly
- // single-use anyways, easier to regenerate than fill up the table.
- if (new_type.has_locals || new_type.has_vars) {
- ret new_type;
- }
-
// Is it interned?
alt (cx.ts.others.find(new_type)) {
case (some[t](?typ)) {
@@ -1542,17 +1536,7 @@ fn eq_ty_full(&t a, &t b) -> bool {
// This is the equality function the public should use. It works as long as
// the types are interned.
-fn eq_ty(&t a, &t b) -> bool {
- let bool full = false;
- full = full || a.has_vars;
- full = full || a.has_locals;
- full = full || b.has_vars;
- full = full || b.has_locals;
- if (full) {
- ret eq_ty_full(a, b);
- }
- ret Box.ptr_eq[raw_t](a, b);
-}
+fn eq_ty(&t a, &t b) -> bool { ret Box.ptr_eq[raw_t](a, b); }
fn ann_to_type(&ast.ann ann) -> t {