Skip to content

Commit e7f860f

Browse files
committed
---
yaml --- r: 107766 b: refs/heads/dist-snap c: 3cb72a3 h: refs/heads/master v: v3
1 parent 1a08474 commit e7f860f

File tree

22 files changed

+110
-66
lines changed

22 files changed

+110
-66
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: 729060dbb95afd1d8562a6b3129555a173b81b0c
9+
refs/heads/dist-snap: 3cb72a3655cdbe1db7a3555ade0c909d541bf336
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1212
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/mk/platform.mk

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

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
33-
3429
# On Darwin, we need to run dsymutil so the debugging information ends
3530
# up in the right place. On other platforms, it automatically gets
3631
# embedded into the executable, so use a no-op command.
@@ -160,7 +155,6 @@ CFG_DEF_SUFFIX_x86_64-unknown-linux-gnu := .linux.def
160155
CFG_LLC_FLAGS_x86_64-unknown-linux-gnu :=
161156
CFG_INSTALL_NAME_x86_64-unknown-linux-gnu =
162157
CFG_LIBUV_LINK_FLAGS_x86_64-unknown-linux-gnu =
163-
CFG_LLVM_BUILD_ENV_x86_64-unknown-linux-gnu="CXXFLAGS=-fno-omit-frame-pointer"
164158
CFG_EXE_SUFFIX_x86_64-unknown-linux-gnu =
165159
CFG_WINDOWSY_x86_64-unknown-linux-gnu :=
166160
CFG_UNIXY_x86_64-unknown-linux-gnu := 1
@@ -188,7 +182,6 @@ CFG_DEF_SUFFIX_i686-unknown-linux-gnu := .linux.def
188182
CFG_LLC_FLAGS_i686-unknown-linux-gnu :=
189183
CFG_INSTALL_NAME_i686-unknown-linux-gnu =
190184
CFG_LIBUV_LINK_FLAGS_i686-unknown-linux-gnu =
191-
CFG_LLVM_BUILD_ENV_i686-unknown-linux-gnu="CXXFLAGS=-fno-omit-frame-pointer"
192185
CFG_EXE_SUFFIX_i686-unknown-linux-gnu =
193186
CFG_WINDOWSY_i686-unknown-linux-gnu :=
194187
CFG_UNIXY_i686-unknown-linux-gnu := 1

branches/dist-snap/src/etc/vim/syntax/rust.vim

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,16 +91,16 @@ syn keyword rustTrait SendStr SendStrOwned SendStrStatic IntoSendStr
9191
syn keyword rustTrait Str StrVector StrSlice OwnedStr
9292
syn keyword rustTrait IterBytes
9393
syn keyword rustTrait ToStr IntoStr
94-
syn keyword rustTrait CopyableTuple ImmutableTuple
94+
syn keyword rustTrait CloneableTuple ImmutableTuple
9595
syn keyword rustTrait Tuple1 Tuple2 Tuple3 Tuple4
9696
syn keyword rustTrait Tuple5 Tuple6 Tuple7 Tuple8
9797
syn keyword rustTrait Tuple9 Tuple10 Tuple11 Tuple12
9898
syn keyword rustTrait ImmutableTuple1 ImmutableTuple2 ImmutableTuple3 ImmutableTuple4
9999
syn keyword rustTrait ImmutableTuple5 ImmutableTuple6 ImmutableTuple7 ImmutableTuple8
100100
syn keyword rustTrait ImmutableTuple9 ImmutableTuple10 ImmutableTuple11 ImmutableTuple12
101-
syn keyword rustTrait ImmutableEqVector ImmutableTotalOrdVector ImmutableCopyableVector
102-
syn keyword rustTrait OwnedVector OwnedCopyableVector OwnedEqVector MutableVector
103-
syn keyword rustTrait Vector VectorVector CopyableVector ImmutableVector
101+
syn keyword rustTrait ImmutableEqVector ImmutableTotalOrdVector ImmutableCloneableVector
102+
syn keyword rustTrait OwnedVector OwnedCloneableVector OwnedEqVector MutableVector
103+
syn keyword rustTrait Vector VectorVector CloneableVector ImmutableVector
104104

