summary refs log tree commit diff
path: root/src/librustc_driver
AgeCommit message (Collapse)AuthorLines
2016-07-04Renamed phase to compilation_doneWill Crichton-5/+5
2016-07-04Added new compilation phase and testWill Crichton-0/+18
2016-07-04Moved LLVM cleanup to after `after_llvm` phaseWill Crichton-0/+2
2016-07-01Add the `after_expand` entry point between import resolution and the rest of ↵Jeffrey Seyfried-14/+60
name resolution
2016-06-30Remove `after_expand` and `after_write_deps` CompileController entry pointsJeffrey Seyfried-61/+1
2016-06-28groundwork: create the `Resolver` earlier in phase 2Jeffrey Seyfried-8/+8
2016-06-28groundwork: refactor the interface that `resolve` exposes to `driver`Jeffrey Seyfried-43/+30
2016-06-28cleanup: refactor away `ast::NodeIdAssigner`Jeffrey Seyfried-4/+2
2016-06-26Rollup merge of #34436 - jseyfried:no_block_expr, r=eddybJeffrey Seyfried-2/+29
To allow these braced macro invocation, this PR removes the optional expression from `ast::Block` and instead uses a `StmtKind::Expr` at the end of the statement list. Currently, braced macro invocations in blocks can expand into statements (and items) except when they are last in a block, in which case they can only expand into expressions. For example, ```rust macro_rules! make_stmt { () => { let x = 0; } } fn f() { make_stmt! {} //< This is OK... let x = 0; //< ... unless this line is commented out. } ``` Fixes #34418.
2016-06-26Rollup merge of #34339 - jseyfried:thin_vec, r=petrochenkov,ManishearthJeffrey Seyfried-1/+1
Generalize and abstract `ThinAttributes` to `ThinVec<Attribute>`.
2016-06-23Avoid wasting node idsJeffrey Seyfried-0/+25
2016-06-23Remove field `expr` of `ast::Block`Jeffrey Seyfried-2/+4
2016-06-23Move errors from libsyntax to its own crateJonathan Turner-18/+24
2016-06-20Improves organization of driver includes.Paul Jarrett-3/+2
2016-06-19Generalize and abstract `ThinAttributes`Jeffrey Seyfried-1/+1
2016-06-16Simplify gated cfg checkingJeffrey Seyfried-36/+12
2016-06-11Strip `#[test]` nodes during `cfg` processing on non-test builds.Jeffrey Seyfried-0/+2
2016-06-09Auto merge of #34149 - arielb1:remove-remove-dead-blocks, r=nikomatsakisbors-6/+13
MIR cleanups and predecessor cache This PR cleans up a few things in MIR and adds a predecessor cache to allow graph algorithms to be run easily. r? @nikomatsakis
2016-06-09fix issuesAriel Ben-Yehuda-1/+2
2016-06-09use the type name as the pass nameAriel Ben-Yehuda-1/+1
2016-06-09refactor simplify_cfg and split off simplify_branchesAriel Ben-Yehuda-0/+1
2016-06-09add hook infrastructure for automatically dumping MIR on every passAriel Ben-Yehuda-1/+3
2016-06-09merge the RemoveDeadBlocks pass into the SimplifyCfg passAriel Ben-Yehuda-5/+8
2016-06-09Auto merge of #34108 - jseyfried:refactor_prelude_injection, r=nrcbors-5/+2
Refactor away the prelude injection fold Instead, just inject `#[prelude_import] use [core|std]::prelude::v1::*;` at the crate root while injecting `extern crate [core|std];` and process `#[no_implicit_prelude]` attributes in `resolve`. r? @nrc
2016-06-09Load macros from `extern crate`s during expansion.Jeffrey Seyfried-6/+3
2016-06-08Auto merge of #34083 - alexcrichton:dumb-hack, r=nrcbors-4/+16
rustc: Try to contain prepends to PATH This commit attempts to bring our prepends to PATH on Windows when loading plugins because we've been seeing quite a few issues with failing to spawn a process on Windows, the leading theory of which is that PATH is too large as a result of this. Currently this is mostly a stab in the dark as it's not confirmed to actually fix the problem, but it's probably not a bad change to have anyway! cc #33844 Closes #17360
2016-06-07Refactor away the prelude injection passJeffrey Seyfried-5/+2
2016-06-05rustc: Try to contain prepends to PATHAlex Crichton-4/+16
This commit attempts to bring our prepends to PATH on Windows when loading plugins because we've been seeing quite a few issues with failing to spawn a process on Windows, the leading theory of which is that PATH is too large as a result of this. Currently this is mostly a stab in the dark as it's not confirmed to actually fix the problem, but it's probably not a bad change to have anyway! cc #33844 Closes #17360
2016-06-04Auto merge of #33622 - arielb1:elaborate-drops, r=nikomatsakisbors-1/+6
[MIR] non-zeroing drop This enables non-zeroing drop through stack flags for MIR. Fixes #30380. Fixes #5016.
2016-06-05break critical edges only when neededAriel Ben-Yehuda-2/+3
the *only* place where critical edges need to be broken is on Call instructions, so only break them there.
2016-06-03implement drop elaborationAriel Ben-Yehuda-0/+4
Fixes #30380
2016-06-01Remove the `dep-info-no-analysis` test and fix other fallout.Jeffrey Seyfried-12/+3
2016-06-01Move name resolution to phase 2Jeffrey Seyfried-57/+66
2016-06-01Remove redundant `check_for_macros` AST pass.Jeffrey Seyfried-4/+0
2016-06-01Auto merge of #33794 - petrochenkov:sanity, r=nrcbors-1/+5
Add AST validation pass and move some checks to it The purpose of this pass is to catch constructions that fit into AST data structures, but not permitted by the language. As an example, `impl`s don't have visibilities, but for convenience and uniformity with other items they are represented with a structure `Item` which has `Visibility` field. This pass is intended to run after expansion of macros and syntax extensions (and before lowering to HIR), so it can catch erroneous constructions that were generated by them. This pass allows to remove ad hoc semantic checks from the parser, which can be overruled by syntax extensions and occasionally macros. The checks can be put here if they are simple, local, don't require results of any complex analysis like name resolution or type checking and maybe don't logically fall into other passes. I expect most of errors generated by this pass to be non-fatal and allowing the compilation to proceed. I intend to move some more checks to this pass later and maybe extend it with new checks, like, for example, identifier validity. Given that syntax extensions are going to be stabilized in the measurable future, it's important that they would not be able to subvert usual language rules. In this patch I've added two new checks - a check for labels named `'static` and a check for lifetimes and labels named `'_`. The first one gives a hard error, the second one - a future compatibility warning. Fixes https://github.com/rust-lang/rust/issues/33059 ([breaking-change]) cc https://github.com/rust-lang/rfcs/pull/1177 r? @nrc
2016-05-31Take the def_map argument to TyCtxt::create_and_enter out of its RefCell.Ms2ger-4/+2
2016-05-30Move driver::Resolutions::def_map out of its RefCell.Ms2ger-7/+8
2016-05-28sanity -> validationVadim Petrochenkov-3/+3
Add test for `::super` in import prefix
2016-05-28Add an AST sanity checking pass and use it to catch some illegal ↵Vadim Petrochenkov-1/+5
lifetime/label names
2016-05-28Auto merge of #33821 - sanxiyn:cfg-test, r=nikomatsakisbors-1/+4
Do not inject test harness for --cfg test Fix #33670.
2016-05-27Auto merge of #33706 - jseyfried:refactor_cfg, r=nrcbors-9/+0
Perform `cfg` attribute processing during macro expansion and fix bugs This PR refactors `cfg` attribute processing and fixes bugs. More specifically: - It merges gated feature checking for stmt/expr attributes, `cfg_attr` processing, and `cfg` processing into a single fold. - This allows feature gated `cfg` variables to be used in `cfg_attr` on unconfigured items. All other feature gated attributes can already be used on unconfigured items. - It performs `cfg` attribute processing during macro expansion instead of after expansion so that macro-expanded items are configured the same as ordinary items. In particular, to match their non-expanded counterparts, - macro-expanded unconfigured macro invocations are no longer expanded, - macro-expanded unconfigured macro definitions are no longer usable, and - feature gated `cfg` variables on macro-expanded macro definitions/invocations are now errors. This is a [breaking-change]. For example, the following would break: ```rust macro_rules! m { () => { #[cfg(attr)] macro_rules! foo { () => {} } foo!(); // This will be an error macro_rules! bar { () => { fn f() {} } } #[cfg(attr)] bar!(); // This will no longer be expanded ... fn g() { f(); } // ... so that `f` will be unresolved. #[cfg(target_thread_local)] // This will be a gated feature error macro_rules! baz { () => {} } } } m!(); ``` r? @nrc
2016-05-27Rollup merge of #33839 - kamalmarhubi:codemape-get-filemap-option, r=nmatsakisManish Goregaokar-0/+1
This is more idiomatic, putting the caller in charge of whether or not to panic.
2016-05-27Strip unconfigured items during macro expansionJeffrey Seyfried-9/+0
2016-05-25trans: save metadata even with -Z no-trans.Eduard Burtescu-4/+0
2016-05-24syntax: Make codemap::get_filemap() return an OptionKamal Marhubi-0/+1
This is more idiomatic, putting the caller in charge of whether or not to panic.
2016-05-24Remove unused field and argumentSeo Sanghyeon-1/+0
2016-05-24Do not inject test harness for --cfg testSeo Sanghyeon-1/+5
2016-05-20Auto merge of #33553 - alexcrichton:cdylibs, r=brsonbors-0/+3
rustc: Add a new crate type, cdylib This commit is an implementation of [RFC 1510] which adds a new crate type, `cdylib`, to the compiler. This new crate type differs from the existing `dylib` crate type in a few key ways: * No metadata is present in the final artifact * Symbol visibility rules are the same as executables, that is only reachable `extern` functions are visible symbols * LTO is allowed * All libraries are always linked statically This commit is relatively simple by just plubming the compiler with another crate type which takes different branches here and there. The only major change is an implementation of the `Linker::export_symbols` function on Unix which now actually does something. This helps restrict the public symbols from a cdylib on Unix. With this PR a "hello world" `cdylib` is 7.2K while the same `dylib` is 2.4MB, which is some nice size savings! [RFC 1510]: https://github.com/rust-lang/rfcs/pull/1510 Closes #33132
2016-05-19rustc: Add a new crate type, cdylibAlex Crichton-0/+3
This commit is an implementation of [RFC 1510] which adds a new crate type, `cdylib`, to the compiler. This new crate type differs from the existing `dylib` crate type in a few key ways: * No metadata is present in the final artifact * Symbol visibility rules are the same as executables, that is only reachable `extern` functions are visible symbols * LTO is allowed * All libraries are always linked statically This commit is relatively simple by just plubming the compiler with another crate type which takes different branches here and there. The only major change is an implementation of the `Linker::export_symbols` function on Unix which now actually does something. This helps restrict the public symbols from a cdylib on Unix. With this PR a "hello world" `cdylib` is 7.2K while the same `dylib` is 2.4MB, which is some nice size savings! [RFC 1510]: https://github.com/rust-lang/rfcs/pull/1510 Closes #33132
2016-05-18ignore dep-graph in resolve and lower_crateNiko Matsakis-1/+1
This got removed at some point, it seems.