Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 9 pull requests #36635

Closed
wants to merge 20 commits into from
Closed

Rollup of 9 pull requests #36635

wants to merge 20 commits into from

Conversation

mikhail-m1 and others added 20 commits September 16, 2016 21:44
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.
…rner

Updated E0560 to new error format

Added a small bit of code to add a label for E0560.

Also renamed src/test/compile-fail/E560.rs file to E0560.rs (not sure why it was named E560).
Updated all test cases which check this error.

Closes rust-lang#36199
…, r=nrc

Add the ability to merge spans to codemap

This PR adds the ability to merge Spans.  To do so, it builds on the Codemap's ability to verify the locations of spans, namely that following can be verified:

* the expn_id of both spans much match
* the lhs span needs to end on the same line the rhs span begins
* the lhs span must start at or before the rhs span

If all of these are met, a new span is returned that is min(lo), max(hi) of the two spans.

This PR also removes an older Span merge, as this new functionality subsumes it.

r? @nrc
…_fix, r=bluss

fixed the safety header/wording in option.rs

Fixes rust-lang#36581

screenshot of the rendered documentation: http://imgur.com/14kLVrA

r? @steveklabnik
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.
…pasel422

Minor correction in `sort_by_key` doc comment

The parameter to `sort_by_key` is named `f`, not `key`.
@sophiajt
Copy link
Contributor Author

@bors r+ p=1

@bors
Copy link
Contributor

bors commented Sep 21, 2016

📌 Commit 9b25f10 has been approved by jonathandturner

@bors
Copy link
Contributor

bors commented Sep 21, 2016

⌛ Testing commit 9b25f10 with merge 4703011...

@rust-highfive
Copy link
Collaborator

r? @alexcrichton

(rust_highfive has picked a reviewer for you, use r? to override)

@bors
Copy link
Contributor

bors commented Sep 21, 2016

💔 Test failed - auto-win-gnu-32-opt-rustbuild

@sophiajt sophiajt closed this Sep 22, 2016
@Centril Centril added the rollup A PR which is a rollup label Oct 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rollup A PR which is a rollup
Projects
None yet
Development

Successfully merging this pull request may close these issues.