Commit Graph

16433 Commits

Author SHA1 Message Date
bors
47ddb59b80 auto merge of #5525 : dbaupp/rust/minor_fixups, r=graydon
Kills some warnings, and implements str::each_char_reverse so that it actually iterates. The test case wasn't detecting a failure, since the loop body was never executed.
2013-03-25 21:18:57 -07:00
bors
02d5f090dc auto merge of #5524 : luqmana/rust/repeat-loop, r=pcwalton
`let v = [24, ..1000];` now more or less emits the same IR as:

```Rust
let mut i = 0;
while i < 1000 {
    v[i] = 24;
    i += 1;
}
```

LLVM will still turn it into a memset if possible with optimization on.
2013-03-25 20:16:01 -07:00
bors
00605d58de auto merge of #5513 : apasel422/rust/deriving, r=luqmana
This removes some explicit implementations of `Eq` in favor of `#[deriving(Eq)]` and derives `Clone` for a few core types.
2013-03-25 19:01:00 -07:00
bors
b48e6998d7 auto merge of #5509 : thestinger/rust/oldmap, r=brson
The reasoning for doing it this way is that it's much easier to transition method-by-method to the `Map` API than trying to do the migration all at once.

I found an issue unrelated to my changes in one of the run-fail tests - if it uses `LinearMap`, it still fails but exits with 0. I xfailed it for now and opened [an issue](https://github.com/mozilla/rust/issues/5512), because it's not caused by these changes.
2013-03-25 18:01:04 -07:00
bors
d469212d9d auto merge of #5507 : graydon/rust/fixups2, r=graydon
Just some editing-to-reflect-reality on release notes and manual.
2013-03-25 16:36:58 -07:00
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
Luqman Aden
e7f42f140b Expand on cleanups in trans for expr_repeat and add to tests. 2013-03-25 15:46:10 -07:00
bors
df171e4b68 auto merge of #5505 : catamorphism/rust/macro-tutorial, r=graydon
r? @jbclements
2013-03-25 15:13:09 -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
Huon Wilson
89a7407c99 librustc: clean-up expr_repeat loop generation: use native integers 2013-03-24 14:19:31 -07:00
Huon Wilson
29e8b6ea9b libcore: implement str::each_char_reverse correctly.
Previously, `each_char_reverse` was not iterating at all, so the
testcase never ran properly.
2013-03-25 01:17:40 +11:00
Huon Wilson
12df65470f Kill some warnings: unused imports and old #[deny(..)]s. 2013-03-25 01:17:23 +11:00
Luqman Aden
441313fc0c librustc: emit loop for expr_repeat instead of 2n instructions in [x, ..n] 2013-03-24 00:59:44 -07:00
Daniel Micay
a919e5ede5 make crates with the same name sort consistently 2013-03-23 21:15:26 -03: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
Andrew Paseltiner
45677eebf2 replace impls with deriving where applicable 2013-03-23 06:57:30 -04:00
Andrew Paseltiner
2b83defa4a core: derive Clone for core types 2013-03-23 06:54:13 -04:00
Daniel Micay
11ca2efce1 turn std::oldmap into a wrapper around LinearMap 2013-03-23 02:16:14 -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
Tim Chevalier
3633ba240f Copyedit macro tutorial 2013-03-22 16:11:27 -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