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.
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.
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.
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.
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.
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.