Commit Graph

32089 Commits

Author SHA1 Message Date
Piotr Czarnecki
696367fb8d Decouple string and argument pieces 2014-09-09 20:34:41 +01:00
bors
6f34760e41 auto merge of #16903 : mahkoh/rust/move_items_unwrap, r=aturon
Closes #16879
2014-09-08 13:46:15 +00:00
bors
5c3987985e auto merge of #17053 : thestinger/rust/large_address_aware, r=sfackler,cmr
By default, 32-bit Windows executables are restricted to 2GiB of address
space even when running on 64-bit Windows when 4GiB is available.

Closes #17043
2014-09-08 11:56:12 +00:00
bors
ab7b1c896d auto merge of #17063 : huonw/rust/snap, r=alexcrichton
Closes #16880.
2014-09-08 10:06:15 +00:00
bors
a39f69f91d auto merge of #17036 : pczarn/rust/issue-15913-ICE-with-call-trans, r=alexcrichton
A match in callee.rs was recognizing some foreign fns as named tuple constructors. A reproducible test case for this is nearly impossible since it depends on the way NodeIds happen to be assigned in different crates.

Fixes #15913
2014-09-08 08:06:18 +00:00
bors
dd626b48c4 auto merge of #16933 : nick29581/rust/dst-rvalue, r=nikomatsakis
Closes #16813 

r? @nikomatsakis I feel like I should be checking more things in check_rvalues, but not sure what - I don't properly understand expr_use_visitor
2014-09-08 02:36:15 +00:00
bors
aaf141d399 auto merge of #16942 : alexcrichton/rust/remove-net-assert, r=brson
This assert was likely inherited from some point, but it's not quite valid as a
no-timeout read may enter this loop, but data could be stolen by any other read
after the socket is deemed readable.

I saw this fail in a recent bors run where the assertion was tripped.
2014-09-07 23:01:34 +00:00
Nick Cameron
742f49c961 Forbid unsized rvalues
Closes #16813
2014-09-08 09:32:52 +12:00
bors
19dc574890 auto merge of #17035 : huonw/rust/moar-jquery, r=alexcrichton
Sometimes (e.g. on Rust CI) the "expand description" text of the
collapse toggle was displayed by default, when a page is first
loaded (even though the description is expanded), because some
Content-Security-Policy settings disable inline CSS.

Setting it the style with the `.css` method allows the output to be used
in more places.
2014-09-07 21:06:29 +00:00
bors
86730e43c0 auto merge of #16904 : inrustwetrust/rust/link-path-order, r=alexcrichton
Issue can be reproduced by the following:
```
$ cat main.rs
fn main() {}
$ rustc -Z print-link-args -Lfoo -Lbar main.rs
```
Run the rustc command a few times and observe that the order of the '-L' 'foo' '-L' 'bar' options randomly changes.

Actually hit this issue in practice on Windows when specifying two -L directories to rustc, one with rust-sdl2 in it and one with the C SDL2.dll. Since Windows file systems aren't case-sensitive, gcc randomly attempted to link against the rust sdl2.dll instead of SDL2.dll if that -L directory happened to come first.

The randomness was due to addl_lib_search_paths being a HashSet. Changed it to a Vec instead which maintains the ordering.
Unsure how to test this though since it is random by nature; suggestions very welcome.
2014-09-07 19:06:28 +00:00
bors
d7502ac2d6 auto merge of #17015 : seb-m/rust/fix-extern-crate-as, r=sfackler
Its arguments were inverted.

For instance it displayed this message:

```
warning: this extern crate syntax is deprecated. Use: extern create "foobar" as foo;
```

Instead of:

