about summary refs log tree commit diff
path: root/src/librustc_interface/util.rs
AgeCommit message (Collapse)AuthorLines
2019-11-16move DIAGNOSTICS usage to rustc_driverMazdak Farrokhzad-12/+1
2019-11-14Update to use new librustc_error_codes libraryGuillaume Gomez-15/+2
2019-11-12Register queries with self profiler in rustc_interfaceMark Rousskov-0/+4
2019-11-10Auto merge of #65324 - Centril:organize-syntax, r=petrochenkovbors-0/+3
Split libsyntax apart In this PR the general idea is to separate the AST, parser, and friends by a more data / logic structure (tho not fully realized!) by separating out the parser and macro expansion code from libsyntax. Specifically have now three crates instead of one (libsyntax): - libsyntax: - concrete syntax tree (`syntax::ast`) - definition of tokens and token-streams (`syntax::{token, tokenstream}`) -- used by `syntax::ast` - visitors (`syntax::visit`, `syntax::mut_visit`) - shared definitions between `libsyntax_expand` - feature gating (`syntax::feature_gate`) -- we could possibly move this out to its own crater later. - attribute and meta item utilities, including used-marking (`syntax::attr`) - pretty printer (`syntax::print`) -- this should possibly be moved out later. For now I've reduced down the dependencies to a single essential one which could be broken via `ParseSess`. This entails that e.g. `Debug` impls for `Path` cannot reference the pretty printer. - definition of `ParseSess` (`syntax::sess`) -- this is used by `syntax::{attr, print, feature_gate}` and is a common definition used by the parser and other things like librustc. - the `syntax::source_map` -- this includes definitions used by `syntax::ast` and other things but could ostensibly be moved `syntax_pos` since that is more related to this module. - a smattering of misc utilities not sufficiently important to itemize -- some of these could be moved to where they are used (often a single place) but I wanted to limit the scope of this PR. - librustc_parse: - parser (`rustc_parse::parser`) -- reading a file and such are defined in the crate root tho. - lexer (`rustc_parse::lexer`) - validation of meta grammar (post-expansion) in (`rustc_parse::validate_attr`) - libsyntax_expand -- this defines the infra for macro expansion and conditional compilation but this is not libsyntax_ext; we might want to merge them later but currently libsyntax_expand is depended on by librustc_metadata which libsyntax_ext is not. - conditional compilation (`syntax_expand::config`) -- moved from `syntax::config` to here - the bulk of this crate is made up of the old `syntax::ext` r? @estebank
2019-11-10move syntax::parse -> librustc_parseMazdak Farrokhzad-0/+1
also move MACRO_ARGUMENTS -> librustc_parse
2019-11-10move config.rs to libsyntax_expandMazdak Farrokhzad-0/+2
2019-11-09Move next_node_id to ResolverMark Rousskov-18/+19
This doesn't migrate the pretty-printing everybody loops, which will be done in the next few commits.
2019-11-08ast::ItemKind::Fn: use ast::FnSigMazdak Farrokhzad-6/+7
2019-11-08ast::MethodSig -> ast::FnSigMazdak Farrokhzad-2/+2
2019-11-03Move crate type checking laterMark Rousskov-50/+59
This allows us to directly pass in a lint buffer
2019-11-03Utilize Resolver lint buffer during HIR loweringMark Rousskov-2/+2
2019-10-17Create lint store during plugin registrationMark Rousskov-7/+0
Remove lint store from Session
2019-10-17De-propagate optional session from lint registrationMark Rousskov-2/+3
This is straight up removing dead code, but is a separate commit from the previous to avoid conflating clean up and important changes.
2019-10-07Name the threads in rayon's poolJosh Stone-0/+1
2019-10-07Rebase rustc-rayon on rayon-1.2Josh Stone-4/+4
See also https://github.com/rust-lang/rustc-rayon/pull/3
2019-10-01Rollup merge of #64722 - Mark-Simulacrum:alt-parallel, r=alexcrichtonTyler Mandry-3/+3
Make all alt builders produce parallel-enabled compilers We're not quite ready to ship parallel compilers by default, but the alt builders are not used too much (in theory), so we believe that shipping a possibly-broken compiler there is not too problematic. r? @nikomatsakis
2019-09-30Make the default parallelism 1Mark Rousskov-3/+3
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-28Switch over all StableHash impls to new formatMark Rousskov-2/+2
2019-09-26Rename `MetaItem.node` to `MetaItem.kind`varkor-1/+1
2019-09-26Rename `Stmt.node` to `Stmt.kind`varkor-2/+2
2019-09-26Rename `Ty.node` to `Ty.kind`varkor-1/+1
2019-09-26Rename `TraitItem.node` to `TraitItem.kind`varkor-1/+1
2019-09-26Rename `ImplItem.node` to `ImplItem.kind`varkor-1/+1
2019-09-26Rename `Expr.node` to `Expr.kind`varkor-2/+2
For both `ast::Expr` and `hir::Expr`.
2019-09-10Locate rustc binary similarly to codegen backend loadingMark Rousskov-74/+110
This ensures that the failure cases for finding the codegen backend and for finding the rustc binary are essentially the same, and since we almost always will load the codegen backend, this is essentially meaning that the rustc change is not a regression.
2019-09-05Replace diagnostic plugins with macro_rulesMark Rousskov-9/+9
2019-07-28Fix `cfg(parallel_compiler)` modeVadim Petrochenkov-2/+0
Fix rebase
2019-06-25Adjust warning of -C extra-filename with -o.Eric Huss-3/+3
2019-06-10Haiku: the maximum stack size is 16 MBNiels Sascha Reedijk-2/+6
When one tries to create a thread with a requested stack size larger than 16 MB, the call will fail and the compiler will bail out. Therefore we should limit the size of the thread stack to 16 MB on Haiku.
2019-06-05Addressed points raised in review.Alexander Regueiro-15/+6
2019-06-05Implemented for traits (associated type definitions).Alexander Regueiro-1/+2
2019-06-05Implemented for function bounds, type bounds, and named existential types.Alexander Regueiro-1/+15
2019-05-27Avoid unnecessary internings.Nicholas Nethercote-1/+1
Most involving `Symbol::intern` on string literals.
2019-05-21Move `edition` outside the hygiene lock and avoid accessing itJohn Kåre Alsaker-2/+5
2019-05-13Remove the equality operation between `Symbol` and strings.Nicholas Nethercote-15/+15
And also the equality between `Path` and strings, because `Path` is made up of `Symbol`s.
2019-05-13Pass a `Symbol` to `check_name`, `emit_feature_err`, and related functions.Nicholas Nethercote-2/+2
2019-04-03Deny internal lints on librustc_interfaceflip1995-1/+0
2019-04-03Check for unstable-options flag before register internalsflip1995-1/+3
2019-04-03Make internal lints allow-by-defaultflip1995-0/+1
2019-03-27librustc_interface => 2018Mazdak Farrokhzad-0/+1
2019-03-16Remove MetadataOnlyCodegenBackendbjorn3-3/+0
2019-03-10Make the rustc driver and interface demand drivenJohn Kåre Alsaker-1/+158
2019-02-28Introduce rustc_interface and move some methods thereJohn Kåre Alsaker-0/+702