about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2016-05-15Update libc to bring in updates for android's aarch64.Nerijus Arlauskas-0/+0
2016-05-15Auto merge of #33607 - jonas-schievink:prettier-mir, r=eddybbors-26/+84
Some simple improvements to MIR pretty printing In short, this PR changes the MIR printer so that it: * places an empty line between the MIR for each item * does *not* write an empty line before the first BB when there are no var decls * aligns the "// Scope" comments 50 chars in (makes the output more readable) * prints the scope comments as "// scope N at ..." instead of "// Scope(N) at ..." * prints a prettier scope tree: * no more unbalanced delimiters! * no more "Parent" entry (these convey no useful information) * drop the "Scope()" and just print scope IDs * no braces when the scope is empty In action: https://gist.github.com/jonas-schievink/1c11226cbb112892a9470ce0f9870b65
2016-05-14Auto merge of #33593 - dotdash:smart_derive, r=brsonbors-7/+44
Improve derived implementations for enums with lots of fieldless variants A number of trait methods like PartialEq::eq or Hash::hash don't actually need a distinct arm for each variant, because the code within the arm only depends on the number and types of the fields in the variants. We can easily exploit this fact to create less and better code for enums with multiple variants that have no fields at all, the extreme case being C-like enums. For nickel.rs and its by now infamous 800 variant enum, this reduces optimized compile times by 25% and non-optimized compile times by 40%. Also peak memory usage is down by almost 40% (310MB down to 190MB). To be fair, most other crates don't benefit nearly as much, because they don't have as huge enums. The crates in the Rust distribution that I measured saw basically no change in compile times (I only tried optimized builds) and only 1-2% reduction in peak memory usage.
2016-05-14Auto merge of #33600 - ollie27:rustdoc_impl_params, r=alexcrichtonbors-8/+30
rustdoc: Fix missing type parameters on impls They were broken by #32558. Fixes: #33592
2016-05-14Add all possible features (NEON, FP) to aarch64 android target.Nerijus Arlauskas-0/+3
2016-05-14Add missing "max_atomic_width" to new armv7 android target.Nerijus Arlauskas-0/+1
2016-05-14Remove "gnu" from "target_env" because it does not matter for android.Nerijus Arlauskas-3/+3
2016-05-14Auto merge of #33579 - Amanieu:atomic_bool2, r=alexcrichtonbors-58/+36
Make AtomicBool the same size as bool Reopening #32365 This allows `AtomicBool` to be transmuted to a `bool`, which makes it more consistent with the other atomic types. Note that this now guarantees that the atomic type will always contain a valid `bool` value, which wasn't the case before (due to `fetch_nand`). r? @alexcrichton
2016-05-14test: clear deprecation warnings in tcp-stressLuca Bruno-7/+8
Signed-off-by: Luca Bruno <lucab@debian.org>
2016-05-14test: assert that all tcp-stress threads get spawnedLuca Bruno-2/+7
System limits may restrict the number of threads effectively spawned by this test (eg. systemd recently introduced a 512 tasks per unit maximum default). This commit 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 Signed-off-by: Luca Bruno <lucab@debian.org>
2016-05-14Auto merge of #33568 - nrc:save-json-2, r=pnkfelixbors-83/+536
save-analysis: JSON mk2 cc @aochagavia r? @pnkfelix
2016-05-14Auto merge of #33563 - Amanieu:oncestate, r=alexcrichtonbors-1/+1
Export OnceState from libstd This type is used in the signature of `call_once_force` but isn't exported from libstd. r? @alexcrichton
2016-05-14doc: 'tis the lang, not the reptileTshepang Lekhonkhobe-1/+1
2016-05-14Add checks for `self: _` and `self: &_`Vadim Petrochenkov-0/+28
2016-05-14doc: improve outputTshepang Lekhonkhobe-1/+1
2016-05-14Remove ExplicitSelf from HIRVadim Petrochenkov-431/+196
2016-05-14syntax: Refactor parsing of method declarationsVadim Petrochenkov-205/+206
Fix spans and expected token lists, fix #33413 + other cosmetic improvements Add test for #33413 Convert between `Arg` and `ExplicitSelf` precisely Simplify pretty-printing for methods
2016-05-14Rollup merge of #33576 - soltanmm:vtable, r=nikomatsakisManish Goregaokar-105/+235
Plumb inference obligations through selection, take 2 Using a `SnapshotVec` and dumping inferred obligations into `Vtable` variants. r? @nikomatsakis
2016-05-14Rollup merge of #33574 - michaelwoerister:collector-cleanup, r=nikomatsakisManish Goregaokar-525/+634
trans-collector: Assorted fixes and refactorings needed for making trans collector-driven. As the title says. The messages on the individual commits should do a good job of explaining what they are about. r? @nikomatsakis
2016-05-14Rollup merge of #33572 - nagisa:assoc-const-types, r=eddybManish Goregaokar-24/+26
Support references to outer type params for assoc consts Fixes #28809 r? @eddyb
2016-05-14Rollup merge of #33566 - dotdash:biased_switch, r=nagisaManish Goregaokar-10/+26
[MIR trans] Optimize trans for biased switches Currently, all switches in MIR are exhausitive, meaning that we can have a lot of arms that all go to the same basic block, the extreme case being an if-let expression which results in just 2 possible cases, be might end up with hundreds of arms for large enums. To improve this situation and give LLVM less code to chew on, we can detect whether there's a pre-dominant target basic block in a switch and then promote this to be the default target, not translating the corresponding arms at all. In combination with #33544 this makes unoptimized MIR trans of nickel.rs as fast as using old trans and greatly improves the times for optimized builds, which are only 30-40% slower instead of ~300%. cc #33111
2016-05-14Rollup merge of #33560 - eddyb:symtidy, r=alexcrichtonManish Goregaokar-1/+1
Use symlink_metadata in tidy to avoid panicking on broken symlinks. r? @alexcrichton
2016-05-14Rollup merge of #33555 - soltanmm:ambiguous-nixon, r=nikomatsakisManish Goregaokar-57/+1
Remove unification despite ambiguity in projection Turns out that closures aren't explicitly considered in `project.rs`, so the ambiguity handling w.r.t. closures can just be removed as the change done in `select.rs` covers it. r? @nikomatsakis
2016-05-14Rollup merge of #33554 - sfackler:no-current-exe, r=alexcrichtonManish Goregaokar-43/+22
Don't use env::current_exe with libbacktrace If the path we give to libbacktrace doesn't actually correspond to the current process, libbacktrace will segfault *at best*. cc #21889 r? @alexcrichton cc @semarie
2016-05-14Rollup merge of #33552 - dotdash:scfg, r=luqmanaManish Goregaokar-59/+124
[MIR] Enhance the SimplifyCfg pass to merge consecutive blocks Updated from #30238, including the changes suggested by @Aatch.
2016-05-14Rollup merge of #33544 - dotdash:baby_dont_break_me_no_more, r=AatchManish Goregaokar-119/+113
Only break critical edges where actually needed Currently, to prepare for MIR trans, we break _all_ critical edges, although we only actually need to do this for edges originating from a call that gets translated to an invoke instruction in LLVM. This has the unfortunate effect of undoing a bunch of the things that SimplifyCfg has done. A particularly bad case arises when you have a C-like enum with N variants and a derived PartialEq implementation. In that case, the match on the (&lhs, &rhs) tuple gets translated into nested matches with N arms each and a basic block each, resulting in N² basic blocks. SimplifyCfg reduces that to roughly 2*N basic blocks, but breaking the critical edges means that we go back to N². In nickel.rs, there is such an enum with roughly N=800. So we get about 640K basic blocks or 2.5M lines of LLVM IR. LLVM takes a while to reduce that to the final "disr_a == disr_b". So before this patch, we had 2.5M lines of IR with 640K basic blocks, which took about about 3.6s in LLVM to get optimized and translated. After this patch, we get about 650K lines with about 1.6K basic blocks and spent a little less than 0.2s in LLVM. cc #33111 r? @Aatch
2016-05-14doc: this statement does not have an effectTshepang Lekhonkhobe-2/+0
2016-05-13Auto merge of #33538 - Ms2ger:LocalCrateReader, r=arielb1bors-43/+50
Refactor code around LocalCrateReader.
2016-05-13rewrite fuzzy `on_unimplemented` matching to avoid ICEsAriel Ben-Yehuda-245/+33
2016-05-13address review commentsAriel Ben-Yehuda-62/+90
2016-05-13add cycle-reporting logicAriel Ben-Yehuda-89/+151
Fixes #33344
2016-05-13rewrite obligation forest. cycles still handled incorrectly.Ariel Ben-Yehuda-748/+617
2016-05-13Auto merge of #33532 - jseyfried:mutable_lowering_context, r=nrcbors-1702/+1647
Clean up `hir::lowering` Clean up `hir::lowering`: - give lowering functions mutable access to the lowering context - refactor the `lower_*` functions and other functions that take a lowering context into methods - simplify the API that `hir::lowering` exposes to `driver` - other miscellaneous cleanups r? @nrc
2016-05-13Auto merge of #33508 - alexcrichton:always-lower-frem, r=nikomatsakisbors-77/+2
trans: Always lower to `frem` Long ago LLVM unfortunately didn't handle the 32-bit MSVC case of `frem` where it can't be lowered to `fmodf` because that symbol doesn't exist. That was since fixed in http://reviews.llvm.org/D12099 (landed as r246615) and was released in what appears to be LLVM 3.8. Now that we're using that branch of LLVM let's remove our own hacks and help LLVM optimize a little better by giving it knowledge about what we're doing.
2016-05-13check check-ui and check-incremental in checkNiko Matsakis-0/+2
2016-05-13modify rust-build to support incremental, ui testsNiko Matsakis-0/+12
2016-05-13dump outputs, diff on UI test failureNiko Matsakis-14/+98
2016-05-13add UI testing frameworkNiko Matsakis-1/+223
2016-05-13Indent comments lessJonas Schievink-1/+1
40 chars is still enough indentation (most common MIR statements don't take more than 40 chars), and fits more easily in 80-character terminals.
2016-05-13Much smaller scope tree printingJonas Schievink-9/+34
2016-05-13Address nitJonathan Turner-1/+1
2016-05-13mir: always allow &mut [...] in static mut regardless of the array length.Eduard Burtescu-3/+4
2016-05-13save-analysis: make DefIds prettierNick Cameron-25/+42
2016-05-13Auto merge of #33355 - luqmana:33202-repr-ice, r=nrcbors-3/+19
adt: Allow repr attribute on single variant enum. Fixes #33202.
2016-05-13Updated based on CR feedback.Val Vanderschaegen-3/+3
2016-05-13Make AtomicBool the same size as boolAmanieu d'Antras-58/+36
2016-05-13Allow repr attribute on single variant enum.Luqman Aden-3/+19
2016-05-13Update span_label call to new apiJonathan Turner-2/+2
2016-05-13Auto merge of #33531 - antonblanchard:local_stage0_fix, r=alexcrichtonbors-0/+8
Copy more libraries from local Rust to stage0 When bootstrapping Rust using a previously built toolchain, I noticed a number of libraries were not copied in. As a result the copied in rustc fails to execute because it can't find all its dependences. Add them into the local_stage0.sh script.
2016-05-13Auto merge of #33513 - sanxiyn:tab-in-error, r=nikomatsakisbors-2/+32
Better handling of tab in error cc #33240.