Skip to content

Commit c947054

Browse files
committed
---
yaml --- r: 173503 b: refs/heads/master c: 855c3e5 h: refs/heads/master i: 173501: 57c22ad 173499: 2768060 173495: a17b18a 173487: bdd946c 173471: 432e762 173439: ccb9503 v: v3
1 parent 9f074b6 commit c947054

File tree

130 files changed

+1729
-1118
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

130 files changed

+1729
-1118
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 4b14f67df3c28cd1cd8ea5bf794a3e542c663d8d
2+
refs/heads/master: 855c3e5af54b0ba6da7b26e56acb2c3864aff5ad
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 210f0dcf007104240b2e286ed0b80cb4a61d7bae
55
refs/heads/try: 957472483d3a2f43c0e4f7c2056280a1022af93c

trunk/configure

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -448,6 +448,10 @@ case $CFG_CPUTYPE in
448448
CFG_CPUTYPE=aarch64
449449
;;
450450

451+
powerpc)
452+
CFG_CPUTYPE=powerpc
453+
;;
454+
451455
x86_64 | x86-64 | x64 | amd64)
452456
CFG_CPUTYPE=x86_64
453457
;;
@@ -1004,7 +1008,7 @@ do
10041008
make_dir $t/rt/jemalloc
10051009
for i in \
10061010
isaac sync test \
1007-
arch/i386 arch/x86_64 arch/arm arch/aarch64 arch/mips
1011+
arch/i386 arch/x86_64 arch/arm arch/aarch64 arch/mips arch/powerpc
10081012
do
10091013
make_dir $t/rt/stage$s/$i
10101014
done
@@ -1169,7 +1173,7 @@ do
11691173

11701174
msg "configuring LLVM for $gnu_t"
11711175

1172-
LLVM_TARGETS="--enable-targets=x86,x86_64,arm,aarch64,mips"
1176+
LLVM_TARGETS="--enable-targets=x86,x86_64,arm,aarch64,mips,powerpc"
11731177
LLVM_BUILD="--build=$gnu_t"
11741178
LLVM_HOST="--host=$gnu_t"
11751179
LLVM_TARGET="--target=$gnu_t"
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# powerpc-unknown-linux-gnu configuration
2+
CROSS_PREFIX_powerpc-unknown-linux-gnu=powerpc-linux-gnu-
3+
CC_powerpc-unknown-linux-gnu=$(CC)
4+
CXX_powerpc-unknown-linux-gnu=$(CXX)
5+
CPP_powerpc-unknown-linux-gnu=$(CPP)
6+
AR_powerpc-unknown-linux-gnu=$(AR)
7+
CFG_LIB_NAME_powerpc-unknown-linux-gnu=lib$(1).so
8+
CFG_STATIC_LIB_NAME_powerpc-unknown-linux-gnu=lib$(1).a
9+
CFG_LIB_GLOB_powerpc-unknown-linux-gnu=lib$(1)-*.so
10+
CFG_LIB_DSYM_GLOB_powerpc-unknown-linux-gnu=lib$(1)-*.dylib.dSYM
11+
CFG_CFLAGS_powerpc-unknown-linux-gnu := -m32 $(CFLAGS)
12+
CFG_GCCISH_CFLAGS_powerpc-unknown-linux-gnu := -Wall -Werror -g -fPIC -m32 $(CFLAGS)
13+
CFG_GCCISH_CXXFLAGS_powerpc-unknown-linux-gnu := -fno-rtti $(CXXFLAGS)
14+
CFG_GCCISH_LINK_FLAGS_powerpc-unknown-linux-gnu := -shared -fPIC -ldl -pthread -lrt -g -m32
15+
CFG_GCCISH_DEF_FLAG_powerpc-unknown-linux-gnu := -Wl,--export-dynamic,--dynamic-list=
16+
CFG_GCCISH_PRE_LIB_FLAGS_powerpc-unknown-linux-gnu := -Wl,-whole-archive
17+
CFG_GCCISH_POST_LIB_FLAGS_powerpc-unknown-linux-gnu := -Wl,-no-whole-archive
18+
CFG_DEF_SUFFIX_powerpc-unknown-linux-gnu := .linux.def
19+
CFG_LLC_FLAGS_powerpc-unknown-linux-gnu :=
20+
CFG_INSTALL_NAME_powerpc-unknown-linux-gnu =
21+
CFG_EXE_SUFFIX_powerpc-unknown-linux-gnu =
22+
CFG_WINDOWSY_powerpc-unknown-linux-gnu :=
23+
CFG_UNIXY_powerpc-unknown-linux-gnu := 1
24+
CFG_PATH_MUNGE_powerpc-unknown-linux-gnu := true
25+
CFG_LDPATH_powerpc-unknown-linux-gnu :=
26+
CFG_RUN_powerpc-unknown-linux-gnu=$(2)
27+
CFG_RUN_TARG_powerpc-unknown-linux-gnu=$(call CFG_RUN_powerpc-unknown-linux-gnu,,$(2))
28+
CFG_GNU_TRIPLE_powerpc-unknown-linux-gnu := powerpc-unknown-linux-gnu

