Commit Graph

78535 Commits

Author SHA1 Message Date
Oliver Schneider
fb9060ac06 Revert "Ensure llvm doesn't trigger an assert for crazy transmutes"
This reverts commit 776c632e2a9a044fd134321a9d561e28994ff3ff.
2018-05-24 20:49:38 +02:00
Oliver Schneider
85de4efdd8 Rename amt variables to shift 2018-05-24 20:49:38 +02:00
Oliver Schneider
5c8741f32e Use in-band-lifetimes instead of unused explicit lifetimes 2018-05-24 20:49:38 +02:00
Oliver Schneider
80a1488601 Prefer to_value_with_len over manual expanison of it 2018-05-24 20:49:38 +02:00
Oliver Schneider
6d513f752f Remove dead code 2018-05-24 20:49:38 +02:00
Oliver Schneider
d0610fd26e Add missing newlines 2018-05-24 20:49:38 +02:00
Oliver Schneider
bdd23bf215 tcx.lift_to_global > tcx.global_tcx().lift 2018-05-24 20:49:38 +02:00
Oliver Schneider
569ae80a0a Wrongly named a closure clamp when it was doing truncation 2018-05-24 20:49:38 +02:00
Oliver Schneider
1f9fa53738 Sanity check the bits argument to the from_bits function 2018-05-24 20:49:38 +02:00
Oliver Schneider
f1ea9ef315 Remove ty_to_primitive 2018-05-24 20:49:38 +02:00
Oliver Schneider
879d8f7070 Properly check defined bits range 2018-05-24 20:49:38 +02:00
Oliver Schneider
cfd5fb5102 Reuse to_bits instead of badly reinventing it 2018-05-24 20:49:38 +02:00
Oliver Schneider
50628b7373 Only defined bits are relevant 2018-05-24 20:49:38 +02:00
Oliver Schneider
c6d25dc224 Don't ICE on horrible transmutes in pattern constants 2018-05-24 20:49:38 +02:00
Oliver Schneider
1a2964a541 Simplify a ScalarPair creation 2018-05-24 20:49:38 +02:00
Oliver Schneider
ca8c27e1c1 Ensure llvm doesn't trigger an assert for crazy transmutes 2018-05-24 20:49:38 +02:00
Oliver Schneider
bc3ba91737 Printing a fn definition needs to know nothing about its ZST's value 2018-05-24 20:49:38 +02:00
Oliver Schneider
09a996b0a6 Printing values should ignore whether bits are undefined 2018-05-24 20:49:38 +02:00
Oliver Schneider
98e5129375 Better variable naming 2018-05-24 20:49:38 +02:00
Oliver Schneider
97da01f8ad Remove the last mention of Undef 2018-05-24 20:49:38 +02:00
Oliver Schneider
c420531304 Replace ScalarKind with Primitive 2018-05-24 20:49:37 +02:00
Oliver Schneider
cc60a22b10 Get rid of scalar_size 2018-05-24 20:49:37 +02:00
Oliver Schneider
0da702a6d4 Remove an instance of scalar_size in a Debug impl 2018-05-24 20:49:37 +02:00
Oliver Schneider
ff652b8a01 Update outdated comment 2018-05-24 20:49:37 +02:00
Oliver Schneider
f82256e473 primval -> scalar rename 2018-05-24 20:49:37 +02:00
Oliver Schneider
1550fd212b Use the destination type size instead of the source type size 2018-05-24 20:49:37 +02:00
Oliver Schneider
edbdf3d263 Formatting nit 2018-05-24 20:49:37 +02:00
Oliver Schneider
ea8f544964 Rebase fallout 2018-05-24 20:49:37 +02:00
Oliver Schneider
9456ba66bf Accidentally used byte-size instead of bit-size 2018-05-24 20:49:37 +02:00
Oliver Schneider
4ca169ce84 Use the target types bitsize instead of the source type's 2018-05-24 20:49:37 +02:00
Oliver Schneider
bf39c7f87c Floats are scalars! 2018-05-24 20:49:37 +02:00
Oliver Schneider
64a75ecc80 change Value::Bytes to Value::Bits 2018-05-24 20:49:37 +02:00
Oliver Schneider
3bbf2fd715 Remove Pointer::zero in favor of Pointer::from 2018-05-24 20:48:54 +02:00
Oliver Schneider
d7324631ae Rename MemoryPointer to Pointer 2018-05-24 20:48:54 +02:00
Oliver Schneider
03a92b61ec Eliminate the Pointer wrapper type 2018-05-24 20:48:13 +02:00
Oliver Schneider
6436de89fe Differentiate between interpret::Scalar and layout::Scalar 2018-05-24 20:47:35 +02:00
Oliver Schneider
ef2177cffc Rename ByVal(Pair) to Scalar(Pair) 2018-05-24 20:47:35 +02:00
Oliver Schneider
1606e137e7 Rename PrimVal to Scalar 2018-05-24 20:47:35 +02:00
Oliver Schneider
9cc5d927c9 Add constant for Size::from_bytes(0) 2018-05-24 20:46:07 +02:00
bors
a41dd6fce2 Auto merge of #50930 - toidiu:ak-ordOutlivesPredicate, r=nikomatsakis
implement Ord for OutlivesPredicate and other types

