about summary refs log tree commit diff
path: root/compiler/rustc_mir/src/interpret
AgeCommit message (Collapse)AuthorLines
2020-10-13Auto merge of #77796 - jonas-schievink:switchint-refactor, r=oli-obkbors-5/+5
Refactor how SwitchInt stores jump targets Closes https://github.com/rust-lang/rust/issues/65693
2020-10-10Refactor how SwitchInt stores jump targetsJonas Schievink-5/+5
2020-10-05query_name_of_opt_const_arg -> query_name_opt_const_argBastian Kauschke-2/+2
2020-10-04cleanup WithOptConstParam queriesBastian Kauschke-5/+1
2020-10-01Only mention that a stack frame is being popped when starting to do soOliver Scherer-5/+4
2020-09-28Use `tracing` spans to trace the entire MIR interp stackOliver Scherer-21/+56
2020-09-25Implement `Display` for `DisambiguatedDefPathData` and `DefPathData`marmeladema-8/+2
2020-09-25Move from {{closure}}#0 syntax to {closure#0} for (def) path componentsmarmeladema-2/+7
2020-09-25Rollup merge of #76973 - lzutao:unstably-const-assume, r=oli-obkJonas Schievink-2/+8
Unstably allow assume intrinsic in const contexts Not sure much about this usage because there are concerns about [blocking optimization][1] and [slowing down LLVM][2] when using `assme` intrinsic in inline functions. But since Oli suggested in https://github.com/rust-lang/rust/issues/76960#issuecomment-695772221, here we are. [1]: https://github.com/rust-lang/rust/pull/54995#issuecomment-429302709 [2]: https://github.com/rust-lang/rust/issues/49572#issuecomment-589615423
2020-09-22Miri: more informative deallocation error messagesRalf Jung-4/+8
2020-09-21Rollup merge of #76581 - lcnr:bound-too-generic, r=eddybecstatic-morse-4/+2
do not ICE on bound variables, return `TooGeneric` instead fixes #73260, fixes #74634, fixes #76595 r? @nikomatsakis
2020-09-21fix InterpCx resolveBastian Kauschke-5/+10
2020-09-20Add unstably const support for assume intrinsicLzu Tao-0/+6
2020-09-20Correct file path after some restructures in compilerLzu Tao-2/+2
2020-09-20Auto merge of #74949 - oli-obk:validate_const_eval_raw, r=RalfJungbors-64/+31
Validate constants during `const_eval_raw` This PR implements the groundwork for https://github.com/rust-lang/rust/issues/72396 * constants are now validated during `const_eval_raw` * to prevent cycle errors, we do not validate references to statics anymore beyond the fact that they are not dangling * the `const_eval` query ICEs if used on `static` items * as a side effect promoteds are now evaluated to `ConstValue::Scalar` again (since they are just a reference to the actual promoted allocation in most cases).
2020-09-20miri: correctly deal with `ConstKind::Bound`Bastian Kauschke-4/+2
2020-09-19Rollup merge of #76757 - matthiaskrgr:clippy_try_into, r=lcnrRalf Jung-4/+2
don't convert types to the same type with try_into (clippy::useless_conversion)
2020-09-19Address review commentsOliver Scherer-22/+22
2020-09-19Unify the names of const eval queries and their return typesOliver Scherer-3/+3
2020-09-19Rename const eval queries to reflect the validation changesOliver Scherer-2/+2
2020-09-19Do not call the `const_eval` query in mir interpretation except for caching ↵Oliver Scherer-33/+7
of nulary intrinsics
2020-09-19Stop using the `const_eval` query for initializers of staticsOliver Scherer-12/+3
As a side effect, we now represent most promoteds as `ConstValue::Scalar` again. This is useful because all implict promoteds are just references anyway and most explicit promoteds are numeric arguments to `asm!` or SIMD instructions.
2020-09-19Validate constants during `const_eval_raw`Oliver Scherer-8/+10
2020-09-15don't convert types to the same type with try_into (clippy::useless_conversion)Matthias Krüger-4/+2
2020-09-12move guaranteed{ne,eq} implementation to compile-time machineRalf Jung-41/+2
2020-09-04Change ty.kind to a methodLeSeulArtichaut-34/+34
2020-09-02pretty: trim paths of unique symbolsDan Aloni-12/+16
If a symbol name can only be imported from one place for a type, and as long as it was not glob-imported anywhere in the current crate, we can trim its printed path and print only the name. This has wide implications on error messages with types, for example, shortening `std::vec::Vec` to just `Vec`, as long as there is no other `Vec` importable anywhere. This adds a new '-Z trim-diagnostic-paths=false' option to control this feature. On the good path, with no diagnosis printed, we should try to avoid issuing this query, so we need to prevent trimmed_def_paths query on several cases. This change also relies on a previous commit that differentiates between `Debug` and `Display` on various rustc types, where the latter is trimmed and presented to the user and the former is not.
2020-09-02Prevent ICE on uninhabited MIR interpretationMark Rousskov-1/+6
2020-08-30mv compiler to compiler/mark-0/+8700