Commit Graph

74639 Commits

Author SHA1 Message Date
Paolo Teti 893fc32744 Update compiler-builtins to latest master.
- Rebase compiler-rt to LLVM 6
- New VFP intrinsics on ARM
- Add generic conversion from a narrower to a wider FP type (f32->f64)
- Fixes minor issues on _subsf3, __subdf3 and __aeabi_fcmple
- Split test suite to a separate crate
2018-02-13 22:39:11 +01:00
Shaun Steenkamp e034dddb32 38880 remove unnecessary self.table.size check 2018-02-13 20:25:10 +00:00
Shaun Steenkamp f3330cea7f 38880 fix incorrect negation 2018-02-13 17:15:58 +00:00
Shaun Steenkamp 94c3c84b6a 38880 hashmap check size=0, not just capacity=0 2018-02-13 16:40:02 +00:00
Shaun Steenkamp a295ec1ec9 38880 restore original entry(key) method 2018-02-13 16:32:35 +00:00
Jacob Kiesel fbad3b2468
Switch to retain calling drain_filter. 2018-02-13 08:48:25 -07:00
Mark Simulacrum 7cf5ea02a9 Add note about Cargo cwd change to release notes 2018-02-13 08:08:38 -07:00
kennytm 7984c895b6
Improve debuggability of #48116.
1. When the invalid condition is hit, write out the relevant variables too
2. In compile-fail/parse-fail tests, check for ICE first, so the invalid
   error patterns won't mask our ICE output.
2018-02-13 22:48:16 +08:00
Michael Woerister 580dd42cfa incr.comp.: Run cache directory garbage collection before loading dep-graph. 2018-02-13 13:37:32 +01:00
Michael Woerister 0397fc1b3a Handle path prefix mapping in a more stable way when computing the crate hash. 2018-02-13 10:55:54 +01:00
Mazdak Farrokhzad db13296b6f core::iter::repeat_with: fix missing word, see @Pazzaz's review 2018-02-13 06:20:17 +01:00
bors 4d2d3fc5da Auto merge of #47804 - retep007:recursive-requirements, r=pnkfelix
Optimized error reporting for recursive requirements #47720

Fixes #47720
2018-02-13 00:14:11 +00:00
Brad Gibson 7948afdc53 changed termination_trait's bound from Error to Debug; added compiletest header command and appropriate tests 2018-02-12 13:52:49 -08:00
Niko Matsakis cc05561048 detect wrong number of args when type-checking a closure
Instead of creating inference variables for those argument types, use
the trait error-reporting code to give a nicer error.
2018-02-12 16:49:21 -05:00
Mazdak Farrokhzad 91a4b9044d core::iter::repeat_with: tracking issue is #48169 2018-02-12 21:47:59 +01:00
Niko Matsakis bd10ef7b27 rustc_typeck/check/closure: rustfmt 2018-02-12 14:47:31 -05:00
Mark Simulacrum f237e9e2e7 Remove allocation from width of character function. 2018-02-12 12:28:32 -07:00
Alex Crichton 4c658f76c1 Update compiletest's `read2` function
This was originally copied over from Cargo and Cargo has since [been
updated][update] so let's pull in the fixes here too!

[update]: https://github.com/rust-lang/cargo/pull/5030
2018-02-12 10:46:31 -08:00
Alex Crichton 43e8ac27d9 rustc: Persist LLVM's `Linker` in Fat LTO
This commit updates our Fat LTO logic to tweak our custom wrapper around LLVM's
"link modules" functionality. Previously whenever the
`LLVMRustLinkInExternalBitcode` function was called it would call LLVM's
`Linker::linkModules` wrapper. Internally this would crate an instance of a
`Linker` which internally creates an instance of an `IRMover`. Unfortunately for
us the creation of `IRMover` is somewhat O(n) with the input module. This means
that every time we linked a module it was O(n) with respect to the entire module
we had built up!

Now the modules we build up during LTO are quite large, so this quickly started
creating an O(n^2) problem for us! Discovered in #48025 it turns out this has
always been a problem and we just haven't noticed it. It became particularly
worse recently though due to most libraries having 16x more object files than
they previously did (1 -> 16).

