Commit Graph

57486 Commits

Author SHA1 Message Date
Eduard Burtescu
a96abca2a4 rustc_metadata: replace RBML with a simple and type-safe scheme. 2016-09-20 20:08:05 +03:00
Eduard Burtescu
24aef24e1a rustc_metadata: split the Def description of a DefId from item_children. 2016-09-20 20:08:05 +03:00
Eduard Burtescu
adddfccf2b rustc_metadata: move all encoding/decoding helpers to methods. 2016-09-20 20:08:05 +03:00
Eduard Burtescu
6890354f3b rustc_metadata: use the shorthand encoding for predicates also. 2016-09-20 20:08:04 +03:00
Eduard Burtescu
cc47dc5c6e rustc_metadata: store dense indexes in little-endian instead of big. 2016-09-20 20:08:04 +03:00
Eduard Burtescu
ef4352fba6 rustc_metadata: group information into less tags. 2016-09-20 20:08:04 +03:00
Eduard Burtescu
6742b239ac rustc_metadata: remove all unnecessary tables from astencode. 2016-09-20 20:08:03 +03:00
Eduard Burtescu
d2ea3daad1 rustc_metadata: group the tags into root tags and item tags. 2016-09-20 20:08:03 +03:00
Eduard Burtescu
89736e8671 rustc: remove ImplOrTraitItemId and TraitDef's associated_type_names. 2016-09-20 20:08:03 +03:00
Eduard Burtescu
8734aaa33e rustc_metadata: move more RBML tags to auto-serialization. 2016-09-20 20:08:02 +03:00
Eduard Burtescu
88c5679c4e rustc_metadata: remove ty{en,de}code and move to auto-derived serialization. 2016-09-20 20:08:01 +03:00
Eduard Burtescu
bcbb4107a1 rustc_metadata: side-step ty{en,de}code for everything but Ty. 2016-09-20 20:08:01 +03:00
Eduard Burtescu
0863012fb9 Remove librbml and the RBML-tagged auto-encoder/decoder. 2016-09-20 20:08:01 +03:00
Eduard Burtescu
2ce0e6d4e7 rustc_trans: use the TypeId hashing mechanism instead of metadata. 2016-09-20 20:08:00 +03:00
Eduard Burtescu
02c4155d2c rustc: remove hir::fold. 2016-09-20 20:08:00 +03:00
Eduard Burtescu
ed593bed88 rustc_metadata: go back to not using the opaque format. 2016-09-20 20:08:00 +03:00
Eduard Burtescu
903ec52ba9 rustc: replace uses of NodeId in Def, other than closures and labels. 2016-09-20 20:08:00 +03:00
Eduard Burtescu
fc363cb482 rustc_metadata: go only through rustc_serialize in astencode. 2016-09-20 20:07:54 +03:00
Eduard Burtescu
91e7239db4 rustc_metadata: combine DecodeContext and rbml::reader::Decoder. 2016-09-20 20:07:16 +03:00
mcarton
726c2b6e9b
Don't ICE when a float can't be parsed 2016-09-20 18:25:00 +02:00
Eduard Burtescu
97864d41a6 rustc_metadata: encode miscellaneous information opaquely. 2016-09-20 19:21:33 +03:00
Eduard Burtescu
3cbe4b8bce rustc_metadata: sign-extend when decoding signed integers. 2016-09-20 19:21:33 +03:00
Eduard Burtescu
d47fd9eb5a rustc_metadata: use specialization for {en,de}coding Ty and Substs. 2016-09-20 19:21:33 +03:00
Eduard Burtescu
82197287a2 rustc_metadata: combine EncodeContext and rbml::writer::Encoder. 2016-09-20 19:21:33 +03:00
Eduard Burtescu
7b073343db rustc_metadata: remove astencode tests. 2016-09-20 19:21:33 +03:00
Eduard Burtescu
78ace66b6a rustc_metadata: remove extension traits from astencode. 2016-09-20 19:21:33 +03:00
Eduard Burtescu
87db6b9e65 rustc_metadata: remove redundant lifetimes from astencode::DecodeContext. 2016-09-20 19:21:33 +03:00
Eduard Burtescu
3ad8aa6b87 rbml: move the tagged encoder/decoder to librustc_metadata. 2016-09-20 19:21:33 +03:00
Eduard Burtescu
a79104e0c6 serialize: extend with specialization-based encoding/decoding multi-dispatch. 2016-09-20 19:21:33 +03:00
Nick Platt
429ba7ba9a Minor correction in sort_by_key doc comment 2016-09-20 11:20:33 -04:00
bors
c772948b68 Auto merge of #36388 - pcwalton:copy-propagation, r=nikomatsakis
librustc_mir: Implement def-use chains and trivial copy propagation on MIR.

This only supports trivial cases in which there is exactly one def and
one use.

Currently, some random unrelated MIR tests are failing, probably just because they haven't been updated.

