Skip to content

Commit f34c694

Browse files
committed
---
yaml --- r: 85940 b: refs/heads/dist-snap c: 58c3fa9 h: refs/heads/master v: v3
1 parent b667b03 commit f34c694

File tree

11 files changed

+63
-35
lines changed

11 files changed

+63
-35
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ refs/heads/try: 0983ebe5310d4eb6d289f636f7ed0536c08bbc0e
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
9-
refs/heads/dist-snap: 15bb9b4e1abf06ada9985effc3ef034d017a4c18
9+
refs/heads/dist-snap: 58c3fa92eda837cdb9be2ad206d7efd3fe402110
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1212
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/mk/llvm.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ ifeq ($(CFG_LLVM_ROOT),)
2626

2727
$$(LLVM_CONFIG_$(1)): $$(LLVM_DEPS)
2828
@$$(call E, make: llvm)
29-
$$(Q)$$(MAKE) -C $$(CFG_LLVM_BUILD_DIR_$(1))
29+
$$(Q)$$(MAKE) -C $$(CFG_LLVM_BUILD_DIR_$(1)) $$(CFG_LLVM_BUILD_ENV)
3030
$$(Q)touch $$(LLVM_CONFIG_$(1))
3131
endif
3232

branches/dist-snap/mk/platform.mk

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,10 @@ endef
2626
$(foreach t,$(CFG_TARGET_TRIPLES),$(eval $(call DEF_OSTYPE_VAR,$(t))))
2727
$(foreach t,$(CFG_TARGET_TRIPLES),$(info cfg: os for $(t) is $(OSTYPE_$(t))))
2828

29-
CFG_GCCISH_CFLAGS += -DUSE_UTF8
29+
# FIXME: no-omit-frame-pointer is just so that task_start_wrapper
30+
# has a frame pointer and the stack walker can understand it. Turning off
31+
# frame pointers everywhere is overkill
32+
CFG_GCCISH_CFLAGS += -fno-omit-frame-pointer -DUSE_UTF8
3033

3134
# On Darwin, we need to run dsymutil so the debugging information ends
3235
# up in the right place. On other platforms, it automatically gets
@@ -150,6 +153,7 @@ CFG_GCCISH_POST_LIB_FLAGS_x86_64-unknown-linux-gnu := -Wl,-no-whole-archive
150153
CFG_DEF_SUFFIX_x86_64-unknown-linux-gnu := .linux.def
151154
CFG_INSTALL_NAME_x86_64-unknown-linux-gnu =
152155
CFG_LIBUV_LINK_FLAGS_x86_64-unknown-linux-gnu =
156+
CFG_LLVM_BUILD_ENV_x86_64-unknown-linux-gnu="CXXFLAGS=-fno-omit-frame-pointer"
153157
CFG_EXE_SUFFIX_x86_64-unknown-linux-gnu =
154158
CFG_WINDOWSY_x86_64-unknown-linux-gnu :=
155159
CFG_UNIXY_x86_64-unknown-linux-gnu := 1
@@ -175,6 +179,7 @@ CFG_GCCISH_POST_LIB_FLAGS_i686-unknown-linux-gnu := -Wl,-no-whole-archive
175179
CFG_DEF_SUFFIX_i686-unknown-linux-gnu := .linux.def
176180
CFG_INSTALL_NAME_i686-unknown-linux-gnu =
177181
CFG_LIBUV_LINK_FLAGS_i686-unknown-linux-gnu =
182+
CFG_LLVM_BUILD_ENV_i686-unknown-linux-gnu="CXXFLAGS=-fno-omit-frame-pointer"
178183
CFG_EXE_SUFFIX_i686-unknown-linux-gnu =
179184
CFG_WINDOWSY_i686-unknown-linux-gnu :=
180185
CFG_UNIXY_i686-unknown-linux-gnu := 1

branches/dist-snap/src/libextra/dlist.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -594,7 +594,7 @@ impl<A: Eq> Eq for DList<A> {
594594
}
595595

