summary refs log tree commit diff
path: root/src/librustc_mir/monomorphize
AgeCommit message (Collapse)AuthorLines
2018-04-25Only warn on erroneous promoted constantsOliver Schneider-4/+2
2018-04-20Fix ICE with `main`'s return type containing lifetimesShotaro Yamada-4/+4
2018-04-17Stop referring to statics' AllocIds directlyOliver Schneider-1/+1
2018-03-15Properly handle collecting default impls of methods with lifetime parameters.Michael Woerister-2/+6
2018-03-15MonoItem collector: Cleanup start fn root collection.Michael Woerister-9/+11
2018-03-14remove defaulting to unitAndrew Cann-1/+1
Types will no longer default to `()`, instead always defaulting to `!`. This disables the associated warning and removes the flag from TyTuple
2018-03-13`trans_apply_param_substs` => `subst_and_normalize_erasing_regions`Niko Matsakis-13/+40
Consolidate `trans_apply_param_substs` and `trans_apply_param_substs_env`. Also remove `trans_impl_self_ty`
2018-03-13transition various normalization functions to the new methodsNiko Matsakis-2/+5
In particular: - `fully_normalize_monormophic_ty` => `normalize_erasing_regions` - `normalize_associated_type_in_env` => `normalize_erasing_regions` - `fully_normalize_associated_types_in` => `normalize_erasing_regions` - `erase_late_bound_regions_and_normalize` => `normalize_erasing_late_bound_regions`
2018-03-13refactor `ParamEnv::empty(Reveal)` into two distinct methodsNiko Matsakis-11/+10
- `ParamEnv::empty()` -- does not reveal all, good for typeck - `ParamEnv::reveal_all()` -- does, good for trans - `param_env.with_reveal_all()` -- converts an existing parameter environment
2018-03-08Regenerate testsOliver Schneider-2/+1
2018-03-08Report errors in statics during collecting instead of translatingOliver Schneider-59/+98
2018-03-08Hide the RefCell inside InterpretInternerOliver Schneider-2/+2
It was too easy to get this wrong
2018-03-08Don't borrow the interpret_interner for anything but a direct function callOliver Schneider-3/+2
2018-03-08Fully use miri in transOliver Schneider-8/+43
2018-03-08Produce instead of pointersOliver Schneider-1/+1
2018-03-07Merge branch 'incr_attr_queries' of https://github.com/wesleywiser/rust into ↵Alex Crichton-50/+7
update-cargo
2018-03-07Rollup merge of #48651 - PramodBisht:issues/48425, r=oli-obkAlex Crichton-1/+1
Fixed #48425 : Various functions taking a `TyCtxt` and a `Span` should be taking a `TyCtxtAt` Hi @oli-obk I have done some code refactoring to fix #48425, Please let me know if anything else is required on this.
2018-03-06Add linkage to TransFnAttrsWesley Wiser-43/+3
Part of #47320
2018-03-06Add flag for rustc_std_internal_symbol attributeWesley Wiser-5/+3
Part of #47320
2018-03-06Add `inline` to `TransFnAttrs`Wesley Wiser-2/+1
Part of #47320
2018-03-06Rename exported_symbol_ids query to something more explicit and document ↵Michael Woerister-5/+5
what it is doing.
2018-03-04Fixed #48425Pramod Bisht-1/+1
2018-02-25Ensure main() always has external linkagevarkor-1/+4
This ensures that the entry function is never elided due to inlining, even with `inline(always)`. Fixes #47783. There were a couple of possible ways of addressing this issue; I simply picked the one that seemed most direct. A warning could be appropriate, but considering using inlining hints in other places it doesn't apply also throws no warnings, and it seems like an edge case anyway, I haven't added one for now.
2018-02-24Rollup merge of #48452 - varkor:unpacked-kind, r=eddybManish Goregaokar-2/+2
Introduce UnpackedKind This adds an `UnpackedKind` type as a typesafe counterpart to `Kind`. This should make future changes to kinds (such as const generics!) more resilient, as the type-checker will be able to catch more potential issues. r? @eddyb cc @yodaldevoid
2018-02-23Introduce UnpackedKindvarkor-2/+2
This adds an `UnpackedKind` type as a typesafe counterpart to `Kind`. This should make future changes to kinds (such as const generics!) more resilient, as the type-checker should catch more potential issues.
2018-02-19Use DefId instead of NodeId in MonoItem::Static.Michael Woerister-19/+25
2018-02-17fix more typos found by codespell.Matthias Krüger-1/+1
2018-02-05mir: Add TerminatorKind::FalseUnwindbobtwinkles-1/+2
Sometimes a simple goto misses the cleanup/unwind edges. Specifically, in the case of infinite loops such as those introduced by a loop statement without any other out edges. Analogous to TerminatorKind::FalseEdges; this new terminator kind is used when we want borrowck to consider an unwind path, but real control flow should never actually take it.
2018-01-30rustc: Add an option to default hidden visibilityAlex Crichton-3/+15
This commit adds a new option to target specifictions to specify that symbols should be "hidden" visibility by default in LLVM. While there are no existing targets that take advantage of this the `wasm32-unknown-unknown` target will soon start to use this visibility. The LLD linker currently interprets `hidden` as "don't export this from the wasm module" which is what we want for 90% of our functions. While the LLD linker does have a "export this symbol" argument which is what we use for other linkers, it was also somewhat easier to do this change instead which'll involve less arguments flying around. Additionally there's no need for non-`hidden` visibility for most of our symbols! This change should not immediately impact the wasm targets as-is, but rather this is laying the foundations for soon integrating LLD as a linker for wasm code.
2018-01-25Rollup merge of #47415 - varkor:cgu-partition-heuristic, r=michaelwoeristerAlex Crichton-3/+7
Add CGU size heuristic for partitioning This addresses the concern of #47316 by estimating CGU size based on the size of its MIR. Looking at the size estimate differences for a small selection of crates, this heuristic produces different orderings, which should more accurately reflect optimisation time. (Fixes #47316.) r? @michaelwoerister
2018-01-23Adds support for immovable generators. Move checking of invalid borrows ↵John Kåre Alsaker-0/+1
across suspension points to borrowck. Fixes #44197, #45259 and #45093.
2018-01-19Allow runtime switching between trans backendsbjorn3-0/+61
2018-01-19Update comments about the partitioning inefficiencyvarkor-2/+0
2018-01-19Refactor CodegenUnit size estimatesvarkor-41/+9
2018-01-19Add CGU size heuristic for partitioningvarkor-4/+42
This addresses the concern of #47316 by estimating CGU size based on the size of its MIR. Looking at the size estimate differences for a small selection of crates, this heuristic produces different orderings, which should more accurately reflect optimisation time. Fixes #47316.
2018-01-13Remove `impl Foo for ..` in favor of `auto trait Foo`leonardo.yvens-1/+0
No longer parse it. Remove AutoTrait variant from AST and HIR. Remove backwards compatibility lint. Remove coherence checks, they make no sense for the new syntax. Remove from rustdoc.
2018-01-09Auto merge of #47269 - michaelwoerister:mangled-cgu-names, r=alexcrichtonbors-9/+24
Shorten names of some compiler generated artifacts. This PR makes the compiler mangle codegen unit names by default. The name of every codegen unit name will now be a random string of 16 characters. It also makes the file extensions of some intermediate compiler products shorter. Hopefully, these changes will reduce the pressure on tools with path length restrictions like buildbot. The change should also solve problems with case-insensitive file system. cc #47186 and #47222 r? @alexcrichton
2018-01-09Rollup merge of #47258 - rkruppe:struct-assert, r=eddybkennytm-2/+2
rustc::ty: Rename struct_variant to non_enum_variant r? @eddyb
2018-01-08Shorten names of some compiler generated artifacts.Michael Woerister-9/+24
2018-01-08Auto merge of #47200 - BurntPizza:query-snatp, r=nikomatsakisbors-4/+2
Make normalize_and_test_predicates into a query From #44891. I'm not real solid on how `dep_graph` stuff works, but if a node is going to have a key (again, not sure how important that is), then the key needs to be `Copy`. So since `normalize_and_test_predicates` only had one out-of-module use, I changed that call site to use a new function, `substitute_normalize_and_test_predicates` which is the query and enables having the arguments be `Copy`. Hopefully this makes sense. r? @nikomatsakis and/or @michaelwoerister
2018-01-08rustc::ty: Rename `struct_variant` to `non_enum_variant`Robin Kruppe-2/+2
It is also intended for use with unions.
2018-01-07Rollup merge of #47170 - eddyb:us-vs-usize, r=nikomatsakiskennytm-2/+2
rustc: use {U,I}size instead of {U,I}s shorthands. `Us`/`Is` come from a time when `us` and `is` were the literal suffixes that are now `usize` / `isize`. r? @nikomatsakis
2018-01-04Auto merge of #46916 - michaelwoerister:generate-dead-code-plz, r=alexcrichtonbors-2/+4
Generate code for unused const- and inline-fns if -Clink-dead-code is specified. Fixes https://github.com/rust-lang/rust/issues/46467. r? @alexcrichton
2018-01-04Generate code for const- and inline-fns if -Clink-dead-code is specified.Michael Woerister-2/+4
2018-01-04rustc: use {U,I}size instead of {U,I}s shorthands.Eduard-Mihai Burtescu-2/+2
2018-01-01Fix docs for future pulldown migrationMalo Jaffré-2/+2
2017-12-27Make normalize_and_test_predicates into a queryBurntPizza-4/+2
2017-12-26rustc: Switch `start_fn` to hidden visibilityAlex Crichton-4/+22
This'll avoid exporting a symbol from binaries unnecessarily and should help the linker clean things up if it can.
2017-12-26Adds whitespaceBastian Köcher-1/+1
2017-12-26Fixes compilation errors and adds proposed improvementsBastian Köcher-8/+4