298 Commits

Author SHA1 Message Date
Mazdak Farrokhzad
93a8283614 Move builtin attribute logic to new rustc_attr crate.
For now, this is all the crate contains, but more
attribute logic & types will be moved there over time.
2020-02-01 18:54:56 +01:00
Mazdak Farrokhzad
e03d1064f0 syntax: move GLOBALS to attr module 2020-02-01 18:54:55 +01:00
Mazdak Farrokhzad
50f0e2e9e6 {syntax -> rustc_ast_passes}::node_count 2020-02-01 18:54:55 +01:00
Nicholas Nethercote
0d69fe8308 Use P for NtTraitItem, NtImplItem, and NtForeignItem.
This commit reduces the size of `Nonterminal` from a whopping 240 bytes
to 72 bytes (on x86-64), which gets it below the `memcpy` threshold.

It also removes some impedance mismatches with `Annotatable`, which
already uses `P` for these variants.
2020-01-30 11:18:56 +11:00
Mark Rousskov
d1bb7e16e0 Privatize private fields of OutputFilenames 2020-01-22 08:10:05 +09:00
Dylan DPC
8c016c3c36
Rollup merge of #67791 - Zoxc:lift-interning, r=eddyb
Implement Lift using interners instead of in_arena

r? @eddyb
cc @cjgillot
2020-01-17 18:53:41 +05:30
Dylan DPC
6b83862d09
Rollup merge of #67780 - cjgillot:passes-ty, r=Zoxc
Move some queries from rustc::ty to librustc_ty.

cc #65031
2020-01-16 11:58:00 +05:30
Yuki Okushi
be1ecce01f
Rollup merge of #68141 - euclio:replace-bindings-with-winapi, r=alexcrichton
use winapi for non-stdlib Windows bindings
2020-01-15 21:51:45 +09:00
Camille GILLOT
894dc2d3d2 Do not forget to provide queries. 2020-01-13 15:36:05 +01:00
Camille GILLOT
9908a87367 Move to new crate rustc_ty. 2020-01-13 13:41:25 +01:00
bors
59c1db0339 Auto merge of #67901 - matthewjasper:split-mir-build, r=nagisa
Split MIR building into its own crate

This moves `rustc_mir::{build, hair, lints}` to `rustc_mir_build`.
The new crate only has a `provide` function as it's public API.

Based on #67898

cc @Centril @rust-lang/compiler
r? @oli-obk
2020-01-12 09:44:55 +00:00
Matthew Jasper
b358929251 Split rustc_mir::{build, hair, lints} into their own crate 2020-01-12 09:39:26 +00:00
Andy Russell
7b564c67de
use winapi for non-stdlib Windows bindings 2020-01-11 20:56:46 -05:00
John Kåre Alsaker
b21c9dddb0 Use Arena for interning 2020-01-11 07:56:44 +01:00
Mazdak Farrokhzad
51078ceb44 fix ui-fulldeps & tests fallout 2020-01-11 07:42:26 +01:00
Mazdak Farrokhzad
f58db20362 move rustc::lint::{context, passes} to rustc_lint.
Also do some cleanup of the interface.
2020-01-11 07:42:26 +01:00
Mazdak Farrokhzad
8c0c5c7e65
Rollup merge of #68043 - Zoxc:missing-timers, r=wesleywiser
Add some missing timers

Based on https://github.com/rust-lang/rust/pull/67988

r? @wesleywiser
2020-01-11 04:02:24 +01:00
Mazdak Farrokhzad
ae213db0f5 {syntax -> rustc_ast_passes}::show_span 2020-01-11 03:30:20 +01:00
Mazdak Farrokhzad
6cbcb83022 {syntax -> rustc_ast_passes}::feature_gate 2020-01-11 03:30:20 +01:00
Mazdak Farrokhzad
ed69fbbc44 ast_validation -> new crate rustc_ast_passes 2020-01-11 03:27:39 +01:00
Mazdak Farrokhzad
7dbccf5b55 buffered lint infra -> rustc_session 2020-01-11 03:21:34 +01:00
Michael Woerister
a62c040929 self-profile: Switch to new approach for event_id generation that enables query-invocation-specific event_ids. 2020-01-10 10:18:21 +01:00
John Kåre Alsaker
5918c18785 Tweak timers 2020-01-09 23:19:20 +01:00
John Kåre Alsaker
b650e91cf4 Label unmarked time 2020-01-09 22:38:40 +01:00
John Kåre Alsaker
5427601e9e Change -Z time event naming scheme and make them generic activities 2020-01-09 07:06:40 +01:00
Vadim Petrochenkov
41a93cba38 Remove -Z continue-parse-after-error 2020-01-08 21:48:04 +03:00
Mazdak Farrokhzad
ebfd8673a7 Remove rustc_hir reexports in rustc::hir. 2020-01-05 12:49:22 +01:00
John Kåre Alsaker
5a485ce4a3 Use self profile infrastructure for -Z time and -Z time-passes 2020-01-05 02:57:14 +01:00
Mazdak Farrokhzad
7a14073875 move def_id to new rustc_hir crate 2020-01-04 19:01:42 +01:00
bors
79cf5e4fe2 Auto merge of #67788 - cjgillot:delint-day, r=Zoxc
Move early and late lint mechanisms to librustc_lint.

