Skip to content

Commit be43d72

Browse files
pcwaltonhuonw
authored andcommitted
---
yaml --- r: 107864 b: refs/heads/dist-snap c: b265dd4 h: refs/heads/master v: v3
1 parent b46fe2e commit be43d72

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ refs/heads/try: f64fdf524a434f0e5cd0bc91d09c144723f3c90d
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
9-
refs/heads/dist-snap: 1e0c07d011959df334d2903ff050c2bc31a3909e
9+
refs/heads/dist-snap: b265dd4156578800fa1171e615638cd86f517042
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1212
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/src/librustc/back/link.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,8 @@ fn truncated_hash_result(symbol_hasher: &mut Sha256) -> ~str {
510510
pub fn symbol_hash(tcx: ty::ctxt,
511511
symbol_hasher: &mut Sha256,
512512
t: ty::t,
513-
link_meta: &LinkMeta) -> @str {
513+
link_meta: &LinkMeta)
514+
-> ~str {
514515
// NB: do *not* use abbrevs here as we want the symbol names
515516
// to be independent of one another in the crate.
516517

@@ -523,23 +524,22 @@ pub fn symbol_hash(tcx: ty::ctxt,
523524
let mut hash = truncated_hash_result(symbol_hasher);
524525
// Prefix with 'h' so that it never blends into adjacent digits
525526
hash.unshift_char('h');
526-
// tjc: allocation is unfortunate; need to change std::hash
527-
hash.to_managed()
527+
hash
528528
}
529529

530-
pub fn get_symbol_hash(ccx: &CrateContext, t: ty::t) -> @str {
530+
pub fn get_symbol_hash(ccx: &CrateContext, t: ty::t) -> ~str {
531531
{
532532
let type_hashcodes = ccx.type_hashcodes.borrow();
533533
match type_hashcodes.get().find(&t) {
534-
Some(&h) => return h,
534+
Some(h) => return h.to_str(),
535535
None => {}
536536
}
537537
}
538538

539539
let mut type_hashcodes = ccx.type_hashcodes.borrow_mut();
540540
let mut symbol_hasher = ccx.symbol_hasher.borrow_mut();
541541
let hash = symbol_hash(ccx.tcx, symbol_hasher.get(), t, &ccx.link_meta);
542-
type_hashcodes.get().insert(t, hash);
542+
type_hashcodes.get().insert(t, hash.clone());
543543
hash
544544
}
545545

branches/dist-snap/src/librustc/middle/trans/context.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ pub struct CrateContext {
9696
llsizingtypes: RefCell<HashMap<ty::t, Type>>,
9797
adt_reprs: RefCell<HashMap<ty::t, @adt::Repr>>,
9898
symbol_hasher: RefCell<Sha256>,
99-
type_hashcodes: RefCell<HashMap<ty::t, @str>>,
99+
type_hashcodes: RefCell<HashMap<ty::t, ~str>>,
100100
all_llvm_symbols: RefCell<HashSet<@str>>,
101101
tcx: ty::ctxt,
102102
maps: astencode::Maps,

0 commit comments

Comments
 (0)