summary refs log tree commit diff
path: root/src/librustc_mir/monomorphize
AgeCommit message (Collapse)AuthorLines
2019-02-24Rollup merge of #58511 - oli-obk:const_to_op, r=RalfJungMazdak Farrokhzad-1/+1
Const to op simplification r? @RalfJung alternative to https://github.com/rust-lang/rust/pull/58486
2019-02-16Reuse the `Pointer` type instead of passing reassembling it at many use sitesOliver Scherer-1/+1
2019-02-15Take Const into account in HIRvarkor-1/+4
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
2019-02-12Auto merge of #58341 - alexreg:cosmetic-2-doc-comments, r=steveklabnikbors-2/+2
Cosmetic improvements to doc comments This has been factored out from https://github.com/rust-lang/rust/pull/58036 to only include changes to documentation comments (throughout the rustc codebase). r? @steveklabnik Once you're happy with this, maybe we could get it through with r=1, so it doesn't constantly get invalidated? (I'm not sure this will be an issue, but just in case...) Anyway, thanks for your advice so far!
2019-02-11Auto merge of #58152 - ljedrz:HirIdify_mir, r=Zoxcbors-4/+4
Partially HirIdify mir Another step towards https://github.com/rust-lang/rust/pull/57578.
2019-02-10rustc: doc commentsAlexander Regueiro-2/+2
2019-02-08librustc_mir => 2018Taiki Endo-14/+14
2019-02-05mir: partially HirIdifyljedrz-4/+4
2019-01-27`ConstValue::ScalarPair` only needs to represent slicesOliver Scherer-6/+1
2019-01-23Don't ICE when logging unusual typesAaron Hill-25/+39
MonoItemExt#to_string is used for both debug logging and LLVM symbol name generation. When debugging, we want to print out any type we encounter, even if it's something weird like GeneratorWitness. However, during codegen, we still want to error if we encounter an unexpected type when generating a name. To resolve this issue, this commit introduces a new 'debug' parameter to the relevant methods. When set to 'true', it allows any type to be printed - when set to 'false', it 'bug!'s when encountering an unexpected type. This prevents an ICE when enabling debug logging (via RUST_LOG) while running rustc on generator-related code.
2019-01-15Querify entry_fnIgor Matuszewski-18/+10
2019-01-05Auto merge of #56837 - arielb1:nonprincipal-trait-objects, r=nikomatsakisbors-17/+23
Add support for trait-objects without a principal The hard-error version of #56481 - should be merged after we do something about the `traitobject` crate. Fixes #33140. Fixes #57057. r? @nikomatsakis
2019-01-04add support for principal-less trait object typesAriel Ben-Yehuda-17/+23
should be a pure refactoring.
2019-01-01`<&'tcx ty::Const as Deref>::deref`Oliver Scherer-2/+2
2019-01-01Add `unwrap_usize` to `LazyConst`, tooOliver Scherer-1/+1
2019-01-01Move the `Unevaluated` constant arm upwards in the type structureOliver Scherer-36/+41
2018-12-25Remove licensesMark Rousskov-40/+0
2018-12-22Fix a commentbjorn3-1/+1
2018-12-13Auto merge of #56461 - oli-obk:alloc_ids, r=RalfJungbors-6/+6
Some cleanups around `AllocId` management r? @eddyb cc @RalfJung
2018-12-07Various minor/cosmetic improvements to codeAlexander Regueiro-2/+2
2018-12-06Use a function to access the Hir map to be able to turn it into a query laterJohn Kåre Alsaker-22/+22
2018-12-04s/alloc_type/alloc_kind/Oliver Scherer-2/+2
2018-12-04sort_by_cached_key -> sort_byShotaro Yamada-2/+2
2018-12-03s/AllocType/AllocKind/Oliver Scherer-4/+4
2018-11-27Use sort_by_cached_key when key the function is not trivial/freeljedrz-1/+1
2018-11-25Rollup merge of #56024 - oli-obk:const_fn_collect_inner, r=michaelwoeristerPietro Albini-26/+21
Don't auto-inline const functions fixes #53451
2018-11-24Introduce `TyKind::Placeholder` variantscalexm-0/+1
2018-11-22Rollup merge of #56106 - bjorn3:patch-1, r=alexcrichtonGuillaume Gomez-6/+0
Remove some incorrect doc comments
2018-11-21rustc: remove {FxHash,Node,DefId,HirId,ItemLocal}{Map,Set} "constructor" fns.Eduard-Mihai Burtescu-1/+1
2018-11-20Remove incorrect doc comment in rustc_mir::monomorphize::itembjorn3-6/+0
2018-11-17Refactor local monomorphization logic to be easier to comprehendOliver Scherer-22/+21
2018-11-17We're looking at the miri memory for constants instead of their ↵Oliver Scherer-4/+0
initializers' MIR
2018-11-06Rollup merge of #55601 - petrochenkov:featissue, r=pnkfelixkennytm-1/+1
Fix tracking issue numbers for some unstable features And also remove deprecated unstable `#[panic_implementation]` attribute that was superseded by stable `#[panic_handler]` and doesn't have an open tracking issue.
2018-11-04Auto merge of #55349 - bjorn3:rustc_mir_collect_and_partition_mono_items, ↵bors-7/+156
r=oli-obk Move collect_and_partition_mono_items to rustc_mir Most of the logic of it is inside rustc_mir anyway. Also removes the single function crate rustc_metadata_utils. Based on #55225
2018-11-03Update src/librustc_mir/monomorphize/partitioning.rsOliver S̶c̶h̶n̶e̶i̶d̶e̶r Scherer-1/+1
Co-Authored-By: bjorn3 <bjorn3@users.noreply.github.com>
2018-11-03Move collect_and_partition_mono_items to rustc_mirbjorn3-7/+156
2018-11-03Rename `Binder::no_late_bound_regions` to `Binder::no_bound_vars`scalexm-1/+1
2018-11-03Shift both late bound regions and bound typesscalexm-3/+3
2018-11-03Move `BoundTy` to `ty::TyKind`scalexm-0/+1
2018-11-02Remove deprecated unstable `#[panic_implementation]`Vadim Petrochenkov-1/+1
It was superseded by `#[panic_handler]`
2018-10-27Auto merge of #54183 - qnighy:by-value-object-safety, r=oli-obkbors-1/+6
Implement by-value object safety This PR implements **by-value object safety**, which is part of unsized rvalues #48055. That means, with `#![feature(unsized_locals)]`, you can call a method `fn foo(self, ...)` on trait objects. One aim of this is to enable `Box<FnOnce>` in the near future. The difficulty here is this: when constructing a vtable for a trait `Foo`, we can't just put the function `<T as Foo>::foo` into the table. If `T` is no larger than `usize`, `self` is usually passed directly. However, as the caller of the vtable doesn't know the concrete `Self` type, we want a variant of `<T as Foo>::foo` where `self` is always passed by reference. Therefore, when the compiler encounters such a method to be generated as a vtable entry, it produces a newly introduced instance called `InstanceDef::VtableShim(def_id)` (that wraps the original instance). the shim just derefs the receiver and calls the original method. We give different symbol names for the shims by appending `::{{vtable-shim}}` to the symbol path (and also adding vtable-shimness as an ingredient to the symbol hash). r? @eddyb
2018-10-25Report const eval error inside the queryOliver Schneider-18/+23
2018-10-24Resolve to Instance::VtableShim when necessary.Masaki Hara-1/+1
2018-10-24Add InstanceDef::VtableShim.Masaki Hara-0/+5
2018-10-19Prefer `Default::default` over `FxHash*::default` in struct constructorsOliver Scherer-1/+1
2018-10-19Deprecate the `FxHashMap()` and `FxHashSet()` constructor function hackOliver Scherer-9/+9
2018-10-13Check the invariant for `principal` inside the methodOliver Scherer-22/+21
2018-10-10miri engine: basic support for pointer provenance trackingRalf Jung-2/+2
2018-10-03Introduce `TyKind::UnnormalizedProjection`scalexm-0/+1
2018-09-30do not normalize non-scalar constants to a ConstValue::ScalarPairRalf Jung-3/+3