It became necessary while implementing https://github.com/rust-lang/rust/pull/50070 to have `Ord` implemented for `OutlivesPredicate`.

This PR implements `Ord` for `OutlivesPredicate` as well as other types needed for the implementation.
2018-05-24 14:30:58 +00:00
bors
d022dd48cc Auto merge of #51023 - kennytm:rollup, r=kennytm
Rollup of 9 pull requests

Successful merges:

 - #50864 (Add NetBSD/arm target specs)
 - #50956 (rust-gdb: work around the re-used -d argument in cgdb)
 - #50964 (Make sure that queries have predictable symbol names.)
 - #50965 (Update LLVM to pull in another wasm fix)
 - #50972 (Add -Z no-parallel-llvm flag)
 - #50979 (Fix span for type-only arguments)
 - #50981 (Shrink `LiveNode`.)
 - #50995 (move type out of unsafe block)
 - #51011 ( rustdoc: hide macro export statements from docs)

Failed merges:
2018-05-24 12:05:47 +00:00
kennytm
98606cfe12
Rollup merge of #51011 - QuietMisdreavus:duplicitous-macros, r=ollie27
rustdoc: hide macro export statements from docs

As mentioned in https://github.com/rust-lang/rust/issues/50647, rustdoc now prints both the import statement and the macro itself when re-exporting macros. This is a stopgap solution to clean up the std docs and get something small backported into beta.

What this does: When rustdoc finds an export statement for a macro, instead of printing the export and bailing, now it will instead hide the export and bail. Until we can solve https://github.com/rust-lang/rust/issues/34843 or have a better way to find the attributes on an export statement when inlining macros, this will at least match the current behavior and clean up the re-export statements from the docs.
2018-05-24 17:34:55 +08:00
kennytm
99de8ab38b
Rollup merge of #50995 - fbstj:patch-1, r=cramertj
move type out of unsafe block

from https://github.com/rust-lang/rust/pull/50863#discussion_r190213000

move the union definition outside of the unsafe block as it's definition is not unsafe
2018-05-24 17:34:54 +08:00
bors
a76bff86e6 Auto merge of #50949 - eddyb:debuginfo, r=mw
rustc_codegen_llvm: remove some debuginfo cruft.

(The second commit passes tests locally but might not on older LLVM versions)

r? @nikomatsakis
2018-05-24 09:27:15 +00:00
kennytm
79a2676ce0
Rollup merge of #50981 - nnethercote:shrink-LiveNode, r=nikomatsakis
Shrink `LiveNode`.

`Liveness::users` is a vector that is occasionally enormous. For
example, doing a "clean incremental" check build of `inflate`, there is
one instance that represents 5,499 live nodes and 1087 vars, which
requires 5,977,413 entries. At 24 bytes per entry, that is 143MB.

This patch changes LiveNode from a usize to a u32. On 64-bit machines
that halves the size of these entries, significantly reducing peak
memory usage and memory traffic, and speeding up "clean incremental"
builds of `inflate` by about 10%.
2018-05-24 16:02:44 +08:00
kennytm
6441ebe5a7
Rollup merge of #50979 - Manishearth:type-only, r=estebank
Fix span for type-only arguments

Currently it points to the comma or parenthesis before the type, which is broken

cc @mark-i-m this is what broke #48309

r? @estebank
2018-05-24 16:02:42 +08:00
kennytm
e14bc2d3d4
Rollup merge of #50972 - nikic:no-parallel, r=michaelwoerister
Add -Z no-parallel-llvm flag

Codegen issues commonly only manifest under specific circumstances,
e.g. if multiple codegen units are used and ThinLTO is enabled.
However, these configuration are threaded, making the use of LLVM
debugging facilities hard, as output is interleaved.

This patch adds a -Z no-parallel-llvm flag, which allows disabling
parallelization of codegen and linking, while otherwise preserving
behavior with regard to codegen units and LTO.
2018-05-24 16:02:41 +08:00
kennytm
eb26c9b390
Rollup merge of #50965 - alexcrichton:update-llvm, r=TimNN
Update LLVM to pull in another wasm fix

Closes #50869
2018-05-24 16:02:40 +08:00
kennytm
4db2241212
Rollup merge of #50964 - michaelwoerister:query-symbol-names, r=nikomatsakis
Make sure that queries have predictable symbol names.

Some recent refactorings led to query names not showing up in the corresponding symbol names. [perf-focus](https://github.com/nikomatsakis/perf-focus) and manual profiling have been broken by this. This PR makes sure that query providers always get their own symbol and that that symbol has a predictable name.

Since this adds `#[inline(never)]` to a function that wraps the provider call, let's check if this does not regress performance before merging.

r? @nikomatsakis
2018-05-24 16:02:39 +08:00
kennytm
02d53f2de7
Rollup merge of #50956 - atopia:rust-gdb-with-cdgb, r=nikomatsakis
rust-gdb: work around the re-used -d argument in cgdb

Use --directory= to pass $GDB_PYTHON_MODULE_DIRECTORY instead of -d, because [cgdb](https://github.com/cgdb/cgdb) reuses '-d' to select a debugger, whereas the long option works with both gdb and cgdb.
2018-05-24 16:02:38 +08:00