]> git.lizzy.rs Git - rust.git/log
rust.git
10 years agoauto merge of #8862 : dcrewi/rust/drop-redundant-ord-impls, r=thestinger
bors [Sat, 31 Aug 2013 03:30:35 +0000 (20:30 -0700)]
auto merge of #8862 : dcrewi/rust/drop-redundant-ord-impls, r=thestinger

If this were to break something, I would expect existing tests to catch it, and a `make check` run passes locally.

10 years agoauto merge of #8894 : alexcrichton/rust/faster, r=thestinger
bors [Sat, 31 Aug 2013 02:20:36 +0000 (19:20 -0700)]
auto merge of #8894 : alexcrichton/rust/faster, r=thestinger

The only changes to the default passes is that O1 now doesn't run the inline
pass, just always-inline with lifetime intrinsics. O2 also now has a threshold
of 225 instead of 275. Otherwise the default passes being run is the same.

I've also added a few more options for configuring the pass pipeline. Namely you
can now specify arguments to LLVM directly via the `--llvm-args` command line
option which operates similarly to `--passes`. I also added the ability to turn
off pre-population of the pass manager in case you want to run *only* your own
passes.

I would consider this as closing #8890. I don't think that we should change the default inlining threshold because LLVM/clang will probably have chosen those numbers more carefully than we would. Regardless, here's the performance numbers from this commit:

```
$ ./x86_64-apple-darwin/stage0/bin/rustc ./gistfile1.rs --test --opt-level=3 -o before
warning: no debug symbols in executable (-arch x86_64)
$ ./before --bench

running 1 test
test bench::aes_bench_x8 ... bench: 1602 ns/iter (+/- 66) = 7990 MB/s

test result: ok. 0 passed; 0 failed; 0 ignored; 1 measured

$ ./x86_64-apple-darwin/stage1/bin/rustc ./gistfile1.rs --test --opt-level=3 -o after
warning: no debug symbols in executable (-arch x86_64)
$ ./after --bench

running 1 test
test bench::aes_bench_x8 ... bench: 2103 ns/iter (+/- 175) = 6086 MB/s

test result: ok. 0 passed; 0 failed; 0 ignored; 1 measured

$ ./x86_64-apple-darwin/stage1/bin/rustc ./gistfile1.rs --test --opt-level=3 -o after --llvm-args '-inline-threshold=225'
warning: no debug symbols in executable (-arch x86_64)
$ ./after --bench

running 1 test
test bench::aes_bench_x8 ... bench: 1600 ns/iter (+/- 71) = 8000 MB/s

test result: ok. 0 passed; 0 failed; 0 ignored; 1 measured

```

10 years agoTweak pass management and add some more options
Alex Crichton [Sat, 31 Aug 2013 00:56:04 +0000 (17:56 -0700)]
Tweak pass management and add some more options

The only changes to the default passes is that O1 now doesn't run the inline
pass, just always-inline with lifetime intrinsics. O2 also now has a threshold
of 225 instead of 275. Otherwise the default passes being run is the same.

I've also added a few more options for configuring the pass pipeline. Namely you
can now specify arguments to LLVM directly via the `--llvm-args` command line
option which operates similarly to `--passes`. I also added the ability to turn
off pre-population of the pass manager in case you want to run *only* your own
passes.

10 years agoauto merge of #8889 : erickt/rust/cleanup, r=catamorphism
bors [Sat, 31 Aug 2013 00:20:36 +0000 (17:20 -0700)]
auto merge of #8889 : erickt/rust/cleanup, r=catamorphism

This fixes a couple minor things I've been sitting on. It cleans up some warnings, CapCases some types in librustc's rscope module, and adds a fixme.

10 years agoauto merge of #8831 : catamorphism/rust/extend_rust_path, r=catamorphism
bors [Fri, 30 Aug 2013 23:10:52 +0000 (16:10 -0700)]
auto merge of #8831 : catamorphism/rust/extend_rust_path, r=catamorphism

r? @brson

@metajack requested the ability to violate the "only workspaces can be in the RUST_PATH" rule for the purpose of bootstrapping Servo without having to restructure all the directories. This patch gives rustpkg the ability to find sources if a directory in the RUST_PATH directly contains one of rustpkg's "special" files (lib.rs, main.rs, bench.rs, or test.rs), even if it's not a workspace. In this case, it puts the build artifacts in the first workspace in the RUST_PATH.

I'm not sure whether or not it's a good idea to keep this feature in rustpkg permanently. Thus, I added a flag, ```--use-rust-path-hack```, and only enabled it when the flag is set.

10 years agorustpkg: Allow package directories to appear in the RUST_PATH
Tim Chevalier [Wed, 28 Aug 2013 21:52:37 +0000 (14:52 -0700)]
rustpkg: Allow package directories to appear in the RUST_PATH

