about summary refs log tree commit diff
path: root/src/libstd/task
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2013-07-27 14:49:28 -0700
committerbors <bors@rust-lang.org>2013-07-27 14:49:28 -0700
commit098106870e0ebdebb40964624185f304ee7b3d63 (patch)
tree0ac0cc7fbcd8c9307ee08c94ef16b1ccdee6088b /src/libstd/task
parent32622cef992fea2ba23bafe39ed08730a2b78fb4 (diff)
parent413446c85b44a7d9269a0723ed043e16d09e2324 (diff)
downloadrust-098106870e0ebdebb40964624185f304ee7b3d63.tar.gz
rust-098106870e0ebdebb40964624185f304ee7b3d63.zip
auto merge of #8077 : graydon/rust/reorganize-driver, r=pcwalton
The purpose here is to get rid of compile_upto, which pretty much always requires the user to read the source to figure out what it does. It's replaced by a sequence of obviously-named functions:

  - phase_1_parse_input(sess, cfg, input);
  - phase_2_configure_and_expand(sess, cfg, crate);
  - phase_3_run_analysis_passes(sess, expanded_crate);
  - phase_4_translate_to_llvm(sess, expanded_crate, &analysis, outputs);
  - phase_5_run_llvm_passes(sess, &trans, outputs);
  - phase_6_link_output(sess, &trans, outputs); 

Each of which takes what it takes and returns what it returns, with as little variation as possible in behaviour: no "pairs of options" and "pairs of control flags". You can tell if you missed a phase because you will be missing a `phase_N` call to some `N` between 1 and 6.

It does mean that people invoking librustc from outside need to write more function calls. The benefit is that they can _figure out what they're doing_ much more easily, and stop at any point, rather than further overloading the tangled logic of `compile_upto`.
Diffstat (limited to 'src/libstd/task')
0 files changed, 0 insertions, 0 deletions