about summary refs log tree commit diff
path: root/src/librustc_mir/interpret
AgeCommit message (Collapse)AuthorLines
2019-06-01rustc: use indexmap instead of a plain vector for upvars.Eduard-Mihai Burtescu-2/+1
2019-06-01Auto merge of #61350 - RalfJung:alloc, r=oli-obkbors-17/+17
light refactoring of global AllocMap * rename AllocKind -> GlobalAlloc. This stores the allocation itself, not just its kind. * rename the methods that allocate stuff to have consistent names. Cc @oli-obk
2019-06-01Rollup merge of #61391 - wesleywiser:doc_comments_interpretcx, r=CentrilMazdak Farrokhzad-8/+8
Doc comment fixes for `rustc::mir::interpret::InterpretCx` Fixes some stuff I noticed while working in const-prop.
2019-05-31miri unsizing: fix projecting into a field of an operandRalf Jung-15/+3
2019-05-31Doc comment fixes for `rustc::mir::interpret::InterpretCx`Wesley Wiser-8/+8
2019-05-30light refactoring of global AllocMapRalf Jung-17/+17
* rename AllocKind -> GlobalAlloc. This stores the allocation itself, not just its kind. * rename the methods that allocate stuff to have consistent names.
2019-05-30Make the `type_name` intrinsic's output deterministicOliver Scherer-0/+233
2019-05-29Rollup merge of #60928 - TheSirC:fix/60229, r=eddybMazdak Farrokhzad-5/+5
Changes the type `mir::Mir` into `mir::Body` Fixes part 1 of #60229 (previously attempted in #60242). I stumbled upon the issue and it seems that the previous attempt at solving it was not merged. This is a second try more up-to-date. The commit should have changed comments as well. At the time of writting, it passes the tidy and check tool.
2019-05-28Changes the type `mir::Mir` into `mir::Body`Claude-Alban RANÉLY-VERGÉ-DÉPRÉ-5/+5
The commit should have changed comments as well. At the time of writting, it passes the tidy and check tool. Revisions asked by eddyb : - Renamed of all the occurences of {visit/super}_mir - Renamed test structures `CachedMir` to `Cached` Fixing the missing import on `AggregateKind`
2019-05-28Rollup merge of #61164 - RalfJung:scalar, r=oli-obkMazdak Farrokhzad-57/+26
rename Scalar::Bits to Scalar::Raw and bits field to data Also use this opportunity to seal some abstraction leaks (other modules constructing `Scalar::Bits` directly instead of using a constructor). r? @oli-obk
2019-05-28Auto merge of #60955 - agnxy:rename-assoc, r=oli-obk,Centrilbors-1/+1
Rename "Associated*" to "Assoc*" This change is for #60163. r? @oli-obk
2019-05-27Auto merge of #59627 - ↵bors-9/+12
LooMaclin:issue_57128_improve_miri_error_reporting_in_check_in_alloc, r=RalfJung Improve miri error reporting in check_in_alloc Fixes https://github.com/rust-lang/rust/issues/57128 r? @RalfJung @oli-obk
2019-05-27Pre-intern "0", "1", ..., "9", and use where appropriate.Nicholas Nethercote-2/+2
2019-05-26centralize Scalar size sanity checks and also do them in release buildsRalf Jung-50/+20
2019-05-26Rollup merge of #61120 - spastorino:eval-place-iterate, r=oli-obkMazdak Farrokhzad-29/+29
Make eval_place iterate instead of recurse r? @oli-obk
2019-05-26Rename "Associated*" to "Assoc*"Andrew Xu-1/+1
We are going to uniform the terminology of all associated items. Methods that may or may not have `self` are called "associated functions". Because `AssociatedFn` is a bit long, we rename `Associated` to `Assoc`.
2019-05-26rename Scalar::Bits to Scalar::Raw and bits field to dataRalf Jung-17/+16
2019-05-25Make eval_place iterate instead of recurseSantiago Pastorino-29/+29
2019-05-25Add comment to explain why we change the layout for ProjectionSantiago Pastorino-0/+2
2019-05-25Auto merge of #59276 - oli-obk:cleanups, r=eddybbors-6/+11
Cleanup (pretty) printing of `ty::Const` r? @eddyb addresses https://github.com/rust-lang/rust/pull/59178/files/5cd28066214a4a255bac6655c20bf05cb95730fd#r266243236 and https://github.com/rust-lang/rust/pull/59178/files/5cd28066214a4a255bac6655c20bf05cb95730fd#r266243336
2019-05-25Make `ConstValue::Slice` solely take `[u8]` and `str`Oliver Scherer-4/+9
2019-05-25Don't use `ty::Const` without immediately interningOliver Scherer-2/+2
2019-05-24Make eval_place_to_op iterate instead of recurseSantiago Pastorino-13/+24
2019-05-24Make eval_place_to_mplace take PlaceBase::StaticSantiago Pastorino-19/+21
2019-05-24Avoid catch-all arm, use Base(PlaceBase::Static(_))Santiago Pastorino-2/+1
2019-05-18expand comment in StorageLiveRalf Jung-1/+3
2019-05-13Pass a `Symbol` to `check_name`, `emit_feature_err`, and related functions.Nicholas Nethercote-3/+3
2019-05-06Auto merge of #60569 - RalfJung:miri-visitor-generators, r=Centrilbors-3/+3
fix typo in enum variant name
2019-05-05Auto merge of #60567 - Manishearth:rollup-rjagqnw, r=Manishearthbors-1/+1
Rollup of 5 pull requests Successful merges: - #60131 (Fix broken link in rustc_plugin doc) - #60426 (Stop `-O`/`-C opt-level` and `-g`/`-C debuginfo` conflicting) - #60515 (use span instead of div for since version) - #60530 (rustc: rename all occurences of "freevar" to "upvar".) - #60536 (Correct code points to match their textual description) Failed merges: r? @ghost
2019-05-05fix typo in enum variant nameRalf Jung-3/+3
2019-05-05Rollup merge of #60530 - eddyb:unfreevars, r=oli-obkManish Goregaokar-1/+1
rustc: rename all occurences of "freevar" to "upvar". Most of the more recent code talks about "(closure) upvars", so I believe that's the name we want to use. There's also the possibility of using "capture" which is more user-facing, but I'd rather not change *both* "freevar" and "upvar" to something else in this one PR. cc @nikomatsakis @petrochenkov
2019-05-05Auto merge of #60237 - saleemjaffer:issue-56166-miri-fntype-arg-passing, r=eddybbors-0/+8
Move pointee_info_at from rustc_codegen_llvm to rustc_target. Makes progress towards #56166. This is a continuation of https://github.com/rust-lang/rust/pull/57150. @oli-obk Should I close the older PR?
2019-05-05rustc: rename all occurences of "freevar" to "upvar".Eduard-Mihai Burtescu-1/+1
2019-05-04match on type directltyRalf Jung-4/+5
2019-05-04fix Miri visiting generatorsRalf Jung-42/+28
2019-05-04adding HasParamEnv traitSaleem Jaffer-0/+8
2019-05-04Auto merge of #59897 - tmandry:variantful-generators, r=eddybbors-18/+18
Multi-variant layouts for generators This allows generators to overlap fields using variants, but doesn't do any such overlapping yet. It creates one variant for every state of the generator (unresumed, returned, panicked, plus one for every yield), and puts every stored local in each of the yield-point variants. Required for optimizing generator layouts (#52924). There was quite a lot of refactoring needed for this change. I've done my best in later commits to eliminate assumptions in the code that only certain kinds of types are multi-variant, and to centralize knowledge of the inner mechanics of generators in as few places as possible. This change also emits debuginfo about the fields contained in each variant, as well as preserving debuginfo about stored locals while running in the generator. Also, fixes #59972. Future work: - Use this change for an optimization pass that actually overlaps locals within the generator struct (#52924) - In the type layout fields, don't include locals that are uninitialized for a particular variant, so miri and UB sanitizers can check our memory (see https://github.com/rust-lang/rust/issues/59972#issuecomment-483058172) - Preserve debuginfo scopes across generator yield points
2019-05-03rustc: use DefKind instead of Def, where possible.Eduard-Mihai Burtescu-5/+5
2019-05-03rustc: factor most DefId-containing variants out of Def and into DefKind.Eduard-Mihai Burtescu-2/+4
2019-05-01Fix issue with const params in operand.rsvarkor-1/+2
2019-05-01Add `ConstValue::Placeholder`varkor-1/+1
2019-04-28Fix lint findings in librustc_mirflip1995-2/+2
2019-04-25Generalize discriminant info calls for generators and ADTsTyler Mandry-18/+18
2019-04-24Remove incorrect debug assertion in interpretMatthew Jasper-2/+1
Cast type may be a subtype of the destination type. There is a later assertion that they have the same layout.
2019-04-23rustc_mir: don't use upvar_decls in the miri validity checks.Eduard-Mihai Burtescu-6/+22
2019-04-21Change return type of `TyCtxt::is_static` to boolVadim Petrochenkov-2/+2
Add `TyCtxt::is_mutable_static`
2019-04-20Auto merge of #59987 - saleemjaffer:refactor_adjust_castkinds, r=oli-obkbors-5/+6
Refactor Adjust and CastKind fixes rust-lang#59588
2019-04-19Improve miri's error reporting in check_in_allocLooMaclin-3/+3
2019-04-17Rollup merge of #59986 - RalfJung:miri-new-alloc, r=oli-obkMazdak Farrokhzad-83/+43
Miri: refactor new allocation tagging Tagging and initializing `AllocExtra` now go hand-in-hand so one cannot forget to do one when doing the other. In particular, `memory.allocate` is now much easier to use correctly (because it will already return a tagged pointer). r? @oli-obk
2019-04-16Miri: refactor new allocation taggingRalf Jung-83/+43