Skip to content

Commit f4d8ad3

Browse files
committed
---
yaml --- r: 62819 b: refs/heads/snap-stage3 c: d295709 h: refs/heads/master i: 62817: a135d21 62815: c16782e v: v3
1 parent 87cd660 commit f4d8ad3

File tree

11 files changed

+47
-59
lines changed

11 files changed

+47
-59
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 2d28d645422c1617be58c8ca7ad9a457264ca850
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 3141acf674fd34f66141c4659a4a239779bb2802
4+
refs/heads/snap-stage3: d2957091c496be86fe4b648a0ccae08753122661
55
refs/heads/try: 7b78b52e602bb3ea8174f9b2006bff3315f03ef9
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/mk/target.mk

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@
88
# option. This file may not be copied, modified, or distributed
99
# except according to those terms.
1010

11+
# This is the compile-time target-triple for the compiler. For the compiler at
12+
# runtime, this should be considered the host-triple. More explanation for why
13+
# this exists can be found on issue #2400
14+
export CFG_COMPILER_TRIPLE
15+
1116
# TARGET_STAGE_N template: This defines how target artifacts are built
1217
# for all stage/target architecture combinations. The arguments:
1318
# $(1) is the stage
@@ -62,6 +67,7 @@ $$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_RUSTLLVM_$(3)): \
6267
@$$(call E, cp: $$@)
6368
$$(Q)cp $$< $$@
6469

70+
$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_LIBRUSTC_$(3)): CFG_COMPILER_TRIPLE = $(2)
6571
$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_LIBRUSTC_$(3)): \
6672
$$(COMPILER_CRATE) $$(COMPILER_INPUTS) \
6773
$$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_LIBSYNTAX_$(3)) \

branches/snap-stage3/mk/tests.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,7 @@ $(3)/stage$(1)/test/syntaxtest-$(2)$$(X_$(2)): \
307307
@$$(call E, compile_and_link: $$@)
308308
$$(STAGE$(1)_T_$(2)_H_$(3)) -o $$@ $$< --test
309309

310+
$(3)/stage$(1)/test/rustctest-$(2)$$(X_$(2)): CFG_COMPILER_TRIPLE = $(2)
310311
$(3)/stage$(1)/test/rustctest-$(2)$$(X_$(2)): \
311312
$$(COMPILER_CRATE) $$(COMPILER_INPUTS) \
312313
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_RUSTLLVM_$(2)) \

branches/snap-stage3/src/libextra/base64.rs

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ pub trait FromBase64 {
113113
fn from_base64(&self) -> ~[u8];
114114
}
115115

