Commit Graph

55 Commits

Author SHA1 Message Date
Mazdak Farrokhzad 86c0fca44b use direct import for ErrorReported 2020-04-02 13:40:43 +02:00
Mazdak Farrokhzad 1ccb0b4a02 rustc -> rustc_middle part 3 (rustfmt) 2020-03-30 07:19:55 +02:00
Mazdak Farrokhzad 0cb9e36090 rustc -> rustc_middle part 2 2020-03-30 07:16:56 +02:00
Mazdak Farrokhzad 0f68ab03c3 separate out an arena for HIR 2020-03-21 22:18:57 +01:00
Mark Mansi 2d75a339ca Refactorings to begin getting rid of rustc_codegen_utils 2020-03-19 23:14:46 -05:00
Mazdak Farrokhzad 4392a8b73c use direct imports for rustc::{lint, session}. 2020-03-16 02:52:06 +01:00
Vadim Petrochenkov e08c279eac Rename syntax to rustc_ast in source code 2020-02-29 21:59:09 +03:00
John Kåre Alsaker d1a81c779d Split query stats into its own file 2020-02-19 16:03:21 +01:00
John Kåre Alsaker 623dcb02db Remove the Forest type 2020-02-06 13:41:37 +01:00
Victor Ding ae51d2ba32 Split join_codegen_and_link() into two steps
`join_codegen_and_link()` is split to `join_codegen()` and `link()`.
2020-02-04 11:09:50 +11: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
John Kåre Alsaker b21c9dddb0 Use Arena for interning 2020-01-11 07:56:44 +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
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
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
Mark Rousskov a06baa56b9 Format the world 2019-12-22 17:42:47 -05:00
Camille GILLOT 4dc79f1f7d Use Arena inside hir::Crate. 2019-12-21 23:12:44 +01:00
bors ae1b871cca Auto merge of #65195 - varkor:to_option, r=Centril
Rename `bool::then_*` to `bool::to_option_*` and use where appropriate

Name change following https://github.com/rust-lang/rfcs/pull/2757. Also try it out throughout the compiler in places I think makes the code more readable.
2019-12-06 19:14:51 +00:00
varkor 9f1269f23c Rename to then_some and then 2019-12-06 12:24:54 +00:00
varkor e3a8ea4e18 Use to_option in various places 2019-12-06 12:23:23 +00:00
Ömer Sinan Ağacan 5ddfbc2e2b Fix Query type docs
`give` no longer exists, `compute` is used to generate query results
now.
2019-12-06 10:41:51 +03:00
Camille GILLOT 1e12f39d83 Allocate HIR Forest on arena. 2019-11-27 13:32:28 +01:00
Camille GILLOT e321ba989c Misc renames. 2019-11-27 13:24:19 +01:00
Camille GILLOT 77a4c85e54 Simplify handling of AllArenas. 2019-11-27 13:19:33 +01:00
Camille GILLOT e5ed101098 Rename BoxedGlobalCtxt. 2019-11-27 13:17:58 +01:00
Camille GILLOT 79e232401e Rename lifetimes. 2019-11-27 13:13:57 +01:00
Camille GILLOT 7e72b36299 Move local Arena to Queries. 2019-11-26 23:16:48 +01:00
Camille GILLOT b99513be57 Have Queries own the GlobalCtxt.
The construction of the GlobalCtxt is moved from a generator's stack to
the Queries struct.  Since the GlobalCtxt requires the HIR Forest and the
arenas to live longer, those are moved into Queries the same way.

The resulting handling of objects is more brittle, because consumers of
the Once objects need to be careful of their initialisation.
2019-11-26 22:51:02 +01:00
Camille GILLOT 144d1c2171 Review nits. 2019-11-26 17:20:32 +01:00
Camille GILLOT 9d5f721406 Superfluous lifetime. 2019-11-25 18:36:18 +01:00
Camille GILLOT ea1b8039ad Pass Queries by reference. 2019-11-25 18:13:29 +01:00
Camille GILLOT 18bb912984 Remove wrong comment. 2019-11-25 17:54:01 +01:00
Camille GILLOT 27513a21c4 Tidy. 2019-11-24 23:21:44 +01:00
Camille GILLOT 5098ba6a93 Move linking ouside the interface queries. 2019-11-24 23:21:43 +01:00
Camille GILLOT 266ede1bb3 Isolate compiler queries inside the Queries type. 2019-11-24 23:21:43 +01:00
Vadim Petrochenkov f89e6c8811 rustc_plugin: Remove support for syntactic plugins 2019-11-24 12:05:10 +03:00
Vadim Petrochenkov 94216ce3ad rustc_interface: Remove ExpansionResult and some Steals 2019-10-24 21:12:05 +03:00
Vadim Petrochenkov 3534ca8f49 Turn crate store into a resolver output 2019-10-24 20:54:16 +03:00
Vadim Petrochenkov 5fd796ad06 rustc: Combine resolver outputs into a single struct 2019-10-24 20:51:33 +03:00
Vadim Petrochenkov 2cda75c48f rustc_metadata: Remove unnecessary use of crate store in plugin loader 2019-10-24 20:51:33 +03:00
Mark Rousskov 6be0a7081a Update API to be more compatible with plugin needs
Move to using Box<dyn Fn() -> ...> so that we can let plugins register
state.

This also adds a callback that'll get called from plugin registration so
that Clippy and other tools can register lints without using the plugin
API. The plugin API still works, but this new API is more compatible
with drivers other than rustc.
2019-10-17 19:41:21 -04:00
Mark Rousskov dab3bd6cda Create lint store during plugin registration
Remove lint store from Session
2019-10-17 19:41:21 -04:00
Mark Rousskov b8a040fc5f Remove tx_to_llvm_workers from TyCtxt
This can be kept within the codegen backend crates entirely
2019-09-25 16:57:27 -04:00
Nicholas Nethercote 2521189438 Add a comment to Compiler::compile().
`Compiler::compile()` is different to all the other `Compiler` methods
because it lacks a `Queries` entry. It only has one call site, which is
in a test that doesn't need its specific characteristics.

This patch replaces that call with a call to `Compile::link()`, which is
similar enough for the test's purposes. It also notes that the method is
an illustrative example of how `Compiler` can be used.
2019-09-19 06:56:52 +10:00
Nicholas Nethercote d264a56068 Move call site of dep_graph_future().
`Compiler::register_plugins()` calls `passes::register_plugins()`, which
calls `Compiler::dep_graph_future()`. This is the only way in which a
`passes` function calls a `Compiler` function.

This commit moves the `dep_graph_future()` call out of
`passes::register_plugins()` and into `Compiler::register_plugins()`,
which is a more sensible spot for it. This will delay the loading of the
dep graph slightly -- from the middle of plugin registration to the end
of plugin registration -- but plugin registration is fast enough
(especially compared to expansion) that the impact should be neglible.
2019-09-11 10:59:05 +10:00
Nicholas Nethercote cd0c21b0e5 Remove lower_to_hir() call from prepare_output().
It's a false dependency. The result isn't used and there are no
relevant side-effects.
2019-09-02 08:46:31 +10:00
Nicholas Nethercote d61605cef8 Don't call self.parse() in Compiler::crate_name() unless necessary. 2019-09-02 08:46:31 +10:00