about summary refs log tree commit diff
path: root/compiler/rustc_middle/src/mir/interpret
AgeCommit message (Collapse)AuthorLines
2021-05-06use CheckInAllocMsg::PointerArithmeticTest for ptr_offset errorRalf Jung-0/+3
2021-05-04Remove `rustc_middle::mir::interpret::CheckInAllocMsg::NullPointerTest`hyd-dev-5/+0
2021-05-02Change 'NULL' to 'null'Brent Kerby-2/+2
2021-04-19fix few typosklensy-1/+1
2021-04-08Fix outdated crate names in compiler docspierwill-1/+1
Changes `librustc_X` to `rustc_X`, only in documentation comments. Plain code comments are left unchanged. Also fix incorrect file paths.
2021-03-27Remove (lots of) dead codeJoshua Nelson-10/+0
Found with https://github.com/est31/warnalyzer. Dubious changes: - Is anyone else using rustc_apfloat? I feel weird completely deleting x87 support. - Maybe some of the dead code in rustc_data_structures, in case someone wants to use it in the future? - Don't change rustc_serialize I plan to scrap most of the json module in the near future (see https://github.com/rust-lang/compiler-team/issues/418) and fixing the tests needed more work than I expected. TODO: check if any of the comments on the deleted code should be kept.
2021-03-20update `const_eval_resolve`lcnr-6/+4
2021-03-18Remove unwrap_none/expect_none from compiler/.Mara Bos-1/+1
2021-03-15Do not expose fallible `to_int` operation on `Scalar`.Oli Scherer-17/+15
Any use of it has been shown to be a bug in the past.
2021-03-15s/ConstantSource/ConstantKind/Oli Scherer-8/+0
2021-03-12Replace a custom lift method with a Lift implOli Scherer-3/+6
2021-03-12Prepare mir::Constant for ty::Const only supporting valtreesOli Scherer-0/+18
2021-03-12Add convenience conversion methods for ScalarIntOli Scherer-8/+23
2021-03-12Add fallible Scalar to ScalarInt conversion methodOli Scherer-13/+15
2021-03-12Implement valtreeOli Scherer-1/+1
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-5/+5
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-02-25Auto merge of #82338 - RalfJung:interp-error-allocs, r=oli-obkbors-15/+10
all InterpError allocate now, so adjust alloc-error-check Cc https://github.com/rust-lang/rust/pull/82116#discussion_r578310770 r? `@oli-obk`
2021-02-21remove redundant return value Ok(()) of clear_relocations()Matthias Krüger-10/+3
2021-02-20all InterpError allocate now, so adjust alloc-error-checkRalf Jung-15/+10
2021-02-17Reduce size of InterpErrorInfo to 8 bytesTomasz Miąsko-6/+22
2021-02-14param_env debugs are instrumental to rustc's successEllen-1/+1
2021-02-13debug!("paramenv={}paramenv={}paramenv={}paramenv={}")Ellen-0/+1
2021-02-02Fix out of date `Scalar` documentationJake Hughes-1/+1
Scalars can represent integers up to u128, but the docs state otherwise.
2021-01-30Rollup merge of #80959 - jhpratt:unsigned_abs-stabilization, r=m-ou-seYuki Okushi-11/+2
Stabilize `unsigned_abs` Resolves #74913. This PR stabilizes the `i*::unsigned_abs()` method, which returns the absolute value of an integer _as its unsigned equivalent_. This has the advantage that it does not overflow on `i*::MIN`. I have gone ahead and used this in a couple locations throughout the repository.
2021-01-26Auto merge of #80692 - Aaron1011:feature/query-result-debug, r=estebankbors-1/+1
Enforce that query results implement Debug Currently, we require that query keys implement `Debug`, but we do not do the same for query values. This can make incremental compilation bugs difficult to debug - there isn't a good place to print out the result loaded from disk. This PR adds `Debug` bounds to several query-related functions, allowing us to debug-print the query value when an 'unstable fingerprint' error occurs. This required adding `#[derive(Debug)]` to a fairly large number of types - hopefully, this doesn't have much of an impact on compiler bootstrapping times.
2021-01-21mir: Improve size_of handling when arg is unsizedÖmer Sinan Ağacan-0/+3
2021-01-16Enforce that query results implement DebugAaron Hill-1/+1
2021-01-13Use unsigned_abs throughout repositoryJacob Pratt-11/+2
2020-12-09Extra assertions in eval_body_using_ecx to disallow queries forTunahan Karlibas-1/+0
functions that does allocations
2020-11-16wordslcnr-1/+1
2020-11-16compiler: fold by valueBastian Kauschke-1/+1
2020-11-05Rollup merge of #78742 - vn-ki:fix-issue-78655, r=oli-obkMara Bos-3/+9
make intern_const_alloc_recursive return error fix #78655 r? ``@oli-obk``
2020-11-04make intern_const_alloc_recursive return error fix #78655Vishnunarayan K I-3/+9
2020-11-04`u128` truncation and sign extension are not just interpreter relatedoli-37/+4
2020-11-04Move ZST constant to the top of the impl blockoli-2/+2
2020-11-04Do not raise interp errors from the scalar int moduleoli-2/+8
2020-11-04Add helper for getting an `int` out of a `Scalar`oli-0/+8
2020-11-04Replace `Scalar::zst` with a `Scalar::ZST` constantoli-4/+1
2020-11-04No need for a `zst` constructor method when we can have a constantoli-1/+1
2020-11-04s/Scalar::Raw/Scalar::Intoli-22/+22
2020-11-04Split the "raw integer bytes" part out of `Scalar`Oliver Scherer-87/+22
2020-10-14Remove unused code from rustc_middleest31-9/+0
2020-10-13Replace absolute paths with relative onesest31-3/+3
Modern compilers allow reaching external crates like std or core via relative paths in modules outside of lib.rs and main.rs.
2020-10-06Rollup merge of #76995 - LingMan:middle_matches, r=varkorYuki Okushi-12/+6
Reduce boilerplate with the matches! macro Replaces simple bool `match`es of the form match $expr { $pattern => true _ => false } and their inverse with invocations of the matches! macro. Limited to rustc_middle for now to get my feet wet.
2020-09-24Auto merge of #77006 - oli-obk:🐌_const_queries, r=Mark-Simulacrumbors-1/+1
Cache `eval_to_allocation_raw` on disk https://github.com/rust-lang/rust/pull/74949#issuecomment-695833161 regressed the performance on these queries, this PR gets the perf back.
2020-09-23Rollup merge of #76939 - lcnr:const-evaluatable-cont, r=oli-obkDylan DPC-0/+6
emit errors during AbstractConst building There changes are currently still untested, so I don't expect this to pass CI :laughing: It seems to me like this is the direction we want to go in, though we didn't have too much of a discussion about this. r? @oli-obk
2020-09-21reviewBastian Kauschke-0/+6
2020-09-21Cache `eval_to_allocation_raw` on diskOliver Scherer-1/+1
2020-09-21Reduce boilerplate with the matches! macroLingMan-12/+6
Replaces simple bool `match`es of the form match $expr { $pattern => true _ => false } and their inverse with invocations of the matches! macro.
2020-09-20Rollup merge of #76891 - lcnr:less-ref, r=ecstatic-morseRalf Jung-9/+9
don't take `TyCtxt` by reference small cleanup