Commit graph

16417 commits

Author SHA1 Message Date
Graydon Hoare 5f7b72eccf RELEASES.txt: wrong tick-mark 2013-03-25 15:53:02 -07:00
Graydon Hoare b481829306 docs: update to avoid mention of const. 2013-03-25 15:53:02 -07:00
Graydon Hoare 62c1f049f8 RELEASES.txt: Mention asm!, add cset count and a hyphen. 2013-03-25 15:52:02 -07:00
bors ef282dbe2a auto merge of #5409 : brson/rust/rt, r=brson
r?

There are a lot of commits here, but not all that much substance. Mostly just refactoring.

I started sketching out the beginnings of a very simple I/O API in `core::rt::io` that represents I/O streams as a single `Stream` trait instead of `Reader` / `Writer` pairs. This seems to be the more common pattern (at least this is how the .NET BCL does it) and it seems to me that separate readers and writers would make duplex streams very awkward. Regardless, I don't intend to go very far down the I/O API design road without some mailing list discussion.

I've also started on the uv bindings for file I/O but haven't gotten very far.

Also hooked up the new scheduler to `rust_start` and the compiletest driver. 70% of run-pass test cases already pass, but I wouldn't read too much into that.

I also split the direct, low-level uv bindings in two so that the scheduler can have its own set, leaving `std::net` on its own.
2013-03-25 13:01:11 -07:00
Brian Anderson 30d4124a37 Merge remote-tracking branch 'brson/rt'
Conflicts:
	src/libcore/rt/context.rs
	src/libcore/rt/sched.rs
	src/libcore/rt/thread.rs
	src/libcore/rt/uv.rs
2013-03-25 12:28:54 -07:00
bors 6d4499ce4d auto merge of #5424 : luqmana/rust/inline-rt, r=brson
As per #2521. Inlining seems to improve performance slightly:

                 Inlined          Not Inlined
    x86:         13.5482            14.4112
    x86_64:      17.4712            18.0696

(Average of 5 runs timed with `time`)

```Rust

fn foo() -> int {
    int::from_str(~"28098").unwrap()
}

fn main() {
    for 1000000.times {
        foo();
        foo();
        foo();
        foo();
        foo();
    }
}
```

All run on:

    Linux 3.2.0-0.bpo.4-amd64 #1 SMP Debian 3.2.35-2~bpo60+1 x86_64 GNU/Linux

The MIPS and ARM bits I didn't inline since I'm not as familiar with them and I also can't test them. All green on try.
2013-03-25 12:04:11 -07:00
bors 6f42738544 auto merge of #5510 : thadguidry/rust/incoming, r=brson
...elp not a command available message
2013-03-23 16:12:51 -07:00
bors a56ec8c134 auto merge of #5515 : nikomatsakis/rust/issue-5514-flexible-coherence-rules, r=pcwalton
See issue #5514

