Skip to content

Commit d4eabeb

Browse files
pcwaltonhuonw
authored andcommitted
---
yaml --- r: 102537 b: refs/heads/auto c: b265dd4 h: refs/heads/master i: 102535: 3e954dc v: v3
1 parent c5976b2 commit d4eabeb

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
@@ -13,7 +13,7 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
1313
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1414
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1515
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
16-
refs/heads/auto: 1e0c07d011959df334d2903ff050c2bc31a3909e
16+
refs/heads/auto: b265dd4156578800fa1171e615638cd86f517042
1717
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1818
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1919
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336

branches/auto/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/auto/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)