Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,8 @@ CFG_CORELIB :=$(call CFG_LIB_NAME,core)
CFG_STDLIB :=$(call CFG_LIB_NAME,std)
CFG_LIBRUSTC :=$(call CFG_LIB_NAME,rustc)
CFG_LIBSYNTAX :=$(call CFG_LIB_NAME,syntax)
CFG_LIBTESTINGFUNS :=$(call CFG_LIB_NAME,testingfuns)
CFG_LIBCODEMAP :=$(call CFG_LIB_NAME,codemap)
CFG_LIBFUZZER :=$(call CFG_LIB_NAME,fuzzer)
CFG_LIBCARGO :=$(call CFG_LIB_NAME,cargo)
CFG_LIBRUSTDOC :=$(call CFG_LIB_NAME,rustdoc)
Expand All @@ -147,6 +149,8 @@ STDLIB_DSYM_GLOB :=$(call CFG_LIB_DSYM_GLOB,std)
CORELIB_DSYM_GLOB :=$(call CFG_LIB_DSYM_GLOB,core)
LIBRUSTC_DSYM_GLOB :=$(call CFG_LIB_DSYM_GLOB,rustc)
LIBSYNTAX_DSYM_GLOB :=$(call CFG_LIB_DSYM_GLOB,syntax)
LIBTESTINGFUNS_DSYM_GLOB :=$(call CFG_LIB_DSYM_GLOB,testingfuns)
LIBCODEMAP_DSYM_GLOB :=$(call CFG_LIB_DSYM_GLOB,codemap)
LIBFUZZER_DSYM_GLOB :=$(call CFG_LIB_DSYM_GLOB,fuzzer)
LIBCARGO_DSYM_GLOB :=$(call CFG_LIB_DSYM_GLOB,cargo)
LIBRUSTDOC_DSYM_GLOB :=$(call CFG_LIB_DSYM_GLOB,rustdoc)
Expand Down Expand Up @@ -230,10 +234,20 @@ COMPILER_CRATE := $(S)src/librustc/rustc.rc
COMPILER_INPUTS := $(wildcard $(addprefix $(S)src/librustc/, \
rustc.rc *.rs */*.rs */*/*.rs */*/*/*.rs))

## NB: these dependencies overlap with the ones for libtestingfuns
## and libcodemap, but there's an indirect dependency there anyway...
LIBSYNTAX_CRATE := $(S)src/libsyntax/syntax.rc
LIBSYNTAX_INPUTS := $(wildcard $(addprefix $(S)src/libsyntax/, \
syntax.rc *.rs */*.rs */*/*.rs))

LIBTESTINGFUNS_CRATE := $(S)src/libsyntax/util/testing.rs
LIBTESTINGFUNS_INPUTS := $(wildcard $(addprefix $(S)src/libsyntax/, \
util/testing.rs ))

LIBCODEMAP_CRATE := $(S)src/libsyntax/codemap.rs
LIBCODEMAP_INPUTS := $(wildcard $(addprefix $(S)src/libsyntax/, \
codemap.rs ))

DRIVER_CRATE := $(S)src/driver/driver.rs

######################################################################
Expand Down
13 changes: 13 additions & 0 deletions mk/host.mk
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ $$(HLIB$(2)_H_$(4))/$$(CFG_LIBSYNTAX): \
$$(TLIB$(1)_T_$(4)_H_$(3))/$$(CFG_LIBSYNTAX) \
$$(HLIB$(2)_H_$(4))/$$(CFG_RUNTIME) \
$$(HLIB$(2)_H_$(4))/$$(CFG_RUSTLLVM) \
$$(HLIB$(2)_H_$(4))/$$(CFG_LIBCODEMAP) \
$$(HCORELIB_DEFAULT$(2)_H_$(3)) \
$$(HSTDLIB_DEFAULT$(2)_H_$(3))
@$$(call E, cp: $$@)
Expand All @@ -56,6 +57,18 @@ $$(HLIB$(2)_H_$(4))/$$(CFG_LIBSYNTAX): \
$$(wildcard $$(TLIB$(1)_T_$(4)_H_$(3))/$(LIBSYNTAX_DSYM_GLOB)) \
$$(HLIB$(2)_H_$(4))

$$(HLIB$(2)_H_$(4))/$$(CFG_LIBCODEMAP): \
$$(TLIB$(1)_T_$(4)_H_$(3))/$$(CFG_LIBCODEMAP) \
$$(HLIB$(2)_H_$(4))/$$(CFG_RUNTIME) \
$$(HLIB$(2)_H_$(4))/$$(CFG_RUSTLLVM) \
$$(HCORELIB_DEFAULT$(2)_H_$(3)) \
$$(HSTDLIB_DEFAULT$(2)_H_$(3))
@$$(call E, cp: $$@)
$$(Q)cp $$< $$@
$$(Q)cp -R $$(TLIB$(1)_T_$(4)_H_$(3))/$(LIBCODEMAP_GLOB) \
$$(wildcard $$(TLIB$(1)_T_$(4)_H_$(3))/$(LIBCODEMAP_DSYM_GLOB)) \
$$(HLIB$(2)_H_$(4))

$$(HLIB$(2)_H_$(4))/$$(CFG_RUNTIME): \
$$(TLIB$(1)_T_$(4)_H_$(3))/$$(CFG_RUNTIME)
@$$(call E, cp: $$@)
Expand Down
19 changes: 19 additions & 0 deletions mk/target.mk
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,25 @@ $$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBSYNTAX): \
$$(LIBSYNTAX_CRATE) $$(LIBSYNTAX_INPUTS) \
$$(TSREQ$(1)_T_$(2)_H_$(3)) \
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_RUSTLLVM) \
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBCODEMAP) \
$$(TCORELIB_DEFAULT$(1)_T_$(2)_H_$(3)) \
$$(TSTDLIB_DEFAULT$(1)_T_$(2)_H_$(3))
@$$(call E, compile_and_link: $$@)
$$(STAGE$(1)_T_$(2)_H_$(3)) $(BORROWCK) -o $$@ $$< && touch $$@

$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBCODEMAP): \
$$(LIBCODEMAP_CRATE) $$(LIBCODEMAP_INPUTS) \
$$(TSREQ$(1)_T_$(2)_H_$(3)) \
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_RUSTLLVM) \
$$(TCORELIB_DEFAULT$(1)_T_$(2)_H_$(3)) \
$$(TSTDLIB_DEFAULT$(1)_T_$(2)_H_$(3))
@$$(call E, compile_and_link: $$@)
$$(STAGE$(1)_T_$(2)_H_$(3)) $(BORROWCK) -o $$@ $$< && touch $$@

$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBTESTINGFUNS): \
$$(LIBTESTINGFUNS_CRATE) $$(LIBTESTINGFUNS_INPUTS) \
$$(TSREQ$(1)_T_$(2)_H_$(3)) \
$$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_RUSTLLVM) \
$$(TCORELIB_DEFAULT$(1)_T_$(2)_H_$(3)) \
$$(TSTDLIB_DEFAULT$(1)_T_$(2)_H_$(3))
@$$(call E, compile_and_link: $$@)
Expand Down
4 changes: 2 additions & 2 deletions src/libfuzzer/fuzzer.rc
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,12 @@ fn common_exprs() -> ~[ast::expr] {
id: 0,
callee_id: -1,
node: e,
span: ast_util::dummy_sp(),
span: codemap::dummy_sp(),
}
}

fn dsl(l: ast::lit_) -> ast::lit {
ast::spanned { node: l, span: ast_util::dummy_sp() }
ast::spanned { node: l, span: codemap::dummy_sp() }
}

~[dse(ast::expr_break(option::None)),
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/driver/driver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ use std;
use syntax::ast;
use syntax::ast_map;
use syntax::attr;
use syntax::codemap;
use codemap;
use syntax::diagnostic;
use syntax::parse;
use syntax::print::{pp, pprust};
Expand Down
13 changes: 7 additions & 6 deletions src/librustc/driver/session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,11 @@ use core::cmp;
use core::option;
use syntax::ast::node_id;
use syntax::ast::{int_ty, uint_ty, float_ty};
use syntax::codemap::span;
use codemap::span;
use syntax::diagnostic;
use syntax::parse::parse_sess;
use syntax::{ast, codemap};
use syntax::ast;
use codemap;
use syntax;

enum os { os_win32, os_macos, os_linux, os_android, os_freebsd, }
Expand Down Expand Up @@ -345,12 +346,12 @@ mod test {
use syntax::ast_util;

fn make_crate_type_attr(+t: ~str) -> ast::attribute {
ast_util::respan(ast_util::dummy_sp(), ast::attribute_ {
ast_util::respan(codemap::dummy_sp(), ast::attribute_ {
style: ast::attr_outer,
value: ast_util::respan(ast_util::dummy_sp(),
value: ast_util::respan(codemap::dummy_sp(),
ast::meta_name_value(
~"crate_type",
ast_util::respan(ast_util::dummy_sp(),
ast_util::respan(codemap::dummy_sp(),
ast::lit_str(@t)))),
is_sugared_doc: false
})
Expand All @@ -360,7 +361,7 @@ mod test {
let mut attrs = ~[];
if with_bin { attrs += ~[make_crate_type_attr(~"bin")]; }
if with_lib { attrs += ~[make_crate_type_attr(~"lib")]; }
@ast_util::respan(ast_util::dummy_sp(), ast::crate_ {
@ast_util::respan(codemap::dummy_sp(), ast::crate_ {
module: ast::_mod { view_items: ~[], items: ~[] },
attrs: attrs,
config: ~[]
Expand Down
3 changes: 2 additions & 1 deletion src/librustc/front/core_inject.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ use core::vec;
use syntax::ast;
use syntax::ast_util::*;
use syntax::attr;
use syntax::codemap;
use codemap;
use codemap::dummy_sp;
use syntax::fold;

export maybe_inject_libcore_ref;
Expand Down
3 changes: 2 additions & 1 deletion src/librustc/front/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,12 @@ use core::option;
use core::vec;
use syntax::ast_util::*;
use syntax::attr;
use syntax::codemap::span;
use codemap::span;
use syntax::fold;
use syntax::print::pprust;
use syntax::{ast, ast_util};
use syntax::attr::attrs_contains_name;
use codemap::dummy_sp;

export modify_for_testing;

Expand Down
5 changes: 3 additions & 2 deletions src/librustc/metadata/creader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ use core::either;
use core::option;
use core::vec;
use syntax::attr;
use syntax::codemap::span;
use codemap;
use codemap::span;
use syntax::diagnostic::span_handler;
use syntax::parse::token::ident_interner;
use syntax::print::pprust;
Expand Down Expand Up @@ -295,7 +296,7 @@ fn resolve_crate_deps(e: env, cdata: @~[u8]) -> cstore::cnum_map {
// This is a new one so we've got to load it
// FIXME (#2404): Need better error reporting than just a bogus
// span.
let fake_span = ast_util::dummy_sp();
let fake_span = codemap::dummy_sp();
let local_cnum = resolve_crate(e, cname, cmetas,
/*bad*/copy dep.hash, fake_span);
cnum_map.insert(extrn_cnum, local_cnum);
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/metadata/csearch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ use std::ebml;
use std::map::HashMap;
use syntax::ast;
use syntax::ast_map;
use syntax::ast_util::dummy_sp;
use codemap::dummy_sp;
use syntax::ast_util;
use syntax::diagnostic::expect;
use syntax::diagnostic::span_handler;
Expand Down
3 changes: 2 additions & 1 deletion src/librustc/metadata/decoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ use syntax::diagnostic::span_handler;
use syntax::parse::token::ident_interner;
use syntax::print::pprust;
use syntax::{ast, ast_util};
use codemap;

export struct_dtor;
export get_struct_fields;
Expand Down Expand Up @@ -1023,7 +1024,7 @@ fn get_attributes(md: ebml::Doc) -> ~[ast::attribute] {
value: /*bad*/copy *meta_item,
is_sugared_doc: false,
},
span: ast_util::dummy_sp()
span: codemap::dummy_sp()
});
};
}
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/metadata/loader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use metadata::decoder;
use metadata::encoder;
use metadata::filesearch::FileSearch;
use metadata::filesearch;
use syntax::codemap::span;
use codemap::span;
use syntax::diagnostic::span_handler;
use syntax::parse::token::ident_interner;
use syntax::print::pprust;
Expand Down
3 changes: 2 additions & 1 deletion src/librustc/metadata/tydecode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ use syntax::ast;
use syntax::ast::*;
use syntax::ast_util;
use syntax::ast_util::respan;
use codemap;
use std::map::HashMap;

