about summary refs log tree commit diff
path: root/src/librustc/mir/interpret/value.rs
AgeCommit message (Collapse)AuthorLines
2019-04-16Miri: refactor new allocation taggingRalf Jung-16/+18
2019-03-16Revert the `LazyConst` PROliver Scherer-1/+7
2019-03-13Use derive macro for HashStableJohn Kåre Alsaker-3/+6
2019-03-05Add ConstValue::Param and ConstValue::Infervarkor-1/+9
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
2019-02-16Reintroduce the invariant comment for clarityOliver Scherer-0/+1
2019-02-16Reuse the `Pointer` type instead of passing reassembling it at many use sitesOliver Scherer-3/+2
2019-02-10rustc: doc commentsAlexander Regueiro-7/+8
2019-02-05move librustc to 2018Mark Mansi-1/+1
2019-01-30Swap the names of `LocalValue` and `LocalState`Oliver Scherer-1/+1
2019-01-27`ConstValue::ScalarPair` only needs to represent slicesOliver Scherer-15/+9
2019-01-27Add some size assertions for const eval typesOliver Scherer-0/+6
2019-01-05Rollup merge of #57314 - wiktorkuchta:master, r=Centrilkennytm-1/+1
Fix repeated word typos Inspired by #57295 (I skipped 'be be' because of it) and my [PR in another repo ](https://github.com/e-maxx-eng/e-maxx-eng/pull/389) Not a stupid `sed`, I actually tried to fix case by case.
2019-01-03Fix repeated word typosWiktor Kuchta-1/+1
Found with `git grep -P '\b([a-z]+)\s+\1\b'`
2019-01-01Move the `Unevaluated` constant arm upwards in the type structureOliver Scherer-9/+1
2018-12-25Remove licensesMark Rousskov-10/+0
2018-12-13Auto merge of #56461 - oli-obk:alloc_ids, r=RalfJungbors-1/+1
Some cleanups around `AllocId` management r? @eddyb cc @RalfJung
2018-12-03s/AllocType/AllocKind/Oliver Scherer-1/+1
2018-12-03provide a way to replace the tag in a Scalar/MemPlaceRalf Jung-0/+8
2018-11-19Make const_eval_raw query return just an AllocIdRalf Jung-3/+12
2018-11-08Move ScalarMaybeUndef into `value.rs`Oliver Scherer-0/+128
2018-11-05add method to obtain the ptr offset of a ScalarRalf Jung-0/+13
2018-11-05proide ptr_wrapping_offset on ScalarsRalf Jung-7/+22
2018-11-05fix validation error on non-integer enum discriminantsRalf Jung-1/+10
2018-11-04rustc_target: pass contexts by reference, not value.Eduard-Mihai Burtescu-20/+20
2018-10-25Remove is_nullRalf Jung-9/+1
It was confusingly named (`is_zero` would have been better), and it didn't even reliably test for "is this value 0 at run-time" because out-of-bounds pointers *can* be 0.
2018-10-10typos and spacesRalf Jung-2/+2
2018-10-10miri engine: basic support for pointer provenance trackingRalf Jung-24/+44
2018-10-03A handful of cleanups for rustc/mirljedrz-2/+2
2018-09-30move ScalarMaybeUndef into the miri engineRalf Jung-93/+0
2018-09-30do not normalize non-scalar constants to a ConstValue::ScalarPairRalf Jung-6/+9
2018-09-08Auto merge of #53903 - GabrielMajeri:opt-miri-array-slice, r=oli-obkbors-1/+1
Optimize miri checking of integer array/slices This pull request implements the optimization described in #53845 (the `E-easy` part of that issue, not the refactoring). Instead of checking every element of an integral array, we can check the whole memory range at once. r? @RalfJung
2018-09-08Optimize miri checking of integer array/slicesGabriel Majeri-1/+1
Instead of checking every element, we can check the whole memory range at once.
2018-09-03Make vaious allocation related types generic on the allocation idBruno Dutra-4/+4
2018-08-29move some Scalar helpers from miri here, and use them where appropriateRalf Jung-1/+96
2018-08-27dedicated handling for binops on bool and char (UB if they are not valid)Ralf Jung-6/+19
2018-08-27Miri Memory WorkRalf Jung-3/+81
* Unify the two maps in memory to store the allocation and its kind together. * Share the handling of statics between CTFE and miri: The miri engine always uses "lazy" `AllocType::Static` when encountering a static. Acessing that static invokes CTFE (no matter the machine). The machine only has any influence when writing to a static, which CTFE outright rejects (but miri makes a copy-on-write). * Add an `AllocId` to by-ref consts so miri can use them as operands without making copies. * Move responsibilities around for the `eval_fn_call` machine hook: The hook just has to find the MIR (or entirely take care of everything); pushing the new stack frame is taken care of by the miri engine. * Expose the intrinsics and lang items implemented by CTFE so miri does not have to reimplement them.
2018-08-23Add license header to CTFE/MIRIBernardo Meurer-0/+10
2018-08-22optimize creating a stack frameRalf Jung-0/+2
2018-08-22better error message when using NULL in to_ptrRalf Jung-1/+2
2018-08-22finally remove all traces of signs from memoryRalf Jung-1/+1
2018-08-22miri/CTFE refactorRalf Jung-123/+77
* Value gets renamed to Operand, so that now interpret::{Place, Operand} are the "dynamic" versions of mir::{Place, Operand}. * Operand and Place share the data for their "stuff is in memory"-base in a new type, MemPlace. This also makes it possible to give some more precise types in other areas. Both Operand and MemPlace have methods available to project into fields (and other kinds of projections) without causing further allocations. * The type for "a Scalar or a ScalarPair" is called Value, and again used to give some more precise types. * All of these have versions with an attached layout, so that we can more often drag the layout along instead of recomputing it. This lets us get rid of `PlaceExtra::Downcast`. MPlaceTy and PlaceTy can only be constructed in place.rs, making sure the layout is handled properly. (The same should eventually be done for ValTy and OpTy.) * All the high-level functions to write typed memory take a Place, and live in place.rs. All the high-level typed functions to read typed memory take an Operand, and live in operands.rs.
2018-08-19Fix typos found by codespell.Matthias Krüger-1/+1
2018-08-03Unify API of `Scalar` and `ScalarMaybeUndef`Oliver Schneider-2/+6
2018-08-02Second field of ScalarPair can be undef in some casesOliver Schneider-6/+5
2018-08-01Address behaviour changing review commentsOliver Schneider-18/+0
2018-08-01Address stylistic review comments and rebase falloutOliver Schneider-3/+6
2018-08-01Reintroduce `Undef` and properly check constant value sizesOliver Schneider-85/+115
2018-07-03Update outdated comment: ByVal -> Scalar.Zach Wolfe-2/+2
2018-06-28Merge `ConstVal` and `ConstValue`Oliver Schneider-2/+10
2018-06-28FixupOliver Schneider-8/+0