Skip to content

Commit b3dc999

Browse files
committed
---
yaml --- r: 144535 b: refs/heads/try2 c: 58c3fa9 h: refs/heads/master i: 144533: 0e1addd 144531: 8473306 144527: 7d17a8f v: v3
1 parent 6a3efd4 commit b3dc999

File tree

10 files changed

+79
-12
lines changed

10 files changed

+79
-12
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: d02496d6d3f59e67d75a4e0c2158ec31d144194e
8+
refs/heads/try2: 58c3fa92eda837cdb9be2ad206d7efd3fe402110
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/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/try2/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/try2/src/etc/emacs/rust-mode.el

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,8 @@
2929

3030
table))
3131

32-
(defcustom rust-indent-offset default-tab-width
33-
"*Indent Rust code by this number of spaces.
34-
35-
The initializer is `DEFAULT-TAB-WIDTH'.")
32+
(defcustom rust-indent-offset 4
33+
"*Indent Rust code by this number of spaces.")
3634

3735
(defun rust-paren-level () (nth 0 (syntax-ppss)))
3836
(defun rust-in-str-or-cmnt () (nth 8 (syntax-ppss)))
@@ -61,7 +59,7 @@ The initializer is `DEFAULT-TAB-WIDTH'.")
6159

6260
;; If we're in any other token-tree / sexp, then:
6361
;; - [ or ( means line up with the opening token
64-
;; - { means indent to either nesting-level * tab width,
62+
;; - { means indent to either nesting-level * rust-indent-offset,
6563
;; or one further indent from that if either current line
6664
;; begins with 'else', or previous line didn't end in
6765
;; semi, comma or brace, and wasn't an attribute. PHEW.

branches/try2/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/try2/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/try2/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: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
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+
// Regression test for issue #5239
12+
13+
fn main() {
14+
let x: &fn(int) -> int = |ref x| { x += 1; }; //~ ERROR binary operation + cannot be applied to type `&int`
15+
}
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() {}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
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+
// Regression test for issue #5239
12+
13+
fn main() {
14+
let _f: &fn(int) -> int = |ref x: int| { *x };
15+
let foo = 10;
16+
assert!(_f(foo) == 10);
17+
}

0 commit comments

Comments
 (0)