This commit adds a rustpkg flag, --rust-path-hack, that allows
rustpkg to *search* inside package directories if they appear in
the RUST_PATH, while *building* libraries and executables into a
different target directory.

This behavior is hidden behind a flag because I believe we only
want to support it temporarily, to make it easier to port servo to
rustpkg.

This commit also includes a fix for how rustpkg fetches sources
from git repositories -- it uses a temporary directory as the target
when invoking `git clone`, then moves that directory into the workspace
if the clone was successful. (The old behavior was that when the
`git clone` failed, the empty target directory would be left lying
around anyway.)

10 years agorustpkg: Add a not_a_workspace condition
Tim Chevalier [Wed, 28 Aug 2013 18:35:11 +0000 (11:35 -0700)]
rustpkg: Add a not_a_workspace condition

10 years agostd: Add a file-renaming function to std::os
Tim Chevalier [Wed, 28 Aug 2013 19:27:10 +0000 (12:27 -0700)]
std: Add a file-renaming function to std::os

10 years agostd: Add a fixme for when we add Trait::<for T>::static_method()
Erick Tryzelaar [Fri, 30 Aug 2013 22:04:20 +0000 (15:04 -0700)]
std: Add a fixme for when we add Trait::<for T>::static_method()

10 years agorustc: capitalize types in rscope.rs
Erick Tryzelaar [Sat, 17 Aug 2013 18:09:52 +0000 (11:09 -0700)]
rustc: capitalize types in rscope.rs

10 years agofix various warnings
Erick Tryzelaar [Fri, 30 Aug 2013 22:06:11 +0000 (15:06 -0700)]
fix various warnings

10 years agorustc: Change a stray error! statement to debug!
Tim Chevalier [Wed, 28 Aug 2013 18:34:54 +0000 (11:34 -0700)]
rustc: Change a stray error! statement to debug!

10 years agoauto merge of #8886 : cmr/rust/test-restructure, r=cmr
bors [Fri, 30 Aug 2013 21:00:43 +0000 (14:00 -0700)]
auto merge of #8886 : cmr/rust/test-restructure, r=cmr

10 years agoRevert "src/test/bench: restructure"
Corey Richardson [Fri, 30 Aug 2013 20:17:53 +0000 (16:17 -0400)]
Revert "src/test/bench: restructure"

This reverts commit 14cdc26e8a7794e437946f46df5769362b42acdf.

10 years agoRevert "Teach compiletest to use multiple --src-base's"
Corey Richardson [Fri, 30 Aug 2013 20:17:32 +0000 (16:17 -0400)]
Revert "Teach compiletest to use multiple --src-base's"

This reverts commit 8a07f5708196dd72ec030018c2a215a4dd823b2e.

10 years agoRevert "Teach the makefile to use multiple src-base's"
Corey Richardson [Fri, 30 Aug 2013 20:17:29 +0000 (16:17 -0400)]
Revert "Teach the makefile to use multiple src-base's"

This reverts commit 43f851d2cb3976655078f032dc1a8cb88f1c8deb.

10 years agoauto merge of #8878 : toqueteos/rust/patch-1, r=sanxiyn
bors [Fri, 30 Aug 2013 19:55:39 +0000 (12:55 -0700)]
auto merge of #8878 : toqueteos/rust/patch-1, r=sanxiyn

As promised on #8876.

10 years agoauto merge of #8858 : blake2-ppc/rust/small-bugs, r=alexcrichton
bors [Fri, 30 Aug 2013 18:00:43 +0000 (11:00 -0700)]
auto merge of #8858 : blake2-ppc/rust/small-bugs, r=alexcrichton

Fix a bug in `s.slice_chars(a, b)` that did not accept `a == s.len()`.

Fix a bug in `!=` defined for DList.

Also simplify NormalizationIterator to use the CharIterator directly instead of mimicing the iteration itself.

10 years agoauto merge of #8877 : bouk/rust/master, r=sanxiyn
bors [Fri, 30 Aug 2013 16:45:39 +0000 (09:45 -0700)]
auto merge of #8877 : bouk/rust/master, r=sanxiyn

Ran into a missing space in the stdlib source

10 years agoauto merge of #8872 : MicahChalmer/rust/emacs-indent-fix, r=pnkfelix
bors [Fri, 30 Aug 2013 15:40:46 +0000 (08:40 -0700)]
auto merge of #8872 : MicahChalmer/rust/emacs-indent-fix, r=pnkfelix

This fixes some, but not all, of the issues mentioned in #8787

10 years agoauto merge of #8869 : alexcrichton/rust/issue-8847-fix-unused, r=huonw
bors [Fri, 30 Aug 2013 14:35:40 +0000 (07:35 -0700)]
auto merge of #8869 : alexcrichton/rust/issue-8847-fix-unused, r=huonw

Closes #8847

10 years agoauto merge of #8867 : thestinger/rust/smaller-arc, r=alexcrichton
bors [Fri, 30 Aug 2013 12:45:45 +0000 (05:45 -0700)]
auto merge of #8867 : thestinger/rust/smaller-arc, r=alexcrichton