```
warning: this extern crate syntax is deprecated. Use: extern create "foo" as foobar;
```
2014-09-07 16:21:29 +00:00
Sebastien Martini
8baff54128 Fix deprecate warning "extern crate ... as ..."
Its arguments were inverted.
2014-09-07 17:58:33 +02:00
bors
4067252def auto merge of #17034 : retep998/rust/glob-fix, r=alexcrichton
Fixes #15279
Based on #13338
2014-09-07 14:31:24 +00:00
bors
1242772cce auto merge of #17005 : bjz/rust/bit-count, r=thestinger
Fixes rust-lang/rfcs#224
2014-09-07 12:41:25 +00:00
Huon Wilson
524e1b20af Register snapshots.
Closes #16880.
2014-09-07 20:42:14 +10:00
inrustwetrust
e7a000e717 Added test for link path ordering 2014-09-07 11:42:02 +02:00
inrustwetrust
61414a9850 Changed addl_lib_search_paths from HashSet to Vec
This makes the extra library paths given to the gcc linker come in
the same order as the -L options on the rustc command line.
2014-09-07 11:42:02 +02:00
bors
ee72e46638 auto merge of #17032 : jamesluke/rust/master, r=alexcrichton
"extern create" -> "extern crate"
2014-09-07 09:26:27 +00:00
bors
57781c3c30 auto merge of #17019 : steveklabnik/rust/remove_compromise, r=thestinger
@dherman doesn't like it 😄
2014-09-07 07:16:27 +00:00
bors
c964cb229b auto merge of #17018 : steveklabnik/rust/fix_projects_in_guide, r=huonw
Thanks @dherman.
2014-09-07 05:31:25 +00:00
bors
d52d0c8364 auto merge of #17016 : steveklabnik/rust/fix_diagnostic_codes, r=huonw
Fixes #16449.
2014-09-07 03:36:27 +00:00
bors
09cebc25a3 auto merge of #16999 : brson/rust/fannkuch, r=alexcrichton
From the discussion on reddit:
http://www.reddit.com/r/rust/comments/2fenlg/benchmark_improvement_fannkuchredux/

This adds two variants: the primary, that uses an unsafe block, and a secondary
that is completely safe.

The one with the unsafe block matches clang's performance and beats gcc's.
2014-09-07 00:31:28 +00:00
Daniel Micay
c6633fde53 mark win32 binaries as large address aware
By default, 32-bit Windows executables are restricted to 2GiB of address
space even when running on 64-bit Windows when 4GiB is available.

Closes #17043
2014-09-06 17:54:52 -04:00
bors
38eb0e5514 auto merge of #17012 : thestinger/rust/sized, r=nikomatsakis 2014-09-06 21:46:25 +00:00
Daniel Micay
c76e3caf10 fix sized deallocation for TypedArena<T> 2014-09-06 13:58:34 -04:00
Daniel Micay
2fdad65a05 fix sized deallocation for OwnedSlice 2014-09-06 13:58:34 -04:00
Daniel Micay
d1bd139251 fix sized deallocation for Box<[T]> 2014-09-06 13:58:30 -04:00
bors
d8a26184dc auto merge of #17011 : nodakai/rust/rustdoc-stronger-crate, r=alexcrichton
If you browse to, say, http://doc.rust-lang.org/libc/types/os/common/posix01/struct.timeval.html , you will see the "location" window showing `libc::types::os::common::posix01`.  The first element points to a crate and others point modules.  This patch adds the bold attribute to the first (ie. crate) element so that it stands out more.
2014-09-06 17:51:24 +00:00
Daniel Micay
5aa2da0133 fix sized deallocation for proc 2014-09-06 13:50:58 -04:00
Daniel Micay
395e453c06 fix a sized deallocation issue in the glue code 2014-09-06 13:50:58 -04:00
Peter Atashian
d3ec0674bb readdir: return error instead of failing on invalid UTF-16
Fixes #15279

Signed-off-by: Peter Atashian <retep998@gmail.com>
2014-09-06 12:51:42 -04:00
bors
6eabd85265 auto merge of #17003 : nick29581/rust/impl, r=pcwalton
closes #16955 

r? @pcwalton
2014-09-06 14:51:26 +00:00
bors
9f2ba967a0 auto merge of #17002 : tari/rust/std-mut-ref-slice, r=alexcrichton
`std::slice` exported `ref_slice` but not `mut_ref_slice`. This change makes it export both.
2014-09-06 13:06:27 +00:00
Piotr Czarnecki
808e039d40 Fix ICE with trans of calls to foreign fns
It was failing occasionally.
2014-09-06 12:31:05 +01:00
Piotr Czarnecki
10935de0cd rustc: Refactor middle::trans::inline 2014-09-06 12:31:05 +01:00
bors
a356e98803 auto merge of #16997 : gamazeps/rust/master, r=huonw
Changed the names according to the issue #16988
2014-09-06 10:31:29 +00:00
bors
20c0ba1279 auto merge of #16907 : SimonSapin/rust/tempdir-result, r=huonw
This allows using `try!()`

