Skip to content

Commit f35ee9b

Browse files
committed
---
yaml --- r: 78703 b: refs/heads/try c: 95c542e h: refs/heads/master i: 78701: 9069b28 78699: 4cb8d5b 78695: e233b0b 78687: f6daa20 v: v3
1 parent f7bcaa4 commit f35ee9b

File tree

21 files changed

+1258
-79
lines changed

21 files changed

+1258
-79
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: 25ed29a0edb3d48fef843a0b818ee68faf2252da
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 60fba4d7d677ec098e6a43014132fe99f7547363
5-
refs/heads/try: 0ac02e7c4fcdda35940eccba385001e8b882c63e
5+
refs/heads/try: 95c542e7fed0b6a76376f7c1146ac34499bbf238
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

branches/try/mk/llvm.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ ifeq ($(CFG_LLVM_ROOT),)
2626

2727
$$(LLVM_CONFIG_$(1)): $$(LLVM_DEPS)
2828
@$$(call E, make: llvm)
29-
$$(Q)$$(MAKE) -C $$(CFG_LLVM_BUILD_DIR_$(1))
29+
$$(Q)$$(MAKE) -C $$(CFG_LLVM_BUILD_DIR_$(1)) $$(CFG_LLVM_BUILD_ENV)
3030
$$(Q)touch $$(LLVM_CONFIG_$(1))
3131
endif
3232

branches/try/mk/platform.mk

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,10 @@ endef
2626
$(foreach t,$(CFG_TARGET_TRIPLES),$(eval $(call DEF_OSTYPE_VAR,$(t))))
2727
$(foreach t,$(CFG_TARGET_TRIPLES),$(info cfg: os for $(t) is $(OSTYPE_$(t))))
2828

29-
CFG_GCCISH_CFLAGS += -DUSE_UTF8
29+
# FIXME: no-omit-frame-pointer is just so that task_start_wrapper
30+
# has a frame pointer and the stack walker can understand it. Turning off
31+
# frame pointers everywhere is overkill
32+
CFG_GCCISH_CFLAGS += -fno-omit-frame-pointer -DUSE_UTF8
3033

3134
# On Darwin, we need to run dsymutil so the debugging information ends
3235
# up in the right place. On other platforms, it automatically gets
@@ -150,6 +153,7 @@ CFG_GCCISH_POST_LIB_FLAGS_x86_64-unknown-linux-gnu := -Wl,-no-whole-archive
150153
CFG_DEF_SUFFIX_x86_64-unknown-linux-gnu := .linux.def
151154
CFG_INSTALL_NAME_x86_64-unknown-linux-gnu =
152155
CFG_LIBUV_LINK_FLAGS_x86_64-unknown-linux-gnu =
156+
CFG_LLVM_BUILD_ENV_x86_64-unknown-linux-gnu="CXXFLAGS=-fno-omit-frame-pointer"
153157
CFG_EXE_SUFFIX_x86_64-unknown-linux-gnu =
154158
CFG_WINDOWSY_x86_64-unknown-linux-gnu :=
155159
CFG_UNIXY_x86_64-unknown-linux-gnu := 1
@@ -175,6 +179,7 @@ CFG_GCCISH_POST_LIB_FLAGS_i686-unknown-linux-gnu := -Wl,-no-whole-archive
175179
CFG_DEF_SUFFIX_i686-unknown-linux-gnu := .linux.def
176180
CFG_INSTALL_NAME_i686-unknown-linux-gnu =
177181
CFG_LIBUV_LINK_FLAGS_i686-unknown-linux-gnu =
182+
CFG_LLVM_BUILD_ENV_i686-unknown-linux-gnu="CXXFLAGS=-fno-omit-frame-pointer"
178183
CFG_EXE_SUFFIX_i686-unknown-linux-gnu =
179184
CFG_WINDOWSY_i686-unknown-linux-gnu :=
180185
CFG_UNIXY_i686-unknown-linux-gnu := 1

