about summary refs log tree commit diff
path: root/src/librustc_mir/transform
AgeCommit message (Collapse)AuthorLines
2019-08-22Move promoted out of mir::BodyWesley Wiser-50/+108
2019-08-22Move 'tcx lifetime on MirPassWesley Wiser-48/+48
2019-08-17use ImmTy::from_uint in a few more spotsRalf Jung-18/+9
2019-08-17make both unary_op and binary_op fully typed, including a return typeRalf Jung-7/+3
2019-08-17Rollup merge of #63642 - eddyb:wrap-it-up, r=rkruppe,Mark-SimulacrumMazdak Farrokhzad-6/+6
Rename overflowing_{add,sub,mul} intrinsics to wrapping_{add,sub,mul}. These confused @Gankra, and then, also me, especially since `overflowing_*` *methods* also exist, but they map to `*_with_overflow` intrinsics! r? @oli-obk / @nikomatsakis cc @Mark-Simulacrum (on the rustbuild workaround)
2019-08-16Rename overflowing_{add,sub,mul} intrinsics to wrapping_{add,sub,mul}.Eduard-Mihai Burtescu-6/+6
2019-08-16Remove redundant `ty` fields from `mir::Constant` and ↵Eduard-Mihai Burtescu-9/+5
`hair::pattern::PatternRange`.
2019-08-15don't add Retag statements for compound typesRalf Jung-13/+9
2019-08-06Rollup merge of #63299 - spastorino:in-projection-use-ref, r=oli-obkMazdak Farrokhzad-14/+15
Make qualify consts in_projection use PlaceRef r? @oli-obk
2019-08-05Make qualify consts in_projection use PlaceRefSantiago Pastorino-14/+15
2019-08-05Clear the ParamEnv where its information is irrelevantOliver Scherer-1/+1
2019-08-05Fiddle param env through to `try_eval_bits` in most placesOliver Scherer-9/+13
2019-08-05Don't abort on unevaluated constants without at least tryting to eval themOliver Scherer-5/+5
2019-08-05Clean up the `ty::Const::assert*` methodsOliver Scherer-2/+1
2019-08-02be less BritishRalf Jung-1/+1
2019-08-01code review fixesSaleem Jaffer-1/+6
2019-08-01code review fixesSaleem Jaffer-6/+2
2019-07-31code review fixesSaleem Jaffer-2/+2
2019-07-30renaming throw_err_* to throw_*Saleem Jaffer-1/+1
2019-07-30adding throw_ and err_ macros for InterpErrorSaleem Jaffer-1/+1
2019-07-30code review fixesSaleem Jaffer-7/+0
2019-07-29code review fixesSaleem Jaffer-2/+2
2019-07-29use PanicInfo and UnsupportedOpInfoSaleem Jaffer-8/+8
2019-07-29adding a err macro for each of the InterpError variantsSaleem Jaffer-1/+1
2019-07-29tidy fixesSaleem Jaffer-1/+0
2019-07-29fixing fallout due to InterpError refactorSaleem Jaffer-76/+10
2019-07-26Rollup merge of #62801 - bjorn3:remove_lower_128bit_ops, r=alexcrichtonMazdak Farrokhzad-240/+0
Remove support for -Zlower-128bit-ops It is broken and unused cc https://github.com/rust-lang/rust/issues/58969 blocked https://github.com/rust-lang-nursery/compiler-builtins/pull/302 (removes definitions of the lang items removed in this PR) r? @alexcrichton
2019-07-24Stabilize the type_name intrinsic in core::anySteven Fackler-1/+1
Closes rust-lang/rfcs#1428
2019-07-24use PanicMessage type for MIR assertion errorsRalf Jung-12/+9
2019-07-24do not use InterpError::description outside librustc::mirRalf Jung-2/+3
2019-07-23Rollup merge of #62859 - spastorino:rename-to-as-ref, r=CentrilMark Rousskov-12/+12
Place::as_place_ref is now Place::as_ref r? @oli-obk
2019-07-23Rollup merge of #60951 - saleemjaffer:mir_better_error_enum, r=oli-obkMark Rousskov-14/+9
more specific errors in src/librustc/mir/interpret/error.rs Implements [this](https://github.com/rust-rfcs/const-eval/issues/4)
2019-07-23renames EvalErrorPanic to PanicMessageSaleem Jaffer-14/+9
2019-07-23moving some variants from InterpError to EvalErrorPanicSaleem Jaffer-14/+14
2019-07-22Place::as_place_ref is now Place::as_refSantiago Pastorino-12/+12
2019-07-20Avoid cloning Place in check_and_patchSantiago Pastorino-12/+13
2019-07-20Avoid cloning Place in visit_rvalueSantiago Pastorino-4/+4
2019-07-20Avoid cloning Place in assign #2Santiago Pastorino-8/+2
2019-07-20Avoid cloning Place in assign #1Santiago Pastorino-8/+3
2019-07-20Avoid cloning Place in in_projection_structurallySantiago Pastorino-20/+20
2019-07-20Avoid cloning Place in is_stableSantiago Pastorino-5/+6
2019-07-20Avoid cloning Place in report_use_of_moved_or_uninitialized and friendsSantiago Pastorino-8/+8
2019-07-20Migrate from Place enum to Place structSantiago Pastorino-176/+351
2019-07-19Remove support for -Zlower-128bit-opsbjorn3-240/+0
It is broken and unused
2019-07-18Auto merge of #61749 - davidtwco:rfc-2203-const-array-repeat-exprs, r=eddybbors-78/+111
rustc/rustc_mir: Implement RFC 2203. This PR implements RFC 2203, allowing constants in array repeat expressions. Part of #49147. r? @eddyb
2019-07-16Auto merge of #62322 - wesleywiser:promoted_query, r=oli-obkbors-0/+7
Add a query to get the `promoted`s for a `mir::Body` This is a builidng block toward removing a lot of duplicated code between miri and the cosnt-propagator pass. See this thread for more info: https://rust-lang.zulipchat.com/#narrow/stream/189540-t-compiler.2Fwg-mir-opt/topic/Using.20.60InterpCx.60.20more/near/169030661 r? @spastorino but feel free to hand it off to somebody else
2019-07-11rustc_mir: follow FalseUnwind's real_target edge in qualify_consts.Eduard-Mihai Burtescu-2/+2
2019-07-10Rollup merge of #62275 - eddyb:const-drop-replace, r=pnkfelixMazdak Farrokhzad-3/+20
rustc_mir: treat DropAndReplace as Drop + Assign in qualify_consts. This slipped through the cracks and never got implemented (thankfully that just meant it was overly conservative and didn't allow assignments that don't *actually* drop the previous value). Fixes #62273. r? @oli-obk
2019-07-07syntax: Add feature gate.David Wood-1/+1
This commit adds a `const_in_array_repeat_expressions` feature gate and only create `Candidate::Repeat` if it is enabled.
2019-07-07rustc/rustc_mir: Implement RFC 2203.David Wood-78/+111
This commit implements RFC 2203, allowing constants in array repeat expressions. Firstly, the check that the array repeat expression implements `Copy` is removed and re-implemented in `rustc_mir::borrow_check::nll::type_check` by emitting an error when the MIR contains a `Operand::Move` and the type does not implement `Copy`. Next, the `qualify_consts` pass is modified to construct a `Candidate::Repeat` when it would be correct to promote a array repeat expression. Finally, the `promote_consts` pass is modified to promote the candidates previously identified.