Commit Graph

15887 Commits

Author SHA1 Message Date
Patrick Walton
c4075492ad librustc: Fix silly bug in AST conversion for const vstores. rs=bugfix
Means that we'll need another snapshot to rid the language of `[const T]`.
2013-03-05 10:18:36 -08:00
Patrick Walton
6d4ed5283c libsyntax: Separate multiple inherited traits with + 2013-03-05 10:18:35 -08:00
bors
5f55a07075 auto merge of #5237 : thestinger/rust/iter, r=nikomatsakis 2013-03-05 07:15:53 -08:00
Daniel Micay
17b5a14c4c trie: fix breaking out of the iterators early 2013-03-05 10:10:22 -05:00
Daniel Micay
f7ae9b1759 trie: fix each_reverse 2013-03-05 09:35:45 -05:00
bors
9ec7f3fa22 auto merge of #5225 : nikomatsakis/rust/issue-5224, r=nikomatsakis
Update region inference for traits so that a method with explicit self doesn't incorrectly cause the entire trait to be tagged as being region-parameterized.

Fixes #5224.

r? @pcwalton
2013-03-05 06:03:43 -08:00
Niko Matsakis
cbfd88a486 Update region inference for traits so that a method with
explicit self doesn't incorrectly cause the entire trait to
be tagged as being region-parameterized.

Fixes #5224.
2013-03-05 08:46:23 -05:00
bors
65986ba0c0 auto merge of #5215 : jld/rust/fn-const-env, r=graydon
Fixes #5210; unblocks #5183.
2013-03-05 03:12:43 -08:00
bors
eddefbc893 auto merge of #5212 : thestinger/rust/iter, r=graydon
A small step towards fixing #2827
2013-03-05 02:06:50 -08:00
bors
75c5bc90d2 auto merge of #5179 : alexcrichton/rust/default-warn-unused-import, r=graydon
I've found that unused imports can often start cluttering a project after a long time, and it's very useful to keep them under control. I don't like how Go forces a compiler error by default and it can't be changed, but I certainly want to know about them so I think that a warn is a good default.

Now that the `unused_imports` lint option is a bit smarter, I think it's possible to change the default level to warn. This commit also removes all unused imports throughout the compiler and libraries (500+).

The only odd things that I ran into were that some `use` statements had to have `#[cfg(notest)]` or `#[cfg(test)]` based on where they were. The ones with `notest` were mostly in core for modules like `cmp` whereas `cfg(test)` was for tests that weren't part of a normal `mod test` module.
2013-03-05 00:57:46 -08:00
bors
71f09813c8 auto merge of #5228 : pcwalton/rust/deriving-clone, r=pcwalton
r? @graydon
2013-03-04 23:57:46 -08:00
Graydon Hoare
ab500d8b8d build fixes 2013-03-04 22:40:59 -08:00
Patrick Walton
0643df28a3 libsyntax: Implement #[deriving_clone] 2013-03-04 16:13:15 -08:00
bors
dd34178b4b auto merge of #5211 : apasel422/rust/kate, r=graydon
These commits remove some obsolete language features, make some highlighting more correct with respect to the language spec, and introduce highlighting for macros, attributes, core traits, and the new region syntax.
2013-03-04 12:30:51 -08:00
bors
40e733a150 auto merge of #5209 : luqmana/rust/reader, r=graydon 2013-03-04 11:42:39 -08:00
Alex Crichton
cb4ab76e4a Adding missing imports for tests, and gate off others 2013-03-04 12:27:01 -05:00
Alex Crichton
bc3bee410a Add a special FIXME for subduing warnings in rpath.rs 2013-03-04 12:27:01 -05:00
Alex Crichton
dfb5c10dea Remove unused imports throughout src/ 2013-03-04 12:27:01 -05:00
Alex Crichton
55461d888f Change the default level of unused_imports to warn 2013-03-04 12:27:01 -05:00
bors
c639a78dc4 auto merge of #5205 : thestinger/rust/radix, r=graydon
This is an implementation of a map and set for integer keys. It's an ordered container (by byte order, which is sorted order for integers and byte strings when done in the right direction) with O(1) worst-case lookup, removal and insertion. There's no rebalancing or rehashing so it's actually O(1) without amortizing any costs.

The fanout can be adjusted in multiples of 2 from 2-ary through 256-ary, but it's hardcoded at 16-ary because there isn't a way to expose that in the type system yet. To keep things simple, it also only allows `uint` keys, but later I'll expand it to all the built-in integer types and byte arrays.

There's quite a bit of room for performance improvement, along with the boost that will come with dropping the headers on `Owned` `~` and getting rid of the overhead from the stack switches to the allocator. It currently does suffix compression for a single node and then splits into two n-ary trie nodes, which could be replaced with an array for at least 4-8 suffixes before splitting it. There's also the option of doing path compression, which may be a good or a bad idea and depends a lot on the data stored.

I want to share the test suite with the other maps so that's why I haven't duplicated all of the existing integer key tests in this file. I'll send in another pull request to deal with that.

