- 05 3月, 2013 4 次提交
-
-
由 Graydon Hoare 提交于
-
由 bors 提交于
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.
-
由 bors 提交于
-
由 bors 提交于
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.
-
- 04 3月, 2013 10 次提交
-
-
由 Brian Anderson 提交于
-
由 Jyun-Yan You 提交于
-
由 Jyun-Yan You 提交于
-
由 Jyun-Yan You 提交于
-
由 Jyun-Yan You 提交于
-
由 bors 提交于
This adds an explicit `&self` to each method in libsyntax, and sets the `#[deny(deprecated_self)]` in `syntax.rc`.
-
由 Erick Tryzelaar 提交于
-
由 Erick Tryzelaar 提交于
-
由 Erick Tryzelaar 提交于
-
由 Patrick Walton 提交于
-
- 03 3月, 2013 26 次提交
-
-
由 Andrew Paseltiner 提交于
-
由 Andrew Paseltiner 提交于
-
由 Andrew Paseltiner 提交于
-
由 Andrew Paseltiner 提交于
-
由 Andrew Paseltiner 提交于
-
由 Andrew Paseltiner 提交于
-
由 Andrew Paseltiner 提交于
-
由 Andrew Paseltiner 提交于
-
由 Andrew Paseltiner 提交于
-
由 Andrew Paseltiner 提交于
-
由 Andrew Paseltiner 提交于
-
由 Andrew Paseltiner 提交于
-
由 Luqman Aden 提交于
-
由 bors 提交于
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.
-
由 bors 提交于
r? @catamorphism
-
由 Patrick Walton 提交于
-
由 Patrick Walton 提交于
-
由 Patrick Walton 提交于
-
由 bors 提交于
Several typos corrected in the comments of src/libcore/iter.rs and 2013 added to the copyright header (as requested on CONTRIBUTING.md)
-
由 Patrick Walton 提交于
-
由 Patrick Walton 提交于
-
由 Patrick Walton 提交于
-
由 Patrick Walton 提交于
-
由 Patrick Walton 提交于
-
由 bors 提交于
Closes #4764
-
由 bors 提交于
Before: ```` test.rs:3:21: 3:30 error: expected constant integer for repeat count but found variable test.rs:3 let a = ~[0, ..n]; //~ ERROR expected constant integer for repeat count but found variable ^~~~~~~~~ ```` After: ```` test.rs:3:27: 3:28 error: expected constant integer for repeat count but found variable test.rs:3 let a = ~[0, ..n]; //~ ERROR expected constant integer for repeat count but found variable ^ ````
-