Skip to content

Commit 82affd8

Browse files
committed
---
yaml --- r: 67260 b: refs/heads/master c: 1f92557 h: refs/heads/master v: v3
1 parent 61f5be6 commit 82affd8

File tree

15 files changed

+9
-318
lines changed

15 files changed

+9
-318
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: b5799e1eb519ea53eb72e031d973cf8775dfc6a8
2+
refs/heads/master: 1f9255751252b5d2b1f55af921896c43764fe52f
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 18e3db7392d2d0697b7e27d6d986139960144d85
55
refs/heads/try: 7b78b52e602bb3ea8174f9b2006bff3315f03ef9

trunk/mk/tests.mk

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -537,6 +537,10 @@ TEST_SREQ$(1)_T_$(2)_H_$(3) = \
537537

538538
# Rules for the cfail/rfail/rpass/bench/perf test runner
539539

540+
# The tests select when to use debug configuration on their own;
541+
# remove directive, if present, from CFG_RUSTC_FLAGS (issue #7898).
542+
CTEST_RUSTC_FLAGS = $$(subst --cfg debug,,$$(CFG_RUSTC_FLAGS))
543+
540544
CTEST_COMMON_ARGS$(1)-T-$(2)-H-$(3) := \
541545
--compile-lib-path $$(HLIB$(1)_H_$(3)) \
542546
--run-lib-path $$(TLIB$(1)_T_$(2)_H_$(3)) \
@@ -548,7 +552,7 @@ CTEST_COMMON_ARGS$(1)-T-$(2)-H-$(3) := \
548552
--target $(2) \
549553
--adb-path=$(CFG_ADB) \
550554
--adb-test-dir=$(CFG_ADB_TEST_DIR) \
551-
--rustcflags "$(RUSTC_FLAGS_$(2)) $$(CFG_RUSTC_FLAGS) --target=$(2)" \
555+
--rustcflags "$(RUSTC_FLAGS_$(2)) $$(CTEST_RUSTC_FLAGS) --target=$(2)" \
552556
$$(CTEST_TESTARGS)
553557

554558
CTEST_DEPS_rpass_$(1)-T-$(2)-H-$(3) = $$(RPASS_TESTS)

