Skip to content

Commit df43b7b

Browse files
committed
---
yaml --- r: 6923 b: refs/heads/master c: 0490c36 h: refs/heads/master i: 6921: 810f878 6919: 51d1753 v: v3
1 parent 608183a commit df43b7b

File tree

340 files changed

+1485
-1758
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

340 files changed

+1485
-1758
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: 8b580954fe140dd45db61d719a49065c3e31de95
2+
refs/heads/master: 0490c36143a525d3e17598531e47eab06381ae84

trunk/src/cargo/cargo.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ fn try_parse_sources(filename: str, sources: map::hashmap<str, source>) {
203203
some(json::dict(_j)) {
204204
_j.items { |k, v|
205205
sources.insert(k, parse_source(k, v));
206-
#debug("source: %s", k);
206+
log #fmt["source: %s", k];
207207
}
208208
}
209209
_ { fail "malformed sources.json"; }
@@ -269,11 +269,11 @@ fn load_one_source_package(&src: source, p: map::hashmap<str, json::json>) {
269269
ref: ref,
270270
tags: tags
271271
});
272-
log_full(core::debug, " Loaded package: " + src.name + "/" + name);
272+
log " Loaded package: " + src.name + "/" + name;
273273
}
274274

275275
fn load_source_packages(&c: cargo, &src: source) {
276-
log_full(core::debug, "Loading source: " + src.name);
276+
log "Loading source: " + src.name;
277277
let dir = fs::connect(c.sourcedir, src.name);
278278
let pkgfile = fs::connect(dir, "packages.json");
279279
if !fs::path_exists(pkgfile) { ret; }
@@ -356,7 +356,7 @@ fn install_one_crate(c: cargo, _path: str, cf: str, _p: pkg) {
356356
if ri != -1 {
357357
name = str::slice(name, 0u, ri as uint);
358358
}
359-
#debug("Installing: %s", name);
359+
log #fmt["Installing: %s", name];
360360
let old = fs::list_dir(".");
361361
let p = run::program_output("rustc", [name + ".rc"]);
362362
if p.status != 0 {
@@ -370,22 +370,22 @@ fn install_one_crate(c: cargo, _path: str, cf: str, _p: pkg) {
370370
for ct: str in created {
371371
if (exec_suffix != "" && str::ends_with(ct, exec_suffix)) ||
372372
(exec_suffix == "" && !str::starts_with(ct, "./lib")) {
373-
#debug(" bin: %s", ct);
373+
log #fmt[" bin: %s", ct];
374374
// FIXME: need libstd fs::copy or something
375375
run::run_program("cp", [ct, c.bindir]);
376376
} else {
377-
#debug(" lib: %s", ct);
377+
log #fmt[" lib: %s", ct];
378378
run::run_program("cp", [ct, c.libdir]);
379379
}
380380
}
381381
}
382382

383383
fn install_source(c: cargo, path: str) {
384-
#debug("source: %s", path);
384+
log #fmt["source: %s", path];
385385
fs::change_dir(path);
386386
let contents = fs::list_dir(".");
387387

388-
#debug("contents: %s", str::connect(contents, ", "));
388+
log #fmt["contents: %s", str::connect(contents, ", ")];
389389

390390
let cratefiles =
391391
vec::filter::<str>(contents, { |n| str::ends_with(n, ".rc") });

trunk/src/comp/back/link.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -588,15 +588,15 @@ fn link_binary(sess: session::session,
588588
let long_libname =
589589
std::os::dylib_filename(#fmt("%s-%s-%s",
590590
lm.name, lm.extras_hash, lm.vers));
591-
#debug("link_meta.name: %s", lm.name);
592-
#debug("long_libname: %s", long_libname);
593-
#debug("out_filename: %s", out_filename);
594-
#debug("dirname(out_filename): %s", fs::dirname(out_filename));
591+
log "link_meta.name: " + lm.name;
592+
log "long_libname: " + long_libname;
593+
log "out_filename: " + out_filename;
594+
log "dirname(out_filename): " + fs::dirname(out_filename);
595595

596596
fs::connect(fs::dirname(out_filename), long_libname)
597597
} else { out_filename };
598598

599-
log_full(core::debug, "output: " + output);
599+
log "output: " + output;
600600

601601
// The default library location, we need this to find the runtime.
602602
// The location of crates will be determined as needed.
@@ -670,7 +670,7 @@ fn link_binary(sess: session::session,
670670

671671
gcc_args += rpath::get_rpath_flags(sess, output);
672672

673-
#debug("gcc link args: %s", str::connect(gcc_args, " "));
673+
log #fmt("gcc link args: %s", str::connect(gcc_args, " "));
674674
// We run 'gcc' here
675675
let prog = run::program_output(prog, gcc_args);
676676
if 0 != prog.status {

trunk/src/comp/back/rpath.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ fn get_rpath_flags(sess: session::session, out_filename: str) -> [str] {
2121
ret [];
2222
}
2323

24-
#debug("preparing the RPATH!");
24+
log "preparing the RPATH!";
2525

2626
let cwd = os::getcwd();
2727
let sysroot = sess.filesearch().sysroot();
@@ -52,14 +52,14 @@ fn rpaths_to_flags(rpaths: [str]) -> [str] {
5252
fn get_rpaths(os: session::os, cwd: fs::path, sysroot: fs::path,
5353
output: fs::path, libs: [fs::path],
5454
target_triple: str) -> [str] {
55-
#debug("cwd: %s", cwd);
56-
#debug("sysroot: %s", sysroot);
57-
#debug("output: %s", output);
58-
#debug("libs:");
55+
log #fmt("cwd: %s", cwd);
56+
log #fmt("sysroot: %s", sysroot);
57+
log #fmt("output: %s", output);
58+
log #fmt("libs:");
5959
for libpath in libs {
60-
#debug(" %s", libpath);
60+
log #fmt(" %s", libpath);
6161
}
62-
#debug("target_triple: %s", target_triple);
62+
log #fmt("target_triple: %s", target_triple);
6363

6464
// Use relative paths to the libraries. Binaries can be moved
6565
// as long as they maintain the relative relationship to the
@@ -74,9 +74,9 @@ fn get_rpaths(os: session::os, cwd: fs::path, sysroot: fs::path,
7474
let fallback_rpaths = [get_install_prefix_rpath(cwd, target_triple)];
7575

7676
fn log_rpaths(desc: str, rpaths: [str]) {
77-
#debug("%s rpaths:", desc);
77+
log #fmt("%s rpaths:", desc);
7878
for rpath in rpaths {
79-
#debug(" %s", rpath);
79+
log #fmt(" %s", rpath);
8080
}
8181
}
8282

trunk/src/comp/front/attr.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ fn find_linkage_metas(attrs: [ast::attribute]) -> [@ast::meta_item] {
3434
for attr: ast::attribute in find_attrs_by_name(attrs, "link") {
3535
alt attr.node.value.node {
3636
ast::meta_list(_, items) { metas += items; }
37-
_ { #debug("ignoring link attribute that has incorrect type"); }
37+
_ { log "ignoring link attribute that has incorrect type"; }
3838
}
3939
}
4040
ret metas;
@@ -140,9 +140,9 @@ fn contains(haystack: [@ast::meta_item], needle: @ast::meta_item) -> bool {
140140
for item: @ast::meta_item in haystack {
141141
log #fmt["looking in %s",
142142
syntax::print::pprust::meta_item_to_str(*item)];
143-
if eq(item, needle) { #debug("found it!"); ret true; }
143+
if eq(item, needle) { log "found it!"; ret true; }
144144
}
145-
#debug("found it not :(");
145+
log "found it not :(";
146146
ret false;
147147
}
148148

trunk/src/comp/front/test.rs

Lines changed: 19 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ fn fold_mod(_cx: test_ctxt, m: ast::_mod, fld: fold::ast_fold) -> ast::_mod {
5151
// we want to be main.
5252
fn nomain(&&item: @ast::item) -> option::t<@ast::item> {
5353
alt item.node {
54-
ast::item_fn(f, _) {
54+
ast::item_fn(_, _, _) {
5555
if item.ident == "main" {
5656
option::none
5757
} else { option::some(item) }
@@ -79,22 +79,22 @@ fn fold_item(cx: test_ctxt, &&i: @ast::item, fld: fold::ast_fold) ->
7979
@ast::item {
8080

8181
cx.path += [i.ident];
82-
#debug("current path: %s", ast_util::path_name_i(cx.path));
82+
log #fmt["current path: %s", ast_util::path_name_i(cx.path)];
8383

8484
if is_test_fn(i) {
8585
alt i.node {
86-
ast::item_fn(f, _) when f.decl.purity == ast::unsafe_fn {
86+
ast::item_fn(decl, _, _) when decl.purity == ast::unsafe_fn {
8787
cx.sess.span_fatal(
8888
i.span,
8989
"unsafe functions cannot be used for tests");
9090
}
9191
_ {
92-
#debug("this is a test function");
92+
log "this is a test function";
9393
let test = {span: i.span,
9494
path: cx.path, ignore: is_ignored(cx, i),
9595
should_fail: should_fail(i)};
9696
cx.testfns += [test];
97-
#debug("have %u test functions", vec::len(cx.testfns));
97+
log #fmt["have %u test functions", vec::len(cx.testfns)];
9898
}
9999
}
100100
}
@@ -110,9 +110,9 @@ fn is_test_fn(i: @ast::item) -> bool {
110110

111111
fn has_test_signature(i: @ast::item) -> bool {
112112
alt i.node {
113-
ast::item_fn(f, tps) {
114-
let input_cnt = vec::len(f.decl.inputs);
115-
let no_output = f.decl.output.node == ast::ty_nil;
113+
ast::item_fn(decl, tps, _) {
114+
let input_cnt = vec::len(decl.inputs);
115+
let no_output = decl.output.node == ast::ty_nil;
116116
let tparm_cnt = vec::len(tps);
117117
input_cnt == 0u && no_output && tparm_cnt == 0u
118118
}
@@ -177,7 +177,7 @@ fn mk_test_module(cx: test_ctxt) -> @ast::item {
177177
node: item_,
178178
span: dummy_sp()};
179179

180-
#debug("Synthetic test module:\n%s\n", pprust::item_to_str(@item));
180+
log #fmt["Synthetic test module:\n%s\n", pprust::item_to_str(@item)];
181181

182182
ret @item;
183183
}
@@ -190,13 +190,12 @@ fn mk_tests(cx: test_ctxt) -> @ast::item {
190190
let ret_ty = mk_test_desc_vec_ty(cx);
191191

192192
let decl: ast::fn_decl =
193-
{inputs: [],
193+
{proto: ast::proto_bare,
194+
inputs: [],
194195
output: ret_ty,
195196
purity: ast::impure_fn,
196-
il: ast::il_normal,
197197
cf: ast::return_val,
198198
constraints: []};
199-
let proto = ast::proto_bare;
200199

201200
// The vector of test_descs for this crate
202201
let test_descs = mk_test_desc_vec(cx);
@@ -205,9 +204,7 @@ fn mk_tests(cx: test_ctxt) -> @ast::item {
205204
default_block([], option::some(test_descs), cx.sess.next_node_id());
206205
let body = nospan(body_);
207206

208-
let fn_ = {decl: decl, proto: proto, body: body};
209-
210-
let item_ = ast::item_fn(fn_, []);
207+
let item_ = ast::item_fn(decl, [], body);
211208
let item: ast::item =
212209
{ident: "tests",
213210
attrs: [],
@@ -242,7 +239,7 @@ fn mk_test_desc_vec_ty(cx: test_ctxt) -> @ast::ty {
242239
}
243240

244241
fn mk_test_desc_vec(cx: test_ctxt) -> @ast::expr {
245-
#debug("building test vector from %u tests", vec::len(cx.testfns));
242+
log #fmt["building test vector from %u tests", vec::len(cx.testfns)];
246243
let descs = [];
247244
for test: test in cx.testfns {
248245
let test_ = test; // Satisfy alias analysis
@@ -258,7 +255,7 @@ fn mk_test_desc_rec(cx: test_ctxt, test: test) -> @ast::expr {
258255
let span = test.span;
259256
let path = test.path;
260257

261-
#debug("encoding %s", ast_util::path_name_i(path));
258+
log #fmt["encoding %s", ast_util::path_name_i(path)];
262259

263260
let name_lit: ast::lit =
264261
nospan(ast::lit_str(ast_util::path_name_i(path)));
@@ -325,10 +322,10 @@ fn mk_test_wrapper(cx: test_ctxt,
325322
ast::stmt_expr(@call_expr, cx.sess.next_node_id()));
326323

327324
let wrapper_decl: ast::fn_decl = {
325+
proto: ast::proto_bare,
328326
inputs: [],
329327
output: @nospan(ast::ty_nil),
330328
purity: ast::impure_fn,
331-
il: ast::il_normal,
332329
cf: ast::return_val,
333330
constraints: []
334331
};
@@ -341,20 +338,14 @@ fn mk_test_wrapper(cx: test_ctxt,
341338
rules: ast::default_blk
342339
});
343340

344-
let wrapper_fn: ast::_fn = {
345-
decl: wrapper_decl,
346-
proto: ast::proto_bare,
347-
body: wrapper_body
348-
};
349-
350341
let wrapper_capture: @ast::capture_clause = @{
351342
copies: [],
352343
moves: []
353344
};
354345

355346
let wrapper_expr: ast::expr = {
356347
id: cx.sess.next_node_id(),
357-
node: ast::expr_fn(wrapper_fn, wrapper_capture),
348+
node: ast::expr_fn(wrapper_decl, wrapper_body, wrapper_capture),
358349
span: span
359350
};
360351

@@ -375,13 +366,12 @@ fn mk_main(cx: test_ctxt) -> @ast::item {
375366
let ret_ty = nospan(ast::ty_nil);
376367

377368
let decl: ast::fn_decl =
378-
{inputs: [args_arg],
369+
{proto: ast::proto_bare,
370+
inputs: [args_arg],
379371
output: @ret_ty,
380372
purity: ast::impure_fn,
381-
il: ast::il_normal,
382373
cf: ast::return_val,
383374
constraints: []};
384-
let proto = ast::proto_bare;
385375

386376
let test_main_call_expr = mk_test_main_call(cx);
387377

@@ -390,9 +380,7 @@ fn mk_main(cx: test_ctxt) -> @ast::item {
390380
cx.sess.next_node_id());
391381
let body = {node: body_, span: dummy_sp()};
392382

393-
let fn_ = {decl: decl, proto: proto, body: body};
394-
395-
let item_ = ast::item_fn(fn_, []);
383+
let item_ = ast::item_fn(decl, [], body);
396384
let item: ast::item =
397385
{ident: "main",
398386
attrs: [],

trunk/src/comp/lib/llvm.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1010,7 +1010,7 @@ fn type_to_str_inner(names: type_names, outer0: [TypeRef], ty: TypeRef) ->
10101010
12 { ret "Opaque"; }
10111011
13 { ret "Vector"; }
10121012
14 { ret "Metadata"; }
1013-
_ { #error("unknown TypeKind %d", kind as int); fail; }
1013+
_ { log_err #fmt["unknown TypeKind %d", kind as int]; fail; }
10141014
}
10151015
}
10161016

trunk/src/comp/metadata/common.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,6 @@ const tag_crate_deps: uint = 0x25u;
6262
// A single crate dependency
6363
const tag_crate_dep: uint = 0x26u;
6464

65-
const tag_items_data_item_inlineness: uint = 0x27u;
66-
6765
const tag_crate_hash: uint = 0x28u;
6866

6967
const tag_mod_impl: uint = 0x30u;

0 commit comments

Comments
 (0)