Commit Graph

23209 Commits

Author SHA1 Message Date
bors
34a1e3dc9a auto merge of #9938 : alexcrichton/rust/fmtdox, r=huonw
Closes #9865
Closes #9808
2013-10-18 21:21:22 -07:00
bors
3a7337ff17 auto merge of #9437 : catamorphism/rust/rustpkg-dates, r=alexcrichton
r? @alexcrichton On most platforms, the time granularity is 1 sec or more, so comparing
dates in tests that check whether rebuilding did or didn't happen leads
to spurious failures. Instead, test the same thing by making an output
file read-only and trapping attempts to write to it.
2013-10-18 19:36:22 -07:00
Tim Chevalier
e779313b07 rustpkg: invoke touch with a portable set of args 2013-10-18 18:36:27 -07:00
Tim Chevalier
4dbef017dd rustc: Check that the output file is writeable before linking
This is because on Linux, the linker will silently overwrite
a read-only file.
2013-10-18 18:36:23 -07:00
Tim Chevalier
1cf029c229 rustpkg: Make rustpkg tests stop comparing dates
Instead of scrutinizing modification times in rustpkg tests,
change output files to be read-only and detect attempts to write
to them (hack suggested by Jack). This avoids time granularity problems.

As part of this change, I discovered that some dependencies weren't
getting written correctly (involving built executables and library
files), so this patch fixes that too.

This partly addresses #9441, but one test (test_rebuild_when_needed)
is still ignored on Linux.
2013-10-18 18:36:17 -07:00
bors
cd623e3e36 auto merge of #9919 : alexcrichton/rust/fmt-begone, r=huonw
It lived a good life, but its time has come. The groundwork is set for the
official transition after the next snapshot (removal of XXX2 macros)
2013-10-18 18:26:23 -07:00
bors
a9836e72dd auto merge of #9856 : alexcrichton/rust/privacy-errors, r=huonw
This stops labeling everything as "is private" when in fact the destination may
be public. Instead, the clause "is inaccessible" is used and the private part of
the flag is called out with a "is private" message.

Closes #9793
2013-10-18 17:11:25 -07:00
Alex Crichton
29c58c473f Remove the fmt! syntax extension
It lived a good life, but its time has come. The groundwork is set for the
official transition after the next snapshot (removal of XXX2 macros)
2013-10-18 16:01:40 -07:00
Alex Crichton
7a8324d3e8 Document traits and Default about format! better
Closes #9865
Closes #9808
2013-10-18 15:55:28 -07:00
bors
df187a0b67 auto merge of #9933 : alexcrichton/rust/no-jemalloc, r=brson
As discovered in #9925, it turns out that we weren't using jemalloc on most
platforms. Additionally, on some platforms we were using it incorrectly and
mismatching the libc version of malloc with the jemalloc version of malloc.

Additionally, it's not clear that using jemalloc is indeed a large performance
win in particular situtations. This could be due to building jemalloc
incorrectly, or possibly due to using jemalloc incorrectly, but it is unclear at
this time.

Until jemalloc can be confirmed to integrate correctly on all platforms and has
verifiable large performance wins on platforms as well, it shouldn't be part of
the default build process. It should still be available for use via the
LD_PRELOAD trick on various architectures, but using it as the default allocator
for everything would require guaranteeing that it works in all situtations,
which it currently doesn't.

Closes #9925
2013-10-18 15:26:24 -07:00
bors
6b07d885f3 auto merge of #9935 : reedlepee123/rust/my_new_branch, r=bstrie 2013-10-18 14:16:26 -07:00
chitra
bdcd29c6d0 Make fields in std::comm private 2013-10-19 00:18:17 +05:30
bors
a1b25f2f09 auto merge of #9930 : alexcrichton/rust/refcount-tests, r=thestinger
This fixes a bug I accidentally introduced in #9922
2013-10-18 11:31:31 -07:00
Alex Crichton
90911d7259 Remove jemalloc from the runtime
As discovered in #9925, it turns out that we weren't using jemalloc on most
platforms. Additionally, on some platforms we were using it incorrectly and
mismatching the libc version of malloc with the jemalloc version of malloc.

Additionally, it's not clear that using jemalloc is indeed a large performance
win in particular situtations. This could be due to building jemalloc
incorrectly, or possibly due to using jemalloc incorrectly, but it is unclear at
this time.

Until jemalloc can be confirmed to integrate correctly on all platforms and has
verifiable large performance wins on platforms as well, it shouldn't be part of
the default build process. It should still be available for use via the
LD_PRELOAD trick on various architectures, but using it as the default allocator
for everything would require guaranteeing that it works in all situtations,
which it currently doesn't.

