Commit Graph

15738 Commits

Author SHA1 Message Date
bors
945ac428b8 auto merge of #4977 : z0w0/rust/endianattr, r=catamorphism
```rust
#[cfg(target_endian = "little")]
fn something() { /* .. */ }

#[cfg(target_endian = "big")]
fn something() { /* .. */ }
```
2013-02-16 13:59:24 -08:00
bors
8d8c25b825 auto merge of #4980 : pcwalton/rust/sizing-type-of, r=pcwalton
...locking-servo

`simplify_type` was bogus, as there was no way for it to handle enums
properly. It was also slow, because it created many Rust types at runtime. In
general creating Rust types during trans is a source of slowness, and I'd like
to avoid doing it as much as possible. (It is probably not possible to
eliminate it entirely, due to `subst`, but we should get rid of as much of it
as we can.) So this patch replaces `simplify_type` with `sizing_type_of`,
which creates a size-equivalent LLVM type directly without going through a
Rust type first.

Because this is causing an ICE in Servo, I'm rubber stamping it.
2013-02-16 13:03:25 -08:00
bors
65aa2594c0 auto merge of #4976 : thestinger/rust/vim, r=nikomatsakis 2013-02-16 11:55:59 -08:00
bors
c53b4f3b91 auto merge of #4975 : thestinger/rust/rt, r=nikomatsakis 2013-02-16 11:03:58 -08:00
Patrick Walton
548c0982ca librustc: Remove simplify_type and replace with sizing_type_of. rs=blocking-servo
`simplify_type` was bogus, as there was no way for it to handle enums
properly. It was also slow, because it created many Rust types at runtime. In
general creating Rust types during trans is a source of slowness, and I'd like
to avoid doing it as much as possible. (It is probably not possible to
eliminate it entirely, due to `subst`, but we should get rid of as much of it
as we can.) So this patch replaces `simplify_type` with `sizing_type_of`,
which creates a size-equivalent LLVM type directly without going through a
Rust type first.

Because this is causing an ICE in Servo, I'm rubber stamping it.
2013-02-16 10:20:52 -08:00
bors
2782202201 auto merge of #4891 : nikomatsakis/rust/region-syntax, r=nikomatsakis
r? @graydon
2013-02-16 10:16:12 -08:00
Zack Corr
19eb225bc2 Support link_args at the crate level. Closes #1301 2013-02-17 01:21:56 +10:00
Zack Corr
fe9f1d155a syntax: Implement recursive sorting of meta items. Closes #607 2013-02-17 00:31:57 +10:00
Niko Matsakis
d3f3d0731c update this test to use the new syntax entirely 2013-02-16 08:03:58 -05:00
Niko Matsakis
6c728e32c0 Parse (and discard) lifetime declarations on function types 2013-02-16 08:03:58 -05:00
Niko Matsakis
ad8b437ada Make 'foo use font-lock-builtin-face, like module names, and make capitalized identifiers optionally use font-lock-type-face 2013-02-16 08:01:10 -05:00
Niko Matsakis
1ef8c48a20 emacs mode: Highlight 'foo as a lifetime, not a character constant. 2013-02-16 08:01:10 -05:00
Niko Matsakis
c7f85003a3 Permit lifetimes to appear in type parameter lists and after &. Lifetimes in
type parameter lists are currently ignored, but `&'a T` is equivalent to
`&a/T`.
2013-02-16 08:01:10 -05:00
Zack Corr
0e83102219 Add target_endian crate cfg. Closes #4367 2013-02-16 22:42:00 +10:00
Daniel Micay
5c75f210ba vim: move keyword is gone 2013-02-16 03:17:26 -05:00
Daniel Micay
59bb9c2f1a rm unused reserve_vec from rt (done in libcore) 2013-02-16 02:56:00 -05:00
bors
9ad8a1f465 auto merge of #4973 : thestinger/rust/rt, r=brson 2013-02-15 22:06:48 -08:00
bors
354da4108a auto merge of #4799 : graydon/rust/rustpkg, r=graydon
Taking over where #4610 left off. Much rebasing and tidying.
2013-02-15 18:53:18 -08:00
Graydon Hoare
585d6f7b00 rustpkg: Massage for landing. 2013-02-15 18:50:51 -08:00
Zack Corr
d4e71da6ca rustpkg: Fix do listeners and support custom test logic 2013-02-15 18:04:11 -08:00
Zack Corr
15440f4236 rustpkg: Add info command for probing a pkg.rs and expose work_dir/src_dir in librustpkg 2013-02-15 18:04:11 -08:00
Zack Corr
efe5a0a61c rustpkg: Use pkg.rs instead of package.rs for consistency 2013-02-15 18:04:11 -08:00
Zack Corr
b10dc1af06 Move semver to std and finish rustpkg 2013-02-15 18:04:10 -08:00
Zack Corr
2192d11cd1 Correct Zack Corr's email in AUTHORS.txt 2013-02-15 18:04:10 -08:00
Zack Corr
787ddb4b7c rustpkg: Clean up formatting issues 2013-02-15 18:04:10 -08:00
Zack Corr
c82183de19 rustpkg: More fixes 2013-02-15 18:04:10 -08:00
Zack Corr
e34e072d17 rustpkg: Add do command and get cmd listeners working correctly 2013-02-15 18:04:10 -08:00
Zack Corr
7079441843 rustpkg: Add preliminary imperative API support 2013-02-15 18:04:10 -08:00
Zack Corr
bd28fa4af5 rustpkg: Finish all commands and declarative logic 2013-02-15 18:04:10 -08:00
Zack Corr
321e3c4909 Add cmp::Ord implementation for semver::Version 2013-02-15 18:04:10 -08:00
Zack Corr
f18ae8ce7e rustpkg: Finish declarative compiling and fetching via git or curl (no workcache or dependency resolution yet) 2013-02-15 18:04:10 -08:00
Zack Corr
220144b93c rustpkg: Finish parsing package scripts and finish boilerplate 2013-02-15 18:04:10 -08:00
Zack Corr
226b61ba5f rustpkg: Add package script parsing 2013-02-15 18:04:10 -08:00
Zack Corr
71d34a8872 rustpkg: More preliminary work 2013-02-15 18:04:10 -08:00
Zack Corr
621c791ded Rename cargo to rustpkg and start over fresh 2013-02-15 18:04:10 -08:00
bors
3e97cce27d auto merge of #4957 : Kimundi/rust/incoming, r=catamorphism
Moved them into own module and made them not depend on an Round trait impl for integers and generic math functions that can fail on integers any more.
2013-02-15 17:29:57 -08:00
Graydon Hoare
1b87dedc0e attempt to fix BSD breakage 2013-02-15 17:28:51 -08:00
Patrick Walton
bb833ca0f0 librustc: Stop parsing impl Type : Trait and fix several declarations that slipped through. r=tjc 2013-02-15 16:59:56 -08:00
Daniel Micay
f34dd565d9 rm unused hash table from the runtime 2013-02-15 18:22:34 -05:00
bors
566bcf2225 auto merge of #4969 : nickdesaulniers/rust/issue3869, r=brson
Issue #3869
review? @nikomatsakis 