trunk/src/librustc/middle/trans/base.rs

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2449,7 +2449,7 @@ pub fn get_item_val(ccx: @mut CrateContext, id: ast::node_id) -> ValueRef {
24492449
let val = match item {
24502450
ast_map::node_item(i, pth) => {
24512451
let my_path = vec::append((*pth).clone(), [path_name(i.ident)]);
2452-
let v = match i.node {
2452+
match i.node {
24532453
ast::item_static(_, m, expr) => {
24542454
let typ = ty::node_id_to_type(ccx.tcx, i.id);
24552455
let s = mangle_exported_name(ccx, my_path, typ);
@@ -2481,16 +2481,7 @@ pub fn get_item_val(ccx: @mut CrateContext, id: ast::node_id) -> ValueRef {
24812481
llfn
24822482
}
24832483
_ => fail!("get_item_val: weird result in table")
2484-
};
2485-
match (attr::first_attr_value_str_by_name(i.attrs, "link_section")) {
2486-
Some(sect) => unsafe {
2487-
do sect.as_c_str |buf| {
2488-
llvm::LLVMSetSection(v, buf);
2489-
}
2490-
},
2491-
None => ()
24922484
}
2493-
v
24942485
}
24952486
ast_map::node_trait_method(trait_method, _, pth) => {
24962487
debug!("get_item_val(): processing a node_trait_method");

trunk/src/libstd/num/strconv.rs

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -703,27 +703,3 @@ mod test {
703703
assert_eq!(n, None);
704704
}
705705
}
706-
707-
#[cfg(test)]
708-
mod bench {
709-
use extra::test::BenchHarness;
710-
use rand::{XorShiftRng,RngUtil};
711-
use uint;
712-
use float;
713-
714-
#[bench]
715-
fn uint_to_str_rand(bh: &mut BenchHarness) {
716-
let mut rng = XorShiftRng::new();
717-
do bh.iter {
718-
uint::to_str(rng.gen());
719-
}
720-
}
721-
722-
#[bench]
723-
fn float_to_str_rand(bh: &mut BenchHarness) {
724-
let mut rng = XorShiftRng::new();
725-
do bh.iter {
726-
float::to_str(rng.gen());
727-
}
728-
}
729-
}

trunk/src/libstd/ops.rs

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -81,28 +81,3 @@ pub trait Shr<RHS,Result> {
8181
pub trait Index<Index,Result> {
8282
fn index(&self, index: &Index) -> Result;
8383
}
84-
85-
#[cfg(test)]
86-
mod bench {
87-
88-
use extra::test::BenchHarness;
89-
use ops::Drop;
90-
91-
// Overhead of dtors
92-
93-
struct HasDtor {
94-
x: int
95-
}
96-
97-
impl Drop for HasDtor {
98-
fn drop(&self) {
99-
}
100-
}
101-
102-
#[bench]
103-
fn alloc_obj_with_dtor(bh: &mut BenchHarness) {
104-
do bh.iter {
105-
HasDtor { x : 10 };
106-
}
107-
}
108-
}

trunk/src/libstd/rand.rs

Lines changed: 1 addition & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -890,7 +890,7 @@ pub fn random<T: Rand>() -> T {
890890
}
891891

892892
#[cfg(test)]
893-
mod test {
893+
mod tests {
894894
use option::{Option, Some};
895895
use super::*;
896896

@@ -1109,37 +1109,3 @@ mod test {
11091109
}
11101110
}
11111111
}
1112-
1113-
#[cfg(test)]
1114-
mod bench {
1115-
use extra::test::BenchHarness;
1116-
use rand::*;
1117-
use sys::size_of;
1118-
1119-
#[bench]
1120-
fn rand_xorshift(bh: &mut BenchHarness) {
1121-
let mut rng = XorShiftRng::new();
1122-
do bh.iter {
1123-
rng.gen::<uint>();
1124-
}
1125-
bh.bytes = size_of::<uint>() as u64;
1126-
}
1127-
1128-
#[bench]
1129-
fn rand_isaac(bh: &mut BenchHarness) {
1130-
let mut rng = IsaacRng::new();
1131-
do bh.iter {
1132-
rng.gen::<uint>();
1133-
}
1134-
bh.bytes = size_of::<uint>() as u64;
1135-
}
1136-
1137-
#[bench]
1138-
fn rand_shuffle_100(bh: &mut BenchHarness) {
1139-
let mut rng = XorShiftRng::new();
1140-
let x : &mut[uint] = [1,..100];
1141-
do bh.iter {
1142-
rng.shuffle_mut(x);
1143-
}
1144-
}
1145-
}

trunk/src/libstd/rt/global_heap.rs

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -101,22 +101,3 @@ pub unsafe fn exchange_free_(ptr: *c_char) {
101101
pub unsafe fn exchange_free(ptr: *c_char) {
102102
free(ptr as *c_void);
103103
}
104-
105-
#[cfg(test)]
106-
mod bench {
107-
use extra::test::BenchHarness;
108-
109-
#[bench]
110-
fn alloc_owned_small(bh: &mut BenchHarness) {
111-
do bh.iter {
112-
~10;
113-
}
114-
}
115-
116-
#[bench]
117-
fn alloc_owned_big(bh: &mut BenchHarness) {
118-
do bh.iter {
119-
~[10, ..1000];
120-
}
121-
}
122-
}

trunk/src/libstd/rt/local_heap.rs

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -135,22 +135,3 @@ extern {
135135
fn rust_boxed_region_free(region: *BoxedRegion, box: *OpaqueBox);
136136
fn rust_current_boxed_region() -> *BoxedRegion;
137137
}
138-
139-
#[cfg(test)]
140-
mod bench {
141-
use extra::test::BenchHarness;
142-
143-
#[bench]
144-
fn alloc_managed_small(bh: &mut BenchHarness) {
145-
do bh.iter {
146-
@10;
147-
}
148-
}
149-
150-
#[bench]
151-
fn alloc_managed_big(bh: &mut BenchHarness) {
152-
do bh.iter {
153-
@[10, ..1000];
154-
}
155-
}
156-
}

trunk/src/libstd/std.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,6 @@ they contained the following prologue:
6363
#[deny(non_camel_case_types)];
6464
#[deny(missing_doc)];
6565

66-
// Make extra accessible for benchmarking
67-
#[cfg(test)] extern mod extra(vers="0.8-pre");
68-
6966
// Make std testable by not duplicating lang items. See #2912
7067
#[cfg(test)] extern mod realstd(name = "std");
7168
#[cfg(test)] pub use kinds = realstd::kinds;

trunk/src/libstd/str.rs

Lines changed: 0 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -3532,50 +3532,3 @@ mod tests {
35323532
assert_eq!(5, sum_len([s.as_slice()]));
35333533
}
35343534
}
3535-
3536-
#[cfg(test)]
3537-
mod bench {
3538-
use extra::test::BenchHarness;
3539-
use str;
3540-
3541-
#[bench]
3542-
fn is_utf8_100_ascii(bh: &mut BenchHarness) {
3543-
3544-
let s = bytes!("Hello there, the quick brown fox jumped over the lazy dog! \
3545-
Lorem ipsum dolor sit amet, consectetur. ");
3546-
3547-
assert_eq!(100, s.len());
3548-
do bh.iter {
3549-
str::is_utf8(s);
3550-
}
3551-
}
3552-
3553-
#[bench]
3554-
fn is_utf8_100_multibyte(bh: &mut BenchHarness) {
3555-
let s = bytes!("𐌀𐌖𐌋𐌄𐌑𐌉ปรدولة الكويتทศไทย中华𐍅𐌿𐌻𐍆𐌹𐌻𐌰");
3556-
assert_eq!(100, s.len());
3557-
do bh.iter {
3558-
str::is_utf8(s);
3559-
}
3560-
}
3561-
3562-
#[bench]
3563-
fn map_chars_100_ascii(bh: &mut BenchHarness) {
3564-
let s = "HelloHelloHelloHelloHelloHelloHelloHelloHelloHello\
3565-
HelloHelloHelloHelloHelloHelloHelloHelloHelloHello";
3566-
do bh.iter {
3567-
s.map_chars(|c| ((c as uint) + 1) as char);
3568-
}
3569-
}
3570-
3571-
#[bench]
3572-
fn map_chars_100_multibytes(bh: &mut BenchHarness) {
3573-
let s = "𐌀𐌖𐌋𐌄𐌑𐌀𐌖𐌋𐌄𐌑𐌀𐌖𐌋𐌄𐌑𐌀𐌖𐌋𐌄𐌑𐌀𐌖𐌋𐌄𐌑\
3574-
𐌀𐌖𐌋𐌄𐌑𐌀𐌖𐌋𐌄𐌑𐌀𐌖𐌋𐌄𐌑𐌀𐌖𐌋𐌄𐌑𐌀𐌖𐌋𐌄𐌑\
3575-
𐌀𐌖𐌋𐌄𐌑𐌀𐌖𐌋𐌄𐌑𐌀𐌖𐌋𐌄𐌑𐌀𐌖𐌋𐌄𐌑𐌀𐌖𐌋𐌄𐌑\
3576-
𐌀𐌖𐌋𐌄𐌑𐌀𐌖𐌋𐌄𐌑𐌀𐌖𐌋𐌄𐌑𐌀𐌖𐌋𐌄𐌑𐌀𐌖𐌋𐌄𐌑";
3577-
do bh.iter {
3578-
s.map_chars(|c| ((c as uint) + 1) as char);
3579-
}
3580-
}
3581-
}

trunk/src/libstd/util.rs

Lines changed: 0 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -195,68 +195,3 @@ mod tests {
195195
unsafe { assert_eq!(did_run, true); }
196196
}
197197
}
198-
199-
/// Completely miscellaneous language-construct benchmarks.
200-
#[cfg(test)]
201-
mod bench {
202-
203-
use extra::test::BenchHarness;
204-
use option::{Some,None};
205-
206-
// Static/dynamic method dispatch
207-
208-
struct Struct {
209-
field: int
210-
}
211-
212-
trait Trait {
213-
fn method(&self) -> int;
214-
}
215-
216-
impl Trait for Struct {
217-
fn method(&self) -> int {
218-
self.field
219-
}
220-
}
221-
222-
#[bench]
223-
fn trait_vtable_method_call(bh: &mut BenchHarness) {
224-
let s = Struct { field: 10 };
225-
let t = &s as &Trait;
226-
do bh.iter {
227-
t.method();
228-
}
229-
}
230-
231-
#[bench]
232-
fn trait_static_method_call(bh: &mut BenchHarness) {
233-
let s = Struct { field: 10 };
234-
do bh.iter {
235-
s.method();
236-
}
237-
}
238-
239-
// Overhead of various match forms
240-
241-
#[bench]
242-
fn match_option_some(bh: &mut BenchHarness) {
243-
let x = Some(10);
244-
do bh.iter {
245-
let _q = match x {
246-
Some(y) => y,
247-
None => 11
248-
};
249-
}
250-
}
251-
252-
#[bench]
253-
fn match_vec_pattern(bh: &mut BenchHarness) {
254-
let x = [1,2,3,4,5,6];
255-
do bh.iter {
256-
let _q = match x {
257-
[1,2,3,.._] => 10,
258-
_ => 11
259-
};
260-
}
261-
}
262-
}

trunk/src/rt/rust_crate_map.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ class cratemap {
6868
return &reinterpret_cast<const cratemap_v0 *>(this)->
6969
m_children[0];
7070
case 1:
71-
return &m_children[0];
71+
return &m_children[1];
7272
default: assert(false && "Unknown crate map version!");
7373
return NULL; // Appease -Werror=return-type
7474
}

trunk/src/test/auxiliary/issue_5844_aux.rs

Lines changed: 0 additions & 16 deletions
This file was deleted.

trunk/src/test/compile-fail/issue-5844.rs

Lines changed: 0 additions & 18 deletions
This file was deleted.

0 commit comments

Comments
 (0)