10 years agoauto merge of #8857 : blake2-ppc/rust/std-str-remove, r=thestinger
bors [Fri, 30 Aug 2013 11:40:47 +0000 (04:40 -0700)]
auto merge of #8857 : blake2-ppc/rust/std-str-remove, r=thestinger

These are very easy to replace with methods on string slices, basically
`.char_len()` and `.len()`.

These are the replacement implementations I did to clean these
functions up, but seeing this I propose removal:

/// ...
pub fn count_chars(s: &str, begin: uint, end: uint) -> uint {
    // .slice() checks the char boundaries
    s.slice(begin, end).char_len()
}

/// Counts the number of bytes taken by the first `n` chars in `s`
/// starting from byte index `begin`.
///
/// Fails if there are less than `n` chars past `begin`
pub fn count_bytes<'b>(s: &'b str, begin: uint, n: uint) -> uint {
    s.slice_from(begin).slice_chars(0, n).len()
}

10 years agodoc/rust.md: Missing in keyword on keyword list.
Carlos [Fri, 30 Aug 2013 11:21:14 +0000 (13:21 +0200)]
doc/rust.md: Missing in keyword on keyword list.

10 years agoAdd missing space
Bouke van der Bijl [Fri, 30 Aug 2013 10:53:05 +0000 (12:53 +0200)]
Add missing space

10 years agoauto merge of #8854 : huonw/rust/rt-papercuts, r=brson
bors [Fri, 30 Aug 2013 10:30:43 +0000 (03:30 -0700)]
auto merge of #8854 : huonw/rust/rt-papercuts, r=brson

The only user-facing change is handling non-integer (and zero) `RUST_THREADS` more nicely:

```
$ RUST_THREADS=x rustc # old

You've met with a terrible fate, haven't you?

fatal runtime error: runtime tls key not initialized
Aborted
$ RUST_THREADS=x ./x86_64-unknown-linux-gnu/stage2/bin/rustc # new

You've met with a terrible fate, haven't you?

fatal runtime error: `RUST_THREADS` is `x`, should be a positive integer
Aborted
```

The other changes are converting some `for .. in range(x,y)` to `vec::from_fn` or `for .. in x.iter()` as appropriate; and removing a chain of (seemingly) unnecessary pointer casts.