Convert all uses of vec::slice to vec::view Issue #3869
Rename const_view to const_slice
Renamed mut_view to mut_slice
Fix windows build error.  `buf` is borrowed by the call to
`as_mut_buf()` and so we must invoke `slice()` outside of that
call.
2013-02-15 13:54:49 -08:00
bors
0528329a4f auto merge of #4964 : luqmana/rust/demove, r=graydon
As per #4339/#3676 this pull removes all uses `move` and gets rid of parsing it in libsyntax.
So that's one more thing to cross off #4707
2013-02-15 12:09:15 -08:00
bors
690d038d0b auto merge of #4959 : thestinger/rust/map, r=graydon 2013-02-15 11:26:41 -08:00
bors
0a1fcadc90 auto merge of #4958 : cpeterso/rust/reseed-rng, r=graydon
For Issue #4709:

**c531506 rt: rand.rs expects `rust_next()` to return `uint32_t`, not `size_t`**

rand.rs expects `rustrt::rand_next()` to return `u32`, but the `rand_next()` C function returns `size_t`: ca71c6ec5b/src/libcore/rand.rs (L34)

**f4320b6 move isaac RNG utility functions to new rust_rng.cpp file**
**665e900 encapsulate isaac RNG in `rust_rng` struct**

Move isaac's `randctx` into a `rust_rng` struct to make names similar to `rand::Rng` function names and prepare for auto-reseeding in the next commit.

**9a78dc9 reseed `rust_rng` after generating 32KB**

Precedents from other languages:
* Haskell's `GenAutoReseed` generator reseeds itself after generating 32KB: http://hackage.haskell.org/packages/archive/DRBG/0.1.2/doc/html/Crypto-Random-DRBG.html#t:GenAutoReseed

* Go's RNG reseeds itself after generating 1MB: https://code.google.com/p/go/source/browse/src/pkg/crypto/rand/rand_unix.go?name=go1.0.3#94

**9a76d71 don't deplete RNG entropy when there is only one runnable task**

`rust_sched_loop::schedule_task()` unnecessarily calls `isaac_rand()` for the common case when there is only 1 runnable task, thus depleting RNG entropy and incurring unnecessary overhead.
2013-02-15 10:06:12 -08:00
Niko Matsakis
91af52784a Fix windows build error. buf is borrowed by the call to
`as_mut_buf()` and so we must invoke `slice()` outside of that
call.
2013-02-15 09:25:16 -08:00
Marvin Löbel
46736868df Removed has_* predicates from NumStrConv trait
Moved `is_*` predicates into standalone functions
2013-02-15 13:39:51 +01:00
Luqman Aden
3a19eef496 libsyntax: Remove move as a keyword. 2013-02-15 02:49:55 -08:00
Luqman Aden
178882c98f tests/tutorials: Get rid of move. 2013-02-15 02:49:55 -08:00
Luqman Aden
e244f103c9 libsyntax: Get rid of uses of move and don't parse it. 2013-02-15 02:49:55 -08:00
Luqman Aden
99b3c07b4e librustc: Get rid of move. 2013-02-15 02:49:55 -08:00
Luqman Aden
e61b243edf compiletest: Get rid of move. 2013-02-15 02:49:54 -08:00