r? @eddyb
2016-09-20 08:01:01 -07:00
Felix S. Klock II
c41a806e4e Workaround #34427 by using memset of 0 on ARM to set the discriminant. 2016-09-20 15:58:46 +02:00
Nicholas Nethercote
80a44779f7 Lazily allocate TypedArena's first chunk.
Currently `TypedArena` allocates its first chunk, which is usually 4096
bytes, as soon as it is created. If no allocations are ever made from
the arena then this allocation (and the corresponding deallocation) is
wasted effort.

This commit changes `TypedArena` so it doesn't allocate the first chunk
until the first allocation is made.

This change speeds up rustc by a non-trivial amount because rustc uses
`TypedArena` heavily: compilation speed (producing debug builds) on
several of the rustc-benchmarks increases by 1.02--1.06x. The change
should never cause a slow-down because the hot `alloc` function is
unchanged. It does increase the size of `TypedArena` by one `usize`
field, however.

The commit also fixes some out-of-date comments.
2016-09-20 22:00:29 +10:00
bors
2c2552b712 Auto merge of #36445 - infinity0:master, r=brson
mk: add a all-no-docs target to build everything except docs

This makes things slightly more efficient for Debian's auto-builders where the
docs can be built on just one architecture, and distributed to users of all
other architectures as well.
2016-09-20 01:24:54 -07:00
Patrick Walton
480287ec3b librustc: Implement def-use chains and trivial copy propagation on MIR.
This only supports trivial cases in which there is exactly one def and
one use.
2016-09-19 19:18:38 -07:00
bors
cbd84aeb73 Auto merge of #34942 - porglezomp:master, r=sfackler
Fix overflow checking in unsigned pow()

The pow() method for unsigned integers produced 0 instead of trapping overflow for certain inputs. Calls such as 2u32.pow(1024) produced 0 when they should trap an overflow. This also adds tests for the correctly handling overflow in unsigned pow().

This was previously fixed for signed integers in #28248, but it seems unsigned integers got missed that time.

For issue number #34913
2016-09-19 19:03:52 -07:00
jacobpadkins
8b02aa1c80 fixed the safety header/wording in option.rs 2016-09-19 17:55:44 -05:00
Jorge Aparicio
e0c60b4d02 rustdoc: implement --sysroot
with the same semantics as rustc. This let us build documentation for a
crate that depends on a custom sysroot.
2016-09-19 15:56:38 -05:00
bors
e0547019eb Auto merge of #36102 - GuillaumeGomez:rustc_metadata_diagnostics, r=jonathandturner
Rustc metadata diagnostics

r? @jonathandturner
2016-09-19 13:23:12 -07:00
Jorge Aparicio
2f71fa7150 add a test 2016-09-19 15:21:32 -05:00
Jonathan Turner
2ea3ab3a90 Add the ability to merge spans to codemap 2016-09-19 12:31:56 -07:00
Patrick Walton
2e6a91812c librustc: Add a new nop statement to the MIR.
This is useful when passes want to remove statements without affecting
`Location`s.
2016-09-19 11:17:12 -07:00
bors
412a637704 Auto merge of #36471 - nnethercote:rm-to_binop, r=sanxiyn
Remove unused Token::to_binop function

Just some dead code removal.
2016-09-19 08:32:05 -07:00
Guillaume Gomez
313fb8fbf2 Replace 'e.g.' by 'i.e.' 2016-09-19 14:08:57 +02:00
Guillaume Gomez
dfa094014c Add missing urls for Box doc 2016-09-19 14:02:48 +02:00
Jorge Aparicio
9631e9f9b3 rustc: implement -C link-arg
this flag lets you pass a _single_ argument to the linker but can be
used _repeatedly_. For example, instead of using:

```
rustc -C link-args='-l bar' (..)
```

you could write

```
rustc -C link-arg='-l' -C link-arg='bar' (..)
```

This new flag can be used with RUSTFLAGS where `-C link-args` has
problems with "nested" spaces:

```
RUSTFLAGS='-C link-args="-Tlayout.ld -nostartfiles"'
```

This passes three arguments to rustc: `-C` `link-args="-Tlayout.ld` and
`-nostartfiles"` to `rustc`. That's not what we meant. But this does
what we want:

```
RUSTFLAGS='-C link-arg=-Tlayout.ld -C link-arg=-nostartfiles`
```

cc rust-lang/rfcs#1509
2016-09-19 02:48:08 -05:00
bors
5f6f838448 Auto merge of #36545 - Cobrand:wild-print-fix, r=sfackler
Remove stray println! when invoking error E0316

Removed a wild println! statement that has been here for over a year and a half.

Closes #36543
2016-09-18 21:01:49 -07:00
bors
bfac5d6d9f Auto merge of #36523 - Mark-Simulacrum:format-args-link, r=GuillaumeGomez
Add links between format_args! macro and std::fmt::Arguments struct

r? @GuillaumeGomez
2016-09-18 17:25:01 -07:00
aclarry
af67f0b389 Fix name of error test file 2016-09-18 18:55:19 -04:00
bors
55bf6a4f87 Auto merge of #36487 - nrc:save-doc-urls, r=@eddyb
save-analysis: better 'parent' info

In particular, this fixes some bugs displaying doc URLs for method calls.
2016-09-18 14:00:02 -07:00