- 17 6月, 2016 1 次提交
-
-
由 Simonas Kazlauskas 提交于
Previously we would rebuild all drops on every early exit from a scope, which for code like: ```rust match x { a => return 1, b => return 2, ... z => return 27 } ``` would produce 27 exactly same chains of drops for each return, a O(n*m) explosion in drops.
-
- 09 6月, 2016 2 次提交
-
-
由 Ariel Ben-Yehuda 提交于
Use it instead of a `panic` for inexhaustive matches and correct the comment. I think we trust our match-generation algorithm enough to generate these blocks, and not generating an `unreachable` means that LLVM won't optimize `match void() {}` to an `unreachable`.
-
由 Ariel Ben-Yehuda 提交于
-
- 08 6月, 2016 1 次提交
-
-
由 Eduard Burtescu 提交于
-
- 07 6月, 2016 1 次提交
-
-
由 Eduard Burtescu 提交于
-
- 05 6月, 2016 1 次提交
-
-
由 Eduard Burtescu 提交于
-
- 03 6月, 2016 1 次提交
-
-
由 Ariel Ben-Yehuda 提交于
this introduces a DropAndReplace terminator as a fix to #30380. That terminator is suppsoed to be translated by desugaring during drop elaboration, which is not implemented in this commit, so this breaks `-Z orbit` temporarily.
-
- 11 5月, 2016 3 次提交
-
-
由 Eduard Burtescu 提交于
-
由 Eduard Burtescu 提交于
-
由 Eduard Burtescu 提交于
-
- 28 4月, 2016 1 次提交
-
-
由 James Miller 提交于
Primarily affects the MIR construction, which indirectly improves LLVM IR generation, but some LLVM IR changes have been made too. * Handle "statement expressions" more intelligently. These are expressions that always evaluate to `()`. Previously a temporary would be generated as a destination to translate into, which is unnecessary. This affects assignment, augmented assignment, `return`, `break` and `continue`. * Avoid inserting drops for non-drop types in more places. Scheduled drops were already skipped for types that we knew wouldn't need dropping at construction time. However manually-inserted drops like those for `x` in `x = y;` were still generated. `build_drop` now takes a type parameter like its `schedule_drop` counterpart and checks to see if the type needs dropping. * Avoid generating an extra temporary for an assignment where the types involved don't need dropping. Previously an expression like `a = b + 1;` would result in a temporary for `b + 1`. This is so the RHS can be evaluated, then the LHS evaluated and dropped and have everything work correctly. However, this isn't necessary if the `LHS` doesn't need a drop, as we can just overwrite the existing value. * Improves lvalue analysis to allow treating an `Rvalue::Use` as an operand in certain conditions. The reason for it never being an operand is so it can be zeroed/drop-filled, but this is only true for types that need dropping. The first two changes result in significantly fewer MIR blocks being generated, as previously almost every statement would end up generating a new block due to the drop of the `()` temporary being generated.
-
- 13 4月, 2016 1 次提交
-
-
由 Manish Goregaokar 提交于
-
- 12 4月, 2016 1 次提交
-
-
由 Eduard Burtescu 提交于
-
- 01 4月, 2016 1 次提交
-
-
由 Benjamin Herr 提交于
-
- 30 3月, 2016 2 次提交
-
-
由 Oliver Schneider 提交于
-
由 Oliver Schneider 提交于
-
- 27 3月, 2016 2 次提交
-
-
由 Eduard Burtescu 提交于
-
由 Eduard Burtescu 提交于
-
- 24 3月, 2016 14 次提交
-
-
由 Niko Matsakis 提交于
while I'm at it, remove the "extra caching" that I was doing for no good reason except laziness. Basically before I was caching at each scope in the chain, but there's not really a reason to do that, since the cached entry point at level N is always equal to the last cached exit point from level N-1.
-
由 Niko Matsakis 提交于
also, when exiting a scope, assign the final goto terminator with the target scope's id
-
由 Niko Matsakis 提交于
-
由 Niko Matsakis 提交于
It's nice to be able to index with a scope-id, but coherence rules prevent us from implementing `Index<ScopeId>` for `Vec<ScopeAuxiliary>`, and I'd prefer that `ScopeAuxiliary` remain in librustc_mir, just for compilation time reasons.
-
由 Niko Matsakis 提交于
-
由 Niko Matsakis 提交于
-
由 Niko Matsakis 提交于
-
由 Niko Matsakis 提交于
-
由 Niko Matsakis 提交于
This was triggered by me wanting to address a use of DUMMY_SP, but actually I'm not sure what would be a better span -- I guess the span for the function as a whole.
-
由 Niko Matsakis 提交于
-
由 Niko Matsakis 提交于
-
由 Niko Matsakis 提交于
-
由 Niko Matsakis 提交于
-
由 Niko Matsakis 提交于
-
- 10 3月, 2016 1 次提交
-
-
由 Oliver Schneider 提交于
-
- 09 3月, 2016 1 次提交
-
-
由 Eduard Burtescu 提交于
-
- 03 3月, 2016 1 次提交
-
-
由 Jeffrey Seyfried 提交于
-
- 25 2月, 2016 1 次提交
-
-
由 Simonas Kazlauskas 提交于
In MIR we previously tried to match `let x in { exprs; let y in { exprs; }}` with our data structures which is rather unwieldy, espeicially because it requires some sort of recursion or stack to process, while, a flat list of statements is enough – lets only relinquish their lifetime at the end of the block (i.e. end of the list). Also fixes #31853.
-
- 20 2月, 2016 2 次提交
-
-
由 Ariel Ben-Yehuda 提交于
-
由 Ariel Ben-Yehuda 提交于
TODO: find a correct borrow region Fixes #31482
-
- 13 2月, 2016 1 次提交
-
-
由 Jonas Schievink 提交于
-
- 11 2月, 2016 1 次提交
-
-
由 Alex Burka 提交于
-