Commit Graph

53549 Commits

Author SHA1 Message Date
Seo Sanghyeon
0f257df31a Preserve span when lowering ExprKind::Paren 2016-05-17 20:37:07 +09:00
bors
5d12502d3a Auto merge of #33617 - sanmai-NL:gitignore_IntelliJ, r=nikomatsakis
IntelliJ support, ordering, cleanup
2016-05-17 04:02:15 -07:00
Jonathan Turner
175ecfefd5 Improve a few errors and fix #33366 2016-05-17 06:46:08 -04:00
Jonathan Turner
3e9747af49 De-emph minimized spans, add better debugging output 2016-05-17 06:46:08 -04:00
Jonathan Turner
ae1e73affe Print secondary labels as notes in old skool mode 2016-05-17 06:46:08 -04:00
Felix S. Klock II
8999e877ed mir::dataflow::sanity_check: removed hackish tmp = val propagation code.
(it was an artifact of an earlier design of the `rustc_peek` API, but
its totally unnecessary now.)
2016-05-17 09:06:18 +02:00
Felix S. Klock II
90a652617b Escape asterix in markdown file to side-step it being interpreted as emphasis. 2016-05-17 08:44:24 +02:00
Felix S. Klock II
b0b1f4da60 Fix comments in mir::dataflow::sanity_check. 2016-05-17 08:41:41 +02:00
bors
5743564f2d Auto merge of #33651 - Nercury:update-i686-android-target-to-match-abi, r=alexcrichton
Update i686-linux-android features to match android x86 ABI.

