Commit Graph

24591 Commits

Author SHA1 Message Date
bors
bf6964ecb6 auto merge of #10709 : alexcrichton/rust/snapshot, r=pcwalton 2013-11-28 20:31:39 -08:00
Alex Crichton
ab387a6838 Register new snapshots 2013-11-28 20:27:56 -08:00
bors
90d06ecf6b auto merge of #10704 : TeXitoi/rust/spectralnorm-resurected, r=alexcrichton 2013-11-28 12:26:31 -08:00
Guillaume Pinot
6bd22494e9 shootout-spectralnorm resurection with parallelization 2013-11-28 20:46:59 +01:00
bors
859c3baf64 auto merge of #10519 : nikomatsakis/rust/issue-8624-borrowck-overly-permissive, r=pnkfelix
See #8624 for details.

r? @pnkfelix
2013-11-28 03:51:32 -08:00
Niko Matsakis
09e12fa553 Test that reborrowing contents of an &'a mut &'b mut pointer can only
be done for at most lifetime `'a`

Fixes #8624
2013-11-28 06:43:39 -05:00
Niko Matsakis
bc4164d4c0 Modify iterators to make them safe with the new rules. 2013-11-28 06:43:39 -05:00
bors
42ea44ba27 auto merge of #10694 : klutzy/rust/rustdoc-closure, r=alexcrichton 2013-11-27 21:02:52 -08:00
bors
68e3292fd7 auto merge of #10691 : g3xzh/rust/benchm, r=cmr
I have written some benchmark tests to `push`, `push_many`, `join`,
`join_many` and `ends_with_path`.

Let me know what you think (@cmr).
Thanks in advance.
2013-11-27 19:47:15 -08:00
bors
db5b51ae63 auto merge of #10687 : alexcrichton/rust/issue-10686, r=thestinger
Turns out android doesn't support LLVM's thread_local attribute and accompanying
implementation.

Closes #10686
2013-11-27 18:32:30 -08:00
bors
503e5df3f2 auto merge of #10621 : Florob/rust/unicode63, r=cmr
This update the unicode.rs file to the latest Unicode version released 2013-09-30.
2013-11-27 16:47:14 -08:00
bors
d2c405eeff auto merge of #10642 : cmr/rust/strict_doccomment, r=alexcrichton
Previously, `//// foo` and `/*** foo ***/` were accepted as doc comments. This
changes that, so that only `/// foo` and `/** foo ***/` are accepted. This
confuses many newcomers and it seems weird.

Also update the manual for these changes, and modernify the EBNF for comments.

Closes #10638
2013-11-27 15:32:18 -08:00
Corey Richardson
b50b162884 Be more strict about doc comments
Previously, `//// foo` and `/*** foo ***/` were accepted as doc comments. This
changes that, so that only `/// foo` and `/** foo ***/` are accepted. This
confuses many newcomers and it seems weird.

Also update the manual for these changes, and modernify the EBNF for comments.

Closes #10638
2013-11-27 18:00:50 -05:00
Florian Zeitz
dfe38dbca4 Fix handling of upper/lowercase, and whitespace 2013-11-27 23:36:20 +01:00
Florian Zeitz
c234614950 Update Unicode data to version 6.3 2013-11-27 23:25:19 +01:00
Florian Zeitz
e9ab9bf01a Update unicode.py to reflect language changes 2013-11-27 23:21:22 +01:00
bors
d662820b29 auto merge of #10680 : alexcrichton/rust/relax-feature-gate, r=thestinger
Instead of forcibly always aborting compilation, allow usage of
 #[warn(unknown_features)] and related lint attributes to selectively abort
 compilation. By default, this lint is deny.
2013-11-27 14:17:41 -08:00
Alex Crichton
1686bfabf5 Use the native tls implementation on android
Turns out android doesn't support LLVM's thread_local attribute and accompanying
implementation.

