Commit Graph

20363 Commits

Author SHA1 Message Date
Brian Anderson
8d3bb7eb30 rustc: Remove some dead code from method resolution 2013-07-24 09:45:21 -04:00
Björn Steinbrink
7fbe8002d5 Fix a crash when transmuting non-immediate to immediate types
The code to build the transmute intrinsic currently makes the invalid
assumption that if the in-type is non-immediate, the out-type is
non-immediate as well. But this is wrong, for example when transmuting
[int, ..1] to int. So we need to handle this fourth case as well.

Fixes #7988
2013-07-24 09:45:21 -04:00
Daniel Micay
254339fd39 fix fmt! usage 2013-07-24 09:45:20 -04:00
Birunthan Mohanathas
5afb3d20aa Disallow non-comma-delimited arguments to fmt! and bytes!
Closes #4982.
2013-07-24 09:45:20 -04:00
Brian Anderson
6c88e46d4d std:rt: args module is not used by win/mac. #7951 2013-07-24 09:45:20 -04:00
Birunthan Mohanathas
206ae5752e Change 'print(fmt!(...))' to printf!/printfln! in src/test/ 2013-07-24 09:45:20 -04:00
Birunthan Mohanathas
d047cf1ec6 Change 'print(fmt!(...))' to printf!/printfln! in src/lib* 2013-07-24 09:45:20 -04:00
Daniel Micay
af5a17b7d0 document random-access iterators 2013-07-24 09:45:20 -04:00
Daniel Micay
8c02272512 expand on double-ended iterators in the tutorial 2013-07-24 09:45:20 -04:00
Daniel Micay
626bb5a866 add a RandomAccessIterator trait 2013-07-24 09:45:20 -04:00
bors
3ee423858a auto merge of #7992 : huonw/rust/un-xfail, r=z0w0
...(they still don't work).
2013-07-24 04:22:36 -07:00
bors
b5799e1eb5 auto merge of #7987 : alexcrichton/rust/tests-for-closed-issues, r=huonw
Closes #5844
2013-07-24 01:34:38 -07:00
bors
7f96eb58d2 auto merge of #7980 : graydon/rust/misc-benchmarks, r=catamorphism
Some machinery for enabling #[bench] benchmarks in std and some examples showing how to write them.
2013-07-23 22:46:39 -07:00
bors
af78e23006 auto merge of #7958 : kemurphy/rust/link-section, r=alexcrichton
This allows for control over the section placement of static, static
mut, and fn items.  One caveat is that if a static and a static mut are
placed in the same section, the static is declared first, and the static
mut is assigned to, the generated program crashes.  For example:

#[link_section=".boot"]
static foo : uint = 0xdeadbeef;

#[link_section=".boot"]
static mut bar : uint = 0xcafebabe;

Declaring bar first would mark .bootdata as writable, preventing the
crash when bar is written to.
2013-07-23 20:04:53 -07:00
bors
359755a39a auto merge of #7885 : graydon/rust/workcache-fixes-1, r=pcwalton
This just redoes various parts of workcache to support context-cloning (eventually quite crudely, via ARCs), the absence of which was blocking rustpkg from being able to use it. Better versions of this are possible (notably removing the ARCs on everything except the database) but it ought to work well enough for now.
2013-07-23 17:49:54 -07:00
Graydon Hoare
978e5d94bc std: wrap "long" utf8 lines. 2013-07-23 16:02:14 -07:00
Graydon Hoare
ff0c2ae812 extra: rebase fallout. 2013-07-23 15:59:24 -07:00
bors
9954409438 auto merge of #7964 : pnkfelix/rust/fsk-issue3994-readme-note, r=huonw
See #3994.
2013-07-23 15:40:53 -07:00
Graydon Hoare
ff8d65eb37 extra: give up trying to make more fields of context cloneable, just use ARCs. 2013-07-23 15:23:02 -07:00
Graydon Hoare
fa8553e417 extra: switch json from hashmaps to treemaps 2013-07-23 15:23:02 -07:00
Graydon Hoare
9e4ebdb9d6 extra: add consume iter to treemap. 2013-07-23 15:23:02 -07:00
Graydon Hoare
31c180e5f5 extra: clean up workcache to use & in place of @ most places. 2013-07-23 15:23:02 -07:00
Graydon Hoare
1d9181bd76 extra: remove a @ in workcache config. 2013-07-23 15:23:02 -07:00
Graydon Hoare
9a093ab70a extra: change workcache::Work::unwrap to move out of self. 2013-07-23 15:23:02 -07:00
Graydon Hoare
d5803e67ee extra: access workcache db via RWARC. 2013-07-23 15:16:14 -07:00
Graydon Hoare
48dd72888c extra: use deriving more in workcache, switch to treemaps. 2013-07-23 15:16:14 -07:00
Kevin Murphy
c6c1472c68 Add simple link_section test to exercise it 2013-07-23 17:23:22 -04:00
bors
e029c2d623 auto merge of #7954 : zslayton/rust/master, r=huonw
fixes #7689
2013-07-23 13:19:56 -07:00
bors
8990f8be54 auto merge of #7848 : michaelwoerister/rust/trans_cleanup_1, r=jdm
The following types are renamed:
```rust
block_ => Block
block => @mut Block

fn_ctx_ => FunctionContext
fn_ctx => @mut FunctionContext

scope_info => ScopeInfo
```
I also tried to convert instances of `@mut` to `&mut` or `&` but a lot of them are blocked by issue #6268, so I left it for some time later.
2013-07-23 11:10:47 -07:00
Michael Woerister
3315edfae7 Adapted trans::common::{block, fn_ctxt, scope_info} to new naming convention. 2013-07-23 15:38:55 +02:00
bors
69a237ed7b auto merge of #7944 : blake2-ppc/rust/dlist-move-nodes, r=bblum
Factor out internal methods to pop/push list nodes so that .merge() and .rotate_to_front(), .rotate_to_back() (new methods) can be implemented without allocating nodes.

With that, some cleanup changes to DList use of Option, and adding a missing Encodable implementation.
2013-07-23 04:46:41 -07:00
bors
dfdb72dbbe auto merge of #7934 : sfackler/rust/smallintset, r=alexcrichton
SmallIntSet is equivalent to BitvSet but with 64 times the memory
overhead. There's no reason for it to exist.

SmallIntSet's overhead should really only be 8 times, but for some
reason, `sys::size_of::<Option<()>>() == 8`, not 1.
2013-07-23 03:04:39 -07:00
Huon Wilson
de2b5c50cd test/run-fail: Un-xfail a test, make some other xfailed ones compile (they still don't work). 2013-07-23 18:55:15 +10:00
bors
0a5d1a1b81 auto merge of #7875 : sstewartgallus/rust/fubar, r=alexcrichton 2013-07-22 23:13:41 -07:00
Alex Crichton
5c6069141b Add a test for #5844 (a closed issue now) 2013-07-22 23:09:21 -07:00
bors
43b1eab23b auto merge of #7873 : sstewartgallus/rust/cleanup_syntax, r=alexcrichton 2013-07-22 20:58:35 -07:00
Kevin Murphy
64ff30a4f0 Add link_section attribute for static and fn items
This allows for control over the section placement of static, static
mut, and fn items.  One caveat is that if a static and a static mut are
placed in the same section, the static is declared first, and the static
mut is assigned to, the generated program crashes.  For example:

#[link_section=".boot"]
static foo : uint = 0xdeadbeef;

#[link_section=".boot"]
static mut bar : uint = 0xcafebabe;

Declaring bar first would mark .bootdata as writable, preventing the
crash when bar is written to.
2013-07-22 22:34:04 -04:00
bors
6dfb0e5ad3 auto merge of #7703 : sfackler/rust/bitv, r=alexcrichton
Switched Bitv and BitvSet to external iterators. They still use some internal iterators internally (ha).

Derived clone for all Bitv types.

Removed indirection in BitvVariant. It previously held a unique pointer to the appropriate Bitv struct, even though those structs are the size of a pointer themselves. BitvVariant is the same size (16 bytes) as it was previously.
2013-07-22 19:13:39 -07:00
bors
ff34064aa3 auto merge of #7916 : olsonjeffery/rust/newrt_timer, r=brson
My first bit of newsched IO work. Pretty simple and limited in scope.

the RtioTimer trait only has a `sleep(msecs: u64)` method, for now. Taking requests on what else ought to be here.

oh yeah: this resolves #6435
2013-07-22 17:28:35 -07:00
Graydon Hoare
d9c0634536 std: various additional language benchmarks in util. 2013-07-22 16:56:11 -07:00
Graydon Hoare
ca5ed4cc49 std: add benchmark for allocating-and-dropping a struct with a dtor. 2013-07-22 16:56:11 -07:00
Graydon Hoare
9f7e364d3a std: add #[bench] benchmarks for num::strconv 2013-07-22 16:56:11 -07:00
Graydon Hoare
d9776236c8 std: add #[bench] benchmarks for rand. 2013-07-22 16:56:10 -07:00
Graydon Hoare
3d5fb470fb std: add #[bench] benchmarks for global and local heaps. 2013-07-22 16:56:10 -07:00
Graydon Hoare
e5cbede103 std: add preliminary str benchmark. 2013-07-22 16:56:10 -07:00
Graydon Hoare
786318f61b std: add #[cfg(test)] reference to extra so we can benchmark libstd. 2013-07-22 16:56:10 -07:00
Graydon Hoare
bc2b78ca2c rt: Fix child-iteration bug in crate map. 2013-07-22 16:56:10 -07:00
blake2-ppc
6e24b750e2 dlist: Rename rotate methods to .rotate_forward() and .rotate_backward() 2013-07-23 01:31:30 +02:00
bors
73921f91a3 auto merge of #7883 : brson/rust/rm-std-net, r=graydon
This removes all the code from libextra that depends on libuv. After that it removes three runtime features that existed to support the global uv loop: weak tasks, runtime-global variables, and at_exit handlers.

The networking code doesn't have many users besides servo, so shouldn't have much fallout. The timer code though is useful and will probably break out-of-tree code until the new scheduler lands, but I expect that to be soon.

It also incidentally moves `os::change_dir_locked` to `std::unstable`. This is a function used by test cases to avoid cwd races and in my opinion shouldn't be public (#7870).

Closes #7251 and #7870
2013-07-22 15:40:36 -07:00
Jeff Olson
3169bb70d8 std: fix for blocked task resume 2013-07-22 15:28:32 -07:00