Commit Graph

104 Commits

Author SHA1 Message Date
Eduard-Mihai Burtescu e0c75ff40d rustc: rename item_path to def_path (except the module in ty). 2019-03-15 13:25:10 +02:00
Eduard-Mihai Burtescu 3e1cef7007 rustc: pass Option<&Substs> and Namespace around in ty::item_path. 2019-03-15 13:25:10 +02:00
Eduard-Mihai Burtescu 08d27441ec rustc: move the formatter into ty::print::PrintCx. 2019-03-15 09:26:13 +02:00
Eduard-Mihai Burtescu 387cacf76b rustc: remove ty::item_path::RootMode by moving local logic into the printer. 2019-03-15 09:26:13 +02:00
Eduard-Mihai Burtescu 7d211e5b12 rustc: rewrite ty::item_path to be more functional than mutation-oriented. 2019-03-15 09:26:13 +02:00
Eduard-Mihai Burtescu 7505bb6bbb rustc_codegen_utils: revert some symbol_names refactors (while keeping the functional changes). 2019-03-15 09:26:13 +02:00
Eduard-Mihai Burtescu 228d6f45d8 rustc: remove unnecessary extern_prelude logic from ty::item_path. 2019-03-15 09:26:13 +02:00
John Kåre Alsaker 51938c61f6 Make the rustc driver and interface demand driven 2019-03-10 04:49:45 +01:00
ljedrz cd06038b54 HirIdification: replace NodeId method calls 2019-03-07 09:22:43 +01:00
varkor 2ce19ae3d1 Use non_erasable_generics for codegen
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
2019-03-05 22:07:37 +00:00
ljedrz e72584c3a1 hir: remove NodeId from TraitItem 2019-03-01 11:18:49 +01:00
csmoe ccfa5d6df8 replace &'tcx Substs with SubstsRef 2019-02-26 19:30:57 +08:00
Mazdak Farrokhzad d7a4dd1074 Rollup merge of #58259 - taiki-e:librustc_codegen_utils-2018, r=Centril
librustc_codegen_utils => 2018

Transitions `librustc_codegen_utils` to Rust 2018; cc #58099

r? @Centril
2019-02-09 00:15:59 +01:00
Taiki Endo 0e622a8ba1 librustc_codegen_utils => 2018 2019-02-08 21:06:07 +09:00
Guillaume Gomez 8b886e07f5 Remove images' url to make it work even without internet connection 2019-02-07 11:06:19 +01:00
Denys Zariaiev 8d53c9247c SymbolPathBuffer shallow refactoring 2019-01-28 01:16:59 +01:00
Denys Zariaiev d3903d5f9c Create nvptx64-nvidia-cuda target specification 2019-01-27 16:04:09 +01:00
Mark Simulacrum db97c48ad6 Remove quote_*! macros and associated APIs 2019-01-24 07:37:34 -07:00
Igor Matuszewski ff19a53ef0 Querify entry_fn 2019-01-15 11:10:51 +01:00
Mazdak Farrokhzad 2e1094429d Rollup merge of #57570 - Xanewok:querify-some, r=Zoxc
Querify local `plugin_registrar_fn` and `proc_macro_decls_static`

Instead of calculating them as part of the `Session`, we do that in the query system.
It's also nice that these queries are already defined for external crates - here, we provide the queries for the local crate.

r? @nikomatsakis
2019-01-14 20:31:56 +01:00
Igor Matuszewski 59d7d7d54b Querify local plugin_registrar_fn 2019-01-13 23:53:58 +01:00
Igor Matuszewski fb6040096c Querify local proc_macro_decls_static 2019-01-13 23:52:00 +01:00
lqd e5318f3f9b MetadataOnlyCodegenBackend: remove is_inline call
This function has no side effects, and its result is ignored.
2019-01-09 14:21:46 +01:00
lqd c075e245de Codegen: run the collector only once
Use the `collect_and_partition_mono_items ` query to avoid calling the collector
2019-01-07 19:48:45 +01:00
Mark Rousskov 2a663555dd Remove licenses 2018-12-25 21:08:33 -07:00
bors 059e6a6f57 Auto merge of #56578 - alexreg:cosmetic-1, r=alexreg
Various minor/cosmetic improvements to code

r? @Centril 😄
2018-12-08 03:50:16 +00:00
Alexander Regueiro ee89c088b0 Various minor/cosmetic improvements to code 2018-12-07 23:53:34 +00:00
bors 0a77980796 Auto merge of #56258 - euclio:fs-read-write, r=euclio
use top level `fs` functions where appropriate