Closes #10686
2013-11-27 11:56:43 -08:00
bors
e147a090a5 auto merge of #10685 : ebiggers/rust/ascii_fixes, r=alexcrichton
is_digit() incorrectly returned false for '0'.
is_control() incorrectly returned true for ' ' (space).
2013-11-27 11:52:09 -08:00
bors
e4136bd552 auto merge of #10662 : alexcrichton/rust/thread-detach, r=pcwalton
This has one commit from a separate pull request (because these commits depend on that one), but otherwise the extra details can be found in the commit messages. The `rt::thread` module has been generally cleaned up for everyday safe usage (and it's a bug if it's not safe).
2013-11-27 09:57:05 -08:00
Alex Crichton
a9bd049fc0 Relax restrictions on unknown feature directives
Instead of forcibly always aborting compilation, allow usage of
 #[warn(unknown_features)] and related lint attributes to selectively abort
 compilation. By default, this lint is deny.
2013-11-27 09:54:30 -08:00
Alex Crichton
5d6dbf3f26 Improve the rt::thread module
* Added doc comments explaining what all public functionality does.
* Added the ability to spawn a detached thread
* Added the ability for the procs to return a value in 'join'
2013-11-27 09:53:48 -08:00
klutzy
79ed898f64 rustdoc: Use new ||/proc syntax 2013-11-28 02:27:04 +09:00
bors
a6fc577ab5 auto merge of #10693 : eddyb/rust/freeze-ast, r=thestinger
It's truly immutable now, which will allow us to remove some cloning in the parser and box parts of the AST in `Rc<T>` (if desired).
2013-11-27 08:07:56 -08:00
Eric Biggers
64883242eb std::ascii: Add tests for is_digit() and is_control() 2013-11-27 09:54:54 -06:00
Eduard Burtescu
f09b7b0ecd Freeze the AST by removing a couple of unused @mut ~[T] from token_tree. 2013-11-27 17:48:58 +02:00
bors
23674be0b1 auto merge of #10684 : jld/rust/unstruct-unhack-typekind, r=alexcrichton 2013-11-27 06:17:40 -08:00
bors
17af6f7d0c auto merge of #10688 : bjz/rust/recv_iter, r=brson
I've noticed I use this pattern quite a bit:

~~~rust
do spawn {
    loop {
        match port.try_recv() {
            Some(x) => ...,
            None => ...,
        }
    }
}
~~~

The `RecvIterator`, returned from a default `recv_iter` method on the `GenericPort` trait, allows you to reduce this down to:

~~~rust
do spawn {
    for x in port.recv_iter() {
        ...
    }
}
~~~

As demonstrated in the tests, you can also access the port from within the `for` block for further `recv`ing and `peek`ing with no borrow errors, which is quite nice.
2013-11-27 01:52:10 -08:00
g3xzh
26ba64dca9 Add benchmark tests to path/posix
I have written some benchmark tests to `push`, `push_many`, `join`,
`join_many` and `ends_with_path`.
2013-11-27 11:39:07 +02:00
bors
faf4c939fb auto merge of #10670 : eddyb/rust/node-u32, r=alexcrichton
### Rationale
There is no reason to support more than 2³² nodes or names at this moment, as compiling something that big (even without considering the quadratic space usage of some analysis passes) would take at least **64GB**.
Meanwhile, some can't (or barely can) compile rustc because it requires almost **1.5GB**.

### Potential problems
Can someone confirm this doesn't affect metadata (de)serialization? I can't tell myself, I know nothing about it.

