Commit Graph

45675 Commits

Author SHA1 Message Date
Huon Wilson
8d8b489bc9 Add intrinsics for SIMD arithmetic. 2015-08-17 14:41:38 -07:00
Huon Wilson
ecb3df5a91 Add simd_cast intrinsic. 2015-08-17 14:41:38 -07:00
Huon Wilson
f1d3b0271e Add x86 & arm reciprocal approximation intrinsics. 2015-08-17 14:41:38 -07:00
Huon Wilson
78eead63fa Implement the simd_insert/simd_extract intrinsics. 2015-08-17 14:41:38 -07:00
Huon Wilson
9af385bddb Add rustc_platform_intrinsics & some arm/x86 intrs.
These are enough to implement a cross-platform SIMD single-precision
mandelbrot renderer.
2015-08-17 14:41:38 -07:00
Huon Wilson
1bfbde6778 Add comparison and shuffle SIMD intrinsics.
- simd_eq, simd_ne, simd_lt, simd_le, simd_gt, simd_ge
- simd_shuffleNNN
2015-08-17 14:41:37 -07:00
Huon Wilson
4f4425840d Add some SIMD target_feature cfg's when appropriate.
NB. this may not be 100% perfect.
2015-08-17 14:41:37 -07:00
Huon Wilson
e364f0eb5a feature gate cfg(target_feature).
This is theoretically a breaking change, but GitHub search turns up no
uses of it, and most non-built-in cfg's are passed via cargo features,
which look like `feature = "..."`, and hence can't overlap.
2015-08-17 14:41:37 -07:00
Huon Wilson
c66554cab3 switch core::simd to repr(simd) and deprecate it.
This functionality will be available out of tree in the `simd` crate on
crates.io.

[breaking-change]
2015-08-17 14:41:37 -07:00
Ariel Ben-Yehuda
13809ffff7 don't iterate over all impls when none match
before:
573.01user 4.04system 7:33.86elapsed 127%CPU (0avgtext+0avgdata 1141656maxresident)k
after:
567.03user 4.00system 7:28.23elapsed 127%CPU (0avgtext+0avgdata 1133112maxresident)k

an additional 1% improvement
2015-08-18 00:25:29 +03:00
Ariel Ben-Yehuda
8aeaaac654 add a fast-path to resolve_type_vars_if_possible
this avoids needless substituting

before:
577.76user 4.27system 7:36.13elapsed 127%CPU (0avgtext+0avgdata 1141608maxresident)k

after:
573.01user 4.04system 7:33.86elapsed 127%CPU (0avgtext+0avgdata 1141656maxresident)k
2015-08-18 00:24:16 +03:00
bors
6d992728c3 Auto merge of #27833 - arielb1:robust-construction, r=eddyb
Fixes #27815

r? @eddyb
2015-08-17 21:02:47 +00:00
Alex Burka
a70635b2cc remove untrue doc from marker.rs
I just took out the sentences that were lies. I'm not sure if they need to be replaced.
2015-08-17 16:37:48 -04:00
Alex Crichton
bfc45834c1 test: Don't panic if some tests failed
This commit removes the call to `panic!("Some tests failed")` at the end of all
tests run when running with libtest. The panic is replaced with
`std::process::exit` to have a nonzero error code, but this change both:

1. Makes the test runner no longer print out the extraneous panic message at the
   end of a failing test run that some tests failed. (this is already summarized
   in the output of the test run).
