summary refs log tree commit diff
path: root/src/librustc_mir/interpret/eval_context.rs
AgeCommit message (Collapse)AuthorLines
2019-02-10rustc: doc commentsAlexander Regueiro-5/+5
2019-02-08librustc_mir => 2018Taiki Endo-1/+1
2019-01-30Swap the names of `LocalValue` and `LocalState`Oliver Scherer-23/+23
2019-01-30Eliminate an unwrapOliver Scherer-10/+11
2019-01-30Monomorphize types when not going through `layout_of_local`Oliver Scherer-1/+2
2019-01-30Indent fixupOliver Scherer-2/+2
2019-01-30Can't use `layout_of_local` for the frame currently being createdOliver Scherer-2/+3
2019-01-30Allow `layout_of_local` to also use cached layoutsOliver Scherer-4/+7
2019-01-30Merge `locals` and `local_layouts` fieldsOliver Scherer-30/+40
2019-01-25Rollup merge of #57734 - oli-obk:fixes_and_cleanups, r=pnkfelixMazdak Farrokhzad-5/+5
Fix evaluating trivial drop glue in constants ```rust struct A; impl Drop for A { fn drop(&mut self) {} } const FOO: Option<A> = None; const BAR: () = (FOO, ()).1; ``` was erroring with ``` error: any use of this value will cause an error --> src/lib.rs:9:1 | 9 | const BAR: () = (FOO, ()).1; | ^^^^^^^^^^^^^^^^^^^^^^^^^^-^ | | | calling non-const function `std::ptr::real_drop_in_place::<(std::option::Option<A>, ())> - shim(Some((std::option::Option<A>, ())))` | = note: #[deny(const_err)] on by default error: aborting due to previous error ``` before this PR. According to godbolt this last compiled successfully in 1.27
2019-01-23Follow naming scheme for "frame" methodsOliver Scherer-4/+4
2019-01-22Bail out on overly generic substitutionsOliver Scherer-11/+31
2019-01-20const_eval: Predetermine the layout of all locals when pushing a stack frameBjörn Steinbrink-5/+14
Usually the layout of any locals is required at least three times, once when it becomes live, once when it is written to, and once it is read from. By adding a cache for them, we can reduce the number of layout queries speeding up code that is heavy on const_eval.
2019-01-18Manually inline a function that was only used onceOliver Scherer-5/+5
2019-01-04add support for principal-less trait object typesAriel Ben-Yehuda-1/+1
should be a pure refactoring.
2018-12-25Remove licensesMark Rousskov-10/+0
2018-12-19make basic CTFE tracing available on release buildsRalf Jung-4/+4
2018-11-25machine hooks for stack push and pop, frame machine dataRalf Jung-6/+12
2018-11-24Rollup merge of #56022 - RalfJung:validate-before-jump, r=oli-obkkennytm-7/+14
When popping in CTFE, perform validation before jumping to next statement to have a better span for the error Currently, when validating the return value fails, the span points at the next statement after the call. That does not make much sense. r? @oli-obk
2018-11-22rustc_target: avoid using AbiAndPrefAlign where possible.Eduard-Mihai Burtescu-9/+9
2018-11-22rustc_target: separate out an individual Align from AbiAndPrefAlign.Eduard-Mihai Burtescu-2/+2
2018-11-22rustc_target: rename abi::Align to AbiAndPrefAlign.Eduard-Mihai Burtescu-6/+6
2018-11-19explain why we can use rawRalf Jung-0/+4
2018-11-19use RawConst in miriRalf Jung-5/+9
2018-11-19Rollup merge of #56059 - alexcrichton:fix-tests, r=sfacklerkennytm-2/+15
Increase `Duration` approximate equal threshold to 1us Previously this threshold when testing was 100ns, but the Windows documentation states: > which is a high resolution (<1us) time stamp which presumably means that we could have up to 1us resolution, which means that 100ns doesn't capture "equivalent" time intervals due to various bits of rounding here and there. It's hoped that this.. Closes #56034
2018-11-18Auto merge of #55672 - RalfJung:miri-extern-types, r=eddybbors-2/+15
miri: accept extern types in structs if they are the only field Fixes https://github.com/rust-lang/rust/issues/55541 Cc @oli-obk @eddyb https://github.com/rust-lang/rust/issues/43467
2018-11-17deallocate locals before validation, to catch dangling referencesRalf Jung-11/+19
2018-11-17When popping in CTFE, perform validation before jumping to next statement to ↵Ralf Jung-17/+16
have a better span for the error
2018-11-15rename FrameInfo span field to call_siteRalf Jung-1/+1
2018-11-14miri: backtraces with instancesRalf Jung-12/+3
2018-11-06make sure we only guess field alignment at offset 0Ralf Jung-4/+3
2018-11-05note some FIXMEsRalf Jung-0/+3
2018-11-05generalize the traversal part of validation to a ValueVisitorRalf Jung-1/+1
2018-11-04rustc_target: pass contexts by reference, not value.Eduard-Mihai Burtescu-37/+7
2018-11-04test for offset and alignment of the sized part, instead of field countRalf Jung-5/+5
2018-11-04miri: accept extern types in structs if they are the only fieldRalf Jung-2/+13
2018-11-02Rename `Value` to `Immediate` for miriOliver Scherer-7/+7
2018-10-28don't tag new memory inside memory.rs; add machine hook to tag new memoryRalf Jung-1/+1
2018-10-28make memory private; that's what we have `memory_mut` forRalf Jung-1/+1
2018-10-26Auto merge of #53821 - oli-obk:sanity_query, r=RalfJungbors-4/+9
Report const eval error inside the query Functional changes: We no longer warn about bad constants embedded in unused types. This relied on being able to report just a warning, not a hard error on that case, which we cannot do any more now that error reporting is consistently centralized. r? @RalfJung fixes #53561
2018-10-25Forward `TooGeneric` errorsOliver Schneider-2/+6
2018-10-25Report const eval error inside the queryOliver Schneider-4/+5
2018-10-23fix typos in various placesMatthias Krüger-1/+1
2018-10-21Use `read_local_of_frame` in `eval_place_to_op`bjorn3-8/+4
Also make `layout_of_local` accept any `Frame`
2018-10-18the tidy strikes againRalf Jung-2/+2
2018-10-18miri: debug! print when we are leaving/entering a functionRalf Jung-0/+14
With a hack to exclude the topmost function for now, because that triggers an ICE...
2018-10-18Forward entire ptr used for dealloaction to machineRalf Jung-2/+2
Also, demote some debug! to trace!
2018-10-18eval_context: move getters together and add one for is_freezeRalf Jung-48/+55
2018-10-18add support for storing extra data in an allocationRalf Jung-2/+1
2018-10-16Use forward compatible `FxHashMap` initializationOliver Scherer-1/+1