about summary refs log tree commit diff
path: root/src/librustc_mir/transform
AgeCommit message (Collapse)AuthorLines
2017-08-01closure unsafety check: stop moving up when we hit an itemRalf Jung-15/+15
2017-08-01Fixed all unnecessary muts in language coreIsaac van Bakel-1/+1
2017-08-01use FnLike to recognize functions for usRalf Jung-63/+60
2017-08-01handle trait items as wellRalf Jung-0/+1
2017-08-01handle tuple struct ctorsRalf Jung-1/+5
2017-07-31Handle closures. Add some more tests.Ralf Jung-14/+47
2017-07-31fix AddValidation on methodsRalf Jung-2/+8
2017-07-31tidyRalf Jung-2/+2
2017-07-31optionally only emit basic validation for functions containing unsafe block ↵Ralf Jung-43/+135
/ unsafe function
2017-08-01rustc_mir::transform::simplify - remove nops firstAriel Ben-Yehuda-2/+2
Removing nops can allow more basic blocks to be merged, but merging basic blocks can't allow for more nops to be removed, so we should remove nops first. This doesn't matter *that* much, because normally we run SimplifyCfg several times, but there's no reason not to do it.
2017-07-31CleanEndRegions: use default impl where possibleRalf Jung-7/+0
2017-07-30Consume MirVisitor changes and use more accurate spans for region renumberingPaul Faria-18/+23
2017-07-30do not use doc comments inside functionsRalf Jung-1/+1
2017-07-30Renumber regions as the first step of the non-lexical lifetimes inferencePaul Faria-12/+82
2017-07-30also release/validate around non-Misc castsRalf Jung-30/+71
2017-07-30Reorder passes so that AddValidation can run after ElaborateDropsRalf Jung-15/+6
2017-07-30after a Ref, only acquire the Deref'd destinationRalf Jung-0/+4
2017-07-30please the tidyRalf Jung-5/+8
2017-07-30add -Z flag for AddValidation passRalf Jung-0/+10
2017-07-30make ValidationOperand generic so that we can reuse it in miri with a ↵Ralf Jung-1/+1
different Lvalue type
2017-07-30when suspending, we need to specify for which lifetime to recoverRalf Jung-50/+91
This matters if the lvalues that is suspended involves Deref'ing a reference -- that reference's lifetime will then not be in the type any more
2017-07-30only emit Suspend validation for mutable pathsRalf Jung-12/+41
2017-07-30add_validation: handle dropRalf Jung-2/+11
2017-07-30emit validation for function calls and RefRalf Jung-5/+88
2017-07-30CleanEndRegions: do not clean regions that occur in types in validation ↵Ralf Jung-9/+44
statements
2017-07-30add a pass for validation commands; for now just emit the initial AcquireValidRalf Jung-0/+44
2017-07-30add new instructions for asserting when values are valid, and to describe ↵Ralf Jung-0/+3
when we can rely on them being locked in memory
2017-07-28Merge remote-tracking branch 'origin/master' into genAlex Crichton-4/+5
2017-07-28Update commentJohn Kåre Alsaker-1/+1
2017-07-28Ignore drop check bools when testing for legal generator typesJohn Kåre Alsaker-2/+6
2017-07-28Fix a string literalJohn Kåre Alsaker-1/+1
2017-07-28Remove support for `gen arg`Alex Crichton-53/+2
2017-07-28Fix a bug with yielding subtypes of the yield type.John Kåre Alsaker-7/+9
2017-07-28Rename suspend to yieldJohn Kåre Alsaker-18/+18
2017-07-28Ensure upvars are dropped when generators have never been resumedJohn Kåre Alsaker-43/+115
2017-07-28Fix tidy warningsAlex Crichton-11/+23
2017-07-28Generator literal supportJohn Kåre Alsaker-7/+808
2017-07-28Auto merge of #43324 - Nashenas88:visit_locations, r=arielb1bors-4/+5
Provide positional information when visiting ty, substs and closure_substs in MIR This will enable the region renumbering portion of #43234 (non-lexical lifetimes). @nikomatsakis's current plan [here](https://gist.github.com/nikomatsakis/dfc27b28cd024eb25054b52bb11082f2) shows that we need spans of the original code to create new region variables, e.g. `self.infcx.next_region_var(infer::MiscVariable(span))`. The current visitor impls did not pass positional information (`Location` in some, `Span` and `SourceInfo` for others) for all types. I did not expand this to all visits, just the ones necessary for the above-mentioned plan.
2017-07-27Squash Span into SourceInfo and rename enum and its inner typesPaul Faria-2/+2
2017-07-20Auto merge of #43271 - Nashenas88:nll, r=nikomatsakisbors-0/+48
Add empty MIR pass for non-lexical lifetimes This is the first step for #43234.
2017-07-19Add empty MIR pass for non-lexical lifetimesPaul Faria-0/+48
2017-07-19Implement const fn {size,align}_of.Eduard-Mihai Burtescu-7/+20
2017-07-18Provide positional information when visiting ty, substs and closure_substs ↵Paul Faria-4/+5
in MIR
2017-07-12overload the mir ty methods to make them more ergonomic to useRalf Jung-31/+31
2017-07-11Refactor: {Lvalue,Rvalue,Operand}::ty only need the locals' types, not the ↵Ralf Jung-31/+31
full &Mir
2017-06-30Auto merge of #42924 - pnkfelix:mir-dataflow, r=arielb1bors-0/+869
Shift mir-dataflow from `rustc_borrowck` to `rustc_mir` crate. Shift mir-dataflow from `rustc_borrowck` to `rustc_mir` crate. Turn `elaborate_drops` and `rustc_peek` implementations into MIR passes that also live in `rustc_mir` crate. Rewire things so `rustc_driver` uses the `ElaborateDrops` from `rustc_mir` crate. (This PR is another baby step for mir-borrowck; it is a piece of work that other people want to rebase their stuff on top of, namely developers who are doing other dataflow analyses on top of MIR.) I have deliberately architected this PR in an attempt to minimize the number of actual code changes. The majority of the diff should be little more than changes to mod and use declarations, as well as a few visibility promotions to pub(crate) when a declaration was moved downward in the module hierarchy. (I have no problem with other PR's that move declarations around to try to clean this up; my goal was to ensure that the diff here was as small as possible, to make the review nearly trivial.)
2017-06-28rustc_typeck: use body-id of type-checking item in need_type_infoVenkata Giri Reddy-1/+1
2017-06-28Shift mir-dataflow from `rustc_borrowck` to `rustc_mir` crate.Felix S. Klock II-0/+869
Turn `elaborate_drops` and `rustc_peek` implementations into MIR passes that also live in `rustc_mir` crate. Rewire things so `rustc_driver` uses the `ElaborateDrops` from `rustc_mir` crate.
2017-06-28Auto merge of #42931 - arielb1:statement-visitor, r=eddybbors-2/+3
re-add the call to `super_statement` in EraseRegions The move gathering code is sensitive to type-equality - that is rather un-robust and I plan to fix it eventually, but that's a more invasive change. And we want to fix the visitor anyway. Fixes #42903. r? @eddyb
2017-06-28re-add the call to `super_statement` in EraseRegionsAriel Ben-Yehuda-2/+3
The move gathering code is sensitive to type-equality - that is rather un-robust and I plan to fix it eventually, but that's a more invasive change. And we want to fix the visitor anyway. Fixes #42903.