This commit fixes this performance issue by preserving the `Linker` instance
across all links into the main LLVM module. This means we only create one
`IRMover` and allows LTO to progress much speedier.

From the `cargo-cache` project in #48025 a **full build** locally when from
5m15s to 2m24s. Looking at the timing logs each object file was linked in in
single-digit millisecond rather than hundreds, clearly being a nice improvement!

Closes #48025
2018-02-12 09:11:06 -08:00
Mazdak Farrokhzad 9cee79a7ff core::iter::repeat_with: document DoubleEndedIterator behavior 2018-02-12 18:03:56 +01:00
Alex Crichton 0f16eee013 rustc: Add the ability to not run dsymutil
This commit adds the ability for rustc to not run `dsymutil` by default
on OSX. A new codegen option, `-Z run-dsymutil=no`, was added to specify
that `dsymutil` should *not* run and instead the compiler should
unconditionally keep the object files around in a compilation if
necessary for debug information.

cc #47240
2018-02-12 07:44:40 -08:00
Shaun Steenkamp fd78621717 38880 fixup add missing mut 2018-02-12 14:53:29 +00:00
Shaun Steenkamp 29f71488bc 38880 remove redundant extra function 2018-02-12 14:00:08 +00:00
Antoni Boucher 146b81c2c6 Fix tidy errors 2018-02-12 08:07:10 -05:00
Scott McMurray 0bb818cc0b Add Iterator::try_for_each
The fallible version of for_each and the stateless version of try_fold.
2018-02-12 01:39:01 -08:00
bors 16362c737f Auto merge of #47843 - estebank:teach, r=nikomatsakis
Add `-Zteach` documentation

Add extra inline documentation to E0019, E0016, E0013, E0396, E0017,
E0018, E0010, E0022, E0030, E0029, E0033, E0026 and E0027.

Follow up to #47652.
2018-02-12 09:38:40 +00:00
Mazdak Farrokhzad efa332038c core::iter::repeat_with: fix doc tests 2018-02-12 09:18:22 +01:00
Mazdak Farrokhzad 55c669c4d9 core::iter::repeat_with: fix tests some more 2018-02-12 09:15:13 +01:00
Mazdak Farrokhzad f025eff21d core::iter::repeat_with: fix tests 2018-02-12 09:13:47 +01:00
Mazdak Farrokhzad 1af9ee1350 core::iter::repeat_with: derive Copy, Clone, Debug 2018-02-12 08:35:12 +01:00
Mazdak Farrokhzad c4099ca4b1 core::iter::repeat_with: general fixes 2018-02-12 08:25:39 +01:00
Mazdak Farrokhzad 0f789aad2b add core::iter::repeat_with 2018-02-12 08:05:46 +01:00
bors b54f27ba36 Auto merge of #48144 - kennytm:reduce-musl-test-size, r=Mark-Simulacrum
Compiletest: delete the compiled program once its test is done.

Reduces CI disk usage which prevents #48118 from succeeding.
2018-02-12 06:43:24 +00:00
Esteban Küber f7cabc6550 Continue parsing function after finding `...` arg
When encountering a variadic argument in a function definition that
doesn't accept it, if immediately after there's a closing paren,
continue parsing as normal. Otherwise keep current behavior of emitting
error and stopping.
2018-02-11 22:10:35 -08:00
Antoni Boucher 56e15de9f9 Make primitive types docs relevant (unsigned) 2018-02-11 21:53:30 -05:00
Guillaume Gomez 9931583468 Make primitive types docs relevant 2018-02-11 21:53:30 -05:00
Jason Schein bd426f1d69 Update ops range example to avoid confusion between indexes and values. 2018-02-11 17:54:44 -08:00
Mark Simulacrum 00bce71144 Delete executables if the test ran successfully.
This isn't a perfect heuristic, but since the amount of run-fail tests
is far lower than run-pass tests for now, it should be sufficient to
ensure that we don't run into CI limits. This makes it possible to run
the test binary manually (e.g., under gdb/lldb) if it failed to attempt
to find out why.
2018-02-11 16:27:33 -07:00
kennytm 66ee33a437
compiletest: Delete the executable immediately after running.
This should save a lot of space on musl test cases (whose standard library
are linked statically).
2018-02-12 03:13:25 +08:00
Peter Atashian 9269e83b37
Add an unstable FileTypeExt extension trait for Windows 2018-02-11 13:40:46 -05:00
bors b8398d947d Auto merge of #47752 - mark-i-m:at-most-once-rep, r=nikomatsakis
Implement `?` macro repetition

