about summary refs log tree commit diff
path: root/src/librustc_mir/interpret/intern.rs
AgeCommit message (Collapse)AuthorLines
2020-08-30mv compiler to compiler/mark-455/+0
2020-08-18Address review commentsOliver Scherer-1/+1
2020-08-18Validate the MIR of all optimizations in the mir-opt directoryOliver Scherer-1/+24
2020-08-17rust_ast::ast => rustc_astUjjwal Sharma-1/+1
2020-08-14answer an old question re: intern kindsRalf Jung-1/+2
2020-06-21Make is_freeze and is_copy_modulo_regions take TyCtxtAtRalf Jung-1/+1
2020-06-19Rollup merge of #73130 - wesleywiser:remove_const_prop_for_indirects, r=oli-obkRalf Jung-6/+6
Remove const prop for indirects This was only used by one mir-opt test and since it causes buggy behavior under `-Zmir-opt-level=2`, it seems like we should remove it. This was split out from #71946. Closes #72679 Closes #72372 Closes #72285
2020-06-14keep root_span and tcx togetherRalf Jung-10/+9
2020-06-12make miri InterpCx TyCtxtAt a TyCtxt, and separately remember the root span ↵Ralf Jung-9/+9
of the evaluation
2020-06-07Don't intern memory in const prop.Oliver Scherer-6/+6
This isn't sound without validation. We don't want to report errors in case of failure to intern and validate, we just don't want to const prop. Interning and const prop is not built for this, let's not do it until we have a clearer picture on aggregate propagation.
2020-05-10TypoRalf Jung-1/+1
Co-Authored-By: Oliver Scherer <github35764891676564198441@oli-obk.de>
2020-05-10fmtRalf Jung-27/+16
2020-05-10avoid raising interpreter errors from interningRalf Jung-15/+24
2020-05-10remove some dead code, and assert we do not swallow allocating errorsRalf Jung-18/+19
2020-05-10Miri interning: replace ICEs by proper errors, make intern_shallow type ↵Ralf Jung-119/+144
signature more precise
2020-05-08Simplify the `tcx.alloc_map` APIOliver Scherer-4/+4
2020-04-19Auto merge of #70598 - vakaras:add-threads-cr3, r=oli-obk,RalfJungbors-2/+5
Make the necessary changes to support concurrency in Miri. This pull request makes the necessary changes to the Rust compiler to allow Miri to support concurrency: 1. Move stack from the interpretation context (`InterpCx`) to machine, so that the machine can switch the stacks when it changes the thread being executed. 2. Add the callbacks that allow the machine to generate fresh allocation ids for each thread local allocation and to translate them back to original allocations when needed. This allows the machine to ensure the property that allocation ids are unique, which allows using a simpler representation of the memory. r? @oli-obk cc @RalfJung
2020-04-19Dogfood more or_patterns in the compilerJosh Stone-8/+9
2020-04-16mir/interpret: only use `ErrorHandled::Reported` for `ErrorReported`.Eduard-Mihai Burtescu-1/+4
2020-04-15Make the necessary changes to support concurrency in Miri.Vytautas Astrauskas-2/+5
2020-03-30rustc -> rustc_middle part 3 (rustfmt)Mazdak Farrokhzad-2/+2
2020-03-30rustc -> rustc_middle part 2Mazdak Farrokhzad-2/+2
2020-03-24move ModifiedStatic error to ConstEval errors, and generally adjust ↵Ralf Jung-2/+2
terminology from "static" to "global" where appropriate
2020-03-11miri: categorize errors into "unsupported" and "UB"Ralf Jung-2/+2
Also slightly refactor pointer bounds checks to avoid creating unnecessary temporary Errors
2020-03-02Auto merge of #69257 - RalfJung:layout-visitor, r=eddybbors-2/+5
Adjust Miri value visitor, and doc-comment layout components I realized that I still didn't have quite the right intuition for how our `LayoutDetails` work, so I had to adjust the Miri value visitor to the things I understood better now. I also added some doc-comments to `LayoutDetails` as a hopefully canonical place to note such things. The main visitor change is that we *first* look at all the fields (according to `FieldPlacement`), and *then* check the variants and handle `Multiple` appropriately. I did not quite realize how orthogonal "fields" and "variants" are. I also moved the check for the scalar ABI to *after* checking all the fields; this leads to better (more type-driven) error messages. And it looks like we can finally remove that magic hack for `ty::Generator`. :D r? @oli-obk for the Miri/visitor changes and @eddyb for the layout docs The Miri PR is at: https://github.com/rust-lang/miri/pull/1178
2020-02-29Rename `syntax` to `rustc_ast` in source codeVadim Petrochenkov-1/+1
2020-02-18miri value visitor: fix some wrong assumptions about layout; improve error ↵Ralf Jung-2/+5
messages
2020-02-11Invert control in struct_lint_level.jumbatm-4/+7
Caller now passes in a `decorate` function, which is only run if the lint is allowed.
2020-01-15Address review commentsOliver Scherer-23/+3
2020-01-15TypoOliver Scherer-1/+1
2020-01-15Undo a change not neceesary for this bugfixOliver Scherer-10/+4
2020-01-15Update src/librustc_mir/interpret/intern.rsOliver Scherer-1/+2
Co-Authored-By: Ralf Jung <post@ralfj.de>
2020-01-15Clean up commentOliver Scherer-4/+4
2020-01-15Elaborate on the details in some commentsOliver Scherer-9/+20
2020-01-15Elaborate on commentsOliver Scherer-0/+14
2020-01-15Promoteds can contain raw pointers, but these must still only point to ↵Oliver Scherer-11/+35
immutable allocations
2020-01-10Promote `Ref`s to constants instead of staticSantiago Pastorino-8/+17
2020-01-09Rename `Unsized` to `Meta`Oliver Scherer-2/+2
2020-01-07Poison any `MemPlace` created from a zst Operand (or otherwise via ↵Oliver Scherer-2/+3
`MPlaceTy::dangling`) so you can't get the address back out.
2020-01-05Remove rustc_hir reexports in rustc::hir.Mazdak Farrokhzad-1/+1
2020-01-01Rename `syntax_pos` to `rustc_span` in source codeVadim Petrochenkov-1/+1
2019-12-26TypoOliver Scherer-1/+1
2019-12-26Comments should start capitalized and end in a periodOliver Scherer-4/+4
2019-12-26Interning even happens when validation of a constant failsOliver Scherer-6/+12
2019-12-26Retire `to_ptr` which should already have no users but still kept getting ↵Oliver Scherer-6/+9
new ones
2019-12-23TidyOliver Scherer-1/+2
2019-12-23Update src/librustc_mir/interpret/intern.rsOliver Scherer-1/+1
Co-Authored-By: Ralf Jung <post@ralfj.de>
2019-12-23Dynamically prevent constants from accessing staticsOliver Scherer-1/+0
2019-12-23Panic on mutable allocs in constantsOliver Scherer-6/+15
2019-12-22Format the worldMark Rousskov-55/+37