about summary refs log tree commit diff
path: root/compiler/rustc_middle/src/mir/interpret
AgeCommit message (Collapse)AuthorLines
2023-03-28address review commentsRémy Rakic-6/+8
Move tests and limit the init mask's structures/fields visibility.
2023-03-27readability tweaksRémy Rakic-22/+22
2023-03-27add more InitMask test coverageRémy Rakic-0/+175
2023-03-27make InitMask lazy for fully init/uninit casesRémy Rakic-58/+225
Avoid materializing bits in the InitMask bitset when a single value would be enough: when the mask represents a fully initialized or fully uninitialized const allocation.
2023-03-02Rollup merge of #108022 - CraftSpider:align-bytes, r=oli-obkMatthias Krüger-17/+69
Support allocations with non-Box<[u8]> bytes This is prep work for allowing miri to support passing pointers to C code, which will require `Allocation`s to be correctly aligned. Currently, it just makes `Allocation` generic and plumbs the necessary changes through the right places. The follow-up to this will be adding a type in the miri interpreter which correctly aligns the bytes, using that for the Miri engine, then allowing Miri to pass pointers into these allocations to C calls. Based off of #100467, credit to ```@emarteca``` for the code
2023-03-01FormatRune Tynan-8/+2
2023-02-28Make zeroed return an OptionRune Tynan-13/+8
2023-02-22Remove type-traversal trait aliasesAlan Egerton-1/+1
2023-02-20Minimal changes to make miri workRune Tynan-14/+4
2023-02-20Remove unused lifetimeRune Tynan-1/+1
2023-02-20Add mentioned from_raw_bytes constructorRune Tynan-0/+17
2023-02-20Allow non-`Box` allocations in preparation for aligned const allocations for ↵Rune Tynan-17/+73
miri. Credit to emarteca for the code.
2023-02-15Use target instead of machine for mir interpreter integer handling.Oli Scherer-16/+16
The naming of `machine` only makes sense from a mir interpreter internals perspective, but outside users talk about the `target` platform
2023-02-14interpret: rename Pointer::from_addr → from_addr_invalidRalf Jung-4/+6
2023-02-07miri: fix ICE when running out of address spaceRalf Jung-1/+6
2023-01-25create and use GlobalAlloc::address_spaceErik Desjardins-1/+12
2023-01-17Remove double spaces after dots in commentsMaybe Waffle-3/+3
2022-12-10compiler: remove unnecessary imports and qualified pathsKaDiWa-3/+0
2022-11-30Update documentationOli Scherer-1/+1
2022-11-28Rollup merge of #104933 - RalfJung:interpret-partial-ord, r=oli-obkMatthias Krüger-7/+7
interpret: remove PartialOrd from a bunch of types that do not have or need a sensible order r? `@oli-obk`
2022-11-27Prefer doc comments over `//`-comments in compilerMaybe Waffle-2/+2
2022-11-26interpret: remove PartialOrd from a bunch of types that do not have or need ↵Ralf Jung-7/+7
a sensible order
2022-11-20Rollup merge of #104564 - RalfJung:either, r=oli-obkMatthias Krüger-8/+12
interpret: use Either over Result when it is not representing an error condition r? `@oli-obk`
2022-11-18interpret: use Either over Result when it is not representing an error conditionRalf Jung-8/+12
2022-11-17fix a typoRalf Jung-1/+1
2022-11-16cleanup and dedupe CTFE and Miri error reportingRalf Jung-19/+8
2022-11-15Auto merge of #104054 - RalfJung:byte-provenance, r=oli-obkbors-787/+962
interpret: support for per-byte provenance Also factors the provenance map into its own module. The third commit does the same for the init mask. I can move it in a separate PR if you prefer. Fixes https://github.com/rust-lang/miri/issues/2181 r? `@oli-obk`
2022-11-14assert that we are (de)seiralizing ProvenanceMap correctlyRalf Jung-11/+11
2022-11-14Manually implement `Encodable` for ProvenanceMap to avoid serializing an ↵Oli Scherer-1/+16
always-none option
2022-11-10Use const_error_with_guaranteed moreMichael Goulet-1/+2
2022-11-09another optimization attemptRalf Jung-66/+83
2022-11-08another attempt at performance improvementsRalf Jung-23/+26
2022-11-07less unsupported errors in Miri, and clarifying commentsRalf Jung-9/+9
2022-11-07try to make things faster when only ptr provenance can existRalf Jung-5/+17
2022-11-06make uninit_mask a unit testRalf Jung-1/+22
2022-11-06move InitMask to its own moduleRalf Jung-587/+567
2022-11-06dont debug-print allocations, that's too verboseRalf Jung-4/+4
2022-11-06interpret: support for per-byte provenanceRalf Jung-185/+312
2022-10-22Auto merge of #103227 - lcnr:bye-bye-unevaluated-const, r=oli-obkbors-1/+25
stop using `ty::UnevaluatedConst` directly best reviewed commit by commit. simplifies #99798 because we now don't have to expand `ty::UnevaluatedConst` to `ty::Const`. I also remember some other places where using `ty::UnevaluatedConst` directly was annoying and caused issues, though I don't quite remember what they were rn '^^ r? `@oli-obk` cc `@JulianKnodt`
2022-10-21fix some typosRageking8-1/+1
2022-10-18`const_evaluatable_unchecked` to const evallcnr-1/+25
2022-10-14more dupe word typosRageking8-1/+1
2022-10-07make const_err a hard errorRalf Jung-18/+1
2022-10-04It's not about types or consts, but the lack of regionsOli Scherer-2/+2
2022-09-23rename Unevaluated to UnevaluatedConstb-naber-3/+3
2022-09-22introduce mir::Unevaluatedb-naber-3/+7
2022-09-19`DestructuredConst` split mir and tylcnr-1/+1
2022-09-17Auto merge of #98588 - b-naber:valtrees-cleanup, r=lcnrbors-2/+2
Use only ty::Unevaluated<'tcx, ()> in type system r? `@lcnr`
2022-09-15Replace more manual TypeFoldable and TypeVisitable impls with derivesOli Scherer-1/+1
2022-09-15derive various Lift impl instead of hand rolling themOli Scherer-18/+2