about summary refs log tree commit diff
path: root/src/librustc_mir/interpret
AgeCommit message (Collapse)AuthorLines
2019-04-15basic refactor. Adding PointerCast enumSaleem Jaffer-5/+6
2019-04-14fix testsRalf Jung-1/+1
2019-04-12Auto merge of #59651 - tmandry:discr-index, r=eddybbors-5/+8
Add discr_index to multi-variant layouts We remove the assumption that the discriminant is always field 0, in preparations for layouts like generators where this is not (always) going to be the case. Specifically, upvars are going to go before the discriminant. In theory, it's possible to remove _that_ assumption instead and keep the discriminant at field index 0, but one assumption or the other had to go :) There is one place I know of in the debuginfo code where we'll still need to remove assumptions that the discriminant is the _only_ field. I was planning on doing this along with the upcoming generator change, which will also include tests that exercise the code changing in this PR. r? @eddyb cc @oli-obk cc @cramertj
2019-04-12Auto merge of #59536 - Zoxc:the-arena, r=eddybbors-2/+1
Introduce an arena type which may be used to allocate a list of types with destructors You can also specify that you want deserializers for `&'tcx [T]` and `&'tcx T` for a type in the list, which will allocate those using the arena. Based on https://github.com/rust-lang/rust/pull/59517 and https://github.com/rust-lang/rust/pull/59533. Look at the last commit for the interesting changes. An alternative to https://github.com/rust-lang/rust/pull/56448. cc @michaelwoerister @eddyb r? @oli-obk
2019-04-11Add discr_index to multi-variant layoutsTyler Mandry-5/+8
We relax the assumption that the discriminant is always field 0, in preparations for layouts like generators where this is not going to be the case.
2019-04-10Improve miri's error reporting in check_in_allocLooMaclin-2/+2
2019-04-09Improve miri's error reporting in check_in_allocLooMaclin-1/+1
2019-04-09Improve miri's error reporting in check_in_allocLooMaclin-1/+1
2019-04-09Improve miri's error reporting in check_in_allocLooMaclin-1/+2
2019-04-09Improve miri's error reporting in check_in_allocLooMaclin-9/+10
2019-04-08Improve miri's error reporting in check_in_allocLooMaclin-7/+7
2019-04-08avoid reading from ZST localsRalf Jung-56/+29
2019-04-08Apply suggestions from code review Ralf Jung-2/+2
typos Co-Authored-By: RalfJung <post@ralfj.de>
2019-04-07implement by-value object safetyRalf Jung-13/+36
2019-04-07initialize unsized locals when copying to the for the first timeRalf Jung-33/+57
2019-04-07fix miri engine debug output for uninitialized localsRalf Jung-11/+6
2019-04-07make StorageLive lazy as wellRalf Jung-37/+22
2019-04-06miri engine: lazily allocate memory for locals on first writeRalf Jung-40/+79
2019-04-05Introduce an arena type which may be used to allocate a list of types with ↵John Kåre Alsaker-2/+1
destructors
2019-04-03Rollup merge of #59514 - tmandry:remove-adt-def-from-projection-elem, r=eddybMazdak Farrokhzad-1/+1
Remove adt_def from projections and downcasts in MIR As part of optimizing generator layouts in MIR, we'd like to allow downcasting generators to variants which do not have a corresponding `def_id`, since they are created by the compiler. This refactor hopes to allow that, without regressing perf. r? @eddyb
2019-04-02Merge branch 'master' into ↵Loo Maclin-31/+31
issue_57128_improve_miri_error_reporting_in_check_in_alloc
2019-04-02Replace adt_def with name in mir::ProjectionElem::DowncastTyler Mandry-1/+1
2019-04-02Rollup merge of #59607 - kenta7777:renames-EvalErrorKind-to-InterpError, ↵Mazdak Farrokhzad-30/+30
r=oli-obk Renames `EvalErrorKind` to `InterpError` This PR renames `EvalErrorKind` to `InterpError`. This is related to #54395.
2019-04-02Improve miri's error reporting in check_in_allocLooMaclin-1/+2
2019-04-02Improve miri's error reporting in check_in_allocLooMaclin-3/+3
2019-04-02Improve miri's error reporting in check_in_allocLooMaclin-14/+14
2019-04-02renames EvalErrorKind to InterpErrorkenta7777-30/+30
2019-04-01typo fixkenta7777-1/+1
2019-03-31Rollup merge of #59580 - taiki-e:coerce-closure, r=oli-obkMazdak Farrokhzad-1/+1
Allow closure to unsafe fn coercion Closes #57883
2019-03-31Rollup merge of #59519 - eddyb:layout-variants-refactor, r=oli-obkMazdak Farrokhzad-19/+21
rustc_target: factor out common fields of non-Single Variants. @tmandry and I were discussing ways to generalize the current variants/discriminant layout to allow more fields in the "`enum`" (or another multi-variant types, such as potentially generator state, in the future), shared by all variants, than just the tag/niche discriminant. This refactor should make it easier to extend multi-variant layouts, as nothing is duplicating anymore between "tagged enums" and "niche-filling enums". r? @oli-obk
2019-04-01Allow closure to unsafe fn coercionTaiki Endo-1/+1
2019-03-30Remove redundant importsFabian Drinck-2/+0
2019-03-29rustc_target: factor out common fields of non-Single Variants.Eduard-Mihai Burtescu-19/+21
2019-03-27Rollup merge of #59430 - kenta7777:rename-evalcontext-to-interpretcx, r=oli-obkJosh Stone-54/+54
Renames `EvalContext` to `InterpretCx` This PR renames `EvalContext` to `InterpretCx` in `src/librustc_mir`. This PR is related to #54395 .
2019-03-26renames EvalContext to InterpretCx.kenta7777-54/+54
2019-03-23adding mir::StaticKind enum for static and promotedSaleem Jaffer-3/+3
2019-03-18fixed all compilation errorsSaleem Jaffer-1/+1
2019-03-18cleaner code as per reviewSaleem Jaffer-32/+30
2019-03-18promoted is still left in 2 placesSaleem Jaffer-28/+31
2019-03-16Revert the `LazyConst` PROliver Scherer-25/+12
2019-03-15Auto merge of #58556 - oli-obk:imperative_recursion, r=pnkfelixbors-26/+76
Optimize copying large ranges of undefmask blocks Hopefully fixes #58523
2019-03-15we can now print on entering/leaving the topmost frame, and make sure it ↵Ralf Jung-8/+4
stays that way
2019-03-15rustc: rename item_path to def_path (except the module in ty).Eduard-Mihai Burtescu-1/+1
2019-03-15rustc: remove fmt::{Debug,Display} from ty::TyKind.Eduard-Mihai Burtescu-5/+5
2019-03-12Document the precomputation algorithm's purposeOliver Scherer-0/+7
2019-03-06Refactor const_to_opvarkor-9/+4
2019-03-05Make adjustments for commentsvarkor-2/+6
2019-03-05Fix rebase falloutvarkor-1/+1
2019-03-05Handle new ConstValue variants in mirvarkor-0/+2
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
2019-03-04Use bit operations for setting large ranges of bits in a u64Oliver Scherer-1/+1