Skip to content

Commit ada27a9

Browse files
committed
---
yaml --- r: 65033 b: refs/heads/master c: d68c027 h: refs/heads/master i: 65031: 9ca8083 v: v3
1 parent 1f5787c commit ada27a9

25 files changed

+281
-262
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: 5ca383b777d3fd406ff9ded4681d385f0668b2df
2+
refs/heads/master: d68c0279eadc8544a1e3c1d9077185500a36ae66
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 18e3db7392d2d0697b7e27d6d986139960144d85
55
refs/heads/try: 7b78b52e602bb3ea8174f9b2006bff3315f03ef9

trunk/mk/platform.mk

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,32 @@ CFG_RUN_arm-linux-androideabi=
239239
CFG_RUN_TARG_arm-linux-androideabi=
240240
RUSTC_FLAGS_arm-linux-androideabi :=--android-cross-path=$(CFG_ANDROID_CROSS_PATH)
241241

242+
# arm-unknown-linux-gnueabihf configuration
243+
CC_arm-unknown-linux-gnueabihf=arm-linux-gnueabihf-gcc
244+
CXX_arm-unknown-linux-gnueabihf=arm-linux-gnueabihf-g++
245+
CPP_arm-unknown-linux-gnueabihf=arm-linux-gnueabihf-gcc -E
246+
AR_arm-unknown-linux-gnueabihf=arm-linux-gnueabihf-ar
247+
CFG_LIB_NAME_arm-unknown-linux-gnueabihf=lib$(1).so
248+
CFG_LIB_GLOB_arm-unknown-linux-gnueabihf=lib$(1)-*.so
249+
CFG_LIB_DSYM_GLOB_arm-unknown-linux-gnueabihf=lib$(1)-*.dylib.dSYM
250+
CFG_GCCISH_CFLAGS_arm-unknown-linux-gnueabihf := -Wall -g -fPIC
251+
CFG_GCCISH_CXXFLAGS_arm-unknown-linux-gnueabihf := -fno-rtti
252+
CFG_GCCISH_LINK_FLAGS_arm-unknown-linux-gnueabihf := -shared -fPIC -g
253+
CFG_GCCISH_DEF_FLAG_arm-unknown-linux-gnueabihf := -Wl,--export-dynamic,--dynamic-list=
254+
CFG_GCCISH_PRE_LIB_FLAGS_arm-unknown-linux-gnueabihf := -Wl,-whole-archive
255+
CFG_GCCISH_POST_LIB_FLAGS_arm-unknown-linux-gnueabihf := -Wl,-no-whole-archive
256+
CFG_DEF_SUFFIX_arm-unknown-linux-gnueabihf := .linux.def
257+
CFG_INSTALL_NAME_ar,-unknown-linux-gnueabihf =
258+
CFG_LIBUV_LINK_FLAGS_arm-unknown-linux-gnueabihf =
259+
CFG_EXE_SUFFIX_arm-unknown-linux-gnueabihf :=
260+
CFG_WINDOWSY_arm-unknown-linux-gnueabihf :=
261+
CFG_UNIXY_arm-unknown-linux-gnueabihf := 1
262+
CFG_PATH_MUNGE_arm-unknown-linux-gnueabihf := true
263+
CFG_LDPATH_arm-unknown-linux-gnueabihf :=
264+
CFG_RUN_arm-unknown-linux-gnueabihf=
265+
CFG_RUN_TARG_arm-unknown-linux-gnueabihf=
266+
RUSTC_FLAGS_arm-unknown-linux-gnueabihf := --linker=$(CC_arm-unknown-linux-gnueabihf)
267+
242268
# mips-unknown-linux-gnu configuration
243269
CC_mips-unknown-linux-gnu=mips-linux-gnu-gcc
244270
CXX_mips-unknown-linux-gnu=mips-linux-gnu-g++

trunk/mk/rt.mk

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,11 @@
2626
# Hack for passing flags into LIBUV, see below.
2727
LIBUV_FLAGS_i386 = -m32 -fPIC
2828
LIBUV_FLAGS_x86_64 = -m64 -fPIC
29+
ifeq ($(OSTYPE_$(1)), linux-androideabi)
2930
LIBUV_FLAGS_arm = -fPIC -DANDROID -std=gnu99
31+
else
32+
LIBUV_FLAGS_arm = -fPIC -std=gnu99
33+
endif
3034
LIBUV_FLAGS_mips = -fPIC -mips32r2 -msoft-float -mabi=32
3135

3236
# when we're doing a snapshot build, we intentionally degrade as many

trunk/src/libcore/num/num.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -396,16 +396,15 @@ pub trait FromStrRadix {
396396
/// - If code written to use this function doesn't care about it, it's
397397
/// probably assuming that `x^0` always equals `1`.
398398
///
399-
pub fn pow_with_uint<T:NumCast+One+Zero+Copy+Div<T,T>+Mul<T,T>>(
400-
radix: uint, pow: uint) -> T {
399+
pub fn pow_with_uint<T:NumCast+One+Zero+Copy+Div<T,T>+Mul<T,T>>(radix: uint, pow: uint) -> T {
401400
let _0: T = Zero::zero();
402401
let _1: T = One::one();
403402

404403
if pow == 0u { return _1; }
405404
if radix == 0u { return _0; }
406405
let mut my_pow = pow;
407406
let mut total = _1;
408-
let mut multiplier = cast(radix as int);
407+
let mut multiplier = cast(radix);
409408
while (my_pow > 0u) {
410409
if my_pow % 2u == 1u {
411410
total *= multiplier;
@@ -422,13 +421,13 @@ pub fn test_num<T:Num + NumCast>(ten: T, two: T) {
422421
assert_eq!(ten.add(&two), cast(12));
423422
assert_eq!(ten.sub(&two), cast(8));
424423
assert_eq!(ten.mul(&two), cast(20));
425-
assert_eq!(ten.div(&two), cast(5));
424+
assert_eq!(ten.div(&two), cast(5));
426425
assert_eq!(ten.rem(&two), cast(0));
427426

428427
assert_eq!(ten.add(&two), ten + two);
429428
assert_eq!(ten.sub(&two), ten - two);
430429
assert_eq!(ten.mul(&two), ten * two);
431-
assert_eq!(ten.div(&two), ten / two);
430+
assert_eq!(ten.div(&two), ten / two);
432431
assert_eq!(ten.rem(&two), ten % two);
433432
}
434433

trunk/src/librustc/back/arm.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ pub fn get_target_strs(target_os: session::os) -> target_strs::t {
6464
target_triple: match target_os {
6565
session::os_macos => ~"arm-apple-darwin",
6666
session::os_win32 => ~"arm-pc-mingw32",
67-
session::os_linux => ~"arm-unknown-linux",
67+
session::os_linux => ~"arm-unknown-linux-gnueabihf",
6868
session::os_android => ~"arm-linux-androideabi",
6969
session::os_freebsd => ~"arm-unknown-freebsd"
7070
},

trunk/src/librustc/middle/borrowck/check_loans.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,6 @@ pub impl<'self> CheckLoanCtxt<'self> {
400400
cmt = b;
401401
}
402402

403-
mc::cat_downcast(b) |
404403
mc::cat_interior(b, _) => {
405404
if cmt.mutbl == mc::McInherited {
406405
cmt = b;

trunk/src/librustc/middle/borrowck/gather_loans/lifetime.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,6 @@ impl GuaranteeLifetimeContext {
105105
}
106106
}
107107

108-
mc::cat_downcast(base) |
109108
mc::cat_deref(base, _, mc::uniq_ptr(*)) |
110109
mc::cat_interior(base, _) => {
111110
self.check(base, discr_scope)
@@ -304,7 +303,6 @@ impl GuaranteeLifetimeContext {
304303
mc::cat_deref(*) => {
305304
false
306305
}
307-
r @ mc::cat_downcast(*) |
308306
r @ mc::cat_interior(*) |
309307
r @ mc::cat_stack_upvar(*) |
310308
r @ mc::cat_discr(*) => {
@@ -342,7 +340,6 @@ impl GuaranteeLifetimeContext {
342340
mc::cat_deref(_, _, mc::region_ptr(_, r)) => {
343341
r
344342
}
345-
mc::cat_downcast(cmt) |
346343
mc::cat_deref(cmt, _, mc::uniq_ptr(*)) |
347344
mc::cat_deref(cmt, _, mc::gc_ptr(*)) |
348345
mc::cat_interior(cmt, _) |

trunk/src/librustc/middle/borrowck/gather_loans/restrictions.rs

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -80,17 +80,24 @@ impl RestrictionsContext {
8080
set: restrictions}])
8181
}
8282

83-
mc::cat_downcast(cmt_base) => {
83+
mc::cat_interior(cmt_base, i @ mc::interior_variant(_)) => {
8484
// When we borrow the interior of an enum, we have to
8585
// ensure the enum itself is not mutated, because that
8686
// could cause the type of the memory to change.
87-
self.compute(cmt_base, restrictions | RESTR_MUTATE)
87+
let result = self.compute(cmt_base, restrictions | RESTR_MUTATE);
88+
self.extend(result, cmt.mutbl, LpInterior(i), restrictions)
8889
}
8990

90-
mc::cat_interior(cmt_base, i) => {
91-
// Overwriting the base would not change the type of
92-
// the memory, so no additional restrictions are
93-
// needed.
91+
mc::cat_interior(cmt_base, i @ mc::interior_tuple) |
92+
mc::cat_interior(cmt_base, i @ mc::interior_anon_field) |
93+
mc::cat_interior(cmt_base, i @ mc::interior_field(*)) |
94+
mc::cat_interior(cmt_base, i @ mc::interior_index(*)) => {
95+
// For all of these cases, overwriting the base would
96+
// not change the type of the memory, so no additional
97+
// restrictions are needed.
98+
//
99+
// FIXME(#5397) --- Mut fields are not treated soundly
100+
// (hopefully they will just get phased out)
94101
let result = self.compute(cmt_base, restrictions);
95102
self.extend(result, cmt.mutbl, LpInterior(i), restrictions)
96103
}

trunk/src/librustc/middle/borrowck/mod.rs

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -236,8 +236,8 @@ pub enum LoanPath {
236236

237237
#[deriving(Eq)]
238238
pub enum LoanPathElem {
239-
LpDeref, // `*LV` in doc.rs
240-
LpInterior(mc::InteriorKind) // `LV.f` in doc.rs
239+
LpDeref, // `*LV` in doc.rs
240+
LpInterior(mc::interior_kind) // `LV.f` in doc.rs
241241
}
242242

243243
pub impl LoanPath {
@@ -280,7 +280,6 @@ pub fn opt_loan_path(cmt: mc::cmt) -> Option<@LoanPath> {
280280
|&lp| @LpExtend(lp, cmt.mutbl, LpInterior(ik)))
281281
}
282282

283-
mc::cat_downcast(cmt_base) |
284283
mc::cat_stack_upvar(cmt_base) |
285284
mc::cat_discr(cmt_base, _) => {
286285
opt_loan_path(cmt_base)
@@ -617,25 +616,24 @@ pub impl BorrowckCtxt {
617616
}
618617
}
619618

620-
LpExtend(lp_base, _, LpInterior(mc::InteriorField(fname))) => {
619+
LpExtend(lp_base, _, LpInterior(mc::interior_field(fld))) => {
621620
self.append_loan_path_to_str_from_interior(lp_base, out);
622-
match fname {
623-
mc::NamedField(fname) => {
624-
str::push_char(out, '.');
625-
str::push_str(out, *self.tcx.sess.intr().get(fname));
626-
}
627-
mc::PositionalField(idx) => {
628-
str::push_char(out, '#'); // invent a notation here
629-
str::push_str(out, idx.to_str());
630-
}
631-
}
621+
str::push_char(out, '.');
622+
str::push_str(out, *self.tcx.sess.intr().get(fld));
632623
}
633624

634-
LpExtend(lp_base, _, LpInterior(mc::InteriorElement(_))) => {
625+
LpExtend(lp_base, _, LpInterior(mc::interior_index(*))) => {
635626
self.append_loan_path_to_str_from_interior(lp_base, out);
636627
str::push_str(out, "[]");
637628
}
638629

630+
LpExtend(lp_base, _, LpInterior(mc::interior_tuple)) |
631+
LpExtend(lp_base, _, LpInterior(mc::interior_anon_field)) |
632+
LpExtend(lp_base, _, LpInterior(mc::interior_variant(_))) => {
633+
self.append_loan_path_to_str_from_interior(lp_base, out);
634+
str::push_str(out, ".(tuple)");
635+
}
636+
639637
LpExtend(lp_base, _, LpDeref) => {
640638
str::push_char(out, '*');
641639
self.append_loan_path_to_str(lp_base, out);

0 commit comments

Comments
 (0)