trunk/mk/main.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ endif
263263
######################################################################
264264

265265
# FIXME: x86-ism
266-
LLVM_COMPONENTS=x86 arm aarch64 mips ipo bitreader bitwriter linker asmparser mcjit \
266+
LLVM_COMPONENTS=x86 arm aarch64 mips powerpc ipo bitreader bitwriter linker asmparser mcjit \
267267
interpreter instrumentation
268268

269269
# Only build these LLVM tools

trunk/mk/platform.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ define CFG_MAKE_TOOLCHAIN
177177
$$(CFG_GCCISH_DEF_FLAG_$(1))$$(3) $$(2) \
178178
$$(call CFG_INSTALL_NAME_$(1),$$(4))
179179

180-
ifeq ($$(findstring $(HOST_$(1)),arm aarch64 mips mipsel),)
180+
ifeq ($$(findstring $(HOST_$(1)),arm aarch64 mips mipsel powerpc),)
181181

182182
# We're using llvm-mc as our assembler because it supports
183183
# .cfi pseudo-ops on mac
@@ -189,7 +189,7 @@ define CFG_MAKE_TOOLCHAIN
189189
-o=$$(1)
190190
else
191191

192-
# For the ARM, AARCH64 and MIPS crosses, use the toolchain assembler
192+
# For the ARM, AARCH64, MIPS and POWER crosses, use the toolchain assembler
193193
# FIXME: We should be able to use the LLVM assembler
194194
CFG_ASSEMBLE_$(1)=$$(CC_$(1)) $$(CFG_GCCISH_CFLAGS_$(1)) \
195195
$$(CFG_DEPEND_FLAGS) $$(2) -c -o $$(1)

trunk/src/doc/reference.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2170,7 +2170,7 @@ arbitrarily complex configurations through nesting.
21702170
The following configurations must be defined by the implementation:
21712171

21722172
* `target_arch = "..."`. Target CPU architecture, such as `"x86"`, `"x86_64"`
2173-
`"mips"`, `"arm"`, or `"aarch64"`.
2173+
`"mips"`, `"powerpc"`, `"arm"`, or `"aarch64"`.
21742174
* `target_endian = "..."`. Endianness of the target CPU, either `"little"` or
21752175
`"big"`.
21762176
* `target_family = "..."`. Operating system family of the target, e. g.

trunk/src/liballoc/heap.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,8 @@ unsafe fn exchange_free(ptr: *mut u8, old_size: uint, align: uint) {
119119
not(feature = "external_crate"),
120120
any(target_arch = "arm",
121121
target_arch = "mips",
122-
target_arch = "mipsel")))]
122+
target_arch = "mipsel",
123+
target_arch = "powerpc")))]
123124
const MIN_ALIGN: uint = 8;
124125
#[cfg(all(not(feature = "external_funcs"),
125126
not(feature = "external_crate"),

trunk/src/libcollections/bit.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2526,7 +2526,7 @@ mod bitv_bench {
25262526
for _ in range(0u, 100) {
25272527
bitv |= 1 << ((r.next_u32() as uint) % u32::BITS);
25282528
}
2529-
black_box(&bitv)
2529+
black_box(&bitv);
25302530
});
25312531
}
25322532

@@ -2538,7 +2538,7 @@ mod bitv_bench {
25382538
for _ in range(0u, 100) {
25392539
bitv.set((r.next_u32() as uint) % BENCH_BITS, true);
25402540
}
2541-
black_box(&bitv)
2541+
black_box(&bitv);
25422542
});
25432543
}
25442544

