rustc: Switch over to resolve3
This commit is contained in:
parent
2edc4195d5
commit
2c0aa257e2
@ -8,7 +8,7 @@ import parse::common::parser_common;
|
||||
|
||||
import pipes::parse_proto::proto_parser;
|
||||
|
||||
import pipes::pipec::*;
|
||||
import pipes::pipec::methods;
|
||||
|
||||
fn expand_proto(cx: ext_ctxt, _sp: span, id: ast::ident, tt: ast::token_tree)
|
||||
-> @ast::item
|
||||
@ -26,4 +26,4 @@ fn expand_proto(cx: ext_ctxt, _sp: span, id: ast::ident, tt: ast::token_tree)
|
||||
let proto = rust_parser.parse_proto(id);
|
||||
|
||||
proto.compile(cx)
|
||||
}
|
||||
}
|
||||
|
@ -12,17 +12,14 @@ export parse_crate_from_source_str;
|
||||
export parse_expr_from_source_str, parse_item_from_source_str;
|
||||
export parse_from_source_str;
|
||||
|
||||
// this used to be `import common::parser_common`, but it was causing
|
||||
// unresolved import errors. Maybe resolve3 will fix it.
|
||||
import common::*;
|
||||
import parser::parser;
|
||||
import attr::parser_attr;
|
||||
import common::parser_common;
|
||||
import ast::node_id;
|
||||
import util::interner;
|
||||
// FIXME (#1935): resolve badness
|
||||
import lexer::*;
|
||||
import diagnostic::{span_handler, mk_span_handler, mk_handler, emitter};
|
||||
import lexer::{reader, string_reader, string_reader_as_reader};
|
||||
import lexer::{tt_reader_as_reader};
|
||||
|
||||
type parse_sess = @{
|
||||
cm: codemap::codemap,
|
||||
|
@ -1,8 +1,8 @@
|
||||
import io::reader_util;
|
||||
import io::println;//XXXXXXXXxxx
|
||||
import util::interner;
|
||||
import lexer::{ string_reader, bump, is_eof, nextch,
|
||||
is_whitespace, get_str_from, string_reader_as_reader };
|
||||
import lexer::{string_reader, bump, is_eof, nextch,
|
||||
is_whitespace, get_str_from, string_reader_as_reader, reader};
|
||||
|
||||
export cmnt;
|
||||
export lit;
|
||||
|
@ -1,6 +1,7 @@
|
||||
import std::map::{hashmap};
|
||||
import ast_util::spanned;
|
||||
import parser::parser;
|
||||
import lexer::reader;
|
||||
|
||||
type seq_sep = {
|
||||
sep: option<token::token>,
|
||||
|
@ -5,7 +5,7 @@ import token::{can_begin_expr, is_ident, is_plain_ident, ACTUALLY};
|
||||
import codemap::{span,fss_none};
|
||||
import util::interner;
|
||||
import ast_util::{spanned, respan, mk_sp, ident_to_path, operator_prec};
|
||||
import lexer::reader;
|
||||
import lexer::{reader, tt_reader_as_reader};
|
||||
import prec::{as_prec, token_to_binop};
|
||||
import attr::parser_attr;
|
||||
import common::{seq_sep_trailing_disallowed, seq_sep_trailing_allowed,
|
||||
|
@ -168,26 +168,9 @@ fn compile_upto(sess: session, cfg: ast::crate_cfg,
|
||||
session::sess_os_to_meta_os(sess.targ_cfg.os),
|
||||
sess.opts.static));
|
||||
|
||||
let mut def_map;
|
||||
let mut impl_map;
|
||||
let mut exp_map;
|
||||
if sess.fast_resolve() {
|
||||
let { def_map: fast_dm, exp_map: fast_em, impl_map: fast_im } =
|
||||
time(time_passes, "fast resolution", ||
|
||||
middle::resolve3::resolve_crate(sess, ast_map, crate));
|
||||
|
||||
def_map = fast_dm;
|
||||
impl_map = fast_im;
|
||||
exp_map = fast_em;
|
||||
} else {
|
||||
let { def_map: normal_dm, exp_map: normal_em, impl_map: normal_im } =
|
||||
time(time_passes, "resolution", ||
|
||||
resolve::resolve_crate(sess, ast_map, crate));
|
||||
|
||||
def_map = normal_dm;
|
||||
impl_map = normal_im;
|
||||
exp_map = normal_em;
|
||||
}
|
||||
let { def_map: def_map, exp_map: exp_map, impl_map: impl_map } =
|
||||
time(time_passes, "resolution", ||
|
||||
middle::resolve3::resolve_crate(sess, ast_map, crate));
|
||||
|
||||
let freevars = time(time_passes, "freevar finding", ||
|
||||
freevars::annotate_freevars(def_map, crate));
|
||||
|
Loading…
Reference in New Issue
Block a user