See rust-lang/rfcs#2298 (with disposition merge)
2018-02-11 18:11:01 +00:00
Mark Simulacrum f104b12059 Change Step to be invoked with a path when in default mode.
Previously, a Step would be able to tell on its own when it was invoked
"by-default" (that is, `./x.py test` was called instead of `./x.py test
some/path`). This commit replaces that functionality, invoking each Step
with each of the paths it has specified as "should be invoked by."

For example, if a step calls `path("src/tools/cargo")` and
`path("src/doc/cargo")` then it's make_run will be called twice, with
"src/tools/cargo" and "src/doc/cargo." This makes it so that default
handling logic is in builder, instead of spread across various Steps.

However, this meant that some Step specifications needed to be updated,
since for example `rustdoc` can be built by `./x.py build
src/librustdoc` or `./x.py build src/tools/rustdoc`. A `PathSet`
abstraction is added that handles this: now, each Step can not only list
`path(...)` but also `paths(&[a, b, ...])` which will make it so that we
don't invoke it with each of the individual paths, instead invoking it
with the first path in the list (though this shouldn't be depended on).

Future work likely consists of implementing a better/easier way for a
given Step to work with "any" crate in-tree, especially those that want
to run tests, build, or check crates in the std, test, or rustc crate
trees. Currently this is rather painful to do as most of the logic is
duplicated across should_run and make_run. It seems likely this can be
abstracted away into builder somehow.
2018-02-11 10:03:16 -07:00
bors 0196b20f69 Auto merge of #47614 - dotdash:x86_64_sysv_ffi, r=eddyb
Fix oversized loads on x86_64 SysV FFI calls

The x86_64 SysV ABI should use exact sizes for small structs passed in
registers, i.e. a struct that occupies 3 bytes should use an i24,
instead of the i32 it currently uses.

Refs #45543
2018-02-11 15:10:46 +00:00
Artyom Pavlov c2a31dee83
Dangling pointer fix 2018-02-11 15:57:07 +03:00
Jeffrey Seyfried a003cb7cd7 Add test. 2018-02-11 02:19:27 -08:00
kennytm bf69b0feed
Upgrade the Travis CI macOS images for testing from Xcode 8.3 to 9.2. 2018-02-11 14:28:28 +08:00
bors 0bb8935136 Auto merge of #47657 - algesten:save-analysis-impls, r=nrc
Emit data::Impl in save-analysis

As discussed on [internals.rust-lang](https://internals.rust-lang.org/t/rustdoc2-rls-analysis-and-the-compiler-help-wanted/6592/5), this PR emits `rls-data::Impl` in the save-analysis.

A number of questions are outstanding:

- [x] A few `???` around row 356. We need to discuss what goes here, if anything.
- [ ] ~~Deriving `id` for impl using hashing. Is this going to clash with rustc defids?~~
- [ ] ~~Deriving `id` for impl using hashing. Is the conversion from 64 bit -> 32 bit problematic?~~
- [x] Need a new rls-data with an `id` field in `Impl` struct.
- [ ] ~~Need a new rls-data which `derive` `Hash` for `ImplKind` enum.~~
2018-02-11 05:29:20 +00:00
bors 7f2baba121 Auto merge of #48092 - eddyb:discriminate-the-void, r=nikomatsakis
rustc_mir: insert a dummy access to places being matched on, when building MIR.

Fixes #47412 by adding a `_dummy = Discriminant(place)` before each `match place {...}`.

r? @nikomatsakis
2018-02-11 02:42:19 +00:00
Mark Simulacrum 55c36e3744 Remove DontDistWithMiri struct and instead just directly check it in builder 2018-02-10 18:18:41 -07:00
Mark Simulacrum 11580b7be3 Make exclude and paths relative to root of checkout 2018-02-10 18:15:34 -07:00