Closes #9925
2013-10-18 10:38:21 -07:00
bors
d052912297 auto merge of #9851 : alexcrichton/rust/include_bin, r=huonw
Previously an ExprLit was created *per byte* causing a huge increase in memory
bloat. This adds a new `lit_binary` to contain a literal of binary data, which
is currently only used by the include_bin! syntax extension. This massively
speeds up compilation times of the shootout-k-nucleotide-pipes test

    before:
        time: 469s
        memory: 6GB
        assertion failure in LLVM (section too large)

    after:
        time: 2.50s
        memory: 124MB

Closes #2598
2013-10-18 09:41:33 -07:00
Alex Crichton
6a11e17b6b Fix an off-by-one in managed::refcount
This fixes a bug I accidentally introduced in #9922
2013-10-18 09:33:18 -07:00
Alex Crichton
273784e9bf Optimize include_bin! for large inputs
Previously an ExprLit was created *per byte* causing a huge increase in memory
bloat. This adds a new `lit_binary` to contain a literal of binary data, which
is currently only used by the include_bin! syntax extension. This massively
speeds up compilation times of the shootout-k-nucleotide-pipes test

    before:
        time: 469s
        memory: 6GB
        assertion failure in LLVM (section too large)

    after:
        time: 2.50s
        memory: 124MB

