Skip to content

Commit 6e75a7d

Browse files
committed
---
yaml --- r: 273343 b: refs/heads/beta c: 2ab1f0a h: refs/heads/master i: 273341: 0a2b96d 273339: fadeb6d 273335: 3226c20 273327: 5876c5a 273311: 527eaa5 273279: 737377e
1 parent 83fc051 commit 6e75a7d

File tree

31 files changed

+38
-382
lines changed

31 files changed

+38
-382
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ refs/tags/0.9: 36870b185fc5f5486636d4515f0e22677493f225
2323
refs/tags/0.10: ac33f2b15782272ae348dbd7b14b8257b2148b5a
2424
refs/tags/0.11.0: e1247cb1d0d681be034adb4b558b5a0c0d5720f9
2525
refs/tags/0.12.0: f0c419429ef30723ceaf6b42f9b5a2aeb5d2e2d1
26-
refs/heads/beta: 4a67405ba9870d643d3b6314b1b0e52d37b6958e
26+
refs/heads/beta: 2ab1f0a850f4e02c5dacf882c040b3acee57f86a
2727
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
2828
refs/heads/tmp: e06d2ad9fcd5027bcaac5b08fc9aa39a49d0ecd3
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f

branches/beta/RELEASES.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,8 @@ Compatibility Notes
116116
that were not intended. In this release, [defaulted type parameters
117117
appearing outside of type definitions will generate a
118118
warning][1.7d], which will become an error in future releases.
119-
* [Parsing "." as a float results in an error instead of 0][1.7p].
120-
That is, `".".parse::<f32>()` returns `Err`, not `Ok(0.0)`.
119+
* [Parsing "." as a float results in an error instead of
120+
0][1.7p]. That is, `".".parse::<f32>()` returns `Err`, not `Ok(0)`.
121121
* [Borrows of closure parameters may not outlive the closure][1.7bc].
122122

123123
[1.7a]: https://github.com/rust-lang/rust/pull/30928

branches/beta/mk/cfg/i586-unknown-linux-gnu.mk

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ CFG_LIB_NAME_i586-unknown-linux-gnu=lib$(1).so
77
CFG_STATIC_LIB_NAME_i586-unknown-linux-gnu=lib$(1).a
88
CFG_LIB_GLOB_i586-unknown-linux-gnu=lib$(1)-*.so
99
CFG_LIB_DSYM_GLOB_i586-unknown-linux-gnu=lib$(1)-*.dylib.dSYM
10-
CFG_JEMALLOC_CFLAGS_i586-unknown-linux-gnu := -m32 $(CFLAGS)
11-
CFG_GCCISH_CFLAGS_i586-unknown-linux-gnu := -Wall -Werror -g -fPIC -m32 $(CFLAGS)
12-
CFG_GCCISH_CXXFLAGS_i586-unknown-linux-gnu := -fno-rtti $(CXXFLAGS)
10+
CFG_JEMALLOC_CFLAGS_i586-unknown-linux-gnu := -m32 $(CFLAGS) -march=pentium
11+
CFG_GCCISH_CFLAGS_i586-unknown-linux-gnu := -Wall -Werror -g -fPIC -m32 $(CFLAGS) -march=pentium
12+
CFG_GCCISH_CXXFLAGS_i586-unknown-linux-gnu := -fno-rtti $(CXXFLAGS) -march=pentium
1313
CFG_GCCISH_LINK_FLAGS_i586-unknown-linux-gnu := -shared -fPIC -ldl -pthread -lrt -g -m32
1414
CFG_GCCISH_DEF_FLAG_i586-unknown-linux-gnu := -Wl,--export-dynamic,--dynamic-list=
1515
CFG_LLC_FLAGS_i586-unknown-linux-gnu :=