branches/try/src/librustc/middle/liveness.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1617,7 +1617,7 @@ impl Liveness {
16171617

16181618
pub fn should_warn(&self, var: Variable) -> Option<@str> {
16191619
let name = self.ir.variable_name(var);
1620-
if name[0] == ('_' as u8) { None } else { Some(name) }
1620+
if name.len() == 0 || name[0] == ('_' as u8) { None } else { Some(name) }
16211621
}
16221622

16231623
pub fn warn_about_unused_args(&self, decl: &fn_decl, entry_ln: LiveNode) {

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

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -577,20 +577,23 @@ fn emit_vtable_methods(bcx: @mut Block,
577577

578578
let trait_method_def_ids = ty::trait_method_def_ids(tcx, trt_id);
579579
do trait_method_def_ids.map |method_def_id| {
580-
let im = ty::method(tcx, *method_def_id);
580+
let ident = ty::method(tcx, *method_def_id).ident;
581+
// The substitutions we have are on the impl, so we grab
582+
// the method type from the impl to substitute into.
583+
let m_id = method_with_name(ccx, impl_id, ident);
584+
let m = ty::method(tcx, m_id);
585+
debug!("(making impl vtable) emitting method %s at subst %s",
586+
m.repr(tcx),
587+
substs.repr(tcx));
581588
let fty = ty::subst_tps(tcx,
582589
substs,
583590
None,
584-
ty::mk_bare_fn(tcx, im.fty.clone()));
585-
if im.generics.has_type_params() || ty::type_has_self(fty) {
591+
ty::mk_bare_fn(tcx, m.fty.clone()));
592+
if m.generics.has_type_params() || ty::type_has_self(fty) {
586593
debug!("(making impl vtable) method has self or type params: %s",
587-
tcx.sess.str_of(im.ident));
594+
tcx.sess.str_of(ident));
588595
C_null(Type::nil().ptr_to())
589596
} else {
590-
debug!("(making impl vtable) adding method to vtable: %s",
591-
tcx.sess.str_of(im.ident));
592-
let m_id = method_with_name(ccx, impl_id, im.ident);
593-
594597
trans_fn_ref_with_vtables(bcx, m_id, 0,
595598
substs, Some(vtables)).llfn
596599
}

branches/try/src/librustc/middle/typeck/check/method.rs

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -938,9 +938,18 @@ impl<'self> LookupContext<'self> {
938938

939939
// static methods should never have gotten this far:
940940
assert!(candidate.method_ty.explicit_self != sty_static);
941-
let transformed_self_ty =
942-
ty::subst(tcx, &candidate.rcvr_substs,
943-
candidate.method_ty.transformed_self_ty.unwrap());
941+
942+
let transformed_self_ty = match candidate.origin {
943+
method_object(*) => {
944+
// For annoying reasons, we've already handled the
945+
// substitution for object calls.
946+
candidate.method_ty.transformed_self_ty.unwrap()
947+
}
948+
_ => {
949+
ty::subst(tcx, &candidate.rcvr_substs,
950+
candidate.method_ty.transformed_self_ty.unwrap())
951+
}
952+
};
944953

945954
// Determine the values for the type parameters of the method.
946955
// If they were not explicitly supplied, just construct fresh

branches/try/src/librustc/middle/typeck/check/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3092,7 +3092,6 @@ pub fn ty_param_bounds_and_ty_for_def(fcx: @mut FnCtxt,
30923092
sp: span,
30933093
defn: ast::def)
30943094
-> ty_param_bounds_and_ty {
3095-
30963095
match defn {
30973096
ast::def_arg(nid, _) | ast::def_local(nid, _) | ast::def_self(nid, _) |
30983097
ast::def_binding(nid, _) => {
@@ -3149,7 +3148,8 @@ pub fn instantiate_path(fcx: @mut FnCtxt,
31493148
let ty_param_count = tpt.generics.type_param_defs.len();
31503149
let ty_substs_len = pth.types.len();
31513150

3152-
debug!("ty_param_count=%? ty_substs_len=%?",
3151+
debug!("tpt=%s ty_param_count=%? ty_substs_len=%?",
3152+
tpt.repr(fcx.tcx()),
31533153
ty_param_count,
31543154
ty_substs_len);
31553155

branches/try/src/librustc/middle/typeck/collect.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -346,9 +346,10 @@ pub fn ensure_trait_methods(ccx: &CrateCtxt,
346346
let substd_type_param_defs = m.generics.type_param_defs.subst(tcx, &substs);
347347
new_type_param_defs.push_all(*substd_type_param_defs);
348348

349-
debug!("static method %s type_param_defs=%s substs=%s",
349+
debug!("static method %s type_param_defs=%s ty=%s, substs=%s",
350350
m.def_id.repr(tcx),
351351
new_type_param_defs.repr(tcx),
352+
ty.repr(tcx),
352353
substs.repr(tcx));
353354

354355
tcx.tcache.insert(m.def_id,
@@ -893,8 +894,8 @@ pub fn convert(ccx: &CrateCtxt, it: &ast::item) {
893894
}
894895
ast::item_trait(ref generics, _, ref trait_methods) => {
895896
let _trait_def = trait_def_of_item(ccx, it);
896-
ensure_trait_methods(ccx, it.id);
897897

898+
// Run convert_methods on the provided methods.
898899
let (_, provided_methods) =
899900
split_trait_methods(*trait_methods);
900901
let untransformed_rcvr_ty = ty::mk_self(tcx, local_def(it.id));
@@ -904,6 +905,11 @@ pub fn convert(ccx: &CrateCtxt, it: &ast::item) {
904905
untransformed_rcvr_ty,
905906
&ty_generics, generics,
906907
it.vis);
908+
909+
// We need to do this *after* converting methods, since
910+
// convert_methods produces a tcache entry that is wrong for
911+
// static trait methods. This is somewhat unfortunate.
912+
ensure_trait_methods(ccx, it.id);
907913
}
908914
ast::item_struct(struct_def, ref generics) => {
909915
ensure_no_ty_param_bounds(ccx, it.span, generics, "structure");

branches/try/src/librustpkg/tests.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -678,6 +678,7 @@ fn rustpkg_local_pkg() {
678678
}
679679
680680
#[test]
681+
#[ignore (reason = "test makes bogus assumptions about build directory layout: issue #8690")]
681682
fn package_script_with_default_build() {
682683
let dir = create_local_package(&PkgId::new("fancy-lib"));
683684
debug!("dir = %s", dir.to_str());

0 commit comments

Comments
 (0)