(Also, fixes a typo in `extra::test` from #8823.)

10 years agoauto merge of #8843 : alexcrichton/rust/fix-bug, r=huonw
bors [Fri, 30 Aug 2013 09:25:47 +0000 (02:25 -0700)]
auto merge of #8843 : alexcrichton/rust/fix-bug, r=huonw

Whenever a generic function was encountered, only the top-level items were
recursed upon, even though the function could contain items inside blocks or
nested inside of other expressions. This fixes the existing code from traversing
just the top level items to using a Visitor to deeply recurse and find any items
which need to be translated.

This was uncovered when building code with --lib, because the encode_symbol
function would panic once it found that an item hadn't been translated.

Closes #8134

10 years agoauto merge of #8820 : alexcrichton/rust/no-io-writer, r=brson
bors [Fri, 30 Aug 2013 08:20:44 +0000 (01:20 -0700)]
auto merge of #8820 : alexcrichton/rust/no-io-writer, r=brson

At the same time, this updates the TyVisitor to use a mutable self because it's
probably going to be mutating state as it goes along anyway.

10 years agoauto merge of #8839 : sanxiyn/rust/env, r=thestinger
bors [Fri, 30 Aug 2013 07:15:47 +0000 (00:15 -0700)]
auto merge of #8839 : sanxiyn/rust/env, r=thestinger

10 years agoAlign field names in struct expressions with fields on same line as the opening curly...
Micah Chalmer [Fri, 30 Aug 2013 05:48:02 +0000 (01:48 -0400)]
Align field names in struct expressions with fields on same line as the opening curly brace

10 years agoMultiline comments with leading *s line up the *s
Micah Chalmer [Fri, 30 Aug 2013 05:15:32 +0000 (01:15 -0400)]
Multiline comments with leading *s line up the *s

10 years agoauto merge of #8819 : vadimcn/rust/unit-tests, r=brson
bors [Fri, 30 Aug 2013 03:40:47 +0000 (20:40 -0700)]
auto merge of #8819 : vadimcn/rust/unit-tests, r=brson

Some of the tests are failing.  I've only managed to fix 'memory_map_file', the rest are up for grabs...

Fixes #5261.

10 years agoOne indent after open paren with no argument
Micah Chalmer [Fri, 30 Aug 2013 03:28:36 +0000 (23:28 -0400)]
One indent after open paren with no argument

10 years agoCorrect indent with trailing spaces/comments on previous line
Micah Chalmer [Fri, 30 Aug 2013 02:59:38 +0000 (22:59 -0400)]
Correct indent with trailing spaces/comments on previous line

10 years agoCorrect the sources of glob imports
Alex Crichton [Fri, 30 Aug 2013 02:48:37 +0000 (19:48 -0700)]
Correct the sources of glob imports

Closes #8847

10 years agoFix a bug with statics inside blocks in generic fns
Alex Crichton [Thu, 29 Aug 2013 06:28:06 +0000 (23:28 -0700)]
Fix a bug with statics inside blocks in generic fns

Whenever a generic function was encountered, only the top-level items were
recursed upon, even though the function could contain items inside blocks or
nested inside of other expressions. This fixes the existing code from traversing
just the top level items to using a Visitor to deeply recurse and find any items
which need to be translated.

This was uncovered when building code with --lib, because the encode_symbol
function would panic once it found that an item hadn't been translated.

Closes #8134

10 years agoauto merge of #8458 : cmr/rust/test-restructure, r=brson
bors [Fri, 30 Aug 2013 01:45:47 +0000 (18:45 -0700)]
auto merge of #8458 : cmr/rust/test-restructure, r=brson

This should make benchmarks easier to understand. But, it doesn't work.
BENCH_RS in mk/tests.mk has everything, from what I can tell in remake, but
only those that are direct children of src/test/bench get build and run.
@graydon, can you lend your expertise? I can't make heads or tails of this
makefile.

10 years agoreduce the size of UnsafeArc from 2 words to 1
Daniel Micay [Fri, 30 Aug 2013 00:23:29 +0000 (20:23 -0400)]
reduce the size of UnsafeArc from 2 words to 1

10 years agoauto merge of #8866 : brson/rust/rvstdrun, r=alexcrichton
bors [Thu, 29 Aug 2013 23:45:49 +0000 (16:45 -0700)]
auto merge of #8866 : brson/rust/rvstdrun, r=alexcrichton

...ing, r=brson"

This reverts commit b8d1fa399402c71331aefd634d710004e00b73a6, reversing
changes made to f22b4b169854c8a4ba86c16ee43327d6bcf94562.

Conflicts:
mk/rt.mk
src/libuv

This caused a big performance regression on the windows bots and possibly some unexpected segfaults in pretty-printing tests.

10 years agopartial revert of 31fa865
David Creswick [Thu, 29 Aug 2013 22:52:22 +0000 (17:52 -0500)]
partial revert of 31fa865

Ratio is generic and so might contain a non-total orderable type. It
should not use the default Ord implementation.

10 years agoRevert "auto merge of #8645 : alexcrichton/rust/issue-6436-run-non-blocking, r=brson"
Brian Anderson [Thu, 29 Aug 2013 21:20:48 +0000 (14:20 -0700)]
Revert "auto merge of #8645 : alexcrichton/rust/issue-6436-run-non-blocking, r=brson"

This reverts commit b8d1fa399402c71331aefd634d710004e00b73a6, reversing
changes made to f22b4b169854c8a4ba86c16ee43327d6bcf94562.

Conflicts:
mk/rt.mk
src/libuv

10 years agoauto merge of #8848 : ILyoan/rust/mk_libuv, r=cmr
bors [Thu, 29 Aug 2013 20:05:47 +0000 (13:05 -0700)]
auto merge of #8848 : ILyoan/rust/mk_libuv, r=cmr

10 years agodrop some redundant Ord method implementations
David Creswick [Thu, 29 Aug 2013 18:22:04 +0000 (13:22 -0500)]
drop some redundant Ord method implementations

10 years agoauto merge of #8842 : jfager/rust/remove-iter-module, r=pnkfelix
bors [Thu, 29 Aug 2013 18:10:47 +0000 (11:10 -0700)]
auto merge of #8842 : jfager/rust/remove-iter-module, r=pnkfelix

Moves the Times trait to num while the question of whether it should
exist at all gets hashed out as a completely separate question.

10 years agoauto merge of #8840 : alexcrichton/rust/update-vendors, r=cmr
bors [Thu, 29 Aug 2013 16:50:48 +0000 (09:50 -0700)]
auto merge of #8840 : alexcrichton/rust/update-vendors, r=cmr

The LLVM update includes patches from #8488 by @klutzy to build llvm on mingw-64 and also to enable segmented stacks on that platform.

The libuv patch is a rebase on the now-current joyent/master in order to fix #8829

10 years agoextra::dlist: Fix bug in Eq::ne
blake2-ppc [Thu, 29 Aug 2013 15:11:11 +0000 (17:11 +0200)]
extra::dlist: Fix bug in Eq::ne

10 years agostd::str: Fix bug in .slice_chars()
blake2-ppc [Thu, 29 Aug 2013 15:11:11 +0000 (17:11 +0200)]
std::str: Fix bug in .slice_chars()

`s.slice_chars(a, b)` did not allow the case where `a == s.len()`, this
is a bug I introduced last time I touched the method; add a test for
this case.

10 years agostd::str: Use CharIterator in NormalizationIterator
blake2-ppc [Thu, 29 Aug 2013 15:11:11 +0000 (17:11 +0200)]
std::str: Use CharIterator in NormalizationIterator

Just to simplify and not have the iteration logic repeated in multiple places.

10 years agostd::str: Remove functions count_chars, count_bytes
blake2-ppc [Thu, 29 Aug 2013 13:21:05 +0000 (15:21 +0200)]
std::str: Remove functions count_chars, count_bytes

These are very easy to replace with methods on string slices, basically
`.char_len()` and `.len()`.

These are the replacement implementations I did to clean these
functions up, but seeing this I propose removal:

/// ...
pub fn count_chars(s: &str, begin: uint, end: uint) -> uint {
    // .slice() checks the char boundaries
    s.slice(begin, end).char_len()
}

/// Counts the number of bytes taken by the first `n` chars in `s`
/// starting from byte index `begin`.
///
/// Fails if there are less than `n` chars past `begin`
pub fn count_bytes<'b>(s: &'b str, begin: uint, n: uint) -> uint {
    s.slice_from(begin).slice_chars(0, n).len()
}