branches/beta/src/bootstrap/build/native.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,7 @@ pub fn compiler_rt(build: &Build, target: &str) {
114114
let arch = target.split('-').next().unwrap();
115115
let mode = if build.config.rust_optimize {"Release"} else {"Debug"};
116116
let (dir, build_target, libname) = if target.contains("linux") ||
117-
target.contains("freebsd") ||
118-
target.contains("netbsd") {
117+
target.contains("freebsd") {
119118
let os = if target.contains("android") {"-android"} else {""};
120119
let arch = if arch.starts_with("arm") && target.contains("eabihf") {
121120
"armhf"

branches/beta/src/compiletest/runtest.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1025,10 +1025,6 @@ fn check_expected_errors(revision: Option<&str>,
10251025
expected.replace(r"\", "/")
10261026
}).collect::<Vec<String>>();
10271027

1028-
// If the testcase being checked contains at least one expected "help"
1029-
// message, then we'll ensure that all "help" messages are expected.
1030-
// Otherwise, all "help" messages reported by the compiler will be ignored.
1031-
// This logic also applies to "note" messages.
10321028
let (expect_help, expect_note) =
10331029
expected_errors.iter()
10341030
.fold((false, false),

branches/beta/src/doc/book/getting-started.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,8 @@ unofficial locations.
9393
| `armv7-apple-ios` || | | ARM iOS |
9494
| `armv7s-apple-ios` || | | ARM iOS |
9595
| `aarch64-apple-ios` || | | ARM64 iOS |
96-
| `i686-unknown-freebsd` ||| | 32-bit FreeBSD |
97-
| `x86_64-unknown-freebsd` ||| | 64-bit FreeBSD |
96+
| `i686-unknown-freebsd` ||| | 32-bit FreeBSD |
97+
| `x86_64-unknown-freebsd` ||| | 64-bit FreeBSD |
9898
| `x86_64-unknown-openbsd` ||| | 64-bit OpenBSD |
9999
| `x86_64-unknown-netbsd` ||| | 64-bit NetBSD |
100100
| `x86_64-unknown-bitrig` ||| | 64-bit Bitrig |

branches/beta/src/doc/book/guessing-game.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -912,7 +912,7 @@ returned by `parse()`, this is an `enum` like `Ordering`, but in this case,
912912
each variant has some data associated with it: `Ok` is a success, and `Err` is a
913913
failure. Each contains more information: the successfully parsed integer, or an
914914
error type. In this case, we `match` on `Ok(num)`, which sets the name `num` to
915-
the unwrapped `Ok` value (the integer), and then we return it on the
915+
the unwrapped `Ok` value (ythe integer), and then we return it on the
916916
right-hand side. In the `Err` case, we don’t care what kind of error it is, so
917917
we just use the catch all `_` instead of a name. This catches everything that
918918
isn't `Ok`, and `continue` lets us move to the next iteration of the loop; in

branches/beta/src/doc/book/references-and-borrowing.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,8 @@ both at the same time:
163163
* exactly one mutable reference (`&mut T`).
164164

165165

166-
You may notice that this is very similar to, though not exactly the same as,
167-
the definition of a data race:
166+
You may notice that this is very similar, though not exactly the same as,
167+
to the definition of a data race:
168168

169169
> There is a ‘data race’ when two or more pointers access the same memory
170170
> location at the same time, where at least one of them is writing, and the

branches/beta/src/doc/book/variable-bindings.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@ function, rather than leaving it off. Otherwise, you’ll get an error.
1818

1919
In many languages, a variable binding would be called a *variable*, but Rust’s
2020
variable bindings have a few tricks up their sleeves. For example the
21-
left-hand side of a `let` statement is a ‘[pattern][pattern]’, not a
21+
left-hand side of a `let` expression is a ‘[pattern][pattern]’, not a
2222
variable name. This means we can do things like:
2323

2424
```rust
2525
let (x, y) = (1, 2);
2626
```
2727

28-
After this statement is evaluated, `x` will be one, and `y` will be two.
28+
After this expression is evaluated, `x` will be one, and `y` will be two.
2929
Patterns are really powerful, and have [their own section][pattern] in the
3030
book. We don’t need those features for now, so we’ll keep this in the back
3131
of our minds as we go forward.

branches/beta/src/libcore/intrinsics.rs

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -539,32 +539,6 @@ extern "rust-intrinsic" {
539539
/// Returns the nearest integer to an `f64`. Rounds half-way cases away from zero.
540540
pub fn roundf64(x: f64) -> f64;
541541

542-
/// Float addition that allows optimizations based on algebraic rules.
543-
/// May assume inputs are finite.
544-
#[cfg(not(stage0))]
545-
pub fn fadd_fast<T>(a: T, b: T) -> T;
546-
547-
/// Float subtraction that allows optimizations based on algebraic rules.
548-
/// May assume inputs are finite.
549-
#[cfg(not(stage0))]
550-
pub fn fsub_fast<T>(a: T, b: T) -> T;
551-
552-
/// Float multiplication that allows optimizations based on algebraic rules.
553-
/// May assume inputs are finite.
554-
#[cfg(not(stage0))]
555-
pub fn fmul_fast<T>(a: T, b: T) -> T;
556-
557-
/// Float division that allows optimizations based on algebraic rules.
558-
/// May assume inputs are finite.
559-
#[cfg(not(stage0))]
560-
pub fn fdiv_fast<T>(a: T, b: T) -> T;
561-
562-
/// Float remainder that allows optimizations based on algebraic rules.
563-
/// May assume inputs are finite.
564-
#[cfg(not(stage0))]
565-
pub fn frem_fast<T>(a: T, b: T) -> T;
566-
567-
568542
/// Returns the number of bits set in an integer type `T`
569543
pub fn ctpop<T>(x: T) -> T;
570544

branches/beta/src/librustc/middle/liveness.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,6 @@ use middle::pat_util;
115115
use middle::ty::{self, TyCtxt, ParameterEnvironment};
116116
use middle::traits::{self, ProjectionMode};
117117
use middle::infer;
118-
use middle::subst::Subst;
119118
use lint;
120119
use util::nodemap::NodeMap;
121120

@@ -1492,15 +1491,14 @@ impl<'a, 'tcx> Liveness<'a, 'tcx> {
14921491
if self.live_on_entry(entry_ln, self.s.no_ret_var).is_some() => {
14931492

14941493
let param_env = ParameterEnvironment::for_item(&self.ir.tcx, id);
1495-
let t_ret_subst = t_ret.subst(&self.ir.tcx, &param_env.free_substs);
14961494
let infcx = infer::new_infer_ctxt(&self.ir.tcx,
14971495
&self.ir.tcx.tables,
14981496
Some(param_env),
14991497
ProjectionMode::Any);
15001498
let cause = traits::ObligationCause::dummy();
15011499
let norm = traits::fully_normalize(&infcx,
15021500
cause,
1503-
&t_ret_subst);
1501+
&t_ret);
15041502

15051503
if norm.unwrap().is_nil() {
15061504
// for nil return types, it is ok to not return a value expl.

branches/beta/src/librustc_llvm/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1310,7 +1310,6 @@ extern {
13101310
-> ValueRef;
13111311
pub fn LLVMBuildNot(B: BuilderRef, V: ValueRef, Name: *const c_char)
13121312
-> ValueRef;
1313-
pub fn LLVMRustSetHasUnsafeAlgebra(Instr: ValueRef);
13141313

13151314
/* Memory */
13161315
pub fn LLVMBuildAlloca(B: BuilderRef, Ty: TypeRef, Name: *const c_char)

branches/beta/src/librustc_trans/trans/build.rs

Lines changed: 0 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -221,18 +221,6 @@ pub fn FAdd(cx: Block,
221221
B(cx).fadd(lhs, rhs)
222222
}
223223

224-
pub fn FAddFast(cx: Block,
225-
lhs: ValueRef,
226-
rhs: ValueRef,
227-
debug_loc: DebugLoc)
228-
-> ValueRef {
229-
if cx.unreachable.get() {
230-
return _Undef(lhs);
231-
}
232-
debug_loc.apply(cx.fcx);
233-
B(cx).fadd_fast(lhs, rhs)
234-
}
235-
236224
pub fn Sub(cx: Block,
237225
lhs: ValueRef,
238226
rhs: ValueRef,
@@ -281,18 +269,6 @@ pub fn FSub(cx: Block,
281269
B(cx).fsub(lhs, rhs)
282270
}
283271

284-
pub fn FSubFast(cx: Block,
285-
lhs: ValueRef,
286-
rhs: ValueRef,
287-
debug_loc: DebugLoc)
288-
-> ValueRef {
289-
if cx.unreachable.get() {
290-
return _Undef(lhs);
291-
}
292-
debug_loc.apply(cx.fcx);
293-
B(cx).fsub_fast(lhs, rhs)
294-
}
295-
296272
pub fn Mul(cx: Block,
297273
lhs: ValueRef,
298274
rhs: ValueRef,
@@ -341,18 +317,6 @@ pub fn FMul(cx: Block,
341317
B(cx).fmul(lhs, rhs)
342318
}
343319

344-
pub fn FMulFast(cx: Block,
345-
lhs: ValueRef,
346-
rhs: ValueRef,
347-
debug_loc: DebugLoc)
348-
-> ValueRef {
349-
if cx.unreachable.get() {
350-
return _Undef(lhs);
351-
}
352-
debug_loc.apply(cx.fcx);
353-
B(cx).fmul_fast(lhs, rhs)
354-
}
355-
356320
pub fn UDiv(cx: Block,
357321
lhs: ValueRef,
358322
rhs: ValueRef,
@@ -401,18 +365,6 @@ pub fn FDiv(cx: Block,
401365
B(cx).fdiv(lhs, rhs)
402366
}
403367

404-
pub fn FDivFast(cx: Block,
405-
lhs: ValueRef,
406-
rhs: ValueRef,
407-
debug_loc: DebugLoc)
408-
-> ValueRef {
409-
if cx.unreachable.get() {
410-
return _Undef(lhs);
411-
}
412-
debug_loc.apply(cx.fcx);
413-
B(cx).fdiv_fast(lhs, rhs)
414-
}
415-
416368
pub fn URem(cx: Block,
417369
lhs: ValueRef,
418370
rhs: ValueRef,
@@ -449,18 +401,6 @@ pub fn FRem(cx: Block,
449401
B(cx).frem(lhs, rhs)
450402
}
451403

452-
pub fn FRemFast(cx: Block,
453-
lhs: ValueRef,
454-
rhs: ValueRef,
455-
debug_loc: DebugLoc)
456-
-> ValueRef {
457-
if cx.unreachable.get() {
458-
return _Undef(lhs);
459-
}
460-
debug_loc.apply(cx.fcx);
461-
B(cx).frem_fast(lhs, rhs)
462-
}
463-
464404
pub fn Shl(cx: Block,
465405
lhs: ValueRef,
466406
rhs: ValueRef,

branches/beta/src/librustc_trans/trans/builder.rs

Lines changed: 0 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -226,15 +226,6 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
226226
}
227227
}
228228

229-
pub fn fadd_fast(&self, lhs: ValueRef, rhs: ValueRef) -> ValueRef {
230-
self.count_insn("fadd");
231-
unsafe {
232-
let instr = llvm::LLVMBuildFAdd(self.llbuilder, lhs, rhs, noname());
233-
llvm::LLVMRustSetHasUnsafeAlgebra(instr);
234-
instr
235-
}
236-
}
237-
238229
pub fn sub(&self, lhs: ValueRef, rhs: ValueRef) -> ValueRef {
239230
self.count_insn("sub");
240231
unsafe {
@@ -263,15 +254,6 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
263254
}
264255
}
265256

266-
pub fn fsub_fast(&self, lhs: ValueRef, rhs: ValueRef) -> ValueRef {
267-
self.count_insn("sub");
268-
unsafe {
269-
let instr = llvm::LLVMBuildFSub(self.llbuilder, lhs, rhs, noname());
270-
llvm::LLVMRustSetHasUnsafeAlgebra(instr);
271-
instr
272-
}
273-
}
274-
275257
pub fn mul(&self, lhs: ValueRef, rhs: ValueRef) -> ValueRef {
276258
self.count_insn("mul");
277259
unsafe {
@@ -300,16 +282,6 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
300282
}
301283
}
302284

303-
pub fn fmul_fast(&self, lhs: ValueRef, rhs: ValueRef) -> ValueRef {
304-
self.count_insn("fmul");
305-
unsafe {
306-
let instr = llvm::LLVMBuildFMul(self.llbuilder, lhs, rhs, noname());
307-
llvm::LLVMRustSetHasUnsafeAlgebra(instr);
308-
instr
309-
}
310-
}
311-
312-
313285
pub fn udiv(&self, lhs: ValueRef, rhs: ValueRef) -> ValueRef {
314286
self.count_insn("udiv");
315287
unsafe {
@@ -338,15 +310,6 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
338310
}
339311
}
340312

341-
pub fn fdiv_fast(&self, lhs: ValueRef, rhs: ValueRef) -> ValueRef {
342-
self.count_insn("fdiv");
343-
unsafe {
344-
let instr = llvm::LLVMBuildFDiv(self.llbuilder, lhs, rhs, noname());
345-
llvm::LLVMRustSetHasUnsafeAlgebra(instr);
346-
instr
347-
}
348-
}
349-
350313
pub fn urem(&self, lhs: ValueRef, rhs: ValueRef) -> ValueRef {
351314
self.count_insn("urem");
352315
unsafe {
@@ -368,15 +331,6 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
368331
}
369332
}
370333

371-
pub fn frem_fast(&self, lhs: ValueRef, rhs: ValueRef) -> ValueRef {
372-
self.count_insn("frem");
373-
unsafe {
374-
let instr = llvm::LLVMBuildFRem(self.llbuilder, lhs, rhs, noname());
375-
llvm::LLVMRustSetHasUnsafeAlgebra(instr);
376-
instr
377-
}
378-
}
379-
380334
pub fn shl(&self, lhs: ValueRef, rhs: ValueRef) -> ValueRef {
381335
self.count_insn("shl");
382336
unsafe {

branches/beta/src/librustc_trans/trans/intrinsic.rs

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -658,29 +658,6 @@ pub fn trans_intrinsic_call<'a, 'blk, 'tcx>(mut bcx: Block<'blk, 'tcx>,
658658
}
659659

660660
},
661-
(_, "fadd_fast") | (_, "fsub_fast") | (_, "fmul_fast") | (_, "fdiv_fast") |
662-
(_, "frem_fast") => {
663-
let sty = &arg_tys[0].sty;
664-
match float_type_width(sty) {
665-
Some(_width) =>
666-
match &*name {
667-
"fadd_fast" => FAddFast(bcx, llargs[0], llargs[1], call_debug_location),
668-
"fsub_fast" => FSubFast(bcx, llargs[0], llargs[1], call_debug_location),
669-
"fmul_fast" => FMulFast(bcx, llargs[0], llargs[1], call_debug_location),
670-
"fdiv_fast" => FDivFast(bcx, llargs[0], llargs[1], call_debug_location),
671-
"frem_fast" => FRemFast(bcx, llargs[0], llargs[1], call_debug_location),
672-
_ => unreachable!(),
673-
},
674-
None => {
675-
span_invalid_monomorphization_error(
676-
tcx.sess, span,
677-
&format!("invalid monomorphization of `{}` intrinsic: \
678-
expected basic float type, found `{}`", name, sty));
679-
C_null(llret_ty)
680-
}
681-
}
682-
683-
},
684661

685662

686663
(_, "return_address") => {
@@ -1723,17 +1700,3 @@ fn int_type_width_signed<'tcx>(sty: &ty::TypeVariants<'tcx>, ccx: &CrateContext)
17231700
_ => None,
17241701
}
17251702
}
1726-
1727-
// Returns the width of a float TypeVariant
1728-
// Returns None if the type is not a float
1729-
fn float_type_width<'tcx>(sty: &ty::TypeVariants<'tcx>)
1730-
-> Option<u64> {
1731-
use rustc::middle::ty::TyFloat;
1732-
match *sty {
1733-
TyFloat(t) => Some(match t {
1734-
ast::FloatTy::F32 => 32,
1735-
ast::FloatTy::F64 => 64,
1736-
}),
1737-
_ => None,
1738-
}
1739-
}

0 commit comments

Comments
 (0)