116-
impl FromBase64 for ~[u8] {
116+
impl<'self> FromBase64 for &'self [u8] {
117117
/**
118118
* Convert base64 `u8` vector into u8 byte values.
119119
* Every 4 encoded characters is converted into 3 octets, modulo padding.
@@ -188,7 +188,7 @@ impl FromBase64 for ~[u8] {
188188
}
189189
}
190190

191-
impl FromBase64 for ~str {
191+
impl<'self> FromBase64 for &'self str {
192192
/**
193193
* Convert any base64 encoded string (literal, `@`, `&`, or `~`)
194194
* to the byte values it encodes.
@@ -227,23 +227,23 @@ mod tests {
227227

228228
#[test]
229229
fn test_to_base64() {
230-
assert_eq!((~"").to_base64(), ~"");
231-
assert!((~"f").to_base64() == ~"Zg==");
232-
assert_eq!((~"fo").to_base64(), ~"Zm8=");
233-
assert_eq!((~"foo").to_base64(), ~"Zm9v");
234-
assert!((~"foob").to_base64() == ~"Zm9vYg==");
235-
assert_eq!((~"fooba").to_base64(), ~"Zm9vYmE=");
236-
assert_eq!((~"foobar").to_base64(), ~"Zm9vYmFy");
230+
assert_eq!("".to_base64(), ~"");
231+
assert_eq!("f".to_base64(), ~"Zg==");
232+
assert_eq!("fo".to_base64(), ~"Zm8=");
233+
assert_eq!("foo".to_base64(), ~"Zm9v");
234+
assert_eq!("foob".to_base64(), ~"Zm9vYg==");
235+
assert_eq!("fooba".to_base64(), ~"Zm9vYmE=");
236+
assert_eq!("foobar".to_base64(), ~"Zm9vYmFy");
237237
}
238238

239239
#[test]
240240
fn test_from_base64() {
241-
assert_eq!((~"").from_base64(), str::to_bytes(""));
242-
assert!((~"Zg==").from_base64() == str::to_bytes("f"));
243-
assert_eq!((~"Zm8=").from_base64(), str::to_bytes("fo"));
244-
assert_eq!((~"Zm9v").from_base64(), str::to_bytes("foo"));
245-
assert!((~"Zm9vYg==").from_base64() == str::to_bytes("foob"));
246-
assert_eq!((~"Zm9vYmE=").from_base64(), str::to_bytes("fooba"))
247-
assert_eq!((~"Zm9vYmFy").from_base64(), str::to_bytes("foobar"));
241+
assert_eq!("".from_base64(), str::to_bytes(""));
242+
assert_eq!("Zg==".from_base64(), str::to_bytes("f"));
243+
assert_eq!("Zm8=".from_base64(), str::to_bytes("fo"));
244+
assert_eq!("Zm9v".from_base64(), str::to_bytes("foo"));
245+
assert_eq!("Zm9vYg==".from_base64(), str::to_bytes("foob"));
246+
assert_eq!("Zm9vYmE=".from_base64(), str::to_bytes("fooba"))
247+
assert_eq!("Zm9vYmFy".from_base64(), str::to_bytes("foobar"));
248248
}
249249
}

branches/snap-stage3/src/librustc/driver/driver.rs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -518,15 +518,15 @@ pub fn host_triple() -> ~str {
518518
// idea of the host triple is the same as for the set of libraries we've
519519
// actually built. We can't just take LLVM's host triple because they
520520
// normalize all ix86 architectures to i386.
521-
522-
// FIXME (#2400): Instead of grabbing the host triple we really should
523-
// be grabbing (at compile time) the target triple that this rustc is
524-
// built with and calling that (at runtime) the host triple.
525-
let ht = env!("CFG_BUILD_TRIPLE");
521+
//
522+
// Instead of grabbing the host triple (for the current host), we grab (at
523+
// compile time) the target triple that this rustc is built with and
524+
// calling that (at runtime) the host triple.
525+
let ht = env!("CFG_COMPILER_TRIPLE");
526526
return if ht != ~"" {
527527
ht
528528
} else {
529-
fail!("rustc built without CFG_BUILD_TRIPLE")
529+
fail!("rustc built without CFG_COMPILER_TRIPLE")
530530
};
531531
}
532532

@@ -536,15 +536,15 @@ pub fn host_triple() -> ~str {
536536
// idea of the host triple is the same as for the set of libraries we've
537537
// actually built. We can't just take LLVM's host triple because they
538538
// normalize all ix86 architectures to i386.
539-
540-
// FIXME (#2400): Instead of grabbing the host triple we really should
541-
// be grabbing (at compile time) the target triple that this rustc is
542-
// built with and calling that (at runtime) the host triple.
543-
let ht = env!("CFG_BUILD_TRIPLE");
539+
//
540+
// Instead of grabbing the host triple (for the current host), we grab (at
541+
// compile time) the target triple that this rustc is built with and
542+
// calling that (at runtime) the host triple.
543+
let ht = env!("CFG_COMPILER_TRIPLE");
544544
return if ht != "" {
545545
ht.to_owned()
546546
} else {
547-
fail!("rustc built without CFG_BUILD_TRIPLE")
547+
fail!("rustc built without CFG_COMPILER_TRIPLE")
548548
};
549549
}
550550

branches/snap-stage3/src/librustc/middle/trans/base.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1506,7 +1506,7 @@ pub fn memzero(cx: block, llptr: ValueRef, llty: TypeRef) {
15061506
let llptr = PointerCast(cx, llptr, T_ptr(T_i8()));
15071507
let llzeroval = C_u8(0);
15081508
let size = IntCast(cx, machine::llsize_of(ccx, llty), ccx.int_type);
1509-
let align = C_i32(1i32);
1509+
let align = C_i32(llalign_of_min(ccx, llty) as i32);
15101510
let volatile = C_i1(false);
15111511
Call(cx, llintrinsicfn, [llptr, llzeroval, size, align, volatile]);
15121512
}

branches/snap-stage3/src/librusti/rusti.rc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -454,8 +454,9 @@ mod tests {
454454
}
455455
}
456456

457-
#[test] #[ignore]
457+
#[test]
458458
fn run_all() {
459+
// FIXME(#6511):
459460
// By default, unit tests are run in parallel. Rusti, on the other hand,
460461
// does not enjoy doing this. I suspect that it is because the LLVM
461462
// bindings are not thread-safe (when running parallel tests, some tests
@@ -468,7 +469,7 @@ mod tests {
468469
run_cmds([""]);
469470

470471
debug!("regression test for #5937");
471-
run_cmds(["use core;", ""]);
472+
run_cmds(["use std;", ""]);
472473

473474
debug!("regression test for #5784");
474475
run_cmds(["let a = 1;"]);

branches/snap-stage3/src/librustpkg/tests.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,7 @@ fn test_sysroot() -> Path {
9393
self_path.pop()
9494
}
9595

96-
// Ignored on i686 -- see #6517
9796
#[test]
98-
#[ignore(cfg(target_arch = "x86"))]
9997
fn test_make_dir_rwx() {
10098
let temp = &os::tmpdir();
10199
let dir = temp.push("quux");
@@ -109,7 +107,6 @@ fn test_make_dir_rwx() {
109107
}
110108

111109
#[test]
112-
#[ignore(cfg(target_arch = "x86"))]
113110
fn test_install_valid() {
114111
let sysroot = test_sysroot();
115112
debug!("sysroot = %s", sysroot.to_str());
@@ -135,7 +132,6 @@ fn test_install_valid() {
135132
}
136133

137134
#[test]
138-
#[ignore(cfg(target_arch = "x86"))]
139135
fn test_install_invalid() {
140136
use conditions::nonexistent_package::cond;
141137
use cond1 = conditions::missing_pkg_files::cond;
@@ -158,7 +154,6 @@ fn test_install_invalid() {
158154
}
159155

160156
#[test]
161-
#[ignore(cfg(target_arch = "x86"))]
162157
fn test_install_url() {
163158
let workspace = mkdtemp(&os::tmpdir(), "test").expect("couldn't create temp dir");
164159
let sysroot = test_sysroot();

branches/snap-stage3/src/libstd/num/f32.rs

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,8 @@ delegate!(
8686
fn erfc(n: c_float) -> c_float = c_float_utils::erfc,
8787
fn exp_m1(n: c_float) -> c_float = c_float_utils::exp_m1,
8888
fn abs_sub(a: c_float, b: c_float) -> c_float = c_float_utils::abs_sub,
89+
fn fmax(a: c_float, b: c_float) -> c_float = c_float_utils::fmax,
90+
fn fmin(a: c_float, b: c_float) -> c_float = c_float_utils::fmin,
8991
fn next_after(x: c_float, y: c_float) -> c_float = c_float_utils::next_after,
9092
fn frexp(n: c_float, value: &mut c_int) -> c_float = c_float_utils::frexp,
9193
fn hypot(x: c_float, y: c_float) -> c_float = c_float_utils::hypot,
@@ -145,16 +147,6 @@ pub fn ge(x: f32, y: f32) -> bool { return x >= y; }
145147
#[inline(always)]
146148
pub fn gt(x: f32, y: f32) -> bool { return x > y; }
147149

148-
#[inline(always)]
149-
pub fn fmax(x: f32, y: f32) -> f32 {
150-
if x >= y || y.is_NaN() { x } else { y }
151-
}
152-
153-
#[inline(always)]
154-
pub fn fmin(x: f32, y: f32) -> f32 {
155-
if x <= y || y.is_NaN() { x } else { y }
156-
}
157-
158150

159151
// FIXME (#1999): replace the predicates below with llvm intrinsics or
160152
// calls to the libmath macros in the rust runtime for performance.

branches/snap-stage3/src/libstd/num/f64.rs

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,8 @@ delegate!(
8787
fn erfc(n: c_double) -> c_double = c_double_utils::erfc,
8888
fn exp_m1(n: c_double) -> c_double = c_double_utils::exp_m1,
8989
fn abs_sub(a: c_double, b: c_double) -> c_double = c_double_utils::abs_sub,
90+
fn fmax(a: c_double, b: c_double) -> c_double = c_double_utils::fmax,
91+
fn fmin(a: c_double, b: c_double) -> c_double = c_double_utils::fmin,
9092
fn next_after(x: c_double, y: c_double) -> c_double = c_double_utils::next_after,
9193
fn frexp(n: c_double, value: &mut c_int) -> c_double = c_double_utils::frexp,
9294
fn hypot(x: c_double, y: c_double) -> c_double = c_double_utils::hypot,
@@ -170,15 +172,6 @@ pub fn ge(x: f64, y: f64) -> bool { return x >= y; }
170172
#[inline(always)]
171173
pub fn gt(x: f64, y: f64) -> bool { return x > y; }
172174

173-
#[inline(always)]
174-
pub fn fmax(x: f64, y: f64) -> f64 {
175-
if x >= y || y.is_NaN() { x } else { y }
176-
}
177-
178-
#[inline(always)]
179-
pub fn fmin(x: f64, y: f64) -> f64 {
180-
if x <= y || y.is_NaN() { x } else { y }
181-
}
182175

183176
// FIXME (#1999): add is_normal, is_subnormal, and fpclassify
184177

branches/snap-stage3/src/libstd/vec.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2347,16 +2347,16 @@ impl<T:Eq> OwnedEqVector<T> for ~[T] {
23472347
}
23482348

23492349
pub trait MutableVector<'self, T> {
2350-
fn mut_slice(&mut self, start: uint, end: uint) -> &'self mut [T];
2350+
fn mut_slice(self, start: uint, end: uint) -> &'self mut [T];
23512351

23522352
unsafe fn unsafe_mut_ref(&self, index: uint) -> *mut T;
23532353
unsafe fn unsafe_set(&self, index: uint, val: T);
23542354
}
23552355

23562356
impl<'self,T> MutableVector<'self, T> for &'self mut [T] {
23572357
#[inline]
2358-
fn mut_slice(&mut self, start: uint, end: uint) -> &'self mut [T] {
2359-
mut_slice(*self, start, end)
2358+
fn mut_slice(self, start: uint, end: uint) -> &'self mut [T] {
2359+
mut_slice(self, start, end)
23602360
}
23612361

23622362
#[inline(always)]

0 commit comments

Comments
 (0)