596596
fn ne(&self, other: &DList<A>) -> bool {
597-
self.len() != other.len() ||
597+
self.len() != other.len() &&
598598
iterator::order::ne(self.iter(), other.iter())
599599
}
600600
}
@@ -978,10 +978,6 @@ mod tests {
978978
assert!(n != m);
979979
m.push_back(1);
980980
assert_eq!(&n, &m);
981-
982-
let n = list_from([2,3,4]);
983-
let m = list_from([1,2,3]);
984-
assert!(n != m);
985981
}
986982

987983
#[test]

branches/dist-snap/src/libextra/test.rs

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ The FILTER is matched against the name of all tests to run, and if any tests
203203
have a substring match, only those tests are run.
204204
205205
By default, all tests are run in parallel. This can be altered with the
206-
RUST_THREADS environment variable when running tests (set it to 1).
206+
RUST_TEST_TASKS environment variable when running tests (set it to 1).
207207
208208
Test Attributes:
209209
@@ -740,9 +740,20 @@ static SCHED_OVERCOMMIT : uint = 4u;
740740

741741
fn get_concurrency() -> uint {
742742
use std::rt;
743-
let threads = rt::util::default_sched_threads();
744-
if threads == 1 { 1 }
745-
else { threads * SCHED_OVERCOMMIT }
743+
match os::getenv("RUST_TEST_TASKS") {
744+
Some(s) => {
745+
let opt_n: Option<uint> = FromStr::from_str(s);
746+
match opt_n {
747+
Some(n) if n > 0 => n,
748+
_ => fail!("RUST_TEST_TASKS is `%s`, should be a non-negative integer.", s)
749+
}
750+
}
751+
None => {
752+
let threads = rt::util::default_sched_threads();
753+
if threads == 1 { 1 }
754+
else { threads * SCHED_OVERCOMMIT }
755+
}
756+
}
746757
}
747758

