about summary refs log tree commit diff
path: root/src/librustc_mir/transform
AgeCommit message (Collapse)AuthorLines
2019-06-10commentsRalf Jung-3/+3
2019-06-10const-correctness might be confusing for C++ peopleRalf Jung-1/+1
2019-06-10avoid 'const-context' terminologyRalf Jung-3/+2
2019-06-10replace some mode comparisons by more readable function call, rename some ↵Ralf Jung-46/+72
Mode, and more comments
2019-06-10some more comments for const_qualifRalf Jung-15/+28
2019-06-09Reword const fn conditional and loop error textChris Gregory-1/+1
2019-06-09Changed usages of `mir` in librustc::mir and librustc_mir to `body`Jad Ghalayini-513/+514
2019-06-09Auto merge of #61653 - oli-obk:visit_place_recursion, r=spastorinobors-116/+134
get rid of visit_place recursion r? @spastorino this is groundwork for https://github.com/rust-lang/rust/pull/60913, since after that PR we won't be able to implement `visit_place` in a recursive manner without heavy cloning everywhere. cc @eddyb this touches const qualif
2019-06-08rename EvalResult -> InterpResult and EvalError -> InterpErrorInfoRalf Jung-2/+2
2019-06-08Do not recursively visit `visit_place`Oliver Scherer-116/+134
2019-06-07Rollup merge of #61532 - wesleywiser:const_prop_more, r=oli-obkMazdak Farrokhzad-12/+39
[const-prop] Support Rvalue::{Ref,Len} and Deref Also fixes an ICE I found in testing. r? @oli-obk ~~The final commit is just for a perf run. I'll remove it after that is completed.~~
2019-06-07Auto merge of #61209 - matthewjasper:const-tuple-constructors, r=oli-obkbors-60/+20
Make tuple constructors real const fns Mir construction special cases `Ctor(...)` to be lowered as `Ctor { 0: ... }`, which means this doesn't come up much in practice, but it seems inconsistent not to allow this. r? @oli-obk
2019-06-06Rollup merge of #61559 - spastorino:make-visitors-iterate, r=oli-obkMazdak Farrokhzad-40/+39
Make visitors iterate r? @oli-obk The second commit is not completely equivalent, unsure if the code is wrong or not. Tests pass though, otherwise we would need to iterate in the opposite direction as it happened in other parts of the code.
2019-06-06Don't run MIR passes on constructor shimsMatthew Jasper-60/+20
2019-06-06[const-prop] Handle Rvalue::LenWesley Wiser-5/+24
2019-06-06[const-prop] Handle ProjectionElem::DerefWesley Wiser-0/+6
2019-06-06[const-prop] Handle Rvalue::RefWesley Wiser-1/+5
2019-06-06[const-prop] Fix ICE when casting function pointersWesley Wiser-6/+4
This fixes an ICE when building libcore with `-Z mir-opt-level=3`.
2019-06-06Make UnsafetyChecker visitor iterate instead of recurseSantiago Pastorino-40/+39
2019-06-05Don't allow using const fn arguments as "args_required_const"Oliver Scherer-1/+3
2019-06-04Whitespace fixesWesley Wiser-2/+2
2019-06-03Add const-eval support for indirectsChristian Poveda-11/+32
2019-06-02Rollup merge of #61380 - varkor:expected-usize-got-param, r=eddybMazdak Farrokhzad-2/+3
Fix some issues with `unwrap_usize` instead of `assert_usize` Fixes https://github.com/rust-lang/rust/issues/61337. Fixes https://github.com/rust-lang/rust/issues/61341. Fixes https://github.com/rust-lang/rust/issues/61422. r? @eddyb
2019-05-31Remove GlobalArenas and use Arena insteadJohn Kåre Alsaker-1/+1
2019-05-31Fix unwrapping usize issue in HasMutInteriorvarkor-2/+3
2019-05-29Rollup merge of #60928 - TheSirC:fix/60229, r=eddybMazdak Farrokhzad-128/+132
Changes the type `mir::Mir` into `mir::Body` Fixes part 1 of #60229 (previously attempted in #60242). I stumbled upon the issue and it seems that the previous attempt at solving it was not merged. This is a second try more up-to-date. The commit should have changed comments as well. At the time of writting, it passes the tidy and check tool.
2019-05-29rustc: rename Mir to mir::Body in comments and to MIR in error strings.Eduard-Mihai Burtescu-5/+5
2019-05-28Changes the type `mir::Mir` into `mir::Body`Claude-Alban RANÉLY-VERGÉ-DÉPRÉ-124/+128
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-05-28Rollup merge of #61164 - RalfJung:scalar, r=oli-obkMazdak Farrokhzad-10/+7
rename Scalar::Bits to Scalar::Raw and bits field to data Also use this opportunity to seal some abstraction leaks (other modules constructing `Scalar::Bits` directly instead of using a constructor). r? @oli-obk
2019-05-28Rollup merge of #61247 - spastorino:eval-place-iterate, r=wesleywiserMazdak Farrokhzad-38/+41
Make eval_place iterate instead of recurse r? @oli-obk
2019-05-28Rollup merge of #61242 - spastorino:dest-needs-borrow-iterate, r=oli-obkMazdak Farrokhzad-10/+13
Make dest_needs_borrow iterate instead of recurse r? @oli-obk
2019-05-28Rollup merge of #61241 - spastorino:check-place-iterative, r=oli-obkMazdak Farrokhzad-39/+36
Check place iterative r? @oli-obk
2019-05-27Make eval_place iterate instead of recurseSantiago Pastorino-38/+41
2019-05-27Make check_place iterate instead of recurseSantiago Pastorino-18/+19
2019-05-27Make dest_needs_borrow iterate instead of recurseSantiago Pastorino-10/+13
2019-05-27Remove unused tcx and mir paramsSantiago Pastorino-22/+18
2019-05-26Rename "Associated*" to "Assoc*"Andrew Xu-1/+1
We are going to uniform the terminology of all associated items. Methods that may or may not have `self` are called "associated functions". Because `AssociatedFn` is a bit long, we rename `Associated` to `Assoc`.
2019-05-26rename Scalar::Bits to Scalar::Raw and bits field to dataRalf Jung-10/+7
2019-05-26Rollup merge of #61184 - wesleywiser:const_prop_tracing, r=oli-obkMazdak Farrokhzad-1/+11
Add additional trace statements to the const propagator This makes it easier to figure out when const propagation fails.
2019-05-25Add additional trace statements to the const propagatorWesley Wiser-1/+11
This makes it easier to figure out when const propagation fails.
2019-05-25Fix missing tcxvarkor-1/+2
2019-05-25Don't use `ty::Const` without immediately interningOliver Scherer-7/+3
2019-05-24Make place projections concrete.Edd Barrett-8/+8
Once upon a time (commit 9bd35c07c26) there were two kinds of projection: one for places, and one for constants. It therefore made sense to share the `Projection` struct for both. Although the different use-cases used different concrete types, sharing was made possible by type-parameterisation of `Projection`. Since then, however, the usage of projections in constants has disappeared, meaning that (forgetting lifetimes for a moment) the parameterised type is only every instantiated under one guise. So it may as well be a concrete type.
2019-05-22Rollup merge of #61023 - spastorino:use-iterate-qualify-consts, r=oli-obkMazdak Farrokhzad-46/+48
Migrate from recursion to iterate on qualify consts visitor impl r? @oli-obk
2019-05-22Migrate from recursion to iterate on qualify consts visitor implSantiago Pastorino-46/+48
2019-05-22Rollup merge of #61003 - nnethercote:rm-InternedString-PartialEq-impls, ↵Mazdak Farrokhzad-1/+1
r=petrochenkov Remove impls for `InternedString`/string equality. `Symbol` received the same treatment in #60630. Also, we can derive `PartialEq` for `InternedString`. r? @petrochenkov
2019-05-22Rollup merge of #60998 - RalfJung:static_assert, r=CentrilMazdak Farrokhzad-2/+2
static_assert: make use of anonymous constants
2019-05-21Remove impls for `InternedString`/string equality.Nicholas Nethercote-1/+1
`Symbol` received the same treatment in #60630. Also, we can derive `PartialEq` for `InternedString`.
2019-05-21static_assert: make use of anonymous constantsRalf Jung-2/+2
2019-05-20LocalDecl push returns Local lenSantiago Pastorino-2/+2