Skip to content

Commit f39e778

Browse files
committed
---
yaml --- r: 235934 b: refs/heads/stable c: 00a5e66 h: refs/heads/master v: v3
1 parent 778f824 commit f39e778

File tree

113 files changed

+727
-1750
lines changed

Some content is hidden

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

113 files changed

+727
-1750
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ refs/heads/tmp: afae2ff723393b3ab4ccffef6ac7c6d1809e2da0
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
3030
refs/tags/homu-tmp: f859507de8c410b648d934d8f5ec1c52daac971d
3131
refs/tags/1.0.0-beta: 8cbb92b53468ee2b0c2d3eeb8567005953d40828
32-
refs/heads/stable: ba9224f35451e5d5ef7647bd2b40e5da80ce2735
32+
refs/heads/stable: 00a5e66f818ad9d79cc4425f5564c7b07e3213a6
3333
refs/tags/1.0.0: 55bd4f8ff2b323f317ae89e254ce87162d52a375
3434
refs/tags/1.1.0: bc3c16f09287e5545c1d3f76b7abd54f2eca868b
3535
refs/tags/1.2.0: f557861f822c34f07270347b94b5280de20a597e

branches/stable/configure

Lines changed: 14 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -601,9 +601,7 @@ valopt llvm-root "" "set LLVM root"
601601
valopt python "" "set path to python"
602602
valopt jemalloc-root "" "set directory where libjemalloc_pic.a is located"
603603
valopt build "${DEFAULT_BUILD}" "GNUs ./configure syntax LLVM build triple"
604-
valopt android-cross-path "/opt/ndk_standalone" "Android NDK standalone path (deprecated)"
605-
valopt arm-linux-androideabi-ndk "" "arm-linux-androideabi NDK standalone path"
606-
valopt aarch64-linux-android-ndk "" "aarch64-linux-android NDK standalone path"
604+
valopt android-cross-path "/opt/ndk_standalone" "Android NDK standalone path"
607605
valopt release-channel "dev" "the name of the release channel to build"
608606
valopt musl-root "/usr/local" "MUSL root installation directory"
609607

@@ -1114,24 +1112,20 @@ do
11141112
fi
11151113

11161114
case $i in
1117-
*android*)
1118-
upper_snake_target=$(echo "$i" | tr '[:lower:]' '[:upper:]' | tr '\-' '\_')
1119-
eval ndk=\$"CFG_${upper_snake_target}_NDK"
1120-
if [ -z "$ndk" ]
1115+
arm-linux-androideabi)
1116+
1117+
if [ ! -f $CFG_ANDROID_CROSS_PATH/bin/arm-linux-androideabi-gcc ]
11211118
then
1122-
ndk=$CFG_ANDROID_CROSS_PATH
1123-
eval "CFG_${upper_snake_target}_NDK"=$CFG_ANDROID_CROSS_PATH
1124-
warn "generic/default Android NDK option is deprecated (use --$i-ndk option instead)"
1119+
err "NDK $CFG_ANDROID_CROSS_PATH/bin/arm-linux-androideabi-gcc not found"
1120+
fi
1121+
if [ ! -f $CFG_ANDROID_CROSS_PATH/bin/arm-linux-androideabi-g++ ]
1122+
then
1123+
err "NDK $CFG_ANDROID_CROSS_PATH/bin/arm-linux-androideabi-g++ not found"
1124+
fi
1125+
if [ ! -f $CFG_ANDROID_CROSS_PATH/bin/arm-linux-androideabi-ar ]
1126+
then
1127+
err "NDK $CFG_ANDROID_CROSS_PATH/bin/arm-linux-androideabi-ar not found"
11251128
fi
1126-
1127-
# Perform a basic sanity check of the NDK
1128-
for android_ndk_tool in "$ndk/bin/$i-gcc" "$ndk/bin/$i-g++" "$ndk/bin/$i-ar"
1129-
do
1130-
if [ ! -f $android_ndk_tool ]
1131-
then
1132-
err "NDK tool $android_ndk_tool not found (bad or missing --$i-ndk option?)"
1133-
fi
1134-
done
11351129
;;
11361130

11371131
arm-apple-darwin)
@@ -1688,8 +1682,7 @@ putvar CFG_HOST
16881682
putvar CFG_TARGET
16891683
putvar CFG_LIBDIR_RELATIVE
16901684
putvar CFG_DISABLE_MANAGE_SUBMODULES
1691-
putvar CFG_AARCH64_LINUX_ANDROID_NDK
1692-
putvar CFG_ARM_LINUX_ANDROIDEABI_NDK
1685+
putvar CFG_ANDROID_CROSS_PATH
16931686
putvar CFG_MANDIR
16941687

16951688
# Avoid spurious warnings from clang by feeding it original source on

