diff options
| author | Patrick Walton <[email protected]> | 2011-05-11 15:56:23 -0700 |
|---|---|---|
| committer | Patrick Walton <[email protected]> | 2011-05-11 15:56:23 -0700 |
| commit | df914e89041bd6a133c6fb642144668bafae5a80 (patch) | |
| tree | 89a782c25693e1da037f868c5f65eeb6a693d7f4 /src/comp/middle | |
| parent | rustc: Hoist derived type descriptors to the top of the function (diff) | |
| download | rust-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.rs | 18 |
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 { |