Based on [android's official x86 ABI info](http://developer.android.com/ndk/guides/abis.html#x86), the x86 baseline CPU can be safely updated to `pentiumpro`, with the addition of `MMX`, `SSE`, `SSE2`, `SSE3`, `SSSE3` features.

r? @alexcrichton
2016-05-16 22:35:00 -07:00
bors
786b26d7b4 Auto merge of #33491 - arielb1:obligation-jungle, r=nikomatsakis
Replace the obligation forest with a graph

In the presence of caching, arbitrary nodes in the obligation forest can be merged, which makes it a general graph. Handle it as such, using cycle-detection algorithms in the processing.

I should do performance measurements sometime.

This was pretty much written as a proof-of-concept. Please help me write this in a less-ugly way. I should also add comments explaining what is going on.

r? @nikomatsakis
2016-05-16 18:39:59 -07:00
Huon Wilson
eb67f492de Deprecate {f32,f64}::abs_sub.
The abs_sub name is misleading: the function actually computes the
positive difference (`fdim` in C), not the `(x - y).abs()` that *many* people expect
from the name.

This function can be replaced with just `(x - y).max(0.0)`, mirroring
the `abs` version, but this behaves differently with NAN: `NAN.max(0.0)
== 0.0`, while `NAN.positive_diff(0.0) == NAN`. People who absolutely
need that behaviour can use the C function directly and/or talk to the libs
team (we haven't encountered a concrete use-case for this functionality).

Closes #30315.
2016-05-17 08:06:56 +10:00
bors
cd6a400175 Auto merge of #33588 - nikomatsakis:compiletest-ui, r=acrichto
add UI testing framework

This adds a framework for capturing and tracking the precise output of rustc, which allows us to check all manner of minor details with the output. It's pretty strict right now -- the output must match almost exactly -- and hence maybe a bit too strict. But I figure we can add wildcards or whatever later. There is also a script intended to make updating the references easy, though the script could make things a *bit* easier (in particular, it'd be nice if it would find the build directory for you automatically).

One thing I was wondering about is the best way to test colors. Since windows doesn't embed those in the output stream, this test framework can't test colors on windows -- so I figure we can just write tests that are ignored on windows and which pass `--color=always` or whatever to rustc.

cc @jonathandturner
r? @alexcrichton
2016-05-16 14:41:50 -07:00
Andrew Paseltiner
f3c63d21c1 Add missing code fence to diagnostics.rs
Closes #33662
2016-05-16 16:57:33 -04:00
Niko Matsakis
24cfa1efb0 pacify the mercilous tidy 2016-05-16 16:48:48 -04:00
Guillaume Gomez
b2613028fe Fix selected item background style 2016-05-16 22:36:13 +02:00
Ariel Ben-Yehuda
65ad935737 change on_unimplented logic 2016-05-16 23:16:52 +03:00
Vadim Petrochenkov
02a1eef6e4 Fix rebase 2016-05-16 23:12:18 +03:00
Vadim Petrochenkov
79b343d87c lowering: Rename identifiers only when necessary
Do not rename invalid identifiers, they stop being invalid after renaming
2016-05-16 22:25:08 +03:00
Vadim Petrochenkov
aad347c4f7 Remove hir::Ident 2016-05-16 22:25:08 +03:00
bors
4fdf2c4f97 Auto merge of #33500 - Nercury:update-aarch64-android-target-to-match-abi, r=alexcrichton
Update aarch64-linux-android target to match android abi.

- Changed `target_env` to "gnu" to empty "" for all android targets because it does not matter for android.
- The PR #33048 added "max_atomic_width" for arm-android but missed recently added armv7-android. Add it there too.
- Added features `+neon,+fp-armv8` because they [must exist on `aarch64` android](http://developer.android.com/ndk/guides/cpu-features.html).
- Update libc to include https://github.com/rust-lang/libc/pull/282 so that rust's std lib works on android's aarch64 (the main issue there was incorrect structure alignment on 64-bit arm).

r? @alexcrichton
2016-05-16 12:15:10 -07:00
bors
8310de856d Auto merge of #33429 - ranma42:fix-x87-parsing, r=alexcrichton
Fix fast path of float parsing on x87

The fast path of the float parser relies on the rounding to happen
exactly and directly to the correct number of bits. On x87, instead,
double rounding would occour as the FPU stack defaults to 80 bits of
precision.

This can be fixed by setting the precision of the FPU stack before
performing the int to float conversion. This can be achieved by
changing the value of the x87 control word. This is a somewhat common
operation that is in fact performed whenever a float needs to be
truncated to an integer, but it is undesirable to add its overhead for
code that does not rely on x87 for computations (i.e. on non-x86
architectures, or x86 architectures which perform FPU computations on
using SSE).

Fixes `num::dec2flt::fast_path_correct` (on x87).
2016-05-16 09:46:09 -07:00
Felix S. Klock II
cd71b0dd54 core::intrinsics: fix typo noted during review. 2016-05-16 17:10:44 +02:00
bors
c1ccf97e51 Auto merge of #33663 - rphmeier:recover_rename, r=sfackler
rename a few occurrences of RecoverSafe in docs
2016-05-16 07:25:04 -07:00
Andrea Canciani
4ec1f8de41 Fix asm! blocks
The `volatile` modifier was incorrectly written outside of the `asm!`
blocks.
2016-05-16 15:41:45 +02:00
Andrea Canciani
88afeb9cba Cleanup documentation
Remove irrelevant information (and instead provide pointer to
reference documentation), replace ASCII-art table with the
corresponding MarkDown one, and minor fixes.
2016-05-16 15:37:14 +02:00
bors
89430be0c1 Auto merge of #33331 - uasi:diag-e0038-typo, r=GuillaumeGomez
diagnostics: Fix minor typo in E0038
2016-05-16 05:05:55 -07:00
Felix S. Klock II
ee44f7ed27 DefinitelyInitializedLvals dataflow op (goal: move away from MaybeUninitializedLvals) 2016-05-16 13:34:33 +02:00
Felix S. Klock II
8956789c35 Little unit tests for MIR dataflow analysis.
These use new `rustc_peek` (whose semantics is driven by attribute
attached to fn).
2016-05-16 13:34:33 +02:00
Felix S. Klock II
5839e6bb10 Add ability to unit-test dataflow results via rustc_peek intrinsic.
(The static semantics of `rustc_peek` is derived from attributes
attached to the function being compiled; in this case,
`rustc_peek(&expr)` observes the dataflow state for the l-value
`expr`.)
2016-05-16 13:34:33 +02:00
Felix S. Klock II
3bb598429a Adding magic rustc_peek intrinsic that other code can repurpose to
its own needs based on attributes attached to the function where it
appears.
2016-05-16 13:34:33 +02:00
Felix S. Klock II
c73f3517a2 Revised mir-dataflow.
Incorporates many fixes contributed by arielb1.

----

revise borrowck::mir::dataflow code to allow varying domain for bitvectors.

This particular code implements the `BitDenotation` trait for three
analyses:

 * `MovingOutStatements`, which, like `borrowck::move_data`, maps each
   bit-index to a move instruction, and a 1 means "the effect of this
   move reaches this point" (and the assigned l-value, if a scoped
   declaration, is still in scope).

 * `MaybeInitializedLvals`, which maps each bit-index to an l-value.
   A 1 means "there exists a control flow path to this point that
   initializes the associated l-value."

 * `MaybeUninitializedLvals`, which maps each bit-index to an l-value
   A 1 means "there exists a control flow path to this point that
   de-initializes the associated l-value."

----

Revised `graphviz` dataflow-rendering support in `borrowck::mir`.

One big difference is that this code is now parameterized over the
`BitDenotation`, so that it can be used to render dataflow results
independent of how the dataflow bitvectors are interpreted; see where
reference to `MoveOut` is replaced by the type parameter `D`.

----

Factor out routine to query subattributes in `#[rustc_mir(..)]`.

(Later commits build upon this for some unit testing and instrumentation.)

----

thread through a tcx so that I can query types of lvalues as part of analysis.

----

Revised `BitDenotation::Ctxt`, allowing variation beyond `MoveData`.

The main motivation is to ease threading through a `TyCtxt`.

(In hindsight it might have been better to instead attach the `TyCtxt`
to each of the different dataflow implementations, but that would
require e.g. switching away from having a `Default` impl, so I am
leaving that experiment for another time.)
2016-05-16 13:34:25 +02:00
bors
32f8366b7c Auto merge of #33640 - lucab:to-upstream/tcp-stress, r=alexcrichton
test: explicitely check the number of spawned threads in tcp-stress

System limits may restrict the number of threads effectively spawned by this test (eg. systemd recently introduced a 512 tasks per unit maximum default).
Now this test explicitly asserts on the expected number of threads, making failures due to system limits easier to spot.
More details at https://bugs.debian.org/822325
2016-05-16 02:47:12 -07:00
Wang Xuerui
2ea6c70a1a syntax_ext: format: remove reference to methods in comment 2016-05-16 17:16:32 +08:00
Wang Xuerui
067284b291 syntax_ext: format: nest_level's are no more
`nest_level` is long dead since cac7a2053a
(PR #14831), so is `check_positional_ok()`. Let's bid them farewell.
2016-05-16 16:59:27 +08:00
Felix S. Klock II
6c72c5fa88 borrowck::mir::gather_moves: create MovePaths for lvalues even if unreferenced.
includes misc bug fixes and removal of useless code.
2016-05-16 10:00:35 +02:00
Felix S. Klock II
d03b341e6b Unit struct defns for 3 dataflow analyses for borrowck::mir::dataflow. 2016-05-16 09:13:42 +02:00
Felix S. Klock II
79ab85544b Remove &self parameter from DataflowOperator::initial_value. 2016-05-16 09:13:42 +02:00
Felix S. Klock II
b4972b00c9 Add helper method for getting the dataflow results at exit from a basic block. 2016-05-16 09:13:42 +02:00
Felix S. Klock II
129b371cae One-line doc clarification for representation of unit type (). 2016-05-16 09:13:42 +02:00
Felix S. Klock II
4446e793da Expose pretty print routines that accept just mir (no need for a NodeId). 2016-05-16 09:13:42 +02:00
Felix S. Klock II
90b7a86268 rustc_mir::pretty refactoring: break fn write_fn_intro into two routines.
(The crucial thing these changes are working toward (but are not yet
in this commit) is a way to pretty-print MIR without having the
`NodeId` for that MIR in hand.)
2016-05-16 09:13:42 +02:00
Felix S. Klock II
306ca4ca4f rustc_mir::pretty: factor out scope entry/exit annotation computation. 2016-05-16 09:13:42 +02:00
Felix S. Klock II
bfe789c044 fixes to librustc_borrowck::bitslice::bits_to_string, used for graphviz printing. 2016-05-16 09:13:42 +02:00
Felix S. Klock II
cd81b60a4a fix bug in debug! output from rustc::middle::dataflow
(bug was cut/pasted into `rustc_borrowck::bitslice`, so I fixed it
there as well.)
2016-05-16 09:13:42 +02:00
bors
e87cd7e380 Auto merge of #33505 - petrochenkov:self, r=nrc
Remove ExplicitSelf from HIR

`self` argument is already kept in the argument list and can be retrieved from there if necessary, so there's no need for the duplication.
The same changes can be applied to AST, I'll make them in the next breaking batch.
The first commit also improves parsing of method declarations and fixes https://github.com/rust-lang/rust/issues/33413.

r? @eddyb
2016-05-15 23:14:52 -07:00
Pyry Kontio
20b9129617 Added a big-picture explanation for thread::park() & co. 2016-05-16 14:01:21 +09:00
Robert Habermeier
81f479f5bd rename a few occurrences of RecoverSafe in docs 2016-05-16 00:04:01 -04:00
bors
e90307d2a2 Auto merge of #33251 - Kintaro:fix-typo-in-fs, r=GuillaumeGomez
Fix a typo in error messages in std::fs tests

Just a small correction to fix a typo in an error message in std::fs tests
2016-05-15 20:47:15 -07:00
bors
bb39c4925a Auto merge of #33643 - eddyb:rollup, r=eddyb
Rollup of 27 pull requests

- Successful merges: #33342, #33393, #33415, #33475, #33517, #33533, #33534, #33565, #33580, #33584, #33585, #33588, #33590, #33591, #33593, #33598, #33600, #33602, #33603, #33604, #33605, #33607, #33612, #33620, #33633, #33634, #33635
- Failed merges: #33578
2016-05-15 18:22:51 -07:00
Eduard-Mihai Burtescu
ffbfbe452c Rollup merge of #33660 - fbergr:doc, r=steveklabnik
Update link to license

Permanent redirect (301). The link should be updated.
2016-05-16 02:00:20 +03:00