about summary refs log tree commit diff
path: root/src/librustc_mir/util/patch.rs
AgeCommit message (Collapse)AuthorLines
2020-08-30mv compiler to compiler/mark-183/+0
2020-05-06Improve `LocalDecl` creation.Nicholas Nethercote-2/+2
This commit adds some new `LocalDecl` methods: - `with_source_info`, a most general constructor. - `new`, a variant of `with_source_info` which represents the most common use case. - `internal` a modifying method (like the already present `immutable`). It removes some old `LocalDecl` methods: - `new_internal` and `new_local`, because they're subsumed by the new methods. - `new_return_place`, because it was identical to `new_temp`. Finally, it cleans up all the use sites.
2020-05-06Add `SourceInfo::outermost`.Nicholas Nethercote-1/+1
2020-04-22Use `Body` everywhereDylan MacKenzie-1/+1
2020-03-30rustc -> rustc_middle part 3 (rustfmt)Mazdak Farrokhzad-1/+1
2020-03-30rustc -> rustc_middle part 2Mazdak Farrokhzad-2/+2
2020-02-28use is_empty() instead of len() == x to determine if structs are empty.Matthias Krüger-1/+1
2020-01-01Rename `syntax_pos` to `rustc_span` in source codeVadim Petrochenkov-1/+1
2019-12-22Format the worldMark Rousskov-36/+32
2019-12-05rustc: Apply clearer naming to BodyAndCache, fix Deref impl, remove unneeded ↵Paul Daniel Faria-1/+1
Index impl, remove body fn rustc_codegen_ssa: Fix BodyAndCache reborrow to Body and change instances of body() call to derefence rustc_mir: Fix BodyAndCache reborrow to Body and change intances of body() call to derefence
2019-12-02Remove HasLocalDecls impl from BodyCache's, properly reborrow to Body, ↵Paul Daniel Faria-9/+9
rename all body_cache back to body
2019-12-02Simplify BodyCache impl and fix all remaining type errors in librustc_mir ↵Paul Daniel Faria-1/+1
(lifetime errors still exist)
2019-12-02Add predecessors fn to ReadOnlyBodyCache, fix more Body -> ↵Paul Daniel Faria-9/+9
(ReadOnly)BodyCache type errors
2019-12-02Move predecessors cache invalidation back to basic_blocks_mut, add a couple ↵Paul Daniel Faria-1/+1
more ensure_predecessors to prevent panics
2019-12-02Stop invalidating predecessors cache when accessing unique basic block, ↵Paul Daniel Faria-1/+1
invalidate cache when accessing unique terminator
2019-09-29remove indexed_vec re-export from rustc_data_structurescsmoe-1/+1
2019-09-11Make Place Boxed on Statement to reduce size from 64 bytes to 32 bytesSantiago Pastorino-1/+1
2019-06-09Changed usages of `mir` in librustc::mir and librustc_mir to `body`Jad Ghalayini-20/+20
2019-05-28Changes the type `mir::Mir` into `mir::Body`Claude-Alban RANÉLY-VERGÉ-DÉPRÉ-4/+4
The commit should have changed comments as well. At the time of writting, it passes the tidy and check tool. Revisions asked by eddyb : - Renamed of all the occurences of {visit/super}_mir - Renamed test structures `CachedMir` to `Cached` Fixing the missing import on `AggregateKind`
2019-02-08librustc_mir => 2018Taiki Endo-2/+2
2018-12-25Remove licensesMark Rousskov-10/+0
2018-09-24Shrink StatementKind::Assign.Nicholas Nethercote-1/+1
This shrinks StatementKind from 80 bytes to 64 bytes on 64-bit.
2018-07-25Improve readability in a few sortsljedrz-1/+1
2018-05-30rustc: rename mir::VisibilityScope to mir::SourceScope.Eduard-Mihai Burtescu-1/+1
2018-02-08add transform for uniform array move outMikhail Modin-1/+11
2017-12-01MIR: s/lv(al(ue)?)?/place in function/variable/module names.Eduard-Mihai Burtescu-2/+2
2017-12-01MIR: s/Lvalue/Place in type names.Eduard-Mihai Burtescu-1/+1
2017-08-16Merge remote-tracking branch 'origin/master' into genAlex Crichton-1/+1
2017-08-15use field init shorthand EVERYWHEREZack M. Davis-1/+1
Like #43008 (f668999), but _much more aggressive_.
2017-07-28Ignore drop check bools when testing for legal generator typesJohn Kåre Alsaker-0/+7
2017-06-12Add `EndRegion` statement kind to MIR.Felix S. Klock II-0/+1
* Emit `EndRegion` for every code-extent for which we observe a borrow. To do this, we needed to thread source info back through to `fn in_scope`, which makes this commit a bit more painful than one might have expected. * There is `end_region` emission in `Builder::pop_scope` and in `Builder::exit_scope`; the first handles falling out of a scope normally, the second handles e.g. `break`. * Remove `EndRegion` statements during the erase_regions mir transformation. * Preallocate the terminator block, and throw an `Unreachable` marker on it from the outset. Then overwrite that Terminator as necessary on demand. * Instead of marking the scope as needs_cleanup after seeing a borrow, just treat every scope in the chain as being part of the diverge_block (after any *one* of them has separately signalled that it needs cleanup, e.g. due to having a destructor to run). * Allow for resume terminators to be patched when looking up drop flags. (In particular, `MirPatch::new` has an explicit code path, presumably previously unreachable, that patches up such resume terminators.) * Make `Scope` implement `Debug` trait. * Expanded a stray comment: we do not emit StorageDead on diverging paths, but that end behavior might not be desirable.
2017-04-11store Spans for all MIR localsAriel Ben-Yehuda-2/+3
2017-03-18move the drop expansion code to rustc_mirAriel Ben-Yehuda-0/+178