Commit graph

20335 commits

Author SHA1 Message Date
Michael Sullivan
17e30d6b4e Change each_bound_trait_and_supertraits to take a vec of TraitRefs. 2013-07-23 17:06:56 -07:00
Michael Sullivan
387df4e127 Fix the issue-3979 tests and add a new test. 2013-07-23 17:06:56 -07:00
Michael Sullivan
ffc879c2e4 Major rework of how calls to self and super methods work.
Eliminates method_super, method_self, and vtable_self, merging all of
them into the param cases.
Cloes #4396. Closes #7301.
2013-07-23 17:06:33 -07:00
Michael Sullivan
79f8a7fee5 Properly track and export information about vtables for impls in metadata.
Partially rework how vtables are handled in default method calls.
Closes #7460.
2013-07-23 17:06:33 -07:00
Michael Sullivan
304a5f0786 Have vtable resolution check for supertrait bounds. Closes #4055. 2013-07-23 17:06:33 -07:00
Michael Sullivan
a0f8540c95 Fix some impls such that all supertraits are actually implemented. 2013-07-23 17:06:32 -07:00
Michael Sullivan
e75ec80157 Improve vtable resolution.
Improve vtable resolution in a handful of ways.  First, if we don't
find a vtable for a self/param type, do a regular vtable search.  This
could find impls of the form "impl for A". Second, we don't require
that types be fully resolved before looking up subtables, and we
process tables in reverse order. This allows us to gain more
information about early type parameters based on how they are used by
the impls used to resolve later params.

Closes #6967, I believe.
2013-07-23 17:06:32 -07:00
Michael Sullivan
fbbbc98ea4 Refactor a bunch of lookup_vtable to reduce rightward drift and clean things up. 2013-07-23 17:06:32 -07:00
Michael Sullivan
4b9759e20f Add a to_owned_vec method to IteratorUtil. 2013-07-23 17:06:32 -07:00
Michael Sullivan
89c4af0ea9 Fix a default method polymorphism bug. 2013-07-23 17:06:32 -07:00
Michael Sullivan
172ea83adc Get rid of an unused variable warning. 2013-07-23 17:06:32 -07: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
bors
0a5d1a1b81 auto merge of #7875 : sstewartgallus/rust/fubar, r=alexcrichton 2013-07-22 23:13:41 -07:00
bors
43b1eab23b auto merge of #7873 : sstewartgallus/rust/cleanup_syntax, r=alexcrichton 2013-07-22 20:58:35 -07: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
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
Brian Anderson
407bffb33e std: Remove at_exit API. Unused 2013-07-22 14:17:09 -07:00
Brian Anderson
23b7ee2bda std: Remove unstable::global. Unused 2013-07-22 14:16:52 -07:00
Brian Anderson
6174f9a4d9 std: Move change_dir_locked to unstable. #7870 2013-07-22 14:16:52 -07:00
Brian Anderson
4beda4e582 std::rt: Stop using unstable::global in change_dir_locked 2013-07-22 14:16:52 -07:00
Brian Anderson
f8c4d99df6 std: Remove weak_task API. Unused 2013-07-22 14:16:52 -07:00
Brian Anderson
a637db2aa1 extra: Add url module
Used to be under extra::net, which no longer exists
2013-07-22 14:16:33 -07:00
Brian Anderson
219c1c71da extra: Remove uv, net, timer code
This will all be reimplemented in the new runtime.
2013-07-22 14:16:33 -07:00
bors
9ed82fbb43 auto merge of #7943 : Dretch/rust/vec-slice-from-to, r=huonw 2013-07-22 13:49:34 -07:00
Jeff Olson
73ab6c60f3 std: make check appeasement 2013-07-22 13:19:05 -07:00
Jeff Olson
155470fc9c std: minor timer cleanup based on feedback 2013-07-22 13:19:04 -07:00
Jeff Olson
5da29e3278 std: add rt::io::Timer 2013-07-22 13:19:04 -07:00
Jeff Olson
921d99108c std: add RtioTimer and UvTimer impl atop rt::uv 2013-07-22 13:19:04 -07:00
bors
2f7d86f9a8 auto merge of #7942 : Dretch/rust/os-listdir-path-no-squiggle, r=brson 2013-07-22 12:01:41 -07:00
bors
48f115e168 auto merge of #7940 : cmr/rust/comments, r=pnkfelix 2013-07-22 10:07:34 -07:00
blake2-ppc
52b4a2eb6f dlist: Fix .peek_next() w.r.t double ended iterators
.peek_next() needs to check the element counter just like the .next()
and .next_back() iterators do.

Also clarify .insert_next() doc w.r.t double ended iteration.
2013-07-22 17:51:11 +02:00
bors
52b7fc14fe auto merge of #7903 : michaelwoerister/rust/end_of_spanned, r=jdm
Continuation of https://github.com/mozilla/rust/pull/7826.

AST spanned<T> refactoring, AST type renamings:

`crate => Crate`
`local => Local`
`blk => Block`
`crate_num => CrateNum`
`crate_cfg => CrateConfig`
`field => Field`

Also, Crate, Field and Local are not wrapped in spanned<T> anymore.
2013-07-22 08:19:32 -07:00
Michael Woerister
5aee3e01a0 De-spanned<T> and renamed ast::field (now ast::Field) 2013-07-22 15:35:29 +02:00
Michael Woerister
4bd1424622 Ast spanned<T> refactoring, renaming: crate, local, blk, crate_num, crate_cfg.
`crate => Crate`
`local => Local`
`blk => Block`
`crate_num => CrateNum`
`crate_cfg => CrateConfig`

Also, Crate and Local are not wrapped in spanned<T> anymore.
2013-07-22 15:35:28 +02:00
bors
7a3eaf8f27 auto merge of #7941 : dotdash/rust/codegen, r=huonw
These changes remove unnecessary basic blocks and the associated branches from
the LLVM IR that we emit. Together, they reduce the time for unoptimized builds
in stage2 by about 10% on my box.
2013-07-22 06:28:35 -07:00
bors
7b2218d248 auto merge of #7926 : brson/rust/issue-4116, r=graydon
When loading a module the parser will look for either foo.rs or foo/mod.rs and generate
an error when both are found.
2013-07-22 04:37:36 -07:00
bors
40a48e62c1 auto merge of #7957 : alexcrichton/rust/ignore-warnings, r=thestinger
The new snapshot now enables this.
2013-07-22 02:49:36 -07:00
Alex Crichton
634eddb28e Allow all warnings in stage0 to account for bugs 2013-07-22 00:30:32 -07:00
bors
74f4badcab auto merge of #7955 : thestinger/rust/snapshot, r=huonw 2013-07-21 22:34:36 -07:00
Daniel Micay
f51e2ad435 temporarily disable 3 rustpkg tests
Re-enabling these when the ephemeral failures are fixed is filed as
issue #7956.
2013-07-22 01:09:56 -04:00
Daniel Micay
ed67cdb73c new snapshot 2013-07-22 01:09:48 -04:00
bors
3d6c0bc056 auto merge of #7938 : crabtw/rust/foreign-vis, r=huonw 2013-07-21 20:46:33 -07:00
zslayton
49014c8268 Exposed previously hidden 'use' statements in the tutorial's sample code. 2013-07-21 23:40:52 -04:00