about summary refs log tree commit diff
path: root/compiler/rustc_middle/src/ty/consts
AgeCommit message (Collapse)AuthorLines
2021-08-26inline stufflcnr-0/+4
2021-08-26shrink `ty::PredicateKind` againlcnr-5/+24
2021-08-26use `ty::Unevaluated` instead of def substs pairlcnr-1/+1
2021-08-26update `TypeFlags` to deal with missing ct substslcnr-0/+6
2021-08-26make unevaluated const substs optionallcnr-11/+27
2021-07-15adjustions and cleanup to make Miri build againRalf Jung-10/+1
2021-07-14CTFE/Miri engine Pointer type overhaul: make Scalar-to-Pointer conversion ↵Ralf Jung-3/+2
infallible This resolves all the problems we had around "normalizing" the representation of a Scalar in case it carries a Pointer value: we can just use Pointer if we want to have a value taht we are sure is already normalized.
2021-03-20update `const_eval_resolve`lcnr-1/+2
2021-03-20extract `ConstKind::Unevaluated` into a structlcnr-4/+12
2021-03-16Update compiler/rustc_middle/src/ty/consts/valtree.rsOli Scherer-1/+1
Co-authored-by: Ralf Jung <post@ralfj.de>
2021-03-16Update compiler/rustc_middle/src/ty/consts/valtree.rsOli Scherer-1/+2
Co-authored-by: Ralf Jung <post@ralfj.de>
2021-03-15Pacify tidyOli Scherer-1/+1
2021-03-15Do not expose fallible `to_int` operation on `Scalar`.Oli Scherer-1/+1
Any use of it has been shown to be a bug in the past.
2021-03-15Document valtreeOli Scherer-0/+18
2021-03-12Add convenience conversion methods for ScalarIntOli Scherer-2/+30
2021-03-12Intern valtree field vectorOli Scherer-5/+5
2021-03-12Implement valtreeOli Scherer-0/+15
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-03-06Change x64 size checks to not apply to x32.Harald van Dijk-1/+1
Rust contains various size checks conditional on target_arch = "x86_64", but these checks were never intended to apply to x86_64-unknown-linux-gnux32. Add target_pointer_width = "64" to the conditions.
2021-01-14Use Option::map_or instead of `.map(..).unwrap_or(..)`LingMan-1/+1
2020-11-16compiler: fold by valueBastian Kauschke-2/+2
2020-11-13Rollup merge of #78463 - varkor:placeholder-const, r=nikomatsakisGuillaume Gomez-1/+1
Add type to `ConstKind::Placeholder` I simply threaded `<'tcx>` through everything that required it. I'm not sure whether this is the correct thing to do, but it seems to work. r? `@nikomatsakis`
2020-11-12Add type to `ConstKind::Placeholder`varkor-1/+1
2020-11-09comment attribution fixo752d-1/+1
comment means to refer to the macro in its direct scope
2020-11-04Make `ScalarInt` entirely independent of MIR interpretationoli-4/+3
2020-11-04Document an `unwrap`oli-1/+4
2020-11-04`u128` truncation and sign extension are not just interpreter relatedoli-6/+6
2020-11-04Update compiler/rustc_middle/src/ty/consts/int.rsOli Scherer-1/+1
Co-authored-by: Ralf Jung <post@ralfj.de>
2020-11-04Simplify `assert_bits` imploli-4/+3
2020-11-04Do not raise interp errors from the scalar int moduleoli-18/+15
2020-11-04Add `is_null` helperoli-0/+5
This is cheaper than creating a null-`ScalarInt` and comparing and then just throwing it away.
2020-11-04Explain why we forward to self-printing during self-printingoli-1/+2
2020-11-04catch conversion errors during `ptr_sized_op`oli-1/+1
2020-11-04No need for a `zst` constructor method when we can have a constantoli-5/+0
2020-11-04Update commentoli-3/+2
2020-11-04Unaligned reads are UB in Rust irrelevant on which platform we areoli-4/+4
2020-11-04Remove outdated FIXMEoli-1/+0
2020-11-04Fix cranelift buildoli-0/+14
2020-11-04Explain the use of blocks around `self.data` accessesoli-0/+14
2020-11-04Use packed struct instead of manually packing into an arrayoli-33/+34
2020-11-04Encode `ScalarInt::bytes` as `u128` instead of `[u8; 16]` to see if that ↵Oliver Scherer-1/+15
caused the performance regression
2020-11-04Split the "raw integer bytes" part out of `Scalar`Oliver Scherer-12/+227
2020-08-30mv compiler to compiler/mark-0/+250