export parse_state_from_data;
Expand Down Expand Up @@ -121,7 +122,7 @@ fn parse_path(st: @pstate) -> @ast::path {
':' => { next(st); next(st); }
c => {
if c == '(' {
return @ast::path { span: ast_util::dummy_sp(),
return @ast::path { span: codemap::dummy_sp(),
global: false,
idents: idents,
rp: None,
Expand Down
6 changes: 3 additions & 3 deletions src/librustc/middle/astencode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ use std::serialize::Decodable;
use syntax::ast;
use syntax::ast_map;
use syntax::ast_util;
use syntax::codemap::span;
use syntax::codemap;
use codemap::span;
use codemap;
use syntax::diagnostic;
use syntax::fold::*;
use syntax::fold;
Expand Down Expand Up @@ -221,7 +221,7 @@ impl extended_decode_ctxt {
ast::def_id { crate: ast::local_crate, node: self.tr_id(did.node) }
}
fn tr_span(_span: span) -> span {
ast_util::dummy_sp() // FIXME (#1972): handle span properly
codemap::dummy_sp() // FIXME (#1972): handle span properly
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/librustc/middle/borrowck/check_loans.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ use std::map::HashMap;
use syntax::ast::{m_const, m_imm, m_mutbl};
use syntax::ast;
use syntax::ast_util;
use syntax::codemap::span;
use codemap::span;
use syntax::print::pprust;
use syntax::visit;

Expand Down
2 changes: 1 addition & 1 deletion src/librustc/middle/borrowck/gather_loans.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ use core::vec;
use std::map::HashMap;
use syntax::ast::{m_const, m_imm, m_mutbl};
use syntax::ast;
use syntax::codemap::span;
use codemap::span;
use syntax::print::pprust;
use syntax::visit;

Expand Down
2 changes: 1 addition & 1 deletion src/librustc/middle/borrowck/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ use syntax::ast::{mutability, m_mutbl, m_imm, m_const};
use syntax::ast;
use syntax::ast_map;
use syntax::ast_util;
use syntax::codemap::span;
use codemap::span;
use syntax::print::pprust;
use syntax::visit;

Expand Down
2 changes: 1 addition & 1 deletion src/librustc/middle/capture.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ use core::option;
use core::vec;
use std::map::HashMap;
use std::map;
use syntax::codemap::span;
use codemap::span;
use syntax::{ast, ast_util};

export capture_mode;
Expand Down
6 changes: 3 additions & 3 deletions src/librustc/middle/check_match.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ use core::vec;
use std::map::HashMap;
use std::sort;
use syntax::ast::*;
use syntax::ast_util::{variant_def_ids, dummy_sp, unguarded_pat, walk_pat};
use syntax::ast_util::{variant_def_ids, unguarded_pat, walk_pat};
use syntax::ast_util;
use syntax::codemap::span;
use codemap::{span, dummy_sp};
use syntax::print::pprust::pat_to_str;
use syntax::visit;

Expand Down Expand Up @@ -478,7 +478,7 @@ fn ctor_arity(cx: @MatchCheckCtxt, ctor: ctor, ty: ty::t) -> uint {
}

fn wild() -> @pat {
@pat {id: 0, node: pat_wild, span: ast_util::dummy_sp()}
@pat {id: 0, node: pat_wild, span: dummy_sp()}
}

fn specialize(cx: @MatchCheckCtxt, +r: ~[@pat], ctor_id: ctor, arity: uint,
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/middle/freevars.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ use core::int;
use core::option::*;
use core::vec;
use std::map::*;
use syntax::codemap::span;
use codemap::span;
use syntax::print::pprust::path_to_str;
use syntax::{ast, ast_util, visit};

Expand Down
2 changes: 1 addition & 1 deletion src/librustc/middle/kind.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ use core::str;
use core::vec;
use std::map::HashMap;
use syntax::ast::*;
use syntax::codemap::span;
use codemap::span;
use syntax::print::pprust::expr_to_str;
use syntax::{visit, ast_util};

Expand Down
2 changes: 1 addition & 1 deletion src/librustc/middle/lint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ use std::smallintmap::{Map, SmallIntMap};
use std::smallintmap;
use syntax::ast_util::{path_to_ident};
use syntax::attr;
use syntax::codemap::span;
use codemap::span;
use syntax::print::pprust::{expr_to_str, mode_to_str, pat_to_str};
use syntax::{ast, ast_util, visit};

Expand Down
2 changes: 1 addition & 1 deletion src/librustc/middle/liveness.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ use core::uint;
use core::vec;
use std::map::HashMap;
use syntax::ast::*;
use syntax::codemap::span;
use codemap::span;
use syntax::parse::token::special_idents;
use syntax::print::pprust::{expr_to_str, block_to_str};
use syntax::visit::{fk_anon, fk_dtor, fk_fn_block, fk_item_fn, fk_method};
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/middle/mem_categorization.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ use core::to_bytes;
use core::uint;
use syntax::ast::{m_imm, m_const, m_mutbl};
use syntax::ast;
use syntax::codemap::span;
use codemap::span;
use syntax::print::pprust;

#[deriving_eq]
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/middle/mode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ use syntax::ast::{fn_decl, blk};
use syntax::visit;
use syntax::visit::{fn_kind, vt};
use syntax::print::pprust;
use syntax::codemap::span;
use codemap::span;

struct VisitContext {
tcx: ctxt,
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/middle/pat_util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ use syntax::ast_util;
use syntax::ast_util::{path_to_ident, respan, walk_pat};
use syntax::fold;
use syntax::fold::*;
use syntax::codemap::span;
use codemap::span;
use std::map::HashMap;

export pat_binding_ids, pat_bindings, pat_id_map, PatIdMap;
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/middle/privacy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ use syntax::ast_map::{node_item, node_method};
use syntax::ast_map;
use syntax::ast_util::{Private, Public, has_legacy_export_attr, is_local};
use syntax::ast_util::{visibility_to_privacy};
use syntax::codemap::span;
use codemap::span;
use syntax::visit;

fn check_crate(tcx: ty::ctxt, method_map: &method_map, crate: @ast::crate) {
Expand Down
Loading