r? @pcwalton
2013-03-23 12:36:53 -07:00
Patrick Walton 8aee0a6a29 libsyntax: Fix static in pretty printer. rs=burningtree 2013-03-23 10:28:24 -07:00
Niko Matsakis a1b4afe067 Update coherence rules to be more flexible for impl Trait for Type 2013-03-23 09:49:47 -04:00
Patrick Walton 28efc234f4 libcore: Fix obsolete syntax in extfmt 2013-03-22 23:09:15 -07:00
Patrick Walton e2fde83ce4 libsyntax: Stop parsing old lifetime syntax 2013-03-22 22:24:36 -07:00
Patrick Walton 66770d20b3 test: Add lifetime binders and new-style lifetime parameters to the test suite 2013-03-22 22:24:36 -07:00
Patrick Walton 6d81307a9b librustc: Add explicit lifetime binders and new lifetime notation in core/std/syntax/rustc 2013-03-22 22:24:35 -07:00
Patrick Walton 68cb53672b libsyntax: Stop parsing const. 2013-03-22 22:24:35 -07:00
Patrick Walton 85c9fc6f8f librustc: Remove the const declaration form everywhere 2013-03-22 22:24:35 -07:00
Patrick Walton eba3367404 libsyntax: Introduce the new assert! macro; make assert no longer a keyword 2013-03-22 22:24:34 -07:00
Patrick Walton fa70709e07 libsyntax: Stop parsing pure and static 2013-03-22 22:24:33 -07:00
Thad Guidry 9aa0cedc84 changed /configure to be compatible with Cygwin and removed annoying --help not a command available message 2013-03-23 02:21:43 +01:00
bors d60a7259f9 auto merge of #5503 : thestinger/rust/trie, r=pcwalton 2013-03-22 18:00:52 -07:00
bors 1e41bc7445 auto merge of #5501 : catamorphism/rust/manual, r=graydon
r? @graydon
2013-03-22 16:42:50 -07:00
bors 5b43810841 auto merge of #5497 : luqmana/rust/clang-ver, r=thestinger 2013-03-22 15:15:54 -07:00
Daniel Micay 705c796ffa remove obsolete purity workarounds 2013-03-22 18:08:56 -04:00
Daniel Micay 0c8c3b4232 trie: make the TrieSet impl public 2013-03-22 18:04:35 -04:00
Daniel Micay 55fbb9518b trie: inline the other TrieSet wrapper methods 2013-03-22 18:04:35 -04:00
Daniel Micay 04e367b353 trie: rm workaround for issue #3469 2013-03-22 18:03:55 -04:00
Tim Chevalier ab2a397ae7 docs: Copyedit my randomly assigned sections of the manual 2013-03-22 14:45:16 -07:00
bors bd065d3311 auto merge of #5496 : catamorphism/rust/release-notes, r=catamorphism 2013-03-22 14:00:57 -07:00
bors e9b077c0e9 auto merge of #5488 : pcwalton/rust/depure, r=pcwalton 2013-03-22 13:00:56 -07:00
Patrick Walton 3eda11a4f7 test: Remove pure from the test suite 2013-03-22 12:57:28 -07:00
Patrick Walton fbe22afdbe librustdoc: Remove pure from fuzzer and rustdoc. 2013-03-22 12:57:28 -07:00
Patrick Walton e7c60c141b librustc: Remove pure from libsyntax and librustc. 2013-03-22 12:57:27 -07:00
Patrick Walton ec59ce5796 test: Fix test. rs=test 2013-03-22 12:57:27 -07:00
Luqman Aden 19c104000e configure: accept clang 3.3 when passed --enable-clang 2013-03-22 15:49:55 -04:00
Tim Chevalier d049bf2492 Edit release notes a bit 2013-03-22 11:59:59 -07:00
bors b6f9aa1fd7 auto merge of #5483 : pcwalton/rust/static-syntax, r=graydon
r? @nikomatsakis
2013-03-22 11:21:48 -07:00
Patrick Walton c1084091d4 libstd: Remove all uses of pure from libstd. rs=depure 2013-03-22 10:29:17 -07:00
Patrick Walton be9bddd463 libcore: Remove pure from libcore. rs=depure 2013-03-22 10:29:17 -07:00
Patrick Walton 4634f7edae librustc: Remove all uses of static from functions. rs=destatic 2013-03-22 10:27:39 -07:00
bors f011f928dd auto merge of #5463 : alexcrichton/rust/faster-fmt, r=graydon
This is a minor step towards #3571, although I'm sure there's still more work to be done. Previously, `fmt!` collected a bunch of strings in a vector and then called `str::concat`. This changes the behavior by maintaining only one buffer and appending directly into that buffer. This avoids doubly-allocating memory, and it has the added bonus of reducing some allocations in `core::unstable::extfmt`

