| Age | Commit message (Collapse) | Author | Lines | |
|---|---|---|---|---|
| 2021-03-16 | Update compiler/rustc_mir/src/const_eval/mod.rs | Oli Scherer | -5/+4 | |
| Co-authored-by: Ralf Jung <post@ralfj.de> | ||||
| 2021-03-15 | Explain pointer and dyn Trait handling in const_to_valtree | Oli Scherer | -9/+7 | |
| 2021-03-15 | Explain how we encode enums at the encoding site | Oli Scherer | -3/+4 | |
| 2021-03-15 | Explain why we do not allow const_to_valtree to read from statics | Oli Scherer | -1/+6 | |
| 2021-03-12 | We won't support trait object constants in type level constants for the ↵ | Oli Scherer | -3/+5 | |
| forseeable future | ||||
| 2021-03-12 | Intern valtree field vector | Oli Scherer | -3/+7 | |
| 2021-03-12 | Implement valtree | Oli Scherer | -2/+90 | |
| valtree is a version of constants that is inherently safe to be used within types. This is in contrast to ty::Const which can have different representations of the same value. These representation differences can show up in hashing or equality comparisons, breaking type equality of otherwise equal types. valtrees do not have this problem. | ||||
| 2021-02-25 | fix review | klensy | -1/+1 | |
| 2021-02-24 | replaced some map_or with map_or_else | klensy | -1/+1 | |
| 2021-02-20 | Auto merge of #82124 - tmiasko:op-ty-ref, r=oli-obk | bors | -27/+27 | |
| Pass large interpreter types by reference, not value r? `@ghost` | ||||
| 2021-02-17 | Reduce size of InterpErrorInfo to 8 bytes | Tomasz Miąsko | -4/+8 | |
| 2021-02-16 | Pass MPlaceTy by reference not value | Tomasz Miąsko | -6/+6 | |
| 2021-02-16 | Pass PlaceTy by reference not value | Tomasz Miąsko | -4/+4 | |
| 2021-02-16 | Pass OpTy by reference not value | Tomasz Miąsko | -17/+17 | |
| 2021-02-13 | Heat up the ICE-y error reporting | Ellen | -1/+1 | |
| rest in peace match bool <3 | ||||
| 2021-02-05 | improve error message for disallowed ptr-to-int casts in const eval | Jeffrey Griffin | -1/+8 | |
| 2021-01-24 | clean up some const error reporting around promoteds | Ralf Jung | -74/+28 | |
| 2021-01-13 | Auto merge of #79322 - jyn514:refactor-impl, r=estebank | bors | -1/+1 | |
| Separate out a `hir::Impl` struct This makes it possible to pass the `Impl` directly to functions, instead of having to pass each of the many fields one at a time. It also simplifies matches in many cases. See `rustc_save_analysis::dump_visitor::process_impl` or `rustdoc::clean::clean_impl` for a good example of how this makes `impl`s easier to work with. r? `@petrochenkov` maybe? | ||||
| 2021-01-12 | Separate out a `hir::Impl` struct | Joshua Nelson | -1/+1 | |
| This makes it possible to pass the `Impl` directly to functions, instead of having to pass each of the many fields one at a time. It also simplifies matches in many cases. | ||||
| 2021-01-12 | Auto merge of #78407 - oli-obk:ub_checkable_ctfe, r=RalfJung,pnkfelix | bors | -0/+16 | |
| Make CTFE able to check for UB... ... by not doing any optimizations on the `const fn` MIR used in CTFE. This means we duplicate all `const fn`'s MIR now, once for CTFE, once for runtime. This PR is for checking the perf effect, so we have some data when talking about https://github.com/rust-lang/const-eval/blob/master/rfcs/0000-const-ub.md To do this, we now have two queries for obtaining mir: `optimized_mir` and `mir_for_ctfe`. It is now illegal to invoke `optimized_mir` to obtain the MIR of a const/static item's initializer, an array length, an inline const expression or an enum discriminant initializer. For `const fn`, both `optimized_mir` and `mir_for_ctfe` work, the former returning the MIR that LLVM should use if the function is called at runtime. Similarly it is illegal to invoke `mir_for_ctfe` on regular functions. This is all checked via appropriate assertions and I don't think it is easy to get wrong, as there should be no `mir_for_ctfe` calls outside the const evaluator or metadata encoding. Almost all rustc devs should keep using `optimized_mir` (or `instance_mir` for that matter). | ||||
| 2021-01-10 | Add ABI argument to `find_mir_or_eval_fn` | Nym Seddon | -0/+2 | |
| Add ABI argument for called function in `find_mir_or_eval_fn` and `call_extra_fn`. Useful for comparing with expected ABI in interpreters. Related to [miri/1631](https://github.com/rust-lang/miri/issues/1631) | ||||
| 2021-01-04 | Move MIR body loading to a machine function | oli | -0/+16 | |
| 2020-12-20 | promoteds in statics may refer to statics | Ralf Jung | -2/+6 | |
| 2020-12-20 | validate promoteds | Ralf Jung | -19/+9 | |
| 2020-12-17 | Auto merge of #79840 - dvtkrlbs:issue-79667, r=oli-obk | bors | -68/+17 | |
| Remove memoization leftovers from constant evaluation machine Closes #79667 | ||||
| 2020-12-11 | add missing constraints | Tunahan Karlibas | -6/+10 | |
| 2020-12-11 | Remove unnecessary check and fix local_def_id parameter | Tunahan Karlibas | -11/+4 | |
| 2020-12-10 | Auto merge of #79621 - usbalbin:constier_maybe_uninit, r=RalfJung | bors | -0/+6 | |
| Constier maybe uninit I was playing around trying to make `[T; N]::zip()` in #79451 be `const fn`. One of the things I bumped into was `MaybeUninit::assume_init`. Is there any reason for the intrinsic `assert_inhabited<T>()` and therefore `MaybeUninit::assume_init` not being `const`? --- I have as best as I could tried to follow the instruction in [library/core/src/intrinsics.rs](https://github.com/rust-lang/rust/blob/master/library/core/src/intrinsics.rs#L11). I have no idea what I am doing but it seems to compile after some slight changes after the copy paste. Is this anywhere near how this should be done? Also any ideas for name of the feature gate? I guess `const_maybe_assume_init` is quite misleading since I have added some more methods. Should I add test? If so what should be tested? | ||||
| 2020-12-09 | Extra assertions in eval_body_using_ecx to disallow queries for | Tunahan Karlibas | -0/+7 | |
| functions that does allocations | ||||
| 2020-12-09 | Remove memoization leftovers | Tunahan Karlibas | -59/+4 | |
| closes #79667 | ||||
| 2020-12-06 | Fix comments related to abort() | Albin Hedman | -0/+4 | |
| 2020-12-05 | Fix tests (hopefully) | Albin Hedman | -1/+1 | |
| 2020-12-05 | abort() now takes a msg parameter | Albin Hedman | -0/+2 | |
| 2020-12-03 | move interpret::MemoryKind::Heap to const eval | Vishnunarayan K I | -1/+26 | |
| 2020-12-03 | move intrinsic to CTFE, add FIXME | Vishnunarayan K I | -0/+17 | |
| 2020-12-02 | add comment and bless some tests | Vishnunarayan K I | -1/+5 | |
| 2020-12-01 | review comment and one more test | Vishnunarayan K I | -7/+6 | |
| 2020-12-01 | review comments | Vishnunarayan K I | -2/+8 | |
| 2020-11-12 | review comments | Vishnunarayan K I | -3/+2 | |
| 2020-11-12 | check mir exists before validation; fix tests | Vishnunarayan K I | -0/+7 | |
| 2020-11-12 | fix tests and formatting | Vishnunarayan K I | -1/+1 | |
| 2020-11-12 | add error_occured field to ConstQualifs, fix #76064 | Vishnunarayan K I | -0/+5 | |
| 2020-11-05 | Rollup merge of #78742 - vn-ki:fix-issue-78655, r=oli-obk | Mara Bos | -3/+5 | |
| make intern_const_alloc_recursive return error fix #78655 r? ``@oli-obk`` | ||||
| 2020-11-04 | make intern_const_alloc_recursive return error fix #78655 | Vishnunarayan K I | -3/+5 | |
| 2020-11-04 | Add `is_null` helper | oli | -2/+2 | |
| This is cheaper than creating a null-`ScalarInt` and comparing and then just throwing it away. | ||||
| 2020-11-04 | Replace `Scalar::zst` with a `Scalar::ZST` constant | oli | -1/+1 | |
| 2020-11-04 | s/Scalar::Raw/Scalar::Int | oli | -6/+6 | |
| 2020-11-04 | 32 bit platforms don't have 64 bit pointers | Oliver Scherer | -2/+3 | |
| 2020-11-04 | Split the "raw integer bytes" part out of `Scalar` | Oliver Scherer | -7/+7 | |
| 2020-10-26 | interning cleanup: we no longer need to distinguish Const and ConstInner; we ↵ | Ralf Jung | -8/+9 | |
| no longer need the ignore_interior_mut_in_const hack | ||||
