Skip to content

Commit e373cea

Browse files
committed
---
yaml --- r: 130517 b: refs/heads/try c: 2e7bc0f h: refs/heads/master i: 130515: 5317525 v: v3
1 parent 0bf48d2 commit e373cea

File tree

3 files changed

+16
-15
lines changed

3 files changed

+16
-15
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: c964cb229bd342bdeb0b4506c3a6d32b03e575f6
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 67b97ab6d2b7de9b69fd97dc171fcf8feec932ff
5-
refs/heads/try: cf672850df05a05e8bb5785228c408a24e102d32
5+
refs/heads/try: 2e7bc0f808d9ad874010ac610ad796d07127c458
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

branches/try/src/librustc/metadata/encoder.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -892,7 +892,8 @@ fn encode_info_for_method(ecx: &EncodeContext,
892892
IITraitItemRef(local_def(parent_id),
893893
RequiredInlinedTraitItemRef(
894894
&*ast_method)));
895-
} else {
895+
}
896+
if !any_types {
896897
encode_symbol(ecx, rbml_w, m.def_id.node);
897898
}
898899
encode_method_argument_names(rbml_w, &*ast_method.pe_fn_decl());
@@ -1047,7 +1048,8 @@ fn encode_info_for_item(ecx: &EncodeContext,
10471048
encode_attributes(rbml_w, item.attrs.as_slice());
10481049
if tps_len > 0u || should_inline(item.attrs.as_slice()) {
10491050
encode_inlined_item(ecx, rbml_w, IIItemRef(item));
1050-
} else {
1051+
}
1052+
if tps_len == 0 {
10511053
encode_symbol(ecx, rbml_w, item.id);
10521054
}
10531055
encode_visibility(rbml_w, vis);
@@ -1411,9 +1413,8 @@ fn encode_info_for_foreign_item(ecx: &EncodeContext,
14111413
encode_name(rbml_w, nitem.ident.name);
14121414
if abi == abi::RustIntrinsic {
14131415
encode_inlined_item(ecx, rbml_w, IIForeignRef(nitem));
1414-
} else {
1415-
encode_symbol(ecx, rbml_w, nitem.id);
14161416
}
1417+
encode_symbol(ecx, rbml_w, nitem.id);
14171418
}
14181419
ForeignItemStatic(_, mutbl) => {
14191420
if mutbl {

branches/try/src/librustc/middle/trans/base.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2554,6 +2554,15 @@ pub fn create_entry_wrapper(ccx: &CrateContext,
25542554

25552555
fn exported_name(ccx: &CrateContext, id: ast::NodeId,
25562556
ty: ty::t, attrs: &[ast::Attribute]) -> String {
2557+
match ccx.external_srcs().borrow().find(&id) {
2558+
Some(&did) => {
2559+
let sym = csearch::get_symbol(&ccx.sess().cstore, did);
2560+
debug!("found item {} in other crate...", sym);
2561+
return sym;
2562+
}
2563+
None => {}
2564+
}
2565+
25572566
match attr::first_attr_value_str_by_name(attrs, "export_name") {
25582567
// Use provided name
25592568
Some(name) => name.get().to_string(),
@@ -2597,16 +2606,7 @@ pub fn get_item_val(ccx: &CrateContext, id: ast::NodeId) -> ValueRef {
25972606
// using the current crate's name/version
25982607
// information in the hash of the symbol
25992608
debug!("making {}", sym);
2600-
let (sym, is_local) = {
2601-
match ccx.external_srcs().borrow().find(&i.id) {
2602-
Some(&did) => {
2603-
debug!("but found in other crate...");
2604-
(csearch::get_symbol(&ccx.sess().cstore,
2605-
did), false)
2606-
}
2607-
None => (sym, true)
2608-
}
2609-
};
2609+
let is_local = !ccx.external_srcs().borrow().contains_key(&id);
26102610

26112611
// We need the translated value here, because for enums the
26122612
// LLVM type is not fully determined by the Rust type.

0 commit comments

Comments
 (0)