trunk/src/libcollections/slice.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1631,7 +1631,7 @@ mod tests {
16311631
#[test]
16321632
fn test_slice_from() {
16331633
let vec: &[int] = &[1, 2, 3, 4];
1634-
assert_eq!(&vec[0..], vec);
1634+
assert_eq!(&vec[], vec);
16351635
let b: &[int] = &[3, 4];
16361636
assert_eq!(&vec[2..], b);
16371637
let b: &[int] = &[];
@@ -1641,11 +1641,11 @@ mod tests {
16411641
#[test]
16421642
fn test_slice_to() {
16431643
let vec: &[int] = &[1, 2, 3, 4];
1644-
assert_eq!(&vec[0..4], vec);
1644+
assert_eq!(&vec[..4], vec);
16451645
let b: &[int] = &[1, 2];
1646-
assert_eq!(&vec[0..2], b);
1646+
assert_eq!(&vec[..2], b);
16471647
let b: &[int] = &[];
1648-
assert_eq!(&vec[0..0], b);
1648+
assert_eq!(&vec[..0], b);
16491649
}
16501650

16511651

@@ -2538,15 +2538,15 @@ mod tests {
25382538
let (left, right) = values.split_at_mut(2);
25392539
{
25402540
let left: &[_] = left;
2541-
assert!(left[0..left.len()] == [1, 2][]);
2541+
assert!(left[..left.len()] == [1, 2][]);
25422542
}
25432543
for p in left.iter_mut() {
25442544
*p += 1;
25452545
}
25462546

25472547
{
25482548
let right: &[_] = right;
2549-
assert!(right[0..right.len()] == [3, 4, 5][]);
2549+
assert!(right[..right.len()] == [3, 4, 5][]);
25502550
}
25512551
for p in right.iter_mut() {
25522552
*p += 2;

trunk/src/libcollections/str.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -807,7 +807,7 @@ pub trait StrExt: Index<FullRange, Output = str> {
807807
/// out of bounds.
808808
///
809809
/// See also `slice`, `slice_from` and `slice_chars`.
810-
#[unstable = "use slice notation [0..a] instead"]
810+
#[unstable = "use slice notation [..a] instead"]
811811
fn slice_to(&self, end: uint) -> &str {
812812
core_str::StrExt::slice_to(&self[], end)
813813
}
@@ -2841,7 +2841,7 @@ mod bench {
28412841
let s = "ศไทย中华Việt Nam; Mary had a little lamb, Little lamb";
28422842

28432843
b.iter(|| {
2844-
for ch in s.chars() { black_box(ch) }
2844+
for ch in s.chars() { black_box(ch); }
28452845
});
28462846
}
28472847

@@ -2869,7 +2869,7 @@ mod bench {
28692869
let s = "ศไทย中华Việt Nam; Mary had a little lamb, Little lamb";
28702870

28712871
b.iter(|| {
2872-
for ch in s.chars().rev() { black_box(ch) }
2872+
for ch in s.chars().rev() { black_box(ch); }
28732873
});
28742874
}
28752875

trunk/src/libcollections/string.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ impl String {
168168

169169
if i > 0 {
170170
unsafe {
171-
res.as_mut_vec().push_all(&v[0..i])
171+
res.as_mut_vec().push_all(&v[..i])
172172
};
173173
}
174174

trunk/src/libcore/finally.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,11 @@
3232
//! # }
3333
//! ```
3434
35-
#![unstable]
35+
#![deprecated = "It is unclear if this module is more robust than implementing \
36+
Drop on a custom type, and this module is being removed with no \
37+
replacement. Use a custom Drop implementation to regain existing \
38+
functionality."]
39+
#![allow(deprecated)]
3640

3741
use ops::{Drop, FnMut, FnOnce};
3842

trunk/src/libcore/fmt/float.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,5 +332,5 @@ pub fn float_to_str_bytes_common<T: Float, U, F>(
332332
}
333333
}
334334

335-
f(unsafe { str::from_utf8_unchecked(&buf[0..end]) })
335+
f(unsafe { str::from_utf8_unchecked(&buf[..end]) })
336336
}

trunk/src/libcore/fmt/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,7 @@ impl<'a> Formatter<'a> {
449449
for c in sign.into_iter() {
450450
let mut b = [0; 4];
451451
let n = c.encode_utf8(&mut b).unwrap_or(0);
452-
let b = unsafe { str::from_utf8_unchecked(&b[0..n]) };
452+
let b = unsafe { str::from_utf8_unchecked(&b[..n]) };
453453
try!(f.buf.write_str(b));
454454
}
455455
if prefixed { f.buf.write_str(prefix) }
@@ -692,7 +692,7 @@ impl String for char {
692692
fn fmt(&self, f: &mut Formatter) -> Result {
693693
let mut utf8 = [0u8; 4];
694694
let amt = self.encode_utf8(&mut utf8).unwrap_or(0);
695-
let s: &str = unsafe { mem::transmute(&utf8[0..amt]) };
695+
let s: &str = unsafe { mem::transmute(&utf8[..amt]) };
696696
String::fmt(s, f)
697697
}
698698
}

trunk/src/libcore/slice.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ impl<T> SliceExt for [T] {
159159

160160
#[inline]
161161
fn split_at(&self, mid: uint) -> (&[T], &[T]) {
162-
(&self[0..mid], &self[mid..])
162+
(&self[..mid], &self[mid..])
163163
}
164164

165165
#[inline]
@@ -240,7 +240,7 @@ impl<T> SliceExt for [T] {
240240

241241
#[inline]
242242
fn init(&self) -> &[T] {
243-
&self[0..(self.len() - 1)]
243+
&self[..(self.len() - 1)]
244244
}
245245

246246
#[inline]
@@ -443,7 +443,7 @@ impl<T> SliceExt for [T] {
443443
#[inline]
444444
fn starts_with(&self, needle: &[T]) -> bool where T: PartialEq {
445445
let n = needle.len();
446-
self.len() >= n && needle == &self[0..n]
446+
self.len() >= n && needle == &self[..n]
447447
}
448448

449449
#[inline]
@@ -972,7 +972,7 @@ impl<'a, T, P> Iterator for Split<'a, T, P> where P: FnMut(&T) -> bool {
972972
match self.v.iter().position(|x| (self.pred)(x)) {
973973
None => self.finish(),
974974
Some(idx) => {
975-
let ret = Some(&self.v[0..idx]);
975+
let ret = Some(&self.v[..idx]);
976976
self.v = &self.v[(idx + 1)..];
977977
ret
978978
}
@@ -999,7 +999,7 @@ impl<'a, T, P> DoubleEndedIterator for Split<'a, T, P> where P: FnMut(&T) -> boo
999999
None => self.finish(),
10001000
Some(idx) => {
10011001
let ret = Some(&self.v[(idx + 1)..]);
1002-
self.v = &self.v[0..idx];
1002+
self.v = &self.v[..idx];
10031003
ret
10041004
}
10051005
}
@@ -1195,7 +1195,7 @@ impl<'a, T> Iterator for Windows<'a, T> {
11951195
if self.size > self.v.len() {
11961196
None
11971197
} else {
1198-
let ret = Some(&self.v[0..self.size]);
1198+
let ret = Some(&self.v[..self.size]);
11991199
self.v = &self.v[1..];
12001200
ret
12011201
}

trunk/src/libcore/str/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -701,10 +701,10 @@ impl TwoWaySearcher {
701701
//
702702
// What's going on is we have some critical factorization (u, v) of the
703703
// needle, and we want to determine whether u is a suffix of
704-
// &v[0..period]. If it is, we use "Algorithm CP1". Otherwise we use
704+
// &v[..period]. If it is, we use "Algorithm CP1". Otherwise we use
705705
// "Algorithm CP2", which is optimized for when the period of the needle
706706
// is large.
707-
if &needle[0..crit_pos] == &needle[period.. period + crit_pos] {
707+
if &needle[..crit_pos] == &needle[period.. period + crit_pos] {
708708
TwoWaySearcher {
709709
crit_pos: crit_pos,
710710
period: period,
@@ -1412,7 +1412,7 @@ impl StrExt for str {
14121412
#[inline]
14131413
fn starts_with(&self, needle: &str) -> bool {
14141414
let n = needle.len();
1415-
self.len() >= n && needle.as_bytes() == &self.as_bytes()[0..n]
1415+
self.len() >= n && needle.as_bytes() == &self.as_bytes()[..n]
14161416
}
14171417

14181418
#[inline]

trunk/src/libcoretest/char.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ fn test_encode_utf8() {
167167
fn check(input: char, expect: &[u8]) {
168168
let mut buf = [0u8; 4];
169169
let n = input.encode_utf8(buf.as_mut_slice()).unwrap_or(0);
170-
assert_eq!(&buf[0..n], expect);
170+
assert_eq!(&buf[..n], expect);
171171
}
172172

173173
check('x', &[0x78]);
@@ -181,7 +181,7 @@ fn test_encode_utf16() {
181181
fn check(input: char, expect: &[u16]) {
182182
let mut buf = [0u16; 2];
183183
let n = input.encode_utf16(buf.as_mut_slice()).unwrap_or(0);
184-
assert_eq!(&buf[0..n], expect);
184+
assert_eq!(&buf[..n], expect);
185185
}
186186

187187
check('x', &[0x0078]);

0 commit comments

Comments
 (0)