diff options
| author | Niko Matsakis <niko@alum.mit.edu> | 2012-07-11 10:28:30 -0700 |
|---|---|---|
| committer | Niko Matsakis <niko@alum.mit.edu> | 2012-07-11 14:41:41 -0700 |
| commit | b9aa9def858cfc66d411972b10ce3d98479acd78 (patch) | |
| tree | c65223b2926112a34427574cdd9c2feee6d06430 /src/rustc/driver | |
| parent | 9b094c0baf4fa758c80fb9db8cc172f03789adbb (diff) | |
| download | rust-b9aa9def858cfc66d411972b10ce3d98479acd78.tar.gz rust-b9aa9def858cfc66d411972b10ce3d98479acd78.zip | |
infer when types are region parameterized rather than requiring /&
- removes various fields from various variants in the AST - also update tests not to use this notation
Diffstat (limited to 'src/rustc/driver')
| -rw-r--r-- | src/rustc/driver/driver.rs | 6 | ||||
| -rw-r--r-- | src/rustc/driver/session.rs | 8 |
2 files changed, 11 insertions, 3 deletions
diff --git a/src/rustc/driver/driver.rs b/src/rustc/driver/driver.rs index 606bcd77e1a..cec72045bca 100644 --- a/src/rustc/driver/driver.rs +++ b/src/rustc/driver/driver.rs @@ -178,7 +178,11 @@ fn compile_upto(sess: session, cfg: ast::crate_cfg, let region_map = time(time_passes, "region resolution", || middle::region::resolve_crate(sess, def_map, crate)); - let ty_cx = ty::mk_ctxt(sess, def_map, ast_map, freevars, region_map); + let rp_set = time(time_passes, "region paramerization inference", || + middle::region::determine_rp_in_crate(sess, ast_map, def_map, crate)); + + let ty_cx = ty::mk_ctxt(sess, def_map, ast_map, freevars, + region_map, rp_set); let (method_map, vtable_map) = time(time_passes, "typechecking", || typeck::check_crate(ty_cx, diff --git a/src/rustc/driver/session.rs b/src/rustc/driver/session.rs index cffec613e60..be21555a1d7 100644 --- a/src/rustc/driver/session.rs +++ b/src/rustc/driver/session.rs @@ -38,6 +38,7 @@ const no_rt: uint = 256u; const coherence: uint = 512u; const borrowck_stats: uint = 1024u; const borrowck_note_pure: uint = 2048; +const borrowck_note_loan: uint = 4096; fn debugging_opts_map() -> ~[(str, str, uint)] { ~[("ppregions", "prettyprint regions with \ @@ -46,7 +47,7 @@ fn debugging_opts_map() -> ~[(str, str, uint)] { ("count-llvm-insns", "count where LLVM \ instrs originate", count_llvm_insns), ("time-llvm-passes", "measure time of each LLVM pass", time_llvm_passes), - ("stats", "gather trans statistics", stats), + ("trans-stats", "gather trans statistics", trans_stats), ("no-asm-comments", "omit comments when using -S", no_asm_comments), ("no-verify", "skip LLVM verification", no_verify), ("trace", "emit trace logs", trace), @@ -54,7 +55,9 @@ fn debugging_opts_map() -> ~[(str, str, uint)] { ("coherence", "perform coherence checking", coherence), ("borrowck-stats", "gather borrowck statistics", borrowck_stats), ("borrowck-note-pure", "note where purity is req'd", - borrowck_note_pure) + borrowck_note_pure), + ("borrowck-note-loan", "note where loans are req'd", + borrowck_note_loan) ] } @@ -172,6 +175,7 @@ impl session for session { fn coherence() -> bool { self.debugging_opt(coherence) } fn borrowck_stats() -> bool { self.debugging_opt(borrowck_stats) } fn borrowck_note_pure() -> bool { self.debugging_opt(borrowck_note_pure) } + fn borrowck_note_loan() -> bool { self.debugging_opt(borrowck_note_loan) } } /// Some reasonable defaults |