Current benchmark numbers against the other map types:

    TreeMap:
     Sequential integers:
      insert: 0.798295
      search: 0.188931
      remove: 0.435923
     Random integers:
      insert: 1.557661
      search: 0.758325
      remove: 1.720527

    LinearMap:
     Sequential integers:
      insert: 0.272338
      search: 0.141179
      remove: 0.190273
     Random integers:
      insert: 0.293588
      search: 0.162677
      remove: 0.206142

    TrieMap:
     Sequential integers:
      insert: 0.0901
      search: 0.012223
      remove: 0.084139
     Random integers:
      insert: 0.392719
      search: 0.261632
      remove: 0.470401

@graydon is using an earlier version of this for the garbage collection implementation, so that's why I added this to libcore. I left out the `next` and `prev` methods *for now* because I just wanted the essentials first.
2013-03-04 08:21:47 -08:00
Brian Anderson
edcebac1cc There is no function in LLVM called LLVMInitializeMipsAsmLexer 2013-03-03 20:02:06 -08:00
Jyun-Yan You
314605f948 rt: fix some bugs for MIPS target 2013-03-03 20:02:06 -08:00
Jyun-Yan You
c2a61d7df3 rustc: implement MIPS O32 ABI 2013-03-03 20:02:03 -08:00
Jyun-Yan You
5150b9811b rustc: MIPS32 support 2013-03-03 19:27:27 -08:00
Jyun-Yan You
0ecd9e03ff rt: MIPS32 support 2013-03-03 19:27:01 -08:00
Jed Davis
eb1c632201 Add a test case for const fn sizing, just to be safe. 2013-03-03 17:22:51 -08:00
Jed Davis
514fd3efec Assert that constants are translated with the correct size. 2013-03-03 16:40:44 -08:00
Jed Davis
5f0a123f0d Construct const fns based on the type, not the definition.
Otherwise we can add a null environment when we shouldn't.

Fixes #5210.
2013-03-03 16:40:41 -08:00
bors
d30a4f4e67 auto merge of #5207 : erickt/rust/libsyntax-deprecated-self, r=brson
This adds an explicit `&self` to each method in libsyntax, and sets the `#[deny(deprecated_self)]` in `syntax.rc`.
2013-03-03 16:16:00 -08:00
Erick Tryzelaar
690caf8ab8 libsyntax: deny deprecated_self in libsyntax 2013-03-03 15:25:08 -08:00
Erick Tryzelaar
b9d9157883 libsyntax: add &self to extensions 2013-03-03 15:25:08 -08:00
Erick Tryzelaar
4a73426aa2 libsyntax: add &self to parser methods 2013-03-03 15:25:08 -08:00
Patrick Walton
3c23589b08 etc: Suppress another Valgrind issue. rs=burningtree 2013-03-03 10:30:00 -08:00
Daniel Micay
af645e8487 replace option::iter with a BaseIter impl 2013-03-03 11:01:17 -05:00
Andrew Paseltiner
39b713f93e kate: allow [] regions to be collapsed 2013-03-03 09:14:53 -05:00
Andrew Paseltiner
c43512be2e kate: restrict char escapes to ones accepted by Rust and highlight hex escapes 2013-03-03 09:08:28 -05:00
Andrew Paseltiner
6002d10ce3 kate: detect and highlight attributes 2013-03-03 08:56:39 -05:00
Andrew Paseltiner
4548eb1a29 kate: consolidate integer suffixes with &rustIntSuf; entity 2013-03-03 08:49:16 -05:00
Andrew Paseltiner
c771a93c50 kate: add note about &rustIdent; 2013-03-03 08:45:44 -05:00
Andrew Paseltiner
8596535679 kate: update Rust version 2013-03-03 08:40:37 -05:00
Andrew Paseltiner
d1d6326f5c kate: add Self to types 2013-03-03 08:40:37 -05:00
Andrew Paseltiner
ecf1eea1e1 kate: detect and highlight core traits 2013-03-03 08:40:37 -05:00
Andrew Paseltiner
bcd95d0254 kate: detect and highlight regions 2013-03-03 08:40:37 -05:00
Andrew Paseltiner
11d10fdb09 kate: introduce &rustIdent; entity 2013-03-03 08:40:37 -05:00
Andrew Paseltiner
7ad2082663 kate: detect and highlight macro invocations 2013-03-03 08:40:37 -05:00
Andrew Paseltiner
c33b4d98cc kate: remove export, fail, and move keywords 2013-03-03 08:40:37 -05:00
Luqman Aden
162c816e34 libcore: Add read_until to ReaderUtil. 2013-03-03 02:03:30 -08:00
bors
a7de81ac3e auto merge of #5203 : erickt/rust/incoming, r=brson
My merges for #5143 missed a couple other copies. This patch corrects this, and gets stage0 to compile libsyntax with `#[deny(vecs_implicitly_copyable)]`. stage1 still fails though.
2013-03-02 20:12:36 -08:00
bors
5655ae46a7 auto merge of #5197 : pcwalton/rust/fn-types, r=pcwalton
r? @catamorphism
2013-03-02 19:18:37 -08:00
Patrick Walton
ccec510f39 librustc: Stop parsing fn@, fn~, and fn& 2013-03-02 18:47:48 -08:00