One of the unfortunate side effects of this is that the `rt` module in `extfmt.rs` had to be duplicated to avoid `stage0` errors. Dealing with the change in conversion functions may require a bit of a dance when a snapshot happens, but I think it's doable.

If the second speedup commit isn't deemed necessary, I got about a 15% speedup with just the first patch which doesn't require any modification of `extfmt.rs`, so no snapshot weirdness.

Here's some other things I ran into when looking at `fmt!`:
* I don't think that #2249 is relevant any more except for maybe removing one of `%i` or `%d`
* I'm not sure what was in mind for using traits with #3571, but I thought that formatters like `%u` could invoke the `to_uint()` method on the `NumCast` trait, but I ran into some problems like those in #5462

I'm having trouble thinking of other wins for `fmt!`, but if there's some suggestions I'd be more than willing to look into if they'd work out or not.
2013-03-22 10:18:53 -07:00
bors 1616ffd0c2 auto merge of #5398 : dbaupp/rust/core-readlines, r=graydon
The `each_line` function in `ReaderUtil` acts very differently to equivalent functions in Python, Ruby, Clojure etc. E.g. given a file `t` with contents `trailing\nnew line\n` and `n` containing `no trailing\nnew line`:

Rust:
```Rust
t: ~[~"trailing", ~"new line", ~""]
n: ~[~"no trailing", ~"new line"]
```

Python:
```Python
>>> open('t').readlines()
['trailing\n', 'new line\n']
>>> open('n').readlines()
['no trailing\n', 'new line']
```

Ruby:
```Ruby
irb(main):001:0> File.readlines('t')
=> ["trailing\n", "new line\n"]
irb(main):002:0> File.readlines('n')
=> ["no trailing\n", "new line"]
```

Clojure
```Clojure
user=> (read-lines "t")
("trailing" "new line")
user=> (read-lines "n")
("no trailing" "new line")
```

The extra string that rust includes at the end is inconsistent, and means that it is impossible to distinguish between the "real" empty line a file that ends `...\n\n`, and the "fake" one after the last `\n`.

The code attached makes Rust's `each_line` act like Clojure (and PHP, i.e. not including the `\n`), as well as adjusting `str::lines` to fix the trailing empty line problem.

Also, add a convenience `read_lines` method to read all the lines in a file into a vector.
2013-03-22 09:24:53 -07:00
Alex Crichton e93654c96d Pass the fmt! buffer to each conversion method
Achieves a little more speedup and avoids allocations around some strings in
conv_str
2013-03-22 11:49:45 -04:00
Alex Crichton c0bbc6242f Removing some unused imports 2013-03-22 11:49:45 -04:00
Alex Crichton 1a0d212dd9 Build up the result of fmt! in a buffer instead of a vector 2013-03-22 11:49:45 -04:00
bors d700500d0c auto merge of #5471 : erickt/rust/incoming, r=bstrie
I made a typo in `str::levdistance` in my str pull request. This fixes it.
2013-03-22 06:21:51 -07:00
Huon Wilson f8323397aa compiletest: Use lines_each instead of lines(..).each, or split(.., n).each 2013-03-23 00:15:06 +11:00
Huon Wilson 429b8a9b9e libcore: handle trailing newlines more like other languages.
Specifically, `lines` and `each_line` will not emit a trailing empty string
when given "...\n". Also, add `read_lines`, which just collects all of
`each_line` into a vector, and `split_*_no_trailing` which will is the
generalised version of `lines`.
2013-03-23 00:15:05 +11:00
bors 059764779c auto merge of #5493 : apasel422/rust/leibniz, r=bstrie
Closes #5411.
2013-03-22 05:30:50 -07:00
Andrew Paseltiner 999e7ef9a9 syntax: make old #[deriving_foo] attribute obsolete 2013-03-22 07:15:13 -04:00
Andrew Paseltiner e2abecd3ab syntax: replace uses of old deriving attribute with new one 2013-03-22 06:30:59 -04:00