748759
pub fn filter_tests(

branches/dist-snap/src/libstd/str.rs

Lines changed: 16 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -621,7 +621,8 @@ enum NormalizationForm {
621621
#[deriving(Clone)]
622622
struct NormalizationIterator<'self> {
623623
priv kind: NormalizationForm,
624-
priv iter: CharIterator<'self>,
624+
priv index: uint,
625+
priv string: &'self str,
625626
priv buffer: ~[(char, u8)],
626627
priv sorted: bool
627628
}
@@ -649,17 +650,16 @@ impl<'self> Iterator<char> for NormalizationIterator<'self> {
649650
NFKD => char::decompose_compatible
650651
};
651652

652-
if !self.sorted {
653-
for ch in self.iter {
654-
do decomposer(ch) |d| {
655-
let class = canonical_combining_class(d);
656-
if class == 0 && !self.sorted {
657-
canonical_sort(self.buffer);
658-
self.sorted = true;
659-
}
660-
self.buffer.push((d, class));
653+
while !self.sorted && self.index < self.string.len() {
654+
let CharRange {ch, next} = self.string.char_range_at(self.index);
655+
self.index = next;
656+
do decomposer(ch) |d| {
657+
let class = canonical_combining_class(d);
658+
if class == 0 && !self.sorted {
659+
canonical_sort(self.buffer);
660+
self.sorted = true;
661661
}
662-
if self.sorted { break }
662+
self.buffer.push((d, class));
663663
}
664664
}
665665

@@ -678,10 +678,7 @@ impl<'self> Iterator<char> for NormalizationIterator<'self> {
678678
}
679679
}
680680

681-
fn size_hint(&self) -> (uint, Option<uint>) {
682-
let (lower, _) = self.iter.size_hint();
683-
(lower, None)
684-
}
681+
fn size_hint(&self) -> (uint, Option<uint>) { (self.string.len(), None) }
685682
}
686683

687684
/// Replace all occurrences of one string with another
@@ -1631,7 +1628,8 @@ impl<'self> StrSlice<'self> for &'self str {
16311628
/// Returns the string in Unicode Normalization Form D (canonical decomposition)
16321629
fn nfd_iter(&self) -> NormalizationIterator<'self> {
16331630
NormalizationIterator {
1634-
iter: self.iter(),
1631+
index: 0,
1632+
string: *self,
16351633
buffer: ~[],
16361634
sorted: false,
16371635
kind: NFD
@@ -1641,7 +1639,8 @@ impl<'self> StrSlice<'self> for &'self str {
16411639
/// Returns the string in Unicode Normalization Form KD (compatibility decomposition)
16421640
fn nfkd_iter(&self) -> NormalizationIterator<'self> {
16431641
NormalizationIterator {
1644-
iter: self.iter(),
1642+
index: 0,
1643+
string: *self,
16451644
buffer: ~[],
16461645
sorted: false,
16471646
kind: NFKD
@@ -1713,7 +1712,6 @@ impl<'self> StrSlice<'self> for &'self str {
17131712
if count == end { end_byte = Some(idx); break; }
17141713
count += 1;
17151714
}
1716-
if begin_byte.is_none() && count == begin { begin_byte = Some(self.len()) }
17171715
if end_byte.is_none() && count == end { end_byte = Some(self.len()) }
17181716
17191717
match (begin_byte, end_byte) {
@@ -2701,11 +2699,8 @@ mod tests {
27012699
fn t(a: &str, b: &str, start: uint) {
27022700
assert_eq!(a.slice_chars(start, start + b.char_len()), b);
27032701
}
2704-
t("", "", 0);
27052702
t("hello", "llo", 2);
27062703
t("hello", "el", 1);
2707-
t("αβλ", "β", 1);
2708-
t("αβλ", "", 3);
27092704
assert_eq!("ะเทศไท", "ประเทศไทย中华Việt Nam".slice_chars(2, 8));
27102705
}
27112706

branches/dist-snap/src/libuv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Subproject commit ef2bcd134164adcaa072dcb56e62b737fdcb075e
1+
Subproject commit d88cf5652a1afb23939da0bae86c70ec521b9921

branches/dist-snap/src/llvm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Subproject commit 0964c68ddf2c67ce455e7443a06f4bb3db9e92bb
1+
Subproject commit 08a3bd96ee6e1d141494f0014ede75d9871114c4

branches/dist-snap/src/rustllvm/PassWrapper.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ LLVMRustCreateTargetMachine(const char *triple,
7878
}
7979

8080
TargetOptions Options;
81+
Options.NoFramePointerElim = true;
8182
Options.EnableSegmentedStacks = EnableSegmentedStacks;
8283
Options.FixedStackSegmentSize = 2 * 1024 * 1024; // XXX: This is too big.
8384
Options.FloatABIType =

branches/dist-snap/src/rustllvm/RustWrapper.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,7 @@ LLVMRustBuildJIT(void* mem,
284284
std::string Err;
285285
TargetOptions Options;
286286
Options.JITEmitDebugInfo = true;
287+
Options.NoFramePointerElim = true;
287288
Options.EnableSegmentedStacks = EnableSegmentedStacks;
288289
RustMCJITMemoryManager* MM = (RustMCJITMemoryManager*) mem;
289290
assert(MM);
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
2+
// file at the top-level directory of this distribution and at
3+
// http://rust-lang.org/COPYRIGHT.
4+
//
5+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+
// option. This file may not be copied, modified, or distributed
9+
// except according to those terms.
10+
11+
// This checks that RUST_TEST_TASKS not being 1, 2, ... is detected
12+
// properly.
13+
14+
// error-pattern:should be a non-negative integer
15+
// compile-flags: --test
16+
// exec-env:RUST_TEST_TASKS=foo
17+
18+
#[test]
19+
fn do_nothing() {}

0 commit comments

Comments
 (0)