[breaking-change]

Fixes #16875
2014-09-06 08:01:33 +00:00
bors
4bea7b3ed0 auto merge of #16367 : epdtry/rust/parallel-codegen, r=alexcrichton
This branch adds support for running LLVM optimization and codegen on different parts of a crate in parallel.  Instead of translating the crate into a single LLVM compilation unit, `rustc` now distributes items in the crate among several compilation units, and spawns worker threads to optimize and codegen each compilation unit independently.  This improves compile times on multicore machines, at the cost of worse performance in the compiled code.  The intent is to speed up build times during development without sacrificing too much optimization.

On the machine I tested this on, `librustc` build time with `-O` went from 265 seconds (master branch, single-threaded) to 115s (this branch, with 4 threads), a speedup of 2.3x.  For comparison, the build time without `-O` was 90s (single-threaded).  Bootstrapping `rustc` using 4 threads gets a 1.6x speedup over the default settings (870s vs. 1380s), and building `librustc` with the resulting stage2 compiler takes 1.3x as long as the master branch (44s vs.  55s, single threaded, ignoring time spent in LLVM codegen).

The user-visible changes from this branch are two new codegen flags:

 * `-C codegen-units=N`: Distribute items across `N` compilation units.
 * `-C codegen-threads=N`: Spawn `N` worker threads for running optimization and codegen.  (It is possible to set `codegen-threads` larger than `codegen-units`, but this is not very useful.)

Internal changes to the compiler are described in detail on the individual commit messages.

Note: The first commit on this branch is copied from #16359, which this branch depends on.

r? @nick29581
2014-09-06 06:06:35 +00:00
bors
da1395b6cb auto merge of #17039 : vadimcn/rust/test_lots_of_files, r=alexcrichton 2014-09-06 03:31:34 +00:00
Vadim Chugunov
6a7e6017c5 Disable test_lots_of_files on Windows 2014-09-05 19:55:25 -07:00
Huon Wilson
9151874f40 Use more jQuery to avoid displaying Expand Description more often.
Sometimes (e.g. on Rust CI) the "expand description" text of the
collapse toggle was displayed by default, when a page is first
loaded (even though the description is expanded), because some
Content-Security-Policy settings disable inline CSS.

Setting it the style with the `.css` method allows the output to be used
in more places.
2014-09-06 11:04:39 +10:00
jamesluke
4755441fd4 Fix documentation typo. 2014-09-05 16:03:58 -07:00
Stuart Pernsteiner
6d2d47b2fc don't use ld -r with -C codegen-units=1 2014-09-05 14:30:36 -07:00
Brian Anderson
7e12e67936 Optimize Slice::reverse
This makes the completely safe implementation of fannkuchredux perform
the same as C++. Yay, Rust.
2014-09-05 14:12:20 -07:00
bors
82c052794d auto merge of #16628 : pczarn/rust/hashmap-opt, r=nikomatsakis
This is #15720, rebased and reopened.

cc @nikomatsakis
2014-09-05 17:36:25 +00:00
Stuart Pernsteiner
4d9a478616 add workaround for mingw ld --force-exe-suffix behavior 2014-09-05 09:18:57 -07:00
Stuart Pernsteiner
1b676fb760 don't leave unwanted temporary files with --emit=ir/asm 2014-09-05 09:18:57 -07:00
Stuart Pernsteiner
b5a0b700c6 use target-specific linker args when combining compilation units 2014-09-05 09:18:57 -07:00
Stuart Pernsteiner
4b70269854 add tests for separate compilation 2014-09-05 09:18:57 -07:00
Stuart Pernsteiner
73f8adcbc8 make separate compilation respect #[inline] attributes
Adjust the handling of `#[inline]` items so that they get translated into every
compilation unit that uses them.  This is necessary to preserve the semantics
of `#[inline(always)]`.

Crate-local `#[inline]` functions and statics are blindly translated into every
compilation unit.  Cross-crate inlined items and monomorphizations of
`#[inline]` functions are translated the first time a reference is seen in each
compilation unit.  When using multiple compilation units, inlined items are
given `available_externally` linkage whenever possible to avoid duplicating
object code.
2014-09-05 09:18:57 -07:00