10 years agoauto merge of #8838 : brson/rust/rvfpelim, r=alexcrichton
bors [Thu, 29 Aug 2013 13:00:48 +0000 (06:00 -0700)]
auto merge of #8838 : brson/rust/rvfpelim, r=alexcrichton

This reverts commit 2c0f9bd35493def5e23f0f43ddeba54da9d788b4, reversing
changes made to f8c4f0ea9c96218dbc81081799e77875fbb071de.

Conflicts:
src/rustllvm/RustWrapper.cpp

Fixes #8833

10 years agoextra: error message should reflact that RUST_TEST_TASKS should be strictly positive...
Huon Wilson [Thu, 29 Aug 2013 12:58:27 +0000 (22:58 +1000)]
extra: error message should reflact that RUST_TEST_TASKS should be strictly positive (zero is illegal).

10 years agort: remove a series of unfortunate casts.
Huon Wilson [Thu, 29 Aug 2013 12:28:49 +0000 (22:28 +1000)]
rt: remove a series of unfortunate casts.

10 years agort: use sugary functions rather than manual range loops.
Huon Wilson [Thu, 29 Aug 2013 11:49:55 +0000 (21:49 +1000)]
rt: use sugary functions rather than manual range loops.

10 years agort: Handle non-integer RUST_THREADS (slightly) more gracefully.
Huon Wilson [Thu, 29 Aug 2013 10:57:37 +0000 (20:57 +1000)]
rt: Handle non-integer RUST_THREADS (slightly) more gracefully.

Previously it would call Option.unwrap(), which calls `fail!` on None,
which doesn't work without the runtime (e.g. when initialising it).

10 years agoauto merge of #8823 : huonw/rust/6233, r=brson
bors [Thu, 29 Aug 2013 11:50:43 +0000 (04:50 -0700)]
auto merge of #8823 : huonw/rust/6233, r=brson

Fixes #7335.

10 years agoauto merge of #8830 : andersk/rust/indent-4, r=catamorphism
bors [Thu, 29 Aug 2013 10:10:42 +0000 (03:10 -0700)]
auto merge of #8830 : andersk/rust/indent-4, r=catamorphism

`default-tab-width` is standardly 8, but most programmers and style guides prefer an indentation width smaller than that.  Rust itself uses 4 space indents.  Most other Emacs modes define the indentation width as 4 or 2 spaces, independently of the width of a Tab character.  Depending on `default-tab-width` makes especially little sense for rust-mode because it sets `indent-tabs-mode` to `nil`.

10 years agomk: Fix libuv makefile generation on android
Ilyong Cho [Thu, 29 Aug 2013 08:44:23 +0000 (17:44 +0900)]
mk: Fix libuv makefile generation on android

10 years agoRemove @io::Writer from sys/repr/reflect
Alex Crichton [Thu, 8 Aug 2013 20:46:40 +0000 (13:46 -0700)]
Remove @io::Writer from sys/repr/reflect

At the same time, this updates the TyVisitor to use a mutable self because it's
probably going to be mutating state as it goes along anyway.

10 years agoRemove the iter module.
Jason Fager [Thu, 29 Aug 2013 05:27:24 +0000 (01:27 -0400)]
Remove the iter module.

Moves the Times trait to num while the question of whether it should
exist at all gets hashed out as a completely separate question.

10 years agoEnable segmented stacks for llvm on mingw-64
Alex Crichton [Thu, 29 Aug 2013 03:36:25 +0000 (20:36 -0700)]
Enable segmented stacks for llvm on mingw-64

cc #8488

10 years agoUpdate libuv to rebase on top of joyent/master
Alex Crichton [Thu, 29 Aug 2013 03:33:24 +0000 (20:33 -0700)]
Update libuv to rebase on top of joyent/master

