about summary refs log tree commit diff
path: root/src/librustc_mir/interpret
AgeCommit message (Collapse)AuthorLines
2018-09-03Use EvalContext's TyCtx for the purpose of hashing the evaluation contextBruno Dutra-2/+8
2018-09-03Keep lines shorter than 100 charactersBruno Dutra-11/+41
2018-09-03Add a convenience macro to reduce code duplicationBruno Dutra-114/+86
2018-09-03Add an info log when snapshotting the constant evaluation contextBruno Dutra-0/+2
2018-09-03Impl Eq and PartialEq for EvalSnapshot in terms of the Snapshot traitBruno Dutra-69/+45
2018-09-03Impl SnapshotContext for MemoryBruno Dutra-0/+10
2018-09-03Introduce Snapshot and SnapshotContext traitsBruno Dutra-1/+265
2018-09-03Make vaious allocation related types generic on the allocation idBruno Dutra-18/+19
2018-09-03Move EvalSnapshot into its own moduleBruno Dutra-42/+50
2018-09-03Implement Hash in terms of HashStable for EvalSnapshotBruno Dutra-51/+85
2018-09-03Promote EvalSnapshot to newtypeBruno Dutra-7/+22
2018-09-03Auto merge of #53697 - Cyres:const-fn-int-ops, r=oli-obkbors-1/+36
Add more const int ops r? @oli-obk Tracking Issue: #53718 list of `const fn`s in this PR: - `feature = const_int_rotate` - `rotate_left` - `rotate_right` - `feature = const_int_wrapping` - `wrapping_add` - `wrapping_sub` - `wrapping_mul` - `wrapping_shl` - `wrapping_shr` - `feature = const_int_overflowing` - `overflowing_add` - `overflowing_sub` - `overflowing_mul` - `overflowing_shl` - `overflowing_shr` - `feature = const_int_sign` - `is_positive` - `is_negative` - `feature = const_int_conversion` - `reverse_bits` - `to_le_bytes` - `to_ne_bytes` - `from_be_bytes` - `from_le_bytes` - `from_ne_bytes` - `reverse_bits`
2018-09-03Auto merge of #53831 - TheDarkula:pointer-check, r=oli-obkbors-0/+18
Added pointer checking to sanity checks r? @oli-obk
2018-09-01rebaseTim-1/+36
2018-09-01make sure we do not copy unsized dataRalf Jung-0/+2
2018-09-01bug! instead of panic!csmoe-1/+1
2018-09-01improve panic messagecsmoe-1/+1
2018-08-31Added pointer checking to sanity checksthedarkula-0/+18
2018-08-31extract allocation info from byrefcsmoe-4/+7
2018-08-31Auto merge of #53779 - RalfJung:miri-refactor, r=oli-obkbors-521/+437
Miri refactor: Final round Tying up some loose ends that I noticed in the previous PRs -- and finally getting argument passing into a shape where @eddyb says it is "okay", which is a big improvement over the previous verdict that I cannot quote in public. ;) Also move a bunch of useful helpers to construct `Scalar` from miri to here. Cc @eddyb r? @oli-obk
2018-08-30Made std::intrinsics::transmute() const fn.thedarkula-0/+7
2018-08-30assert sanity in memoryRalf Jung-5/+4
2018-08-29audit the relocations code, and clean it up a littleRalf Jung-22/+42
2018-08-29refactor memory access methods a bitRalf Jung-40/+47
2018-08-29make ptr_op finally reponsible for all ops involving pointers; make ValTy ↵Ralf Jung-55/+39
constructor private Also remove public OpTy constructors, but a pub(crate) constructor remains
2018-08-29re-do argument passing one more time to finally be saneRalf Jung-183/+160
2018-08-29memory: make getting the alloc for a static an associate function for easier ↵Ralf Jung-42/+42
calling
2018-08-29move some Scalar helpers from miri here, and use them where appropriateRalf Jung-179/+108
2018-08-28restructure unary_op to also dispatch on type first; fix promotion with ↵Ralf Jung-42/+54
unary '-' overflowing
2018-08-28fix unsized extern typesRalf Jung-7/+9
2018-08-28address nitsRalf Jung-119/+167
2018-08-27use associated const for machine controlling mutable staticsRalf Jung-45/+35
So get rid of the IsStatic trait again
2018-08-27get rid of *most* of the fn call hack by honoring mir.spread_argRalf Jung-62/+56
2018-08-27fix len() on non-array but array-layout types (e.g. SIMD)Ralf Jung-14/+15
2018-08-27expand comment on how statics workRalf Jung-3/+9
2018-08-27fix handling of unsized types in validation; validate str to be UTF-8Ralf Jung-288/+317
2018-08-27validate enum discriminant whenever it is readRalf Jung-60/+59
2018-08-27dedicated handling for binops on bool and char (UB if they are not valid)Ralf Jung-54/+94
2018-08-27get rid of FinishStatic hack from stack clenaup; const_eval can do that itselfRalf Jung-33/+17
2018-08-27move const_eval out of rustc_mir::interpretRalf Jung-476/+15
to make sure that it does not access private implementation details
2018-08-27switch validation to use operand, not mplaceRalf Jung-85/+75
this means we can get rid of the public allocate_op, and make OpTy only constructible in librustc_mir
2018-08-27terminator/drop.rs is just one fn... merge it together with the other ↵Ralf Jung-66/+46
terminator stuff
2018-08-27Clean up function callingRalf Jung-118/+99
Still not as clean as I'd like it, but better
2018-08-27simplify const_to_allocation_provider because it is used for statics onlyRalf Jung-17/+5
2018-08-27allow Machine to hook into foreign statics; remove unused HasMemory traitRalf Jung-126/+72
2018-08-27without all those copies of constants, we can finally make eval_operand take ↵Ralf Jung-59/+53
&self
2018-08-27Miri Memory WorkRalf Jung-503/+554
* 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-25Auto merge of #53609 - bemeurer:tidy-ctfe, r=RalfJungbors-63/+287
Tidy CFTE/MIRI Fixes #53596
2018-08-24support user-given types in adtsNiko Matsakis-1/+1
2018-08-23Fixed multi-line function signaturesBernardo Meurer-4/+8