105105
"syn keyword rustFunction stream
106106
syn keyword rustTrait Port Chan GenericChan GenericSmartChan GenericPort Peekable

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,9 @@ pub mod write {
128128
};
129129
let use_softfp = sess.opts.debugging_opts & session::USE_SOFTFP != 0;
130130

131+
// FIXME: #11906: Omitting frame pointers breaks retrieving the value of a parameter.
132+
let no_fp_elim = sess.opts.debuginfo;
133+
131134
let tm = sess.targ_cfg.target_strs.target_triple.with_c_str(|T| {
132135
sess.opts.target_cpu.with_c_str(|CPU| {
133136
sess.opts.target_feature.with_c_str(|Features| {
@@ -137,7 +140,8 @@ pub mod write {
137140
lib::llvm::RelocPIC,
138141
OptLevel,
139142
true,
140-
use_softfp
143+
use_softfp,
144+
no_fp_elim
141145
)
142146
})
143147
})

branches/dist-snap/src/librustc/lib/llvm.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1733,7 +1733,8 @@ pub mod llvm {
17331733
Reloc: RelocMode,
17341734
Level: CodeGenOptLevel,
17351735
EnableSegstk: bool,
1736-
UseSoftFP: bool) -> TargetMachineRef;
1736+
UseSoftFP: bool,
1737+
NoFramePointerElim: bool) -> TargetMachineRef;
17371738
pub fn LLVMRustDisposeTargetMachine(T: TargetMachineRef);
17381739
pub fn LLVMRustAddAnalysisPasses(T: TargetMachineRef,
17391740
PM: PassManagerRef,

branches/dist-snap/src/librustc/middle/mem_categorization.rs

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ impl mem_categorization_ctxt {
356356
// Convert a bare fn to a closure by adding NULL env.
357357
// Result is an rvalue.
358358
let expr_ty = ty::expr_ty_adjusted(self.tcx, expr);
359-
self.cat_rvalue_node(expr, expr_ty)
359+
self.cat_rvalue_node(expr.id(), expr.span(), expr_ty)
360360
}
361361

362362
ty::AutoDerefRef(ty::AutoDerefRef {
@@ -365,7 +365,7 @@ impl mem_categorization_ctxt {
365365
// Equivalent to &*expr or something similar.
366366
// Result is an rvalue.
367367
let expr_ty = ty::expr_ty_adjusted(self.tcx, expr);
368-
self.cat_rvalue_node(expr, expr_ty)
368+
self.cat_rvalue_node(expr.id(), expr.span(), expr_ty)
369369
}
370370

371371
ty::AutoDerefRef(ty::AutoDerefRef {
@@ -398,7 +398,7 @@ impl mem_categorization_ctxt {
398398
ast::ExprUnary(_, ast::UnDeref, e_base) => {
399399
let method_map = self.method_map.borrow();
400400
if method_map.get().contains_key(&expr.id) {
401-
return self.cat_rvalue_node(expr, expr_ty);
401+
return self.cat_rvalue_node(expr.id(), expr.span(), expr_ty);
402402
}
403403

404404
let base_cmt = self.cat_expr(e_base);
@@ -418,7 +418,7 @@ impl mem_categorization_ctxt {
418418
ast::ExprIndex(_, base, _) => {
419419
let method_map = self.method_map.borrow();
420420
if method_map.get().contains_key(&expr.id) {
421-
return self.cat_rvalue_node(expr, expr_ty);
421+
return self.cat_rvalue_node(expr.id(), expr.span(), expr_ty);
422422
}
423423

424424
let base_cmt = self.cat_expr(base);
@@ -444,7 +444,7 @@ impl mem_categorization_ctxt {
444444
ast::ExprLit(..) | ast::ExprBreak(..) | ast::ExprMac(..) |
445445
ast::ExprAgain(..) | ast::ExprStruct(..) | ast::ExprRepeat(..) |
446446
ast::ExprInlineAsm(..) | ast::ExprBox(..) => {
447-
return self.cat_rvalue_node(expr, expr_ty);
447+
return self.cat_rvalue_node(expr.id(), expr.span(), expr_ty);
448448
}
449449

450450
ast::ExprForLoop(..) => fail!("non-desugared expr_for_loop")
@@ -457,13 +457,18 @@ impl mem_categorization_ctxt {
457457
expr_ty: ty::t,
458458
def: ast::Def)
459459
-> cmt {
460+
debug!("cat_def: id={} expr={}",
461+
id, ty_to_str(self.tcx, expr_ty));
462+
463+
460464
match def {
465+
ast::DefStruct(..) | ast::DefVariant(..) => {
466+
self.cat_rvalue_node(id, span, expr_ty)
467+
}
461468
ast::DefFn(..) | ast::DefStaticMethod(..) | ast::DefMod(_) |
462469
ast::DefForeignMod(_) | ast::DefStatic(_, false) |
463-
ast::DefUse(_) | ast::DefVariant(..) |
464-
ast::DefTrait(_) | ast::DefTy(_) | ast::DefPrimTy(_) |
465-
ast::DefTyParam(..) | ast::DefStruct(..) |
466-
ast::DefTyParamBinder(..) | ast::DefRegion(_) |
470+
ast::DefUse(_) | ast::DefTrait(_) | ast::DefTy(_) | ast::DefPrimTy(_) |
471+
ast::DefTyParam(..) | ast::DefTyParamBinder(..) | ast::DefRegion(_) |
467472
ast::DefLabel(_) | ast::DefSelfTy(..) | ast::DefMethod(..) => {
468473
@cmt_ {
469474
id:id,
@@ -571,16 +576,13 @@ impl mem_categorization_ctxt {
571576
}
572577
}
573578

574-
pub fn cat_rvalue_node<N:ast_node>(&self,
575-
node: &N,
576-
expr_ty: ty::t) -> cmt {
577-
match self.tcx.region_maps.temporary_scope(node.id()) {
579+
pub fn cat_rvalue_node(&self, id: ast::NodeId, span: Span, expr_ty: ty::t) -> cmt {
580+
match self.tcx.region_maps.temporary_scope(id) {
578581
Some(scope) => {
579-
self.cat_rvalue(node.id(), node.span(),
580-
ty::ReScope(scope), expr_ty)
582+
self.cat_rvalue(id, span, ty::ReScope(scope), expr_ty)
581583
}
582584
None => {
583-
self.cat_rvalue(node.id(), node.span(), ty::ReStatic, expr_ty)
585+
self.cat_rvalue(id, span, ty::ReStatic, expr_ty)
584586
}
585587
}
586588
}
@@ -986,7 +988,7 @@ impl mem_categorization_ctxt {
986988
}
987989
for &slice_pat in slice.iter() {
988990
let slice_ty = self.pat_ty(slice_pat);
989-
let slice_cmt = self.cat_rvalue_node(pat, slice_ty);
991+
let slice_cmt = self.cat_rvalue_node(pat.id(), pat.span(), slice_ty);
990992
self.cat_pattern(slice_cmt, slice_pat, |x,y| op(x,y));
991993
}
992994
for &after_pat in after.iter() {

branches/dist-snap/src/librustc/middle/region.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,14 @@ impl RegionMaps {
172172
}
173173

174174
// else, locate the innermost terminating scope
175-
let mut id = self.encl_scope(expr_id);
175+
// if there's one. Static items, for instance, won't
176+
// have an enclusing scope, hence no scope will be
177+
// returned.
178+
let mut id = match self.opt_encl_scope(expr_id) {
179+
Some(i) => i,
180+
None => { return None; }
181+
};
182+
176183
let terminating_scopes = self.terminating_scopes.borrow();
177184
while !terminating_scopes.get().contains(&id) {
178185
match self.opt_encl_scope(id) {

branches/dist-snap/src/libstd/c_str.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ use ptr::RawPtr;
7272
use ptr;
7373
use str::StrSlice;
7474
use str;
75-
use vec::{CopyableVector, ImmutableVector, MutableVector};
75+
use vec::{CloneableVector, ImmutableVector, MutableVector};
7676
use vec;
7777
use unstable::intrinsics;
7878

branches/dist-snap/src/libstd/io/comm_adapters.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ use cmp;
1515
use io;
1616
use option::{None, Option, Some};
1717
use super::{Reader, Writer};
18-
use vec::{bytes, CopyableVector, MutableVector, ImmutableVector};
18+
use vec::{bytes, CloneableVector, MutableVector, ImmutableVector};
1919

2020
/// Allows reading from a port.
2121
///

branches/dist-snap/src/libstd/io/mem.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ use option::{Option, Some, None};
1717
use super::{Reader, Writer, Seek, Buffer, IoError, SeekStyle, io_error,
1818
OtherIoError};
1919
use vec;
20-
use vec::{Vector, ImmutableVector, MutableVector, OwnedCopyableVector};
20+
use vec::{Vector, ImmutableVector, MutableVector, OwnedCloneableVector};
2121

2222
/// Writes to an owned, growable byte vector
2323
///

branches/dist-snap/src/libstd/io/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ use str::{StrSlice, OwnedStr};
302302
use to_str::ToStr;
303303
use uint;
304304
use unstable::finally::Finally;
305-
use vec::{OwnedVector, MutableVector, ImmutableVector, OwnedCopyableVector};
305+
use vec::{OwnedVector, MutableVector, ImmutableVector, OwnedCloneableVector};
306306
use vec;
307307

308308
// Reexports

branches/dist-snap/src/libstd/num/strconv.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ use option::{None, Option, Some};
1818
use char;
1919
use str::{StrSlice};
2020
use str;
21-
use vec::{CopyableVector, ImmutableVector, MutableVector};
21+
use vec::{CloneableVector, ImmutableVector, MutableVector};
2222
use vec::OwnedVector;
2323
use num;
2424
use num::{NumCast, Zero, One, cast, Integer};

branches/dist-snap/src/libstd/path/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ use str;
7373
use str::{OwnedStr, Str, StrSlice};
7474
use to_str::ToStr;
7575
use vec;
76-
use vec::{CopyableVector, OwnedCopyableVector, OwnedVector, Vector};
76+
use vec::{CloneableVector, OwnedCloneableVector, OwnedVector, Vector};
7777
use vec::{ImmutableEqVector, ImmutableVector};
7878

7979
/// Typedef for POSIX file paths.

branches/dist-snap/src/libstd/path/posix.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ use str;
2121
use str::Str;
2222
use to_bytes::IterBytes;
2323
use vec;
24-
use vec::{CopyableVector, RevSplits, Splits, Vector, VectorVector,
25-
ImmutableEqVector, OwnedVector, ImmutableVector, OwnedCopyableVector};
24+
use vec::{CloneableVector, RevSplits, Splits, Vector, VectorVector,
25+
ImmutableEqVector, OwnedVector, ImmutableVector, OwnedCloneableVector};
2626
use super::{BytesContainer, GenericPath, GenericPathUnsafe};
2727

2828
/// Iterator that yields successive components of a Path as &[u8]
@@ -332,7 +332,7 @@ impl Path {
332332

333333
/// Returns a normalized byte vector representation of a path, by removing all empty
334334
/// components, and unnecessary . and .. components.
335-
fn normalize<V: Vector<u8>+CopyableVector<u8>>(v: V) -> ~[u8] {
335+
fn normalize<V: Vector<u8>+CloneableVector<u8>>(v: V) -> ~[u8] {
336336
// borrowck is being very picky
337337
let val = {
338338
let is_abs = !v.as_slice().is_empty() && v.as_slice()[0] == SEP_BYTE;

branches/dist-snap/src/libstd/prelude.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,17 +67,17 @@ pub use send_str::{SendStr, SendStrOwned, SendStrStatic, IntoSendStr};
6767
pub use str::{Str, StrVector, StrSlice, OwnedStr};
6868
pub use to_bytes::IterBytes;
6969
pub use to_str::{ToStr, IntoStr};
70-
pub use tuple::{CopyableTuple, ImmutableTuple};
70+
pub use tuple::{CloneableTuple, ImmutableTuple};
7171
pub use tuple::{ImmutableTuple1, ImmutableTuple2, ImmutableTuple3, ImmutableTuple4};
7272
pub use tuple::{ImmutableTuple5, ImmutableTuple6, ImmutableTuple7, ImmutableTuple8};
7373
pub use tuple::{ImmutableTuple9, ImmutableTuple10, ImmutableTuple11, ImmutableTuple12};
7474
pub use tuple::{Tuple1, Tuple2, Tuple3, Tuple4};
7575
pub use tuple::{Tuple5, Tuple6, Tuple7, Tuple8};
7676
pub use tuple::{Tuple9, Tuple10, Tuple11, Tuple12};
77-
pub use vec::{ImmutableEqVector, ImmutableTotalOrdVector, ImmutableCopyableVector};
78-
pub use vec::{OwnedVector, OwnedCopyableVector,OwnedEqVector};
77+
pub use vec::{ImmutableEqVector, ImmutableTotalOrdVector, ImmutableCloneableVector};
78+
pub use vec::{OwnedVector, OwnedCloneableVector,OwnedEqVector};
7979
pub use vec::{MutableVector, MutableTotalOrdVector};
80-
pub use vec::{Vector, VectorVector, CopyableVector, ImmutableVector};
80+
pub use vec::{Vector, VectorVector, CloneableVector, ImmutableVector};
8181

8282
// Reexported runtime types
8383
pub use comm::{Port, Chan, SharedChan};

branches/dist-snap/src/libstd/str.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ use to_str::ToStr;
112112
use from_str::FromStr;
113113
use uint;
114114
use vec;
115-
use vec::{OwnedVector, OwnedCopyableVector, ImmutableVector, MutableVector};
115+
use vec::{OwnedVector, OwnedCloneableVector, ImmutableVector, MutableVector};
116116
use default::Default;
117117
use send_str::{SendStr, SendStrOwned};
118118
use unstable::raw::Repr;
@@ -594,7 +594,7 @@ impl<'a> Iterator<&'a str> for StrSplits<'a> {
594594
// Helper functions used for Unicode normalization
595595
fn canonical_sort(comb: &mut [(char, u8)]) {
596596
use iter::range;
597-
use tuple::CopyableTuple;
597+
use tuple::CloneableTuple;
598598

599599
let len = comb.len();
600600
for i in range(0, len) {

branches/dist-snap/src/libstd/tuple.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ use clone::Clone;
1717
#[cfg(not(test))] use default::Default;
1818

1919
/// Method extensions to pairs where both types satisfy the `Clone` bound
20-
pub trait CopyableTuple<T, U> {
20+
pub trait CloneableTuple<T, U> {
2121
/// Return the first element of self
2222
fn first(&self) -> T;
2323
/// Return the second element of self
@@ -26,7 +26,7 @@ pub trait CopyableTuple<T, U> {
2626
fn swap(&self) -> (U, T);
2727
}
2828

29-
impl<T:Clone,U:Clone> CopyableTuple<T, U> for (T, U) {
29+
impl<T:Clone,U:Clone> CloneableTuple<T, U> for (T, U) {
3030
/// Return the first element of self
3131
#[inline]
3232
fn first(&self) -> T {

0 commit comments

Comments
 (0)