As requested, split from #67737

r? @Zoxc
2020-01-04 09:32:29 +00:00
Mazdak Farrokhzad
b1aad76586 Normalize syntax::edition imports. 2020-01-02 19:31:38 +01:00
Mazdak Farrokhzad
4ff12ce4c1 Normalize syntax::symbol imports. 2020-01-02 13:57:04 +01:00
Mazdak Farrokhzad
75e4783f63 Normalize syntax::source_map imports. 2020-01-02 13:57:04 +01:00
Camille GILLOT
36b6630771 Move stability queries to librustc_passes.
Contains:
- check_mod_unstable_api_usage query;
- stability_index query;
- check_unused_or_stable features pass.
2020-01-01 14:15:02 +01:00
Camille GILLOT
1fab03e908 Move lint levels machanism in librustc_lint. 2020-01-01 13:20:33 +01:00
Camille GILLOT
96180ff655 Move late lint machanism in librustc_lint. 2020-01-01 13:20:18 +01:00
Camille GILLOT
3a350e1a39 Move early lint machanism in librustc_lint. 2020-01-01 13:16:43 +01:00
Vadim Petrochenkov
70f1d57048 Rename syntax_pos to rustc_span in source code 2020-01-01 09:15:18 +03:00
bors
119307a83e Auto merge of #67764 - Centril:rollup-ycbq3os, r=Centril
Rollup of 6 pull requests

Successful merges:

 - #67574 (Extract `rustc_ast_lowering` crate from `rustc`)
 - #67685 (Constify Result)
 - #67702 (Add symbol normalization for proc_macro_server.)
 - #67730 (Cleanup pattern type checking, fix diagnostics bugs (+ improvements))
 - #67744 (parser: reduce diversity in error handling mechanisms)
 - #67748 (Use function attribute "frame-pointer" instead of "no-frame-pointer-elim")

Failed merges:

r? @ghost
2019-12-31 19:41:36 +00:00
Mazdak Farrokhzad
3cf2bc0e51
Rollup merge of #67574 - Centril:librustc_lowering, r=Mark-Simulacrum
Extract `rustc_ast_lowering` crate from `rustc`

Working towards https://github.com/rust-lang/rust/issues/65031.

This PR moves `src/librustc/hir/lowering{/, .rs}` to its own crate (`librustc_ast_lowering`) which is very self-contained (only `fn lower_crate` and `trait Resolver` are exposed).

r? @Mark-Simulacrum
2019-12-31 19:19:31 +01:00
Mazdak Farrokhzad
52179c56be librustc_ast_lowering: fix misc fallout. 2019-12-31 17:56:25 +01:00
Mazdak Farrokhzad
7b6ef2b369 librustc_ast_lowering: cargo changes. 2019-12-31 17:33:10 +01:00
bors
769eb2194a Auto merge of #67699 - cjgillot:passes-resolve, r=Zoxc
Move resolve_lifetimes query in librustc_resolve.

Split out of #67688

r? @Zoxc
2019-12-31 16:21:10 +00:00
Dylan DPC
83f5cf8c4d
Rollup merge of #67697 - cjgillot:passes-scope-tree, r=Zoxc
Move the region_scope_tree query to librustc_passes.

Split out of #67688.

r? @Zoxc
2019-12-31 18:14:03 +05:30
Camille GILLOT
28eefb3797 Move resolve_lifetimes query in librustc_resolve. 2019-12-31 10:21:32 +01:00
Vadim Petrochenkov
a2823e3af6 Rename libsyntax_ext and libsyntax_expand in code 2019-12-30 19:18:17 +03:00
Vadim Petrochenkov
b9a9c5b4fd Make things build again 2019-12-30 19:18:16 +03:00
Camille GILLOT
afcd5c16b7 Move region_scope_tree query to librustc_passes. 2019-12-30 11:45:57 +01:00
Camille GILLOT
4922310a3b Move reachable_set query in librustc_passes. 2019-12-29 10:45:00 +01:00
Mark Rousskov
b98633b94c Store callbacks in global statics
The callbacks have precisely two states: the default, and the one
present throughout almost all of the rustc run (the filled in value
which has access to TyCtxt).

We used to store this as a thread local, and reset it on each thread to
the non-default value. But this is somewhat wasteful, since there is no
reason to set it globally -- while the callbacks themselves access TLS,
they do not do so in a manner that fails in when we do not have TLS to
work with.
2019-12-25 14:10:46 -05:00