Closes #8829

10 years agoauto merge of #8800 : fhahn/rust/ticket_5239, r=alexcrichton
bors [Thu, 29 Aug 2013 03:30:36 +0000 (20:30 -0700)]
auto merge of #8800 : fhahn/rust/ticket_5239, r=alexcrichton

I've added a test for the second example mentioned in #5239. The first example does not compile with a reasonable error message. Should I add a compile-fail test for that example as well?

    /rust/src/test/run-pass/issue-5239.rs:15:45: 15:51 error: binary operation + cannot be applied to type `&int`
    rust/src/test/run-pass/issue-5239.rs:15     let _f = |ref x: int| { x += 1};
                                                                                         ^~~~~~

    error: aborting due to previous error

10 years agoRevert "auto merge of #8695 : thestinger/rust/build, r=pcwalton"
Brian Anderson [Thu, 29 Aug 2013 00:41:40 +0000 (17:41 -0700)]
Revert "auto merge of #8695 : thestinger/rust/build, r=pcwalton"

This reverts commit 2c0f9bd35493def5e23f0f43ddeba54da9d788b4, reversing
changes made to f8c4f0ea9c96218dbc81081799e77875fbb071de.

Conflicts:
src/rustllvm/RustWrapper.cpp

10 years agoMake the unit-test framework check RUST_TEST_TASKS over RUST_THREADS.
Huon Wilson [Wed, 28 Aug 2013 12:58:41 +0000 (22:58 +1000)]
Make the unit-test framework check RUST_TEST_TASKS over RUST_THREADS.

Fixes #7335.

10 years agoauto merge of #8832 : alexcrichton/rust/fix-libuv-build, r=pcwalton
bors [Thu, 29 Aug 2013 00:35:35 +0000 (17:35 -0700)]
auto merge of #8832 : alexcrichton/rust/fix-libuv-build, r=pcwalton

