Commit Graph

37 Commits

Author SHA1 Message Date
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
Victor Ding a47fdb99c0 Support linking from a .rlink file
Flag `-Z no-link` was previously introduced, which allows creating
an `.rlink` file to perform compilation without linking.
This change enables linking from an `.rlink` file.
2020-02-11 20:19:28 +11:00
Mazdak Farrokhzad eadff06823 syntax: reexport attr globals 2020-02-01 18:59:49 +01:00
Mazdak Farrokhzad 097d5e1c5e 1. move node_id to syntax
2. invert rustc_session & syntax deps
3. drop rustc_session dep in rustc_hir
2020-02-01 18:58:08 +01:00
Mazdak Farrokhzad e03d1064f0 syntax: move GLOBALS to attr module 2020-02-01 18:54:55 +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 b650e91cf4 Label unmarked time 2020-01-09 22:38:40 +01:00
Mazdak Farrokhzad 75e4783f63 Normalize `syntax::source_map` imports. 2020-01-02 13:57:04 +01:00
Vadim Petrochenkov 70f1d57048 Rename `syntax_pos` to `rustc_span` in source code 2020-01-01 09:15:18 +03:00
Mark Rousskov a06baa56b9 Format the world 2019-12-22 17:42:47 -05:00
LeSeulArtichaut bfc02bdd3c
Fix documentation typo 2019-12-19 12:58:42 +01:00
Camille GILLOT 266ede1bb3 Isolate compiler queries inside the Queries type. 2019-11-24 23:21:43 +01:00
Mark Rousskov 70805e6444 Delete ProcessCfgMod
The previous commit removes the use of this, and now we cleanup.
2019-11-20 14:07:57 -05:00
Mazdak Farrokhzad 8444e1628c move DIAGNOSTICS usage to rustc_driver 2019-11-16 02:32:33 +01:00
Vytautas Astrauskas f9f5a88bc4 Add a callback that allows compiler consumers to override queries. 2019-11-11 19:29:34 +01:00
Mazdak Farrokhzad 4ae2728fa8 move syntax::parse -> librustc_parse
also move MACRO_ARGUMENTS -> librustc_parse
2019-11-10 03:57:18 +01:00
Mazdak Farrokhzad be023ebe85 move config.rs to libsyntax_expand 2019-11-10 02:46:17 +01:00
Mazdak Farrokhzad 9d6768a478 syntax::parser::token -> syntax::token 2019-11-07 13:50:12 +01:00
Andy Russell d06a4ded13
use silent emitter for rustdoc highlighting pass 2019-11-03 22:19:34 -05:00
Vadim Petrochenkov 3534ca8f49 Turn crate store into a resolver output 2019-10-24 20:54:16 +03:00
Mazdak Farrokhzad 7c043e284a
Rollup merge of #65193 - Mark-Simulacrum:lockless-lintstore, r=nikomatsakis
Lockless LintStore

This removes mutability from the lint store after registration. Each commit stands alone, for the most part, though they don't make sense out of sequence.

The intent here is to move LintStore to a more parallel-friendly architecture, although also just a cleaner one from an implementation perspective. Specifically, this has the following changes:
 * We no longer implicitly register lints when registering lint passes
    * For the most part this means that registration calls now likely want to call something like:
       `lint_store.register_lints(&Pass::get_lints())` as well as `register_*_pass`.
    * In theory this is a simplification as it's much easier for folks to just register lints and then have passes that implement whichever lint however they want, rather than necessarily tying passes to lints.
 * Lint passes still have a list of associated lints, but a followup PR could plausibly change that
   * This list must be known for a given pass type, not instance, i.e., `fn get_lints()` is the signature instead of `fn get_lints(&self)` as before.
 * We do not store pass objects, instead storing constructor functions. This means we always get new passes when running lints (this happens approximately once though for a given compiler session, so no behavior change is expected).
 * Registration API is _much_ simpler: generally all functions are just taking `Fn() -> PassObject` rather than several different `bool`s.
2019-10-23 22:19:10 +02:00
Mark Rousskov 4e8d1b2292 Add some documentation 2019-10-22 16:53:28 -04:00
Mazdak Farrokhzad d945f9860f move parse_cfgspecs to rustc_interface 2019-10-19 13:25:46 +02: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 e85089b63a Remove -Zprofile-queries 2019-10-03 21:34:27 -04:00
Mark Rousskov 1a1067d1a5 Make the default parallelism 1
This changes the default parallelism for parallel compilers to one,
instead of the previous default, which was "num cpus". This is likely
not an optimal default long-term, but it is a good default for testing
whether parallel compilers are not a significant regression over a
sequential compiler.

Notably, this in theory makes a parallel-enabled compiler behave
exactly like a sequential compiler with respect to the jobserver.
2019-09-30 16:49:19 -04:00
Vadim Petrochenkov 434152157f Remove lint annotations in specific crates that are already enforced by rustbuild
Remove some random unnecessary lint `allow`s
2019-07-28 18:46:24 +03:00
John Kåre Alsaker 0b37900b40 Specify the edition for the rustdoc thread-pool 2019-05-21 18:17:06 +02:00
John Kåre Alsaker a1f2dceaeb Move `edition` outside the hygiene lock and avoid accessing it 2019-05-21 18:17:05 +02:00
Andy Russell b6f148c8bd
hide `--explain` hint if error has no extended info 2019-04-18 13:29:28 -04:00
Wesley Wiser 56e434d84d Use measureme in self-profiler
Related to #58372
Related to #58967
2019-04-12 20:27:29 -04:00
flip1995 818d300451
Deny internal lints on librustc_interface 2019-04-03 18:24:21 +02:00
John Kåre Alsaker e9a8befd2d Remove unnecessary with_globals calls 2019-03-28 18:58:43 +01:00
Mazdak Farrokhzad 14f3f6c712 librustc_interface => 2018 2019-03-27 09:41:42 +01:00
John Kåre Alsaker 51938c61f6 Make the rustc driver and interface demand driven 2019-03-10 04:49:45 +01:00