Nicholas Nethercote
257eaf523f
Introduce InternedString::intern.
...
`InternedString::intern(x)` is preferable to
`Symbol::intern(x).as_interned_str()`, because the former involves one
call to `with_interner` while the latter involves two.
The case within InternedString::decode() is particularly hot, and this
change reduces the number of `with_interner` calls by up to 13%.
2019-05-20 09:17:00 +10:00
Nicholas Nethercote
999c1fc281
Remove the equality operation between Symbol and strings.
...
And also the equality between `Path` and strings, because `Path` is made
up of `Symbol`s.
2019-05-13 09:31:30 +10:00
Nicholas Nethercote
fb084a48e2
Pass a Symbol to check_name, emit_feature_err, and related functions.
2019-05-13 09:29:22 +10:00
Nicholas Nethercote
faf5eac854
Move metadata encoding earlier.
...
This commit separates metadata encoding (`tcx.encode_metadata`) from the
creation of the metadata module (which is now handled by
`write_compressed_metadata`, formerly `write_metadata`).
The metadata encoding now occurs slightly earlier in the pipeline, at
the very start of code generation within `start_codegen`.
Metadata *writing* still occurs near the end of compilation; that will
be moved forward in subsequent commits.
2019-04-30 14:55:10 +10:00
Mateusz Mikuła
87e4b43d51
Deny internal in stage0
2019-04-17 05:15:00 +02:00
flip1995
d3f0cb9b62
Deny internal lints on non conflicting crates
...
- libarena
- librustc_allocator
- librustc_borrowck
- librustc_codegen_ssa
- librustc_codegen_utils
- librustc_driver
- librustc_errors
- librustc_incremental
- librustc_metadata
- librustc_passes
- librustc_privacy
- librustc_resolve
- librustc_save_analysis
- librustc_target
- librustc_traits
- libsyntax
- libsyntax_ext
- libsyntax_pos
2019-04-03 18:24:21 +02:00
Eduard-Mihai Burtescu
03639a2bff
rustc(codegen): uncache def_symbol_name prefix from symbol_name.
2019-03-29 07:45:38 +02:00
Vadim Petrochenkov
2cbc25e6fc
Merge DefPathData::VariantCtor and DefPathData::StructCtor
2019-03-24 17:59:18 +03:00
bjorn3
ca2ff089f3
Remove MetadataOnlyCodegenBackend
2019-03-16 10:54:38 +01:00
Eduard-Mihai Burtescu
a54a41ce47
rustc: provide DisambiguatedDefPathData in ty::print.
2019-03-15 13:25:10 +02:00
Eduard-Mihai Burtescu
8619edede1
rustc: slice substs in ty::print instead of passing the full ones.
2019-03-15 13:25:10 +02:00
Eduard-Mihai Burtescu
52b4f2daa0
rustc: remove PrintCx from ty::Print and rely on printers carrying TyCtxt.
2019-03-15 13:25:10 +02:00
Eduard-Mihai Burtescu
2a656828ac
rustc: remove the ability for pretty-printers to override nesting.
2019-03-15 13:25:10 +02:00
Eduard-Mihai Burtescu
c0c485c3ad
rustc: don't thread existential projections through path_generic_args.
2019-03-15 13:25:10 +02:00
Eduard-Mihai Burtescu
ffa00d4628
rustc: make pretty_path_generic_args' task as simple as possible.
2019-03-15 13:25:10 +02:00
Eduard-Mihai Burtescu
4deaa69b42
rustc: print elided regions as '_ instead of nothing, and use a separate check when optional.
2019-03-15 13:25:10 +02:00
Eduard-Mihai Burtescu
381fa7aa18
rustc: move ty::print::PrintConfig's fields to FmtPrinter.
2019-03-15 13:25:10 +02:00
Eduard-Mihai Burtescu
6d67d6846c
rustc_codegen_utils: print all nominal types as paths, in symbol names.
2019-03-15 13:25:10 +02:00
Eduard-Mihai Burtescu
5211e37b1d
rustc: don't pass Namespace explicitly, but rather track it in FmtPrinter.
2019-03-15 13:25:10 +02:00
Eduard-Mihai Burtescu
ab26b26d34
rustc: introduce a ty::print::PrettyPrinter helper for printing "<...>".
2019-03-15 13:25:10 +02:00
Eduard-Mihai Burtescu
35e5123f51
rustc: support overriding type printing in ty::print::Printer.
2019-03-15 13:25:10 +02:00
Eduard-Mihai Burtescu
88d96b269c
rustc: support overriding region printing in ty::print::Printer.
2019-03-15 13:25:10 +02:00
Eduard-Mihai Burtescu
7c4eecef0b
rustc: pass ty::print::PrintCx by value.
2019-03-15 13:25:10 +02:00
Eduard-Mihai Burtescu
37e918526a
rustc: split off most of ty::print::PrintCx's fields into a separate struct.
2019-03-15 13:25:10 +02:00
Eduard-Mihai Burtescu
5616ca857d
rustc: uniformize ty::print's error handling by requiring Result.
2019-03-15 13:25:10 +02:00
Eduard-Mihai Burtescu
36f64f15fc
rustc: remove ty::print::FORCE_ABSOLUTE altogether.
2019-03-15 13:25:10 +02:00
Eduard-Mihai Burtescu
df6650f38c
rustc: move ...::<impl ...> printing into pretty_path_qualified.
2019-03-15 13:25:10 +02:00
Eduard-Mihai Burtescu
aec5a48481
rustc: move <...>-less impl path special-case to pretty_path_qualified.
2019-03-15 13:25:10 +02:00
Eduard-Mihai Burtescu
a15bfc6f48
rustc: merge PrintCx::parameterized and def_path printing.
2019-03-15 13:25:10 +02:00
Eduard-Mihai Burtescu
9f8aaa04e0
rustc: move the contents of ty::item_path to ty::print.
2019-03-15 13:25:10 +02:00
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