branches/stable/mk/cfg/aarch64-linux-android.mk

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# aarch64-linux-android configuration
22
# CROSS_PREFIX_aarch64-linux-android-
3-
CC_aarch64-linux-android=$(CFG_AARCH64_LINUX_ANDROID_NDK)/bin/aarch64-linux-android-gcc
4-
CXX_aarch64-linux-android=$(CFG_AARCH64_LINUX_ANDROID_NDK)/bin/aarch64-linux-android-g++
5-
CPP_aarch64-linux-android=$(CFG_AARCH64_LINUX_ANDROID_NDK)/bin/aarch64-linux-android-gcc -E
6-
AR_aarch64-linux-android=$(CFG_AARCH64_LINUX_ANDROID_NDK)/bin/aarch64-linux-android-ar
3+
CC_aarch64-linux-android=$(CFG_ANDROID_CROSS_PATH)/bin/aarch64-linux-android-gcc
4+
CXX_aarch64-linux-android=$(CFG_ANDROID_CROSS_PATH)/bin/aarch64-linux-android-g++
5+
CPP_aarch64-linux-android=$(CFG_ANDROID_CROSS_PATH)/bin/aarch64-linux-android-gcc -E
6+
AR_aarch64-linux-android=$(CFG_ANDROID_CROSS_PATH)/bin/aarch64-linux-android-ar
77
CFG_LIB_NAME_aarch64-linux-android=lib$(1).so
88
CFG_STATIC_LIB_NAME_aarch64-linux-android=lib$(1).a
99
CFG_LIB_GLOB_aarch64-linux-android=lib$(1)-*.so

branches/stable/mk/cfg/arm-linux-androideabi.mk

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# arm-linux-androideabi configuration
2-
CC_arm-linux-androideabi=$(CFG_ARM_LINUX_ANDROIDEABI_NDK)/bin/arm-linux-androideabi-gcc
3-
CXX_arm-linux-androideabi=$(CFG_ARM_LINUX_ANDROIDEABI_NDK)/bin/arm-linux-androideabi-g++
4-
CPP_arm-linux-androideabi=$(CFG_ARM_LINUX_ANDROIDEABI_NDK)/bin/arm-linux-androideabi-gcc -E
5-
AR_arm-linux-androideabi=$(CFG_ARM_LINUX_ANDROIDEABI_NDK)/bin/arm-linux-androideabi-ar
2+
CC_arm-linux-androideabi=$(CFG_ANDROID_CROSS_PATH)/bin/arm-linux-androideabi-gcc
3+
CXX_arm-linux-androideabi=$(CFG_ANDROID_CROSS_PATH)/bin/arm-linux-androideabi-g++
4+
CPP_arm-linux-androideabi=$(CFG_ANDROID_CROSS_PATH)/bin/arm-linux-androideabi-gcc -E
5+
AR_arm-linux-androideabi=$(CFG_ANDROID_CROSS_PATH)/bin/arm-linux-androideabi-ar
66
CFG_LIB_NAME_arm-linux-androideabi=lib$(1).so
77
CFG_STATIC_LIB_NAME_arm-linux-androideabi=lib$(1).a
88
CFG_LIB_GLOB_arm-linux-androideabi=lib$(1)-*.so

