summary refs log tree commit diff
path: root/src/librustc_driver/driver.rs
AgeCommit message (Collapse)AuthorLines
2016-04-06add code to persist graph and for unit-testingNiko Matsakis-0/+8
2016-04-06make an incremental crateNiko Matsakis-2/+10
for now, this houses `svh` and the code to check `assert_dep_graph` is sane
2016-04-06restructure rustc options relating to incr. comp.Niko Matsakis-1/+1
You can now pass `-Z incremental=dir` as well as saying `-Z query-dep-graph` if you want to enable queries for some other purpose. Accessor functions take the place of computed boolean flags.
2016-04-06rustc: move rustc_front to rustc::hir.Eduard Burtescu-5/+4
2016-04-03Auto merge of #32210 - Aatch:mir-traversal, r=nikomatsakisbors-7/+13
rBreak Critical Edges and other MIR work This PR is built on top of #32080. This adds the basic depth-first traversals for MIR, preorder, postorder and reverse postorder. The MIR blocks are now translated using reverse postorder. There is also a transform for breaking critical edges, which includes the edges from `invoke`d calls (`Drop` and `Call`), to account for the fact that we can't add code after an `invoke`. It also stops generating the intermediate block (since the transform essentially does it if necessary already). The kinds of cases this deals with are difficult to produce, so the test is the one I managed to get. However, it seems to bootstrap with `-Z orbit`, which it didn't before my changes.
2016-03-31Turn break critical edges into a MIR passJames Miller-12/+11
Also adds a new set of passes to run just before translation that "prepare" the MIR for codegen. Removal of landing pads, region erasure and break critical edges are run in this pass. Also fixes some merge/rebase errors.
2016-03-31Rollup merge of #32494 - pnkfelix:gate-parser-recovery-via-debugflag, r=nrcManish Goregaokar-0/+4
Gate parser recovery via debugflag Gate parser recovery via debugflag Put in `-Z continue_parse_after_error` This works by adding a method, `fn abort_if_no_parse_recovery`, to the diagnostic handler in `syntax::errors`, and calling it after each error is emitted in the parser. (We might consider adding a debugflag to do such aborts in other places where we are currently attempting recovery, such as resolve, but I think the parser is the really important case to handle in the face of #31994 and the parser bugs of varying degrees that were injected by parse error recovery.) r? @nikomatsakis
2016-03-30Put in `-Z continue-parse-after-error`Felix S. Klock II-0/+4
This works by adding a boolean flag, `continue_after_error`, to `syntax::errors::Handler` that can be imperatively set to `true` or `false` via a new `fn set_continue_after_error`. The flag starts off true (since we generally try to recover from compiler errors, and `Handler` is shared across all phases). Then, during the `phase_1_parse_input`, we consult the setting of the `-Z continue-parse-after-error` debug flag to determine whether we should leave the flag set to `true` or should change it to `false`. ---- (We might consider adding a debugflag to do such aborts in other places where we are currently attempting recovery, such as resolve, but I think the parser is the really important case to handle in the face of #31994 and the parser bugs of varying degrees that were injected by parse error recovery.)
2016-03-30move `const_eval` and `check_match` out of `librustc`Oliver Schneider-1/+2
2016-03-30Add and use a break critical edges transformJames Miller-1/+8
This is a fairly standard transform that inserts blocks along critical edges so code can be inserted along the edge without it affecting other edges. The main difference is that it considers a Drop or Call terminator that would require an `invoke` instruction in LLVM a critical edge. This is because we can't actually insert code after an invoke, so it ends up looking similar to a critical edge anyway. The transform is run just before translation right now.
2016-03-27rustc_trans: move the contents of the trans module to top-level.Eduard Burtescu-1/+1
2016-03-27rustc: move cfg, infer, traits and ty from middle to top-level.Eduard Burtescu-2/+2
2016-03-25store krate information more uniformlyNiko Matsakis-1/+1
make DefPath store krate and enable uniform access to crate_name/crate_disambiguator
2016-03-25Make the compiler emit an error if the crate graph contains two crates with ↵Michael Woerister-3/+7
the same crate-name and crate-salt but different SVHs.
2016-03-25Make the definite name of the local crate available in the tcx.Michael Woerister-0/+1
2016-03-25Compute a salt from arguments passed via -Cmetadata.Michael Woerister-3/+30
2016-03-22fix alignmentJorge Aparicio-16/+16
2016-03-22try! -> ?Jorge Aparicio-32/+32
Automated conversion using the untry tool [1] and the following command: ``` $ find -name '*.rs' -type f | xargs untry ``` at the root of the Rust repo. [1]: https://github.com/japaric/untry
2016-03-21scaffolding for borrowck on MIR.Felix S. Klock II-1/+1
emit (via debug!) scary message from `fn borrowck_mir` until basic prototype is in place. Gather children of move paths and set their kill bits in dataflow. (Each node has a link to the child that is first among its siblings.) Hooked in libgraphviz based rendering, including of borrowck dataflow state. doing this well required some refactoring of the code, so I cleaned it up more generally (adding comments to explain what its trying to do and how it is doing it). Update: this newer version addresses most review comments (at least the ones that were largely mechanical changes), but I left the more interesting revisions to separate followup commits (in this same PR).
2016-03-14Auto merge of #32169 - mitaa:anon-tip, r=nrcbors-5/+4
Allow custom filenames for anonymous inputs This came out of #29253 but doesn't fix it. I thought it might be worth merging on its own nonetheless.
2016-03-14Allow custom filenames for anonymous inputsmitaa-5/+4
2016-03-13Auto merge of #31916 - nagisa:mir-passmgr-2, r=arielb1bors-10/+15
Add Pass manager for MIR A new PR, since rebasing the original one (https://github.com/rust-lang/rust/pull/31448) properly was a pain. Since then there has been several changes most notable of which: 1. Removed the pretty-printing with `#[rustc_mir(graphviz/pretty)]`, mostly because we now have `--unpretty=mir`, IMHO that’s the direction we should expand this functionality into; 2. Reverted the infercx change done for typeck, because typeck can make an infercx for itself by being a `MirMapPass` r? @nikomatsakis
2016-03-09Auto merge of #32073 - jseyfried:fix_another_trait_privacy_error, r=nikomatsakisbors-4/+1
Fix incorrect trait privacy error This PR fixes #21670 by using the crate metadata instead of `ExternalExports` to determine if an external item is public. r? @nikomatsakis
2016-03-09Auto merge of #31631 - jonas-schievink:agoraphobia, r=nrcbors-10/+17
[breaking-batch] Move more uses of `panictry!` out of libsyntax
2016-03-06Refactor away `ExternalExports`Jeffrey Seyfried-4/+1
2016-03-04Address commentsSimonas Kazlauskas-2/+1
2016-03-04Add Pass manager for MIRSimonas Kazlauskas-11/+17
2016-03-03Rename middle::ty::ctxt to TyCtxtJeffrey Seyfried-7/+7
2016-02-20fix a few remaining bugs - make check runs!Ariel Ben-Yehuda-8/+12
2016-02-19Do less panicking in generalJonas Schievink-1/+7
2016-02-16Move more uses of `panictry!` out of libsyntaxJonas Schievink-10/+11
[breaking-change] for syntax extensions
2016-02-13Auto merge of #31524 - jonas-schievink:autoderef, r=steveklabnikbors-1/+1
2016-02-12Use more autoderef in rustc_driverJonas Schievink-1/+1
2016-02-12Auto merge of #30726 - GuillaumeGomez:compile-fail, r=brsonbors-1/+1
r? @brson cc @alexcrichton I still need to add error code explanation test with this, but I can't figure out a way to generate the `.md` files in order to test example source codes. Will fix #27328.
2016-02-09Allow registering MIR-passes through compiler pluginsOliver Schneider-2/+7
2016-02-09make `MirMap` a struct instead of a type alias for `NodeMap`Oliver Schneider-1/+1
2016-02-07Add compile-fail test in rustdocGuillaume Gomez-1/+1
2016-02-05Instrument a bunch of tasks that employ the HIR map in one way orNiko Matsakis-21/+31
another and were not previously instrumented.
2016-02-01Try to run compiler callbacks when we error outNick Cameron-67/+93
2016-02-01Replace some aborts with ResultsNick Cameron-12/+14
Fixes #31207 by removing abort_if_new_errors
2016-01-26rebasingNick Cameron-2/+2
2016-01-26Initial work towards abort-free compilationNick Cameron-202/+203
The goal is that the compiler will pass `Result`s around rather than using abort_if_errors. To preserve behaviour we currently abort at the top level. I've removed all other aborts from the driver, but haven't touched any of the nested aborts.
2016-01-22test falloutNick Cameron-11/+22
2016-01-22The war on abort_if_errorsNick Cameron-31/+33
2016-01-21move more checks out of librustcOliver Schneider-6/+7
2016-01-15move const block checks before lowering stepOliver Schneider-1/+5
this makes sure the checks run before typeck (which might use the constant or const function to calculate an array length) and gives prettier error messages in case of for loops and such (since they aren't expanded yet).
2016-01-11Replace --show-span with -Z show-spanMatt Kraai-1/+1
2016-01-05Annotate the compiler with information about what it is doing when.Niko Matsakis-1/+1
2015-12-30use structured errorsNick Cameron-2/+3
2015-12-25Delete the AST after loweringJonas Schievink-3/+11