Skip to content

Commit 1848c22

Browse files
committed
---
yaml --- r: 144569 b: refs/heads/try2 c: 20def31 h: refs/heads/master i: 144567: 586790b v: v3
1 parent 41bb713 commit 1848c22

Some content is hidden

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

43 files changed

+627
-2018
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: f9142536a6e500c4f0fa70c433ef8026757bb9f0
8+
refs/heads/try2: 20def317685b39a35416397b35940a4d040bf72f
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: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -870,8 +870,7 @@ $(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) check-stage2-std check-stage2-extra
874-
$(Q)$(CFG_PYTHON) $(S)src/etc/check-summary.py tmp/*.log
873+
check-fast: tidy check-fast-H-$(CFG_BUILD_TRIPLE)
875874

876875
define DEF_CHECK_FAST_FOR_H
877876

branches/try2/src/compiletest/common.rs

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

86+
// Run tests using the new runtime
87+
newrt: bool,
88+
8689
// Target system to be tested
8790
target: ~str,
8891

branches/try2/src/compiletest/compiletest.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ 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"),
7475
optopt("", "target", "the target to build for", "TARGET"),
7576
optopt("", "adb-path", "path to the android debugger", "PATH"),
7677
optopt("", "adb-test-dir", "path to tests for the android debugger", "PATH"),
@@ -136,6 +137,7 @@ pub fn parse_config(args: ~[~str]) -> config {
136137
runtool: getopts::opt_maybe_str(matches, "runtool"),
137138
rustcflags: getopts::opt_maybe_str(matches, "rustcflags"),
138139
jit: getopts::opt_present(matches, "jit"),
140+
newrt: getopts::opt_present(matches, "newrt"),
139141
target: opt_str2(getopts::opt_maybe_str(matches, "target")).to_str(),
140142
adb_path: opt_str2(getopts::opt_maybe_str(matches, "adb-path")).to_str(),
141143
adb_test_dir:
@@ -169,6 +171,7 @@ pub fn log_config(config: &config) {
169171
logv(c, fmt!("runtool: %s", opt_str(&config.runtool)));
170172
logv(c, fmt!("rustcflags: %s", opt_str(&config.rustcflags)));
171173
logv(c, fmt!("jit: %b", config.jit));
174+
logv(c, fmt!("newrt: %b", config.newrt));
172175
logv(c, fmt!("target: %s", config.target));
173176
logv(c, fmt!("adb_path: %s", config.adb_path));
174177
logv(c, fmt!("adb_test_dir: %s", config.adb_test_dir));

branches/try2/src/compiletest/runtest.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -547,13 +547,15 @@ 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
550551
let env = props.exec_env.clone();
552+
let env = if config.newrt { env + &[(~"RUST_NEWRT", ~"1")] } else { env };
551553

552554
match config.target {
553555

554556
~"arm-linux-androideabi" => {
555557
if (config.adb_device_status) {
556-
_arm_exec_compiled_test(config, props, testfile, env)
558+
_arm_exec_compiled_test(config, props, testfile)
557559
} else {
558560
_dummy_exec_compiled_test(config, props, testfile)
559561
}
@@ -779,7 +781,7 @@ stderr:\n\
779781
}
780782

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

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

806808
// run test via adb_run_wrapper
807809
runargs.push(~"shell");
808-
for (key, val) in env.move_iter() {
809-
runargs.push(fmt!("%s=%s", key, val));
810-
}
811810
runargs.push(fmt!("%s/adb_run_wrapper.sh", config.adb_test_dir));
812811
runargs.push(fmt!("%s", config.adb_test_dir));
813812
runargs.push(fmt!("%s", prog_short));

branches/try2/src/etc/emacs/rust-mode.el

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,8 @@
6262
;; - { means indent to either nesting-level * rust-indent-offset,
6363
;; or one further indent from that if either current line
6464
;; begins with 'else', or previous line didn't end in
65-
;; semi, comma or brace, and wasn't an attribute. PHEW.
65+
;; semi, comma or brace (other than whitespace and line
66+
;; comments) , and wasn't an attribute. PHEW.
6667
((> level 0)
6768
(let ((pt (point)))
6869
(rust-rewind-irrelevant)
@@ -79,7 +80,7 @@
7980
(beginning-of-line)
8081
(rust-rewind-irrelevant)
8182
(end-of-line)
82-
(if (looking-back "[{};,]")
83+
(if (looking-back "[,;{}][[:space:]]*\\(?://.*\\)?")
8384
(* rust-indent-offset level)
8485
(back-to-indentation)
8586
(if (looking-at "#")

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 positive integer.", s)
748+
_ => fail!("RUST_TEST_TASKS is `%s`, should be a non-negative integer.", s)
749749
}
750750
}
751751
None => {

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2585,13 +2585,11 @@ 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;
25892588
}
25902589
if name_bindings.defined_in_public_namespace(TypeNS) {
25912590
debug!("(resolving glob import) ... for type target");
25922591
dest_import_resolution.type_target =
25932592
Some(Target(containing_module, name_bindings));
2594-
dest_import_resolution.type_id = id;
25952593
}
25962594
};
25972595

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

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@ 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;
9190

9291
pub use middle::trans::context::task_llcx;
9392

@@ -2163,14 +2162,6 @@ pub fn trans_enum_def(ccx: @mut CrateContext, enum_definition: &ast::enum_def,
21632162
}
21642163
}
21652164

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-
21742165
pub fn trans_item(ccx: @mut CrateContext, item: &ast::item) {
21752166
let _icx = push_ctxt("trans_item");
21762167
let path = match ccx.tcx.items.get_copy(&item.id) {
@@ -2202,10 +2193,15 @@ pub fn trans_item(ccx: @mut CrateContext, item: &ast::item) {
22022193
item.id,
22032194
item.attrs);
22042195
} else {
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);
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+
}
22092205
}
22102206
}
22112207
ast::item_impl(ref generics, _, _, ref ms) => {

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

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ 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;
4140

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

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-
}
59+
if !generics.ty_params.is_empty() { return; }
6960
let sub_path = vec::append_one(path, path_name(name));
7061
for method in methods.iter() {
7162
if method.generics.ty_params.len() == 0u {
@@ -78,9 +69,6 @@ pub fn trans_impl(ccx: @mut CrateContext,
7869
*method,
7970
None,
8071
llfn);
81-
} else {
82-
let mut v = TransItemVisitor;
83-
visit::walk_method_helper(&mut v, *method, ccx);
8472
}
8573
}
8674
}

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_mutbl,
4575+
ast::m_imm,
45764576
EmptyBuiltinBounds())))
45774577
}
45784578

branches/try2/src/libstd/logging.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,16 @@ pub fn console_off() {
4141
#[lang="log_type"]
4242
#[allow(missing_doc)]
4343
pub fn log_type<T>(_level: u32, object: &T) {
44-
use sys;
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+
};
4551

4652
// XXX: Bad allocation
47-
let msg = sys::log_str(object);
53+
let msg = str::from_bytes(bytes);
4854
newsched_log_str(msg);
4955
}
5056

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

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1142,10 +1142,6 @@ 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() {
11491145
assert!(NaN.abs_sub(&-1f32).is_NaN());
11501146
assert!(1f32.abs_sub(&NaN).is_NaN());
11511147
}
@@ -1271,10 +1267,7 @@ mod tests {
12711267

12721268
assert_eq!(0f32.frexp(), (0f32, 0));
12731269
assert_eq!((-0f32).frexp(), (-0f32, 0));
1274-
}
12751270

1276-
#[test] #[ignore(cfg(windows))] // FIXME #8755
1277-
fn test_frexp_nowin() {
12781271
let inf: f32 = Float::infinity();
12791272
let neg_inf: f32 = Float::neg_infinity();
12801273
let nan: f32 = Float::NaN();

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

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1192,10 +1192,6 @@ 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() {
11991195
assert!(NaN.abs_sub(&-1f64).is_NaN());
12001196
assert!(1f64.abs_sub(&NaN).is_NaN());
12011197
}
@@ -1320,10 +1316,7 @@ mod tests {
13201316

13211317
assert_eq!(0f64.frexp(), (0f64, 0));
13221318
assert_eq!((-0f64).frexp(), (-0f64, 0));
1323-
}
13241319

1325-
#[test] #[ignore(cfg(windows))] // FIXME #8755
1326-
fn test_frexp_nowin() {
13271320
let inf: f64 = Float::infinity();
13281321
let neg_inf: f64 = Float::neg_infinity();
13291322
let nan: f64 = Float::NaN();

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

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1163,10 +1163,6 @@ 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() {
11701166
assert!(NaN.abs_sub(&-1f).is_NaN());
11711167
assert!(1f.abs_sub(&NaN).is_NaN());
11721168
}
@@ -1292,10 +1288,7 @@ mod tests {
12921288

12931289
assert_eq!(0f.frexp(), (0f, 0));
12941290
assert_eq!((-0f).frexp(), (-0f, 0));
1295-
}
12961291

1297-
#[test] #[ignore(cfg(windows))] // FIXME #8755
1298-
fn test_frexp_nowin() {
12991292
let inf: float = Float::infinity();
13001293
let neg_inf: float = Float::neg_infinity();
13011294
let nan: float = Float::NaN();

0 commit comments

Comments
 (0)