### Results
Some structures have a size reduction of 25% to 50%: [before](https://gist.github.com/luqmana/3a82a51fa9c86d9191fa) - [after](https://gist.github.com/eddyb/5a75f8973d3d8018afd3).
Sadly, there isn't a massive change in the memory used for compiling stage2 librustc (it doesn't go over **1.4GB** as [before](http://huonw.github.io/isrustfastyet/mem/), but I can barely see the difference).
However, my own testcase (previously peaking at **1.6GB** in typeck) shows a reduction of **200**-**400MB**.
2013-11-26 22:07:44 -08:00
Alex Crichton
ed86b48cc9 Clean up statically initialized data on shutdown
Whenever the runtime is shut down, add a few hooks to clean up some of the
statically initialized data of the runtime. Note that this is an unsafe
operation because there's no guarantee on behalf of the runtime that there's no
other code running which is using the runtime.

This helps turn down the noise a bit in the valgrind output related to
statically initialized mutexes. It doesn't turn the noise down to 0 because
there are still statically initialized mutexes in dynamic_lib and
os::with_env_lock, but I believe that it would be easy enough to add exceptions
for those cases and I don't think that it's the runtime's job to go and clean up
that data.
2013-11-26 21:11:17 -08:00
Brendan Zabarauskas
31da6b7698 Add an iterator for receiving messages from GenericPorts 2013-11-27 15:10:12 +10:00
Eduard Burtescu
7ed27b5531 Shink NodeId, CrateNum, Name and Mrk down to 32 bits on x64. 2013-11-27 07:02:25 +02:00
bors
82d9033b67 auto merge of #10679 : alexcrichton/rust/no-routine, r=pcwalton 2013-11-26 19:37:38 -08:00
Eric Biggers
7b96f13d7d std::ascii: Fix is_digit() and is_control()
is_digit() incorrectly returned false for '0'.
is_control() incorrectly returned true for ' ' (space).
2013-11-26 20:13:25 -06:00
Jed Davis
57c1a01a93 Remove enum struct return workaround from LLVM bindings. 2013-11-26 17:47:49 -08:00
bors
fb52956fe4 auto merge of #10677 : jld/rust/type-enum-discrim-rm, r=alexcrichton 2013-11-26 17:32:45 -08:00
Alex Crichton
7dcc066bd2 Remove unused std::routine 2013-11-26 15:19:41 -08:00
bors
18687a92ae auto merge of #10649 : sfackler/rust/multi-macro, r=alexcrichton
The majority of this change is modifying some of the `ast_visit` methods to return multiple values.

It's prohibitively expensive to allocate a `~[Foo]` every time a statement, declaration, item, etc is visited, especially since the vast majority will have 0 or 1 elements. I've added a `SmallVector` class that avoids allocation in the 0 and 1 element cases to take care of that.
2013-11-26 14:52:05 -08:00
Steven Fackler
c403c1f18e Clean up SmallVector use a bit 2013-11-26 13:56:02 -08:00
Steven Fackler
c144752a2d Support multiple item macros
Closes #4375
2013-11-26 13:56:02 -08:00
Steven Fackler
09f84aa8f4 Add SmallVector to libsyntax 2013-11-26 13:54:00 -08:00
bors
35ebf03489 auto merge of #10312 : thestinger/rust/thread_local, r=alexcritchton
This provides a building block for fast thread-local storage. It does
not change the safety semantics of `static mut`.

Closes #10310
2013-11-26 13:32:43 -08:00
bors
e9a1869a5f auto merge of #10581 : pcwalton/rust/dedo, r=pcwalton
r? @alexcrichton
2013-11-26 12:13:03 -08:00
Daniel Micay
a5af479bb4 add a thread_local feature gate 2013-11-26 14:49:14 -05:00
Daniel Micay
2cf3d8adf2 port the runtime to #[thread_local] 2013-11-26 14:49:14 -05:00
Daniel Micay
1795ae4e8a add #[thread_local] attribute
This provides a building block for fast thread-local storage. It does
not change the safety semantics of `static mut`.

Closes #10310
2013-11-26 14:49:10 -05:00
Patrick Walton
9521551b47 librustc: Fix merge fallout. 2013-11-26 11:04:39 -08:00
bors
9f9efae790 auto merge of #10673 : klutzy/rust/quite, r=alexcrichton 2013-11-26 10:57:01 -08:00
Jed Davis
792077274c Remove the unused obsolete enum_discrim type. 2013-11-26 10:54:35 -08:00