about summary refs log tree commit diff
path: root/src/librustc_mir/interpret
AgeCommit message (Collapse)AuthorLines
2018-08-23Small style fixesBernardo Meurer-5/+5
2018-08-23More tidy fixes to CTFEBernardo Meurer-9/+5
2018-08-23Fix stylistic mistakesBernardo Meurer-6/+13
2018-08-23Fixup long code linesBernardo Meurer-31/+91
2018-08-23Reflow and fixup commentsBernardo Meurer-30/+47
2018-08-23Add license header to CTFE/MIRIBernardo Meurer-0/+140
2018-08-22Auto merge of #52011 - ↵bors-15/+82
oli-obk:dont_you_hate_it_too_when_everything_panics_constantly, r=eddyb Allow panicking with string literal messages inside constants r? @eddyb cc https://github.com/rust-lang/rust/issues/51999 we can't implement things like `panic!("foo: {}", x)` right now because we can't call trait methods (most notably `Display::fmt`) inside constants. Also most of these impls probably have loops and conditions, so it's messy anyway. But hey `panic!("foo")` works at least. cc @japaric got any test ideas for `#![no_std]`?
2018-08-22Allow panicking with string literal messages inside constantsOliver Schneider-15/+82
2018-08-22Fix rebase issuesvarkor-20/+20
2018-08-22Remove Ty prefix from Ty{Bool|Char|Int|Uint|Float|Str}varkor-20/+20
2018-08-22Remove Ty prefix from ↵varkor-16/+16
Ty{Adt|Array|Slice|RawPtr|Ref|FnDef|FnPtr|Dynamic|Closure|Generator|GeneratorWitness|Never|Tuple|Projection|Anon|Infer|Error}
2018-08-22Rename ty::TyVariants to ty::TyKindvarkor-4/+4
2018-08-22fix error reporting in validationRalf Jung-6/+13
2018-08-22fix validating fat pointers to user-defined unsized typesRalf Jung-53/+28
2018-08-22fix a comment in validityRalf Jung-1/+3
2018-08-22fix layout sanity checkRalf Jung-1/+6
2018-08-22also avoid recomputing the layout for unary and binary ops, where possibleRalf Jung-19/+47
2018-08-22in a Use statement, exploit the fact that type and hence layout are the same ↵Ralf Jung-15/+44
for LHS and RHS
2018-08-22optimize creating a stack frameRalf Jung-6/+15
2018-08-22fix validating fat raw pointersRalf Jung-18/+25
2018-08-22optimize sanity check path printingRalf Jung-82/+97
During the sanity check, we keep track of the path we are below in a `Vec`. We avoid cloning that `Vec` unless we hit a pointer indirection. The `String` representation is only computed when validation actually fails.
2018-08-22avoid some redundant alignment checksRalf Jung-7/+18
2018-08-22optimize validation iterating over the elements of an arrayRalf Jung-30/+72
This is still roughly 45ns slower than the old state, because it now works with an MPlaceTy and uses the appropriate abstractions, instead of working with a ptr-align pair directly.
2018-08-22fix formatting nitsRalf Jung-7/+7
2018-08-22move validation to its own fileRalf Jung-331/+346
2018-08-22fix operator handling when using 128bit intrinsicsRalf Jung-1/+1
2018-08-22finally remove all traces of signs from memoryRalf Jung-71/+68
2018-08-22fix computing layout when calling virtual fnRalf Jung-3/+9
2018-08-22avoid allocating for ZSTRalf Jung-1/+4
2018-08-22fix using copy_op to transmuteRalf Jung-8/+10
2018-08-22try_read_value_from_ptr -> try_read_value_from_mplaceRalf Jung-19/+18
2018-08-22fix dynamically determining size and alignmentRalf Jung-17/+20
2018-08-22fix accessing unsized fieldsRalf Jung-14/+15
2018-08-22fix drop typing; use same machinery for validating (sanity checking) dyn ↵Ralf Jung-54/+88
trait ptrs and slices
2018-08-22fix dropping with vtablesRalf Jung-6/+14
2018-08-22Tweak loggingRalf Jung-21/+23
- The logging in step.rs becomes debug! to make it stand out a bit more - Dump value of operands (in `eval_operands`) - Try to log a bit less verbose
2018-08-22fix union field access and DST computations and dumping of placesRalf Jung-27/+33
2018-08-22remove cur_frame from memory (validation is gone, new validation will not ↵Ralf Jung-14/+0
need it)
2018-08-22generalize truncate and sign_extend to take a SizeRalf Jung-7/+7
2018-08-22miri/CTFE refactorRalf Jung-1694/+1816
* 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-22Move some value-and-memory related things out of eval_contextRalf Jung-765/+782
2018-08-21Rollup merge of #53496 - matthiaskrgr:codespell_08_2018, r=varkorkennytm-2/+2
Fix typos found by codespell.
2018-08-19mv (mod) codemap source_mapDonato Sciarra-8/+8
2018-08-19Fix typos found by codespell.Matthias Krüger-2/+2
2018-08-03Reintroduce alignment checkOliver Schneider-0/+1
2018-08-03Remove spurious whitespaceOliver Schneider-1/+1
2018-08-03Remove some more unnecessary `mut`Oliver Schneider-4/+4
2018-08-02Second field of ScalarPair can be undef in some casesOliver Schneider-1/+1
2018-08-02Reading values should not be looking at the variantOliver Schneider-15/+2
2018-08-01Fallout from fixing `try_read_value` to work with enumsOliver Schneider-34/+17