branches/stable/src/doc/trpl/compiler-plugins.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ fn expand_rn(cx: &mut ExtCtxt, sp: Span, args: &[TokenTree])
6161
("I", 1)];
6262
6363
let text = match args {
64-
[TtToken(_, token::Ident(s, _))] => token::get_ident(s).to_string(),
64+
[TtToken(_, token::Ident(s, _))] => s.to_string(),
6565
_ => {
6666
cx.span_err(sp, "argument should be a single identifier");
6767
return DummyResult::any(sp);
@@ -186,8 +186,7 @@ impl LintPass for Pass {
186186
}
187187
188188
fn check_item(&mut self, cx: &Context, it: &ast::Item) {
189-
let name = token::get_ident(it.ident);
190-
if name.get() == "lintme" {
189+
if it.ident.name == "lintme" {
191190
cx.span_lint(TEST_LINT, it.span, "item is named 'lintme'");
192191
}
193192
}

branches/stable/src/liballoc/boxed.rs

Lines changed: 2 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@
5656
use core::prelude::*;
5757

5858
use heap;
59-
use raw_vec::RawVec;
6059

6160
use core::any::Any;
6261
use core::cmp::Ordering;
@@ -66,7 +65,7 @@ use core::marker::{self, Unsize};
6665
use core::mem;
6766
use core::ops::{CoerceUnsized, Deref, DerefMut};
6867
use core::ops::{Placer, Boxed, Place, InPlace, BoxPlace};
69-
use core::ptr::{self, Unique};
68+
use core::ptr::Unique;
7069
use core::raw::{TraitObject};
7170

7271
/// A value that represents the heap. This is the default place that the `box`
@@ -301,7 +300,7 @@ impl<T: Clone> Clone for Box<T> {
301300
/// let y = x.clone();
302301
/// ```
303302
#[inline]
304-
fn clone(&self) -> Box<T> { box {(**self).clone()} }
303+
fn clone(&self) -> Box<T> { box (HEAP) {(**self).clone()} }
305304
/// Copies `source`'s contents into `self` without creating a new allocation.
306305
///
307306
/// # Examples
@@ -515,55 +514,3 @@ impl<'a,A,R> FnOnce<A> for Box<FnBox<A,Output=R>+Send+'a> {
515514
}
516515

517516
impl<T: ?Sized+Unsize<U>, U: ?Sized> CoerceUnsized<Box<U>> for Box<T> {}
518-
519-
#[stable(feature = "box_slice_clone", since = "1.3.0")]
520-
impl<T: Clone> Clone for Box<[T]> {
521-
fn clone(&self) -> Self {
522-
let mut new = BoxBuilder {
523-
data: RawVec::with_capacity(self.len()),
524-
len: 0
525-
};
526-
527-
let mut target = new.data.ptr();
528-
529-
for item in self.iter() {
530-
unsafe {
531-
ptr::write(target, item.clone());
532-
target = target.offset(1);
533-
};
534-
535-
new.len += 1;
536-
}
537-
538-
return unsafe { new.into_box() };
539-
540-
// Helper type for responding to panics correctly.
541-
struct BoxBuilder<T> {
542-
data: RawVec<T>,
543-
len: usize,
544-
}
545-
546-
impl<T> BoxBuilder<T> {
547-
unsafe fn into_box(self) -> Box<[T]> {
548-
let raw = ptr::read(&self.data);
549-
mem::forget(self);
550-
raw.into_box()
551-
}
552-
}
553-
554-
impl<T> Drop for BoxBuilder<T> {
555-
fn drop(&mut self) {
556-
let mut data = self.data.ptr();
557-
let max = unsafe { data.offset(self.len as isize) };
558-
559-
while data != max {
560-
unsafe {
561-
ptr::read(data);
562-
data = data.offset(1);
563-
}
564-
}
565-
}
566-
}
567-
}
568-
}
569-

branches/stable/src/liballoc/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,14 @@
7070
test(no_crate_inject))]
7171
#![no_std]
7272

73+
// SNAP d4432b3
74+
#![allow(unused_features)] // until feature(placement_in_syntax) is in snap
7375
#![feature(allocator)]
7476
#![feature(box_syntax)]
7577
#![feature(coerce_unsized)]
7678
#![feature(core)]
7779
#![feature(core_intrinsics)]
7880
#![feature(core_prelude)]
79-
#![feature(core_slice_ext)]
8081
#![feature(custom_attribute)]
8182
#![feature(fundamental)]
8283
#![feature(lang_items)]

branches/stable/src/libcollectionstest/slice.rs

Lines changed: 0 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1270,59 +1270,6 @@ fn test_to_vec() {
12701270
assert_eq!(ys, [1, 2, 3]);
12711271
}
12721272

1273-
#[test]
1274-
fn test_box_slice_clone() {
1275-
let data = vec![vec![0, 1], vec![0], vec![1]];
1276-
let data2 = data.clone().into_boxed_slice().clone().to_vec();
1277-
1278-
assert_eq!(data, data2);
1279-
}
1280-
1281-
#[test]
1282-
fn test_box_slice_clone_panics() {
1283-
use std::sync::Arc;
1284-
use std::sync::atomic::{AtomicUsize, Ordering};
1285-
use std::thread::spawn;
1286-
1287-
struct Canary {
1288-
count: Arc<AtomicUsize>,
1289-
panics: bool
1290-
}
1291-
1292-
impl Drop for Canary {
1293-
fn drop(&mut self) {
1294-
self.count.fetch_add(1, Ordering::SeqCst);
1295-
}
1296-
}
1297-
1298-
impl Clone for Canary {
1299-
fn clone(&self) -> Self {
1300-
if self.panics { panic!() }
1301-
1302-
Canary {
1303-
count: self.count.clone(),
1304-
panics: self.panics
1305-
}
1306-
}
1307-
}
1308-
1309-
let drop_count = Arc::new(AtomicUsize::new(0));
1310-
let canary = Canary { count: drop_count.clone(), panics: false };
1311-
let panic = Canary { count: drop_count.clone(), panics: true };
1312-
1313-
spawn(move || {
1314-
// When xs is dropped, +5.
1315-
let xs = vec![canary.clone(), canary.clone(), canary.clone(),
1316-
panic, canary].into_boxed_slice();
1317-
1318-
// When panic is cloned, +3.
1319-
xs.clone();
1320-
}).join().unwrap_err();
1321-
1322-
// Total = 8
1323-
assert_eq!(drop_count.load(Ordering::SeqCst), 8);
1324-
}
1325-
13261273
mod bench {
13271274
use std::iter::repeat;
13281275
use std::{mem, ptr};

branches/stable/src/libcore/fmt/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1287,7 +1287,7 @@ impl Debug for str {
12871287
fn fmt(&self, f: &mut Formatter) -> Result {
12881288
try!(write!(f, "\""));
12891289
for c in self.chars().flat_map(|c| c.escape_default()) {
1290-
try!(f.write_char(c))
1290+
try!(write!(f, "{}", c));
12911291
}
12921292
write!(f, "\"")
12931293
}
@@ -1306,7 +1306,7 @@ impl Debug for char {
13061306
use char::CharExt;
13071307
try!(write!(f, "'"));
13081308
for c in self.escape_default() {
1309-
try!(f.write_char(c))
1309+
try!(write!(f, "{}", c));
13101310
}
13111311
write!(f, "'")
13121312
}

branches/stable/src/libcore/hash/sip.rs

Lines changed: 4 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111
//! An implementation of SipHash 2-4.
1212
13-
use ptr;
1413
use prelude::*;
1514
use super::Hasher;
1615

@@ -32,13 +31,9 @@ pub struct SipHasher {
3231
k0: u64,
3332
k1: u64,
3433
length: usize, // how many bytes we've processed
35-
// v0, v2 and v1, v3 show up in pairs in the algorithm,
36-
// and simd implementations of SipHash will use vectors
37-
// of v02 and v13. By placing them in this order in the struct,
38-
// the compiler can pick up on just a few simd optimizations by itself.
3934
v0: u64, // hash state
40-
v2: u64,
4135
v1: u64,
36+
v2: u64,
4237
v3: u64,
4338
tail: u64, // unprocessed bytes le
4439
ntail: usize, // how many bytes in tail are valid
@@ -70,20 +65,6 @@ macro_rules! u8to64_le {
7065
});
7166
}
7267

73-
/// Load a full u64 word from a byte stream, in LE order. Use
74-
/// `copy_nonoverlapping` to let the compiler generate the most efficient way
75-
/// to load u64 from a possibly unaligned address.
76-
///
77-
/// Unsafe because: unchecked indexing at i..i+8
78-
#[inline]
79-
unsafe fn load_u64_le(buf: &[u8], i: usize) -> u64 {
80-
debug_assert!(i + 8 <= buf.len());
81-
let mut data = 0u64;
82-
ptr::copy_nonoverlapping(buf.get_unchecked(i),
83-
&mut data as *mut _ as *mut u8, 8);
84-
data.to_le()
85-
}
86-
8768
macro_rules! rotl {
8869
($x:expr, $b:expr) =>
8970
(($x << $b) | ($x >> (64_i32.wrapping_sub($b))))
@@ -165,11 +146,12 @@ impl SipHasher {
165146

166147
// Buffered tail is now flushed, process new input.
167148
let len = length - needed;
149+
let end = len & (!0x7);
168150
let left = len & 0x7;
169151

170152
let mut i = needed;
171-
while i < len - left {
172-
let mi = unsafe { load_u64_le(msg, i) };
153+
while i < end {
154+
let mi = u8to64_le!(msg, i);
173155

174156
self.v3 ^= mi;
175157
compress!(self.v0, self.v1, self.v2, self.v3);

branches/stable/src/libcore/intrinsics.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,11 +184,19 @@ extern "rust-intrinsic" {
184184
/// elements.
185185
pub fn size_of<T>() -> usize;
186186

187+
#[cfg(not(stage0))]
187188
/// Moves a value to an uninitialized memory location.
188189
///
189190
/// Drop glue is not run on the destination.
190191
pub fn move_val_init<T>(dst: *mut T, src: T);
191192

193+
// SNAP d4432b3
194+
#[cfg(stage0)]
195+
/// Moves a value to an uninitialized memory location.
196+
///
197+
/// Drop glue is not run on the destination.
198+
pub fn move_val_init<T>(dst: &mut T, src: T);
199+
192200
pub fn min_align_of<T>() -> usize;
193201
pub fn pref_align_of<T>() -> usize;
194202

@@ -606,5 +614,6 @@ extern "rust-intrinsic" {
606614
/// Rust's "try catch" construct which invokes the function pointer `f` with
607615
/// the data pointer `data`, returning the exception payload if an exception
608616
/// is thrown (aka the thread panics).
617+
#[cfg(not(stage0))]
609618
pub fn try(f: fn(*mut u8), data: *mut u8) -> *mut u8;
610619
}

0 commit comments

Comments
 (0)