2. When running tests with `RUST_BACKTRACE` set it removes an extraneous
   backtrace from the output (only failing tests will have their backtraces in
   the output.
2015-08-17 12:58:19 -07:00
Ariel Ben-Yehuda
96e6b2fef8 use an FnvHashSet instead of an HashSet in fulfill
this doesn't cause a measurable perf increase, but it makes callgrind output
cleaner. Anyway, rustc should be using FNV everywhere.
2015-08-17 21:53:46 +03:00
Ariel Ben-Yehuda
9b75a2bcd1 make trait matching smarter with projections
also, use the right caching logic for type_moves_by_default (this was
broken by @jroesch).

before:
593.10user 5.21system 7:51.41elapsed 126%CPU (0avgtext+0avgdata 1150016maxresident)k
llvm: 427.045

after:
577.76user 4.27system 7:36.13elapsed 127%CPU (0avgtext+0avgdata 1141608maxresident)k
llvm: 431.001
2015-08-17 21:53:44 +03:00
Eli Friedman
1ddee8070d Remove dependencies on libm functions from libcore.
There wasn't any particular reason the functions needed to be there
anyway, so just get rid of them, and adjust libstd to compensate.

With this change, libcore depends on exactly two floating-point functions:
fmod and fmodf.  They are implicitly referenced because they are
used to implement "%".
2015-08-17 11:30:59 -07:00
Huon Wilson
c8b6d5b23c Implement repr(simd) as an alias for #[simd]. 2015-08-17 10:57:18 -07:00
bors
47ea0cfb6b Auto merge of #27864 - frewsxcv:regression-test, r=alexcrichton
Closes #23304
2015-08-17 16:29:31 +00:00
Ariel Ben-Yehuda
44f41063dd use the correct substs when checking struct patterns
also, make sure this is tested.
2015-08-17 18:22:00 +03:00
Corey Farwell
1e79d05ac0 Add regression tests for #23304
Closes #23304
2015-08-17 09:36:03 -04:00
Ulrik Sverdrup
01e8812461 StrSearcher: Additional comments and small code moves
Break out a separate static method to create the "byteset".
2015-08-16 22:37:18 +02:00
bors
e822a18ae7 Auto merge of #27858 - rkruppe:rustdoc-codespans, r=alexcrichton
Fixes #24746
2015-08-16 17:17:43 +00:00
bors
2f60268f54 Auto merge of #27689 - dotdash:die_odr, r=michaelwoerister
When using a generic enum type that was defined in an external crate,
our debuginfo currently claims that the concrete type (e.g. Option<i32>)
was defined in the current crate, where it was first used.

This means that if there are multiple crates that all use, for example,
Option<i32> values, they'll have conflicting debuginfo, each crate
claiming to have defined that type. This doesn't cause problems in
regular builds, but with LTO enabled, LLVM complains because it tries to
merge the debuginfo for those types and sees the ODR violations.

Since I couldn't find a way to get the file info for the external crate
that actually defined the enum, I'm working around the issue by using
"<unknown>" as the file for enum types. We'll want to re-visit and fix
this later, but this at least this fixes the ICE. And with the file
being unknown instead of wrong, the debuginfo isn't really worse than
before either.

Fixes #26447
2015-08-16 14:50:52 +00:00
Robin Kruppe
16ec84b75f Correct signature of hoedown callback for codespans 2015-08-16 16:49:10 +02:00
bors
a49d9bab1e Auto merge of #27643 - mitaa:get_item_, r=arielb1
(this incidentally fixes an error message where the paths separator is " " instead of "::")
2015-08-16 12:14:29 +00:00
bors
bef7d90a3b Auto merge of #27853 - seckar:master, r=steveklabnik 2015-08-16 06:53:43 +00:00
bors
9165a4e2dc Auto merge of #27818 - alexcrichton:tag-all-the-issues, r=aturon
This commit turns `#[unstable]` attributes missing an `issue` annotation into a hard error. This will require the libs team to ensure that there's a tracking issue for all unstable features in the standard library.

All existing unstable features have had issues created and they've all been updated. Yay!

Closes #26868
2015-08-16 05:10:23 +00:00
Nicholas Seckar
ab45e51afa Fix typo in doc string. 2015-08-15 20:17:52 -07:00
Alex Crichton
8ef1e3b77f test: Fix tests for requiring issues 2015-08-15 19:35:52 -07:00
bors
fc7efab3ab Auto merge of #27851 - nikomatsakis:cleanup-ty-decoder, r=eddyb
Just a little code cleanup I was doing as part of another refactoring (which may turn out not to be needed). The main thrust of this is to cleanup the interface to `tydecode.rs` to be less ridiculously repetitive. I also purged the generic "def-id conversion" parameter in favor of a trait object, just to reduce code duplication a bit and make the signatures a bit less messy. I measured the bootstrapping time to build stage2 with these changes, it was identical. (But it'd be easy enough to restore the unboxed closure if we wanted it.)
2015-08-16 02:25:36 +00:00
Niko Matsakis
7a3a1be5e4 remove the last remnants of old interface 2015-08-15 21:35:49 -04:00
Alex Crichton
2972b77134 Add issue for the rustc_private feature everywhere 2015-08-15 18:09:17 -07:00
Alex Crichton
5f625620b5 std: Add issues to all unstable features 2015-08-15 18:09:17 -07:00
Alex Crichton
377c11aa83 collections: Add issues for unstable features 2015-08-15 18:09:17 -07:00
Alex Crichton
3263d41bac rustc_unicode: Add issues for unstable features 2015-08-15 18:09:16 -07:00
Alex Crichton
59dac3175f libc,rand: Add issues for all unstable features 2015-08-15 18:09:16 -07:00
Alex Crichton
6734c933b5 alloc: Add issues for all unstable features 2015-08-15 18:09:16 -07:00
Alex Crichton
b7dcf272d9 core: Fill out issues for unstable features 2015-08-15 18:09:16 -07:00
Alex Crichton
6634777ae0 syntax: Require issues for unstable features
This turns an `#[unstable]` tag without an `issue` annotation into a hard error
to ensure that we've always got a tracking issue for unstable features in the
standard library.
2015-08-15 18:09:16 -07:00
bors
f05b22efb5 Auto merge of #27845 - dylanmckay:abstract-pointer-size-away, r=alexcrichton
This patch rewrites code in several places which assume that the current target has either 32-bit or 64-bit pointers so that it can support arbitrary-width pointers.

It does not completely remove all assumptions of pointer width, but it does reduce them significantly. There is a discussion [here](https://internals.rust-lang.org/t/adding-16-bit-pointer-support/2484/10) about the change.
2015-08-15 19:10:40 +00:00
Ariel Ben-Yehuda
91be125899 prevent non-dict-structs from being intialized via FRU
Fixes #27831
2015-08-15 21:03:10 +03:00
Ariel Ben-Yehuda
ba98228b4d clean-up ExprStruct and PatStruct type-checking
This fixes the crazy "transparent aliases" bug, which I hope nobody
relied on.
2015-08-15 20:39:28 +03:00
bors
753a6a9e29 Auto merge of #27847 - birkenfeld:patch-3, r=sfackler 2015-08-15 17:30:15 +00:00
bors
29455557aa Auto merge of #27827 - w00ns:for-loop-expn-issue-27639, r=alexcrichton
Fixes #27639
2015-08-15 14:50:13 +00:00
Georg Brandl
56f3282f31 Iterator::all() - document short-circuiting property parallel to any() 2015-08-15 11:49:33 +02:00
bors
316f5e5acf Auto merge of #27846 - AlisdairO:diagnostics248, r=Manishearth
As title :-)
Part of #24407.

r? @Manishearth
2015-08-15 09:26:48 +00:00
Dylan McKay
ea7768c2dd Improve 'unknown instrinsic' error message
If you had previously tried to get the ValueRef associated with an
intrinsic that hadn't been described in
`trans::context::declare_intrinsic()`, the compile would panic with
an empty message.

Now we print out details about the error in the panic message.
2015-08-15 21:06:06 +12:00
Alisdair Owens
26cca1c258 Add extended diagnostics for E0248 2015-08-15 10:02:54 +01:00
Niko Matsakis
b09cf1293a astencode: convert code to use TyDecoder directly 2015-08-15 05:01:47 -04:00