Closes #2598
2013-10-18 09:20:08 -07:00
bors
792d73259d auto merge of #9929 : chris-morgan/rust/2013-10-19-vim-updates, r=sanxiyn
- Update prelude items specially highlighted.
- Highlight `
2013-10-18 08:31:24 -07:00
bors
a1848bc755 auto merge of #9927 : chris-morgan/rust/fix-url-to_str-so-it-includes-the-port, r=huonw
Fixes #9451.
Fixes chris-morgan/rust-http#16.
2013-10-18 07:21:25 -07:00
Chris Morgan
f3796616de Highlight \0 in strings and chars in Vim. 2013-10-19 00:56:41 +11:00
Chris Morgan
0ae9e476af Update prelude items in Vim syntax. 2013-10-19 00:55:52 +11:00
Chris Morgan
1093730d72 Fix extra::url::to_str to include the port.
Fixes #9451.
Fixes chris-morgan/rust-http#16.
2013-10-19 00:25:03 +11:00
bors
3f240fedec auto merge of #9926 : Kimundi/rust/future_result_bad_sig, r=huonw 2013-10-18 06:11:18 -07:00
Marvin Löbel
3011801256 Made std::task::TaskBuilder::future_result() easier to use 2013-10-18 10:43:41 +02:00
bors
71c3f8c20c auto merge of #9924 : metajack/rust/fix-starts-with-ends-with, r=huonw
d4a32386f3 broke these since slice_to() and slice_from() must get character
boundaries, and arbitrary needle lengths don't necessarily map to character
boundaries of the haystack.

This also adds new tests that would have caught this bug.
2013-10-18 00:26:19 -07:00
bors
d0d554456a auto merge of #9850 : eddyb/rust/inline-asm-constraints, r=luqmana
I've implemented analysis support for the [GCC '=' write-only inline asm constraint modifier](http://gcc.gnu.org/onlinedocs/gcc/Modifiers.html). I had more changes, for '+' (read+write) as well, but it turns out LLVM doesn't support '+' at all.

I've removed the need for wrapping each output in ExprAddrOf, as that would require unwrapping almost everywhere and it was harder to reason about in borrowck than ExprAssign's LHS.

With this change, rustc will treat (in respect to validity of accessing a local) code like this:
```rust
let x: int;
unsafe {
    asm!("mov $1, $0" : "=r"(x) : "r"(5u));
}
```
as if it were this:
```rust
let x : int;
x = 5;
```

Previously, the local was required to be both mutable and initialized, and the write effect wasn't recorded.
2013-10-17 23:16:22 -07:00
Jack Moffitt
090b2453a1 Fix starts_with() and ends_with().
d4a32386f3 broke these since slice_to() and slice_from() must get character
boundaries, and arbitrary needle lengths don't necessarily map to character
boundaries of the haystack.

This also adds new tests that would have caught this bug.
2013-10-17 23:36:43 -06:00
bors
0e4d1fc8ca auto merge of #9922 : alexcrichton/rust/less-sys, r=thestinger
More progress on #2240
2013-10-17 22:06:22 -07:00
Eduard Burtescu
7ab0b0cd41 Handle inline asm outputs as write-only in liveness, borrowck and trans. 2013-10-18 08:02:56 +03:00
Alex Crichton
82f5f65076 Move sys::refcount to managed::refcount
More progress on #2240
2013-10-17 21:14:38 -07:00
bors
737413d72a auto merge of #9921 : sp3d/rust/master, r=alexcrichton
Refactors parsing of numerical literals to make it more readable.
Removes 'float'/the 'f' literal suffix and invalid character literals ''' and '\'.
Also makes attribute highlighting more robust and allows urls in attributes to be recognized.
2013-10-17 20:56:18 -07:00
sp3d
58b336d90b track language changes, improve attr handling in GtkSourceView language-spec
Refactors parsing of numerical literals to make it more readable.
Removes 'float'/the 'f' literal suffix and invalid character literals ''' and '\'.
Also makes attribute highlighting more robust and allows urls in attributes to be recognized.
2013-10-18 03:35:26 +00:00
bors
d8d1b8f8be auto merge of #9896 : brson/rust/stdmem, r=alexcrichton
This is progress toward removing std::sys.
2013-10-17 19:11:19 -07:00
bors
51709fcedc auto merge of #9916 : alexcrichton/rust/issue-9861, r=brson
This was just incorrectly handled before, the path component shouldn't be looked
at at all (we used absolute paths everywhere instead of relative to the current
module location).

Closes #9861
2013-10-17 18:01:22 -07:00
Brian Anderson
34d376f3cf std: Move size/align functions to std::mem. #2240 2013-10-17 17:31:35 -07:00
Alex Crichton
cf844abced rustdoc: Don't treat "super" specially for urls
This was just incorrectly handled before, the path component shouldn't be looked
at at all (we used absolute paths everywhere instead of relative to the current
module location).

Closes #9861
2013-10-17 17:15:42 -07:00
bors
532ab94c4b auto merge of #9915 : thestinger/rust/rusti, r=thestinger 2013-10-17 16:51:20 -07:00
Daniel Micay
28a6498dbf rm rusti from Makefile.in 2013-10-17 19:47:24 -04:00
bors
3fd0e3a77b auto merge of #9902 : thestinger/rust/immediate, r=nikomatsakis
The code generation previously assumed a reference could not alter the
value in a way the destructor would notice. This is an incorrect
assumption for `&mut`, and is also incorrect for an `&` pointer to a
non-`Freeze` type.

Closes #7972
2013-10-17 13:56:23 -07:00
Daniel Micay
34ae5d70ac partially fix immediate rvalues
The code generation previously assumed a reference could not alter the
value in a way the destructor would notice. This is an incorrect
assumption for `&mut`, and is also incorrect for an `&` pointer to a
non-`Freeze` type.

Closes #7972
2013-10-17 16:50:07 -04:00
bors
d773a024a2 auto merge of #9908 : alexcrichton/rust/snapshots, r=thestinger 2013-10-17 11:06:31 -07:00
Alex Crichton
0adb41d0eb Register new snapshots 2013-10-17 10:12:23 -07:00
bors
d4a32386f3 auto merge of #9907 : kballard/rust/vec_ends_with, r=alexcrichton 2013-10-17 09:56:27 -07:00
bors
2cb96a4eaf auto merge of #9900 : hatahet/rust/master, r=alexcrichton
Closes #9870
2013-10-17 02:46:24 -07:00
bors
386fa1d818 auto merge of #9897 : thestinger/rust/rusti, r=alexcrichton
Closes #9818
Closes #9567
Closes #8924
Closes #8910
Closes #8392
Closes #7692
Closes #7499
Closes #7220
Closes #5038
2013-10-17 01:36:33 -07:00
bors
00adcf0bdd auto merge of #9863 : csainty/rust/issue-9755-once-fns-feature-directive, r=alexcrichton
Hello,

First time rust contributor here, please let me know if I need to sort out the contribution agreement for this.

I picked issue #9755 to dip my toe in the water, this pull request isn't quite complete though as I have not updated the documentation. The reason for this is that I haven't tracked down why this feature is gated so I don't feel I can write a justification of the same quality as the other features have been documented.
If someone would like to explain or point me at a mail thread I am happy to update with this change.

Hopefully I have understood the process of converting the old flag into a directive correctly.

Also just to call out what I am sure if a known quirk when adding feature directives, you can't build this code unless you have a snapshot of the compiler which knows about the feature directive. Chicken and the egg. I split the change into two commits, the first should be able to build a snapshot that can compile the second.
2013-10-17 00:21:20 -07:00
Kevin Ballard
87a2d032ff Rewrite str.starts_with()/ends_with() to be simpler 2013-10-16 23:17:34 -07:00
Kevin Ballard
2fcb53493d Implement new methods vec.starts_with()/vec.ends_with() 2013-10-16 23:17:30 -07:00
Kevin Ballard
d8f82c8e43 Rewrite vec.contains() to be simpler 2013-10-16 23:17:26 -07:00
bors
88acb73ce5 auto merge of #9891 : alexcrichton/rust/allow-warnings, r=brson
Closes #9754
2013-10-16 22:56:17 -07:00