Commit Graph

20540 Commits

Author SHA1 Message Date
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
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
Erick Tryzelaar
9c3679a9a2 std: make str::append move self
This eliminates a copy and fixes a FIXME.
2013-07-23 16:57:00 -07:00
Erick Tryzelaar
d573ecd1f9 rustc: remove unused variables 2013-07-23 16:57:00 -07:00
Erick Tryzelaar
1354cfa07f clean up warnings 2013-07-23 16:57:00 -07:00
Erick Tryzelaar
bbedbc0450 std: inline str::with_capacity and vec::with_capacity 2013-07-23 16:57:00 -07:00
Erick Tryzelaar
cced3c9013 std: simplify str::as_imm_buf and vec::as_{imm,mut}_buf 2013-07-23 16:57:00 -07:00
Erick Tryzelaar
037a5b1af4 str: move as_mut_buf into OwnedStr, and make it self 2013-07-23 16:56:58 -07:00
Erick Tryzelaar
2dd3c44a56 std: remove a malloc from os::fill_charp_buf 2013-07-23 16:56:23 -07:00
Erick Tryzelaar
31b77aecfc std: remove str::to_owned and str::raw::slice_bytes_owned 2013-07-23 16:56:23 -07:00
Erick Tryzelaar
cc9666f68f std: rename str.as_buf to as_imm_buf, add str.as_mut_buf 2013-07-23 16:56:22 -07:00
Erick Tryzelaar
3b818edeba std and extra: use as_c_str instead of as_buf in a couple places
These uses are assuming the strings are null terminated, so it
should be using `as_c_str` instead of `as_buf`
2013-07-23 16:56:22 -07:00
Erick Tryzelaar
cf75330807 std: add test for str::as_c_str 2013-07-23 16:56:22 -07:00
Erick Tryzelaar
7af56bb921 std: move StrUtil::as_c_str into StrSlice 2013-07-23 16:56:22 -07:00
Erick Tryzelaar
9fdec67a67 std: move str::as_buf into StrSlice 2013-07-23 16:56:22 -07:00
Erick Tryzelaar
cfd89c4075 std: remove os::as_c_charp 2013-07-23 16:56:22 -07:00
Erick Tryzelaar
9ad815e063 std: rename str.as_bytes_with_null_consume to str.to_bytes_with_null 2013-07-23 16:56:17 -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
Etienne Millon
b128ceb161 tidy: allow arbitrary spaces between // and NOTE
`make tidy` now detects `//NOTE`, `//  NOTE`, etc.
This also removes the extra empty line emitted after each warning.

Fixes #6060
2013-07-23 21:34:02 +02:00
crnobog
6f4e2b2147 Compare file:line prefix case-insensitively on win32
Paths are case insensitive on windows and rustc and compiletest may disagree on casing.
Fixes test compile-fail/circular_modules_main
2013-07-23 19:24:54 +01: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
Erick Tryzelaar
7434080dd7 rustc: remove some dead functions 2013-07-23 10:08:52 -07:00
OGINO Masanori
7a6ebb36b0 Remove unused variables in compile_submatch.
Just an minor cleanup.

Signed-off-by: OGINO Masanori <masanori.ogino@gmail.com>
2013-07-24 00:13:04 +09: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