It turns out that gyp (libuv's new build system) wants x64 for a 64-bit x86
architecture and ia32 for a 32-bit architecture, so this performs the relevant
mapping and then invokes libuv's configure script with the appropriate target
architecture.

This can be verified by running make with VERBOSE=1 and seeing that beforehand
on a 64-bit build libuv was passed "-arch i386" and now it's passed
"-arch x86_64"

Closes #8826

10 years agoFix compilation issues with libuv on OSX
Alex Crichton [Thu, 29 Aug 2013 00:01:44 +0000 (17:01 -0700)]
Fix compilation issues with libuv on OSX

It turns out that gyp (libuv's new build system) wants x64 for a 64-bit x86
architecture and ia32 for a 32-bit architecture, so this performs the relevant
mapping and then invokes libuv's configure script with the appropriate target
architecture.

This can be verified by running make with VERBOSE=1 and seeing that beforehand
on a 64-bit build libuv was passed "-arch i386" and now it's passed
"-arch x86_64"

Closes #8826

10 years agoauto merge of #8718 : bblum/rust/typeof, r=pcwalton
bors [Wed, 28 Aug 2013 22:30:38 +0000 (15:30 -0700)]
auto merge of #8718 : bblum/rust/typeof, r=pcwalton

r? anybody

10 years agorust-mode: Default rust-indent-offset to 4, not default-tab-width
Anders Kaseorg [Wed, 28 Aug 2013 22:09:02 +0000 (18:09 -0400)]
rust-mode: Default rust-indent-offset to 4, not default-tab-width

default-tab-width is standardly 8, but most programmers and style
guides prefer an indentation width smaller than that.  Rust itself
uses 4 space indents.  Most other Emacs modes define the indentation
width as 4 or 2 spaces, independently of the width of a Tab character.
Depending on default-tab-width makes especially little sense for
rust-mode because it sets indent-tabs-mode to nil.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
10 years agoauto merge of #8447 : alexcrichton/rust/local-data-merge, r=brson
bors [Wed, 28 Aug 2013 21:15:37 +0000 (14:15 -0700)]
auto merge of #8447 : alexcrichton/rust/local-data-merge, r=brson

This moves all local_data stuff into the `local_data` module and only that
module alone. It also removes a fair amount of "super-unsafe" code in favor of
just vanilla code generated by the compiler at the same time.

Closes #8113

10 years agoauto merge of #8828 : brson/rust/randomness, r=thestinger
bors [Wed, 28 Aug 2013 19:30:52 +0000 (12:30 -0700)]
auto merge of #8828 : brson/rust/randomness, r=thestinger

The new scheduler is not currently that random.

10 years agodoc: Remove statement about scheduling randomness
Brian Anderson [Wed, 28 Aug 2013 18:23:30 +0000 (11:23 -0700)]
doc: Remove statement about scheduling randomness

The new scheduler is not currently that random.

10 years agoauto merge of #8807 : alexcrichton/rust/remove-two-offsets, r=thestinger
bors [Wed, 28 Aug 2013 18:00:41 +0000 (11:00 -0700)]
auto merge of #8807 : alexcrichton/rust/remove-two-offsets, r=thestinger

Everything that we do is actually inbounds, so there's no reason for us to be exposing two of these functions

10 years agoauto merge of #8806 : klutzy/rust/winmain, r=cmr
bors [Wed, 28 Aug 2013 14:25:42 +0000 (07:25 -0700)]
auto merge of #8806 : klutzy/rust/winmain, r=cmr

Fixes #8510.

10 years agoAndroid: Pass the environment when running tests
Seo Sanghyeon [Wed, 28 Aug 2013 12:44:55 +0000 (21:44 +0900)]
Android: Pass the environment when running tests

10 years agoRemove --newrt option
Seo Sanghyeon [Wed, 28 Aug 2013 12:25:12 +0000 (21:25 +0900)]
Remove --newrt option

10 years agoTeach the makefile to use multiple src-base's
Corey Richardson [Mon, 12 Aug 2013 18:15:05 +0000 (14:15 -0400)]
Teach the makefile to use multiple src-base's

10 years agoTeach compiletest to use multiple --src-base's
Corey Richardson [Mon, 12 Aug 2013 17:55:42 +0000 (13:55 -0400)]
Teach compiletest to use multiple --src-base's

10 years agosrc/test/bench: restructure
Corey Richardson [Sun, 11 Aug 2013 21:37:36 +0000 (17:37 -0400)]
src/test/bench: restructure

10 years agoauto merge of #8821 : alexcrichton/rust/fix-libuv-build, r=huonw
bors [Wed, 28 Aug 2013 10:40:40 +0000 (03:40 -0700)]
auto merge of #8821 : alexcrichton/rust/fix-libuv-build, r=huonw

The syntax of the script requires python < 3, and so does our build system so we
can just use CFG_PYTHON to run the script. This prevents build failures where
`python` is actually python3 or later.

10 years agoRun gyp_uv with CFG_PYTHON instead of directly
Alex Crichton [Wed, 28 Aug 2013 09:17:13 +0000 (02:17 -0700)]
Run gyp_uv with CFG_PYTHON instead of directly

The syntax of the script requires python < 3, and so does our build system so we
can just use CFG_PYTHON to run the script. This prevents build failures where
`python` is actually python3 or later.

10 years agoTurned off libstd unit tests that currently fail on Windows.
Vadim Chugunov [Wed, 28 Aug 2013 08:44:25 +0000 (01:44 -0700)]
Turned off libstd unit tests that currently fail on Windows.

10 years agoDisabled failing parts of abs_sub() and frexp() unit tests on Windows.
Vadim Chugunov [Mon, 26 Aug 2013 06:29:38 +0000 (23:29 -0700)]
Disabled failing parts of abs_sub() and frexp() unit tests on Windows.

10 years agoFixed MemoryMap on Windows.
Vadim Chugunov [Wed, 28 Aug 2013 08:41:26 +0000 (01:41 -0700)]
Fixed MemoryMap on Windows.

10 years agoAdded libstd and libextra unit tests to check-fast target.
Vadim Chugunov [Wed, 28 Aug 2013 08:39:29 +0000 (01:39 -0700)]
Added libstd and libextra unit tests to check-fast target.

10 years agoAdd tests for ref in closure parameter list, closes #5239
Florian Hahn [Tue, 27 Aug 2013 21:48:02 +0000 (23:48 +0200)]
Add tests for ref in closure parameter list, closes #5239

10 years agoRemove offset_inbounds for an unsafe offset function
Alex Crichton [Fri, 9 Aug 2013 05:22:52 +0000 (22:22 -0700)]
Remove offset_inbounds for an unsafe offset function

10 years agoauto merge of #8805 : jfager/rust/remove-hashutil, r=alexcrichton
bors [Wed, 28 Aug 2013 06:05:35 +0000 (23:05 -0700)]
auto merge of #8805 : jfager/rust/remove-hashutil, r=alexcrichton

10 years agoauto merge of #8645 : alexcrichton/rust/issue-6436-run-non-blocking, r=brson
bors [Wed, 28 Aug 2013 04:55:42 +0000 (21:55 -0700)]
auto merge of #8645 : alexcrichton/rust/issue-6436-run-non-blocking, r=brson

This overhauls `std::run` to instead run on top of libuv. This is *not* in a mergeable state, I've been attempting to diagnose failures in the compiletest suite. I've managed to find a fair number of bugs so far, but I still  don't seem to be done yet.

Notable changes:
* This requires upgrading libuv. From the discussion on #6567, I took libuv master from a few days ago, applied one patch to fix process spawning with multiple event loops in libuv, and pushed to my own fork
* The build system for libuv has changed since we last used it. There's some extra checkout from a google build system which apparently does all the magic if you don't want to require autotools, and the google system just requires python. I updated the Makefile to get this build system and build libuv with it instead. This is untested on windows and arm, and both will probably need to see some improvement.
* This required adding some pipe bindings to libuv as well. Currently the support is pretty simple and probably completely unsafe for pipes, but you at least get read/write methods. This is necessary for capturing output of processes.
* I didn't redesign `std::run` at all, I simply tried to reimplement all the existing functionality on top of libuv. Some functions ended up dying, but nothing major. All uses of `std::run` in the compiler still work just fine.

I'm not quite sure how the rest of the runtime deals with this, but I marked process structures as `no_send` because the waiting/waking up has to happen in the same event loop right now. If processes start migrating between event loops then very bad things can happen. This may be what threadsafe I/O would fix, and I would be more than willing to rebase on that if it lands first.

Anyway, for now I wanted to put this up for review, I'm still investigating the corruption/deadlock bugs, but this is in an *almost* workable state. Once I find the bugs I'll also rebase on the current master.

10 years agorustc: Use "main" entry point on Windows
klutzy [Wed, 28 Aug 2013 04:43:11 +0000 (13:43 +0900)]
rustc: Use "main" entry point on Windows

Fixes #8510.

10 years agoConsolidate local_data implementations, and cleanup
Alex Crichton [Sun, 11 Aug 2013 03:06:39 +0000 (20:06 -0700)]
Consolidate local_data implementations, and cleanup

This moves all local_data stuff into the `local_data` module and only that
module alone. It also removes a fair amount of "super-unsafe" code in favor of
just vanilla code generated by the compiler at the same time.

Closes #8113

10 years agoFix merge fallout
Alex Crichton [Wed, 28 Aug 2013 03:53:26 +0000 (20:53 -0700)]
Fix merge fallout

10 years agoFix various issues associated with building on windows
Alex Crichton [Wed, 28 Aug 2013 03:20:26 +0000 (20:20 -0700)]
Fix various issues associated with building on windows

10 years agoImplement process bindings to libuv
Alex Crichton [Thu, 15 Aug 2013 21:18:13 +0000 (14:18 -0700)]
Implement process bindings to libuv

Closes #6436

10 years agoUpgrade libuv to the current master + our patches
Alex Crichton [Mon, 19 Aug 2013 00:11:45 +0000 (17:11 -0700)]
Upgrade libuv to the current master + our patches

There were two main differences with the old libuv and the master version:

1. The uv_last_error function is now gone. The error code returned by each
   function is the "last error" so now a UvError is just a wrapper around a
   c_int.
2. The repo no longer includes a makefile, and the build system has change.
   According to the build directions on joyent/libuv, this now downloads a `gyp`
   program into the `libuv/build` directory and builds using that. This
   shouldn't add any dependences on autotools or anything like that.

Closes #8407
Closes #6567
Closes #6315

10 years agoauto merge of #8697 : kballard/rust/rustpkg-no-args, r=catamorphism
bors [Wed, 28 Aug 2013 03:45:40 +0000 (20:45 -0700)]
auto merge of #8697 : kballard/rust/rustpkg-no-args, r=catamorphism

`rustpkg build` et al were only checking one directory up to see if it
was in a dir named "src". Ditch that entirely and instead check if the
cwd is descended from any of the workspace paths. Besides being more
intelligent about whether or not something is a workspace, this also
allows for package ids composed of multiple path components.

r? @catamorphism

10 years agoauto merge of #8802 : pcwalton/rust/compile-speed, r=brson
bors [Wed, 28 Aug 2013 02:35:44 +0000 (19:35 -0700)]
auto merge of #8802 : pcwalton/rust/compile-speed, r=brson

r? @brson

10 years agolibrustc: Fix merge fallout
Patrick Walton [Wed, 28 Aug 2013 01:45:13 +0000 (18:45 -0700)]
librustc: Fix merge fallout

10 years agoHandle `rustpkg build`, etc. when given no args properly
Kevin Ballard [Fri, 23 Aug 2013 02:18:38 +0000 (19:18 -0700)]
Handle `rustpkg build`, etc. when given no args properly

`rustpkg build` et al were only checking one directory up to see if it
was in a dir named "src". Ditch that entirely and instead check if the
cwd is descended from any of the workspace paths. Besides being more
intelligent about whether or not something is a workspace, this also
allows for package ids composed of multiple path components.

10 years agolibrustc: Fix problem with cross-crate reexported static methods.
Patrick Walton [Sat, 24 Aug 2013 01:31:43 +0000 (18:31 -0700)]
librustc: Fix problem with cross-crate reexported static methods.

10 years agolibrustc: Implement basic lazy implementation loading.
Patrick Walton [Fri, 23 Aug 2013 21:34:00 +0000 (14:34 -0700)]
librustc: Implement basic lazy implementation loading.

This is only for implementations defined in the same crate as the trait they
implement.