Skip to content

Commit 436695e

Browse files
committed
---
yaml --- r: 64251 b: refs/heads/snap-stage3 c: 1944641 h: refs/heads/master i: 64249: bd239f7 64247: cedc21d v: v3
1 parent bddf510 commit 436695e

File tree

7 files changed

+11
-16
lines changed

7 files changed

+11
-16
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 2d28d645422c1617be58c8ca7ad9a457264ca850
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 186f6faf1e6f4b507d97fefcb02fd8a7cf8d716f
4+
refs/heads/snap-stage3: 19446418bcc7ae48b23dd89d04e78c3d552e3001
55
refs/heads/try: 7b78b52e602bb3ea8174f9b2006bff3315f03ef9
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/src/librustc/middle/trans/base.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -520,7 +520,7 @@ pub fn get_res_dtor(ccx: @mut CrateContext,
520520
let _icx = push_ctxt("trans_res_dtor");
521521
if !substs.is_empty() {
522522
let did = if did.crate != ast::local_crate {
523-
inline::maybe_instantiate_inline(ccx, did, true)
523+
inline::maybe_instantiate_inline(ccx, did)
524524
} else {
525525
did
526526
};

branches/snap-stage3/src/librustc/middle/trans/callee.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -361,8 +361,7 @@ pub fn trans_fn_ref_with_vtables(
361361
// def_id to the local id of the inlined copy.
362362
let def_id = {
363363
if def_id.crate != ast::local_crate {
364-
let may_translate = opt_impl_did.is_none();
365-
inline::maybe_instantiate_inline(ccx, def_id, may_translate)
364+
inline::maybe_instantiate_inline(ccx, def_id)
366365
} else {
367366
def_id
368367
}

branches/snap-stage3/src/librustc/middle/trans/consts.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ pub fn get_const_val(cx: @mut CrateContext, mut def_id: ast::def_id) -> ValueRef
159159
let contains_key = cx.const_values.contains_key(&def_id.node);
160160
if !ast_util::is_local(def_id) || !contains_key {
161161
if !ast_util::is_local(def_id) {
162-
def_id = inline::maybe_instantiate_inline(cx, def_id, true);
162+
def_id = inline::maybe_instantiate_inline(cx, def_id);
163163
}
164164
match cx.tcx.items.get_copy(&def_id.node) {
165165
ast_map::node_item(@ast::item {

branches/snap-stage3/src/librustc/middle/trans/expr.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -956,7 +956,7 @@ fn trans_lvalue_unadjusted(bcx: block, expr: @ast::expr) -> DatumBlock {
956956
fn get_did(ccx: @mut CrateContext, did: ast::def_id)
957957
-> ast::def_id {
958958
if did.crate != ast::local_crate {
959-
inline::maybe_instantiate_inline(ccx, did, true)
959+
inline::maybe_instantiate_inline(ccx, did)
960960
} else {
961961
did
962962
}

branches/snap-stage3/src/librustc/middle/trans/inline.rs

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,7 @@ use syntax::ast;
2222
use syntax::ast_map::path_name;
2323
use syntax::ast_util::local_def;
2424

25-
// `translate` will be true if this function is allowed to translate the
26-
// item and false otherwise. Currently, this parameter is set to false when
27-
// translating default methods.
28-
pub fn maybe_instantiate_inline(ccx: @mut CrateContext, fn_id: ast::def_id,
29-
translate: bool)
25+
pub fn maybe_instantiate_inline(ccx: @mut CrateContext, fn_id: ast::def_id)
3026
-> ast::def_id {
3127
let _icx = push_ctxt("maybe_instantiate_inline");
3228
match ccx.external.find(&fn_id) {
@@ -59,7 +55,7 @@ pub fn maybe_instantiate_inline(ccx: @mut CrateContext, fn_id: ast::def_id,
5955
csearch::found(ast::ii_item(item)) => {
6056
ccx.external.insert(fn_id, Some(item.id));
6157
ccx.stats.n_inlines += 1;
62-
if translate { trans_item(ccx, item); }
58+
trans_item(ccx, item);
6359
local_def(item.id)
6460
}
6561
csearch::found(ast::ii_foreign(item)) => {
@@ -81,19 +77,19 @@ pub fn maybe_instantiate_inline(ccx: @mut CrateContext, fn_id: ast::def_id,
8177
_ => ccx.sess.bug("maybe_instantiate_inline: item has a \
8278
non-enum parent")
8379
}
84-
if translate { trans_item(ccx, item); }
80+
trans_item(ccx, item);
8581
local_def(my_id)
8682
}
8783
csearch::found_parent(_, _) => {
8884
ccx.sess.bug("maybe_get_item_ast returned a found_parent \
8985
with a non-item parent");
9086
}
91-
csearch::found(ast::ii_method(impl_did, _is_provided, mth)) => {
87+
csearch::found(ast::ii_method(impl_did, is_provided, mth)) => {
9288
ccx.stats.n_inlines += 1;
9389
ccx.external.insert(fn_id, Some(mth.id));
9490
// If this is a default method, we can't look up the
9591
// impl type. But we aren't going to translate anyways, so don't.
96-
if !translate { return local_def(mth.id); }
92+
if is_provided { return local_def(mth.id); }
9793

9894
let impl_tpt = ty::lookup_item_type(ccx.tcx, impl_did);
9995
let num_type_params =

branches/snap-stage3/src/librustc/middle/trans/type_use.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ pub fn type_uses_for(ccx: @mut CrateContext, fn_id: def_id, n_tps: uint)
7575
let fn_id_loc = if fn_id.crate == local_crate {
7676
fn_id
7777
} else {
78-
inline::maybe_instantiate_inline(ccx, fn_id, true)
78+
inline::maybe_instantiate_inline(ccx, fn_id)
7979
};
8080

8181
// Conservatively assume full use for recursive loops

0 commit comments

Comments
 (0)