This commit replaces many usages of `File::open` and reading or writing
with `fs::read_to_string`, `fs::read` and `fs::write`. This reduces code
complexity, and will improve performance for most reads, since the
functions allocate the buffer to be the size of the file.

I believe that this commit will not impact behavior in any way, so some
matches will check the error kind in case the file was not valid UTF-8.
Some of these cases may not actually care about the error.
2018-12-07 23:26:14 +00:00
bors 4a45578bc5 Auto merge of #56502 - Zoxc:hir-func, r=eddyb
Use a function to access the Hir map to be able to turn it into a query later

r? @eddyb
2018-12-07 20:04:06 +00:00
Andy Russell 2f6226518b use top level fs functions where appropriate
This commit replaces many usages of `File::open` and reading or writing
with `fs::read_to_string`, `fs::read` and `fs::write`. This reduces code
complexity, and will improve performance for most reads, since the
functions allocate the buffer to be the size of the file.

I believe that this commit will not impact behavior in any way, so some
matches will check the error kind in case the file was not valid UTF-8.
Some of these cases may not actually care about the error.
2018-12-07 12:54:11 -05:00
ljedrz adaeb10b5b codegen_utils, driver: fix clippy errors 2018-12-06 21:14:23 +01:00
John Kåre Alsaker a70babed03 Use a function to access the Hir map to be able to turn it into a query later 2018-12-06 17:24:36 +01:00
ljedrz d0c64bb296 cleanup: remove static lifetimes from consts 2018-12-04 12:46:10 +01:00
bors 21f2684950 Auto merge of #56198 - bjorn3:cg_ssa_refactor, r=eddyb
Refactor rustc_codegen_ssa

cc #56108 (not all things are done yet)

This removes an unsafe method from cg_ssa.

r? @eddyb
cc @sunfishcode
2018-12-02 18:02:20 +00:00
Eduard-Mihai Burtescu e305994beb proc_macro: introduce a "bridge" between clients (proc macros) and servers (compiler front-ends). 2018-11-30 06:15:19 +02:00
bjorn3 8698f5c43d Remove __build_diagnostic_array! from cg_utils 2018-11-29 18:19:41 +01:00
Eduard-Mihai Burtescu 9f49a2626e [eddyb] rustc_codegen_utils: remove extraneous #![allow(dead_code)]. 2018-11-16 15:08:18 +02:00
Denis Merigoux b9e5cf99a9 Separating the back folder between backend-agnostic and LLVM-specific code 2018-11-16 15:08:18 +02:00
Denis Merigoux c9f26c2155 Beginning of moving all backend-agnostic code to rustc_codegen_ssa 2018-11-16 14:55:42 +02:00
Denis Merigoux b02e5cce16 Moved Backend interface into rustc_codegen_utils 2018-11-16 14:40:16 +02:00
Eduard-Mihai Burtescu b06836e71a [eddyb/rebase cleanup] move type_{needs_drop,is_sized,is_freeze} to rustc_codegen_utils 2018-11-16 14:40:16 +02:00
Denis Merigoux 566fa4d003 Moved common.rs enums 2018-11-16 14:38:19 +02:00
Denis Merigoux 39fd4d9274 Starting to move backend-agnostic code into codegen_utils
IntPredicate moved
2018-11-16 14:38:19 +02:00
Pietro Albini 66fcb3ceb2 Rollup merge of #55901 - euclio:speling, r=petrochenkov
fix various typos in doc comments
2018-11-15 11:04:42 +01:00
Michael Woerister 4cfc97924f xLTO: Don't pass --plugin-opt=thin to LLD. That's not supported anymore. 2018-11-14 14:42:49 +01:00
Andy Russell 4e35cbb22e fix various typos in doc comments 2018-11-13 14:45:31 -05:00
Bruce Mitchener a62af858e0 Fix typos. 2018-11-11 20:52:36 +07:00
ljedrz 3968ada006 codegen_llvm_back: use mem::replace instead of swap where more concise 2018-11-10 19:25:24 +01:00
ljedrz 0195d9b95f codegen_llvm_back: use to_owned instead of to_string with string literals 2018-11-10 19:25:23 +01:00
ljedrz 3dbb2cc864 codegen_llvm_back: improve common patterns 2018-11-10 19:25:22 +01:00