Skip to content

Commit 3331fde

Browse files
committed
---
yaml --- r: 144573 b: refs/heads/try2 c: 8e3efc1 h: refs/heads/master i: 144571: 43c3b4a v: v3
1 parent 10b83c5 commit 3331fde

Some content is hidden

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

42 files changed

+2016
-624
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: 7a42dd807430f11678e004bbbad9eda3a550dea9
8+
refs/heads/try2: 8e3efc112f8eb61716c5e8c3fea8f2ef03d88498
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/mk/tests.mk

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -870,7 +870,8 @@ $(foreach host,$(CFG_HOST_TRIPLES), \
870870
$(eval $(foreach target,$(CFG_TARGET_TRIPLES), \
871871
$(eval $(call DEF_CHECK_FAST_FOR_T_H,,$(target),$(host))))))
872872

873-
check-fast: tidy check-fast-H-$(CFG_BUILD_TRIPLE)
873+
check-fast: tidy check-fast-H-$(CFG_BUILD_TRIPLE) check-stage2-std check-stage2-extra
874+
$(Q)$(CFG_PYTHON) $(S)src/etc/check-summary.py tmp/*.log
874875

875876
define DEF_CHECK_FAST_FOR_H
876877

branches/try2/src/compiletest/common.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,6 @@ pub struct config {
8383
// Run tests using the JIT
8484
jit: bool,
8585

86-
// Run tests using the new runtime
87-
newrt: bool,
88-
8986
// Target system to be tested
9087
target: ~str,
9188

branches/try2/src/compiletest/compiletest.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ pub fn parse_config(args: ~[~str]) -> config {
7171
optopt("", "ratchet-noise-percent",
7272
"percent change in metrics to consider noise", "N"),
7373
optflag("", "jit", "run tests under the JIT"),
74-
optflag("", "newrt", "run tests on the new runtime / scheduler"),
7574
optopt("", "target", "the target to build for", "TARGET"),
7675
optopt("", "adb-path", "path to the android debugger", "PATH"),
7776
optopt("", "adb-test-dir", "path to tests for the android debugger", "PATH"),
@@ -137,7 +136,6 @@ pub fn parse_config(args: ~[~str]) -> config {
137136
runtool: getopts::opt_maybe_str(matches, "runtool"),
138137
rustcflags: getopts::opt_maybe_str(matches, "rustcflags"),
139138
jit: getopts::opt_present(matches, "jit"),
140-
newrt: getopts::opt_present(matches, "newrt"),
141139
target: opt_str2(getopts::opt_maybe_str(matches, "target")).to_str(),
142140
adb_path: opt_str2(getopts::opt_maybe_str(matches, "adb-path")).to_str(),
143141
adb_test_dir:
@@ -171,7 +169,6 @@ pub fn log_config(config: &config) {
171169
logv(c, fmt!("runtool: %s", opt_str(&config.runtool)));
172170
logv(c, fmt!("rustcflags: %s", opt_str(&config.rustcflags)));
173171
logv(c, fmt!("jit: %b", config.jit));
174-
logv(c, fmt!("newrt: %b", config.newrt));
175172
logv(c, fmt!("target: %s", config.target));
176173
logv(c, fmt!("adb_path: %s", config.adb_path));
177174
logv(c, fmt!("adb_test_dir: %s", config.adb_test_dir));

branches/try2/src/compiletest/runtest.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -547,15 +547,13 @@ fn compile_test_(config: &config, props: &TestProps,
547547
fn exec_compiled_test(config: &config, props: &TestProps,
548548
testfile: &Path) -> ProcRes {
549549

550-
// If testing the new runtime then set the RUST_NEWRT env var
551550
let env = props.exec_env.clone();
552-
let env = if config.newrt { env + &[(~"RUST_NEWRT", ~"1")] } else { env };
553551

554552
match config.target {
555553

556554
~"arm-linux-androideabi" => {
557555
if (config.adb_device_status) {
558-
_arm_exec_compiled_test(config, props, testfile)
556+
_arm_exec_compiled_test(config, props, testfile, env)
559557
} else {
560558
_dummy_exec_compiled_test(config, props, testfile)
561559
}
@@ -781,7 +779,7 @@ stderr:\n\
781779
}
782780

783781
fn _arm_exec_compiled_test(config: &config, props: &TestProps,
784-
testfile: &Path) -> ProcRes {
782+
testfile: &Path, env: ~[(~str, ~str)]) -> ProcRes {
785783

786784
let args = make_run_args(config, props, testfile);
787785
let cmdline = make_cmdline("", args.prog, args.args);
@@ -807,6 +805,9 @@ fn _arm_exec_compiled_test(config: &config, props: &TestProps,
807805

808806
// run test via adb_run_wrapper
809807
runargs.push(~"shell");
808+
for (key, val) in env.move_iter() {
809+
runargs.push(fmt!("%s=%s", key, val));
810+
}
810811
runargs.push(fmt!("%s/adb_run_wrapper.sh", config.adb_test_dir));
811812
runargs.push(fmt!("%s", config.adb_test_dir));
812813
runargs.push(fmt!("%s", prog_short));

branches/try2/src/libextra/test.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -745,7 +745,7 @@ fn get_concurrency() -> uint {
745745
let opt_n: Option<uint> = FromStr::from_str(s);
746746
match opt_n {
747747
Some(n) if n > 0 => n,
748-
_ => fail!("RUST_TEST_TASKS is `%s`, should be a non-negative integer.", s)
748+
_ => fail!("RUST_TEST_TASKS is `%s`, should be a positive integer.", s)
749749
}
750750
}
751751
None => {

branches/try2/src/librustc/middle/resolve.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2585,11 +2585,13 @@ impl Resolver {
25852585
debug!("(resolving glob import) ... for value target");
25862586
dest_import_resolution.value_target =
25872587
Some(Target(containing_module, name_bindings));
2588+
dest_import_resolution.value_id = id;
25882589
}
25892590
if name_bindings.defined_in_public_namespace(TypeNS) {
25902591
debug!("(resolving glob import) ... for type target");
25912592
dest_import_resolution.type_target =
25922593
Some(Target(containing_module, name_bindings));
2594+
dest_import_resolution.type_id = id;
25932595
}
25942596
};
25952597

branches/try2/src/librustc/middle/trans/base.rs

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ use syntax::parse::token::{special_idents};
8787
use syntax::print::pprust::stmt_to_str;
8888
use syntax::{ast, ast_util, codemap, ast_map};
8989
use syntax::abi::{X86, X86_64, Arm, Mips};
90+
use syntax::visit::Visitor;
9091

9192
pub use middle::trans::context::task_llcx;
9293

@@ -2162,6 +2163,14 @@ pub fn trans_enum_def(ccx: @mut CrateContext, enum_definition: &ast::enum_def,
21622163
}
21632164
}
21642165

2166+
pub struct TransItemVisitor;
2167+
2168+
impl Visitor<@mut CrateContext> for TransItemVisitor {
2169+
fn visit_item(&mut self, i: @ast::item, ccx: @mut CrateContext) {
2170+
trans_item(ccx, i);
2171+
}
2172+
}
2173+
21652174
pub fn trans_item(ccx: @mut CrateContext, item: &ast::item) {
21662175
let _icx = push_ctxt("trans_item");
21672176
let path = match ccx.tcx.items.get_copy(&item.id) {
@@ -2193,15 +2202,10 @@ pub fn trans_item(ccx: @mut CrateContext, item: &ast::item) {
21932202
item.id,
21942203
item.attrs);
21952204
} else {
2196-
for stmt in body.stmts.iter() {
2197-
match stmt.node {
2198-
ast::stmt_decl(@codemap::spanned { node: ast::decl_item(i),
2199-
_ }, _) => {
2200-
trans_item(ccx, i);
2201-
}
2202-
_ => ()
2203-
}
2204-
}
2205+
// Be sure to travel more than just one layer deep to catch nested
2206+
// items in blocks and such.
2207+
let mut v = TransItemVisitor;
2208+
v.visit_block(body, ccx);
22052209
}
22062210
}
22072211
ast::item_impl(ref generics, _, _, ref ms) => {

branches/try2/src/librustc/middle/trans/meth.rs

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ use std::vec;
3737
use syntax::ast_map::{path, path_mod, path_name};
3838
use syntax::ast_util;
3939
use syntax::{ast, ast_map};
40+
use syntax::visit;
4041

4142
/**
4243
The main "translation" pass for methods. Generates code
@@ -56,7 +57,15 @@ pub fn trans_impl(ccx: @mut CrateContext,
5657
debug!("trans_impl(path=%s, name=%s, id=%?)",
5758
path.repr(tcx), name.repr(tcx), id);
5859

59-
if !generics.ty_params.is_empty() { return; }
60+
// Both here and below with generic methods, be sure to recurse and look for
61+
// items that we need to translate.
62+
if !generics.ty_params.is_empty() {
63+
let mut v = TransItemVisitor;
64+
for method in methods.iter() {
65+
visit::walk_method_helper(&mut v, *method, ccx);
66+
}
67+
return;
68+
}
6069
let sub_path = vec::append_one(path, path_name(name));
6170
for method in methods.iter() {
6271
if method.generics.ty_params.len() == 0u {
@@ -69,6 +78,9 @@ pub fn trans_impl(ccx: @mut CrateContext,
6978
*method,
7079
None,
7180
llfn);
81+
} else {
82+
let mut v = TransItemVisitor;
83+
visit::walk_method_helper(&mut v, *method, ccx);
7284
}
7385
}
7486
}

branches/try2/src/librustc/middle/ty.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4572,7 +4572,7 @@ pub fn visitor_object_ty(tcx: ctxt,
45724572
trait_ref.def_id,
45734573
trait_ref.substs.clone(),
45744574
RegionTraitStore(region),
4575-
ast::m_imm,
4575+
ast::m_mutbl,
45764576
EmptyBuiltinBounds())))
45774577
}
45784578

branches/try2/src/libstd/logging.rs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,16 +41,10 @@ pub fn console_off() {
4141
#[lang="log_type"]
4242
#[allow(missing_doc)]
4343
pub fn log_type<T>(_level: u32, object: &T) {
44-
use io;
45-
use repr;
46-
use str;
47-
48-
let bytes = do io::with_bytes_writer |writer| {
49-
repr::write_repr(writer, object);
50-
};
44+
use sys;
5145

5246
// XXX: Bad allocation
53-
let msg = str::from_bytes(bytes);
47+
let msg = sys::log_str(object);
5448
newsched_log_str(msg);
5549
}
5650

branches/try2/src/libstd/num/f32.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1142,6 +1142,10 @@ mod tests {
11421142
assert_eq!(infinity.abs_sub(&1f32), infinity);
11431143
assert_eq!(0f32.abs_sub(&neg_infinity), infinity);
11441144
assert_eq!(0f32.abs_sub(&infinity), 0f32);
1145+
}
1146+
1147+
#[test] #[ignore(cfg(windows))] // FIXME #8663
1148+
fn test_abs_sub_nowin() {
11451149
assert!(NaN.abs_sub(&-1f32).is_NaN());
11461150
assert!(1f32.abs_sub(&NaN).is_NaN());
11471151
}
@@ -1267,7 +1271,10 @@ mod tests {
12671271

12681272
assert_eq!(0f32.frexp(), (0f32, 0));
12691273
assert_eq!((-0f32).frexp(), (-0f32, 0));
1274+
}
12701275

1276+
#[test] #[ignore(cfg(windows))] // FIXME #8755
1277+
fn test_frexp_nowin() {
12711278
let inf: f32 = Float::infinity();
12721279
let neg_inf: f32 = Float::neg_infinity();
12731280
let nan: f32 = Float::NaN();

branches/try2/src/libstd/num/f64.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1192,6 +1192,10 @@ mod tests {
11921192
assert_eq!(infinity.abs_sub(&1f64), infinity);
11931193
assert_eq!(0f64.abs_sub(&neg_infinity), infinity);
11941194
assert_eq!(0f64.abs_sub(&infinity), 0f64);
1195+
}
1196+
1197+
#[test] #[ignore(cfg(windows))] // FIXME #8663
1198+
fn test_abs_sub_nowin() {
11951199
assert!(NaN.abs_sub(&-1f64).is_NaN());
11961200
assert!(1f64.abs_sub(&NaN).is_NaN());
11971201
}
@@ -1316,7 +1320,10 @@ mod tests {
13161320

13171321
assert_eq!(0f64.frexp(), (0f64, 0));
13181322
assert_eq!((-0f64).frexp(), (-0f64, 0));
1323+
}
13191324

1325+
#[test] #[ignore(cfg(windows))] // FIXME #8755
1326+
fn test_frexp_nowin() {
13201327
let inf: f64 = Float::infinity();
13211328
let neg_inf: f64 = Float::neg_infinity();
13221329
let nan: f64 = Float::NaN();

branches/try2/src/libstd/num/float.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1163,6 +1163,10 @@ mod tests {
11631163
assert_eq!(infinity.abs_sub(&1f), infinity);
11641164
assert_eq!(0f.abs_sub(&neg_infinity), infinity);
11651165
assert_eq!(0f.abs_sub(&infinity), 0f);
1166+
}
1167+
1168+
#[test] #[ignore(cfg(windows))] // FIXME #8663
1169+
fn test_abs_sub_nowin() {
11661170
assert!(NaN.abs_sub(&-1f).is_NaN());
11671171
assert!(1f.abs_sub(&NaN).is_NaN());
11681172
}
@@ -1288,7 +1292,10 @@ mod tests {
12881292

12891293
assert_eq!(0f.frexp(), (0f, 0));
12901294
assert_eq!((-0f).frexp(), (-0f, 0));
1295+
}
12911296

1297+
#[test] #[ignore(cfg(windows))] // FIXME #8755
1298+
fn test_frexp_nowin() {
12921299
let inf: float = Float::infinity();
12931300
let neg_inf: float = Float::neg_infinity();
12941301
let nan: float = Float::NaN();

0 commit comments

Comments
 (0)