Merge
This commit is contained in:
parent
6282e5da67
commit
0c3290a217
7 changed files with 17 additions and 19 deletions
|
@ -146,7 +146,7 @@ pub fn find_extern_mod_stmt_cnum(cstore: @mut CStore,
|
|||
// returns hashes of crates directly used by this crate. Hashes are
|
||||
// sorted by crate name.
|
||||
pub fn get_dep_hashes(cstore: @mut CStore) -> ~[~str] {
|
||||
struct crate_hash { name: ~str, hash: ~str }
|
||||
struct crate_hash { name: @~str, hash: @~str }
|
||||
let mut result = ~[];
|
||||
|
||||
let extern_mod_crate_map = cstore.extern_mod_crate_map;
|
||||
|
@ -155,7 +155,7 @@ pub fn get_dep_hashes(cstore: @mut CStore) -> ~[~str] {
|
|||
let hash = decoder::get_crate_hash(cdata.data);
|
||||
debug!("Add hash[%s]: %s", *cdata.name, *hash);
|
||||
result.push(crate_hash {
|
||||
name: /*bad*/copy cdata.name,
|
||||
name: cdata.name,
|
||||
hash: hash
|
||||
});
|
||||
}
|
||||
|
|
|
@ -89,8 +89,8 @@ fn find_library_crate_aux(cx: Context,
|
|||
filesearch: filesearch::FileSearch) ->
|
||||
Option<(~str, @~[u8])> {
|
||||
let crate_name = crate_name_from_metas(/*bad*/copy cx.metas);
|
||||
let prefix: ~str = prefix + crate_name + ~"-";
|
||||
let suffix: ~str = /*bad*/copy nn.suffix;
|
||||
let prefix: ~str = prefix + *crate_name + ~"-";
|
||||
let suffix: ~str = /*bad*/copy suffix;
|
||||
|
||||
let mut matches = ~[];
|
||||
filesearch::search(filesearch, |path| {
|
||||
|
|
|
@ -113,7 +113,7 @@ struct LintSpec {
|
|||
default: level
|
||||
}
|
||||
|
||||
pub type LintDict = HashMap<~str, @LintSpec>;
|
||||
pub type LintDict = HashMap<@~str, @LintSpec>;
|
||||
|
||||
/*
|
||||
Pass names should not contain a '-', as the compiler normalizes
|
||||
|
|
|
@ -1047,21 +1047,19 @@ pub fn load_if_immediate(cx: block, v: ValueRef, t: ty::t) -> ValueRef {
|
|||
return v;
|
||||
}
|
||||
|
||||
pub fn trans_trace(bcx: block, sp_opt: Option<span>, trace_str: ~str) {
|
||||
pub fn trans_trace(bcx: block, sp_opt: Option<span>, trace_str: @~str) {
|
||||
if !bcx.sess().trace() { return; }
|
||||
let _icx = bcx.insn_ctxt("trans_trace");
|
||||
add_comment(bcx, trace_str);
|
||||
add_comment(bcx, *trace_str);
|
||||
let V_trace_str = C_cstr(bcx.ccx(), trace_str);
|
||||
let (V_filename, V_line) = match sp_opt {
|
||||
Some(sp) => {
|
||||
let sess = bcx.sess();
|
||||
let loc = sess.parse_sess.cm.lookup_char_pos(sp.lo);
|
||||
(C_cstr(bcx.ccx(), @/*bad*/copy loc.file.name),
|
||||
V_line: loc.line as int)
|
||||
(C_cstr(bcx.ccx(), @/*bad*/copy loc.file.name), loc.line as int)
|
||||
}
|
||||
None => {
|
||||
(V_filename: C_cstr(bcx.ccx(), @~"<runtime>"),
|
||||
V_line: 0)
|
||||
(C_cstr(bcx.ccx(), @~"<runtime>"), 0)
|
||||
}
|
||||
};
|
||||
let ccx = bcx.ccx();
|
||||
|
@ -1300,11 +1298,11 @@ pub fn cleanup_and_leave(bcx: block,
|
|||
if bcx.sess().trace() {
|
||||
trans_trace(
|
||||
bcx, None,
|
||||
fmt!("cleanup_and_leave(%s)", cur.to_str()));
|
||||
@fmt!("cleanup_and_leave(%s)", cur.to_str()));
|
||||
}
|
||||
|
||||
match cur.kind {
|
||||
block_scope(ref inf) if (*inf).cleanups.len() > 0u => {
|
||||
block_scope(ref inf) if !inf.cleanups.is_empty() => {
|
||||
for vec::find((*inf).cleanup_paths,
|
||||
|cp| cp.target == leave).each |cp| {
|
||||
Br(bcx, cp.dest);
|
||||
|
|
|
@ -380,7 +380,7 @@ fn trans_fail_value(bcx: block,
|
|||
let sess = bcx.sess();
|
||||
let loc = sess.parse_sess.cm.lookup_char_pos(sp.lo);
|
||||
(C_cstr(bcx.ccx(), @/*bad*/ copy loc.file.name),
|
||||
V_line: loc.line as int)
|
||||
loc.line as int)
|
||||
}
|
||||
None => {
|
||||
(C_cstr(bcx.ccx(), @~"<runtime>"), 0)
|
||||
|
|
|
@ -530,7 +530,7 @@ pub impl Datum {
|
|||
if bcx.sess().trace() {
|
||||
trans_trace(
|
||||
bcx, None,
|
||||
fmt!("preserving until end of scope %d",
|
||||
@fmt!("preserving until end of scope %d",
|
||||
root_info.scope));
|
||||
}
|
||||
|
||||
|
|
|
@ -409,7 +409,7 @@ fn trans_to_datum_unadjusted(bcx: block, expr: @ast::expr) -> DatumBlock {
|
|||
fn trans_rvalue_datum_unadjusted(bcx: block, expr: @ast::expr) -> DatumBlock {
|
||||
let _icx = bcx.insn_ctxt("trans_rvalue_datum_unadjusted");
|
||||
|
||||
trace_span!(bcx, expr.span, shorten(bcx.expr_to_str(expr)));
|
||||
trace_span!(bcx, expr.span, @shorten(bcx.expr_to_str(expr)));
|
||||
|
||||
match expr.node {
|
||||
ast::expr_vstore(contents, ast::expr_vstore_box) |
|
||||
|
@ -456,7 +456,7 @@ fn trans_rvalue_stmt_unadjusted(bcx: block, expr: @ast::expr) -> block {
|
|||
let mut bcx = bcx;
|
||||
let _icx = bcx.insn_ctxt("trans_rvalue_stmt");
|
||||
|
||||
trace_span!(bcx, expr.span, shorten(bcx.expr_to_str(expr)));
|
||||
trace_span!(bcx, expr.span, @shorten(bcx.expr_to_str(expr)));
|
||||
|
||||
match expr.node {
|
||||
ast::expr_break(label_opt) => {
|
||||
|
@ -537,7 +537,7 @@ fn trans_rvalue_dps_unadjusted(bcx: block, expr: @ast::expr,
|
|||
let _icx = bcx.insn_ctxt("trans_rvalue_dps_unadjusted");
|
||||
let tcx = bcx.tcx();
|
||||
|
||||
trace_span!(bcx, expr.span, shorten(bcx.expr_to_str(expr)));
|
||||
trace_span!(bcx, expr.span, @shorten(bcx.expr_to_str(expr)));
|
||||
|
||||
match expr.node {
|
||||
ast::expr_paren(e) => {
|
||||
|
@ -728,7 +728,7 @@ fn trans_lvalue_unadjusted(bcx: block, expr: @ast::expr) -> DatumBlock {
|
|||
debug!("trans_lvalue(expr=%s)", bcx.expr_to_str(expr));
|
||||
let _indenter = indenter();
|
||||
|
||||
trace_span!(bcx, expr.span, shorten(bcx.expr_to_str(expr)));
|
||||
trace_span!(bcx, expr.span, @shorten(bcx.expr_to_str(expr)));
|
||||
|
||||
let unrooted_datum = unpack_datum!(bcx, unrooted(bcx, expr));
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue