Commit Graph

15419 Commits

Author SHA1 Message Date
Daniel Micay
f9c7ba009b treemap: cut down on swap_unwrap in remove
Performance before:

    std::treemap::TreeMap
                   sequential_ints 0.083971 s
                       random_ints 0.095861 s
                       delete_ints 0.083931 s
                sequential_strings 0.278272 s
                    random_strings 0.240286 s
                    delete_strings 0.173581 s

Performance after:

    std::treemap::TreeMap
                   sequential_ints 0.083297 s
                       random_ints 0.097644 s
                       delete_ints 0.052602 s
                sequential_strings 0.287326 s
                    random_strings 0.242372 s
                    delete_strings 0.142269 s
2013-02-10 22:03:26 -05:00
Daniel Micay
b0f58f6e68 avoid explicit reborrow in heir_swap 2013-02-10 21:11:33 -05:00
Zack Corr
33ae05871c core: Fix files that needed GenericChan/Port from prelude 2013-02-11 12:11:23 +10:00
Daniel Micay
195a969bb3 treemap: avoid swap_unwrap in insert
Performance before:

    std::treemap::TreeMap
                   sequential_ints 0.151877 s
                       random_ints 0.160926 s
                       delete_ints 0.08694 s
                sequential_strings 0.316458 s
                    random_strings 0.290778 s
                    delete_strings 0.169892 s

Performance after:

    std::treemap::TreeMap
                   sequential_ints 0.083971 s
                       random_ints 0.095861 s
                       delete_ints 0.083931 s
                sequential_strings 0.278272 s
                    random_strings 0.240286 s
                    delete_strings 0.173581 s
2013-02-10 20:49:44 -05:00
Daniel Micay
f9c15de1fd treemap: use an &mut parameter for skew and split
results in a small performance improvement and reduces the compiled
code size
2013-02-10 20:47:22 -05:00
Brendan Zabarauskas
48b2141b83 Add NumCast trait for generic numeric type casts 2013-02-11 12:33:05 +11:00
Erick Tryzelaar
4fb4a4b66d core: add LinearMap::find_or_insert{,_with}
This allows for inserting a new value into the map only if it doesn't
already exist in the map.
2013-02-10 15:51:25 -08:00
Erick Tryzelaar
849644b5bc core: rename hashmap test functions 2013-02-10 15:51:25 -08:00
Erick Tryzelaar
fed5df8f2e libcore: LinearMap doesn't need to pass around the bucket vec 2013-02-10 15:51:25 -08:00
Jeff Olson
4696fb367c std: fix libuv structs on macos 2013-02-10 14:30:07 -08:00
Brian Anderson
79e9b6d6a1 mk: Run debuginfo tests by default, but only if gdb is available 2013-02-10 14:19:12 -08:00
Brian Anderson
85d7b3c154 mk: Typo 2013-02-10 13:35:20 -08:00
Daniel Micay
99ff74c1bd make Option's iter method use a lifetime 2013-02-10 16:30:17 -05:00
Jeff Olson
a3516ae834 build: add link flag for freebsd libuv build 2013-02-10 11:51:05 -08:00
Jeff Olson
1cbbb58d87 build: change libuv to point at joyent's repo and make unpatched build libuv work on mingw 2013-02-10 11:51:05 -08:00
Jeff Olson
73507c1961 std: strip sillyness from debug comment in iotask teardown 2013-02-10 11:51:05 -08:00
Jeff Olson
a74296a39f build: ifdef for mingw/non-mingw builds 2013-02-10 11:51:05 -08:00
Jeff Olson
4942fe9c1e build: point libuv at olsonjeffery/libuv, temporarily 2013-02-10 11:51:05 -08:00
Jeff Olson
a38b16651f build: tweak rt.mk, as per graydon.. CFLAGS had to stay 2013-02-10 11:51:05 -08:00
Jeff Olson
dfcdb6eb72 rt/std: update of libuv API glue for libuv submodule update 2013-02-10 11:51:05 -08:00
Jeff Olson
3a813e29b6 etc: rework of how libuv is integrated into the build
- thanks to work in libuv's upstream, we can call libuv's Makefile directly
with parameters, instead of descending in gyp-uv madness and generating
our own.
2013-02-10 11:51:05 -08:00
John Clements
c05954a76b added issue for reference in FIXME 2013-02-10 11:25:46 -08:00
Jed Davis
e93a58d526 rust-mode.el uses the 'cl macros, so it should actually require them
Without this change, rust-mode doesn't work if 'cl hasn't been required
by something else, apparently.  I'm not entirely sure what changed such
that I started seeing this problem instead of not, but maybe the emacs
world has been making progress towards not loading 'cl at runtime if
it's only needed at compile time.
2013-02-10 11:23:10 -08:00
bors
0f04df8522 auto merge of #4866 : jld/rust/enum-unitlike, r=graydon
If an enum is isomorphic to unit, there's no need to use any bits to
represent it.  The only obvious reason this wasn't the case was because
the enum could be C-like and have a user-specified discriminant -- but
that value is constant, so it doesn't need to be stored.

This change means that all newtype-like enums have the same size (and
layout) as their underlying type, which might be a useful property to
have, at least in terms of making programs' low-level behavior less
surprising.
2013-02-10 10:24:17 -08:00
Zack Corr
4f843763a1 core: Remove GenericChan/Port from prelude. Closes #4762 2013-02-10 18:10:09 +10:00
Jed Davis
3742b62f64 Omit discriminant from nullary univariant enums.
If an enum is isomorphic to unit, there's no need to use any bits to
represent it.  The only obvious reason this wasn't the case was because
the enum could be C-like and have a user-specified discriminant -- but
that value is constant, so it doesn't need to be stored.

This change means that all newtype-like enums have the same size (and
layout) as their underlying type, which might be a useful property to
have, at least in terms of making programs' low-level behavior less
surprising.
2013-02-09 22:28:43 -08:00
bors
9d7014e55c auto merge of #4861 : sethpink/rust/incoming, r=catamorphism
Fix for issue #4830.
2013-02-09 18:37:02 -08:00
bors
2fc1f41d0d auto merge of #4827 : mcpherrinm/rust/master, r=catamorphism
It seems to me the library needs more work to be done, but having a non-compilable sample program seems like bad news.
2013-02-09 17:28:04 -08:00
bors
d6442e97a5 auto merge of #4854 : thestinger/rust/oldmap, r=catamorphism 2013-02-09 15:02:51 -08:00
bors
7fe6b1b6cf auto merge of #4853 : Thiez/rust/incoming, r=catamorphism
A simple fix for issue 2174.
2013-02-09 14:13:59 -08:00
John Clements
7736ed6c62 json tidy 2013-02-09 13:37:05 -08:00
John Clements
c952c04462 re-special-case Option in JSON encoding 2013-02-09 13:37:05 -08:00
John Clements
f91160b687 json add enum encoder test case 2013-02-09 13:37:04 -08:00
John Clements
0e9495b980 json bugfix 2013-02-09 13:37:04 -08:00
John Clements
394f8eeb7e tidy 2013-02-09 13:37:04 -08:00
John Clements
fe82374328 json bugfixes 2013-02-09 13:37:04 -08:00
John Clements
765961438d fix typos in sample code, add enum to json encoder, add test case 2013-02-09 13:37:04 -08:00
bors
19dfec2aaf auto merge of #4852 : Caseus/rust/issue-4836, r=brson
Simple removal of rust_compare_and_swap_ptr from rt, as per Issue #4836
2013-02-09 11:07:13 -08:00
bors
d90abd5879 auto merge of #4848 : nikomatsakis/rust/issue-4821-bad-kind-computation, r=catamorphism
...ear

values to be copied.  Rewrite kind computation so that instead of directly
computing the kind it computes what kinds of values are present in the type,
and then derive kinds based on that. I find this easier to think about.

Fixes #4821.

r? @catamorphism
2013-02-09 10:20:55 -08:00
Brian Leibig
6bfbdadd3b Add debug info tests 2013-02-09 13:09:19 -05:00
Seth Pink
8ebdb3d0ab Issue #4830 fix 2013-02-09 23:00:55 +10:00
Zack Corr
ebd20b7944 Rename dec/inc_weak_task_count to inc/dec_live_count and remove register_task/unregister_task. Closes #4768 2013-02-09 19:19:31 +10:00
Daniel Micay
4e6994dbfa librustc/back/rpath.rs: oldmap -> LinearSet 2013-02-08 21:22:54 -05:00
Daniel Micay
d30fdbb357 libsyntax/attr.rs: switch from oldmap to LinearSet 2013-02-08 20:57:14 -05:00
Matthew McPherrin
0a062b50f1 Remove trailing whitespace 2013-02-08 20:17:50 -05:00
Daniel Micay
94fd95a4f1 oldmap: rm unneeded unsafe 2013-02-08 19:30:54 -05:00
Daniel Micay
0127828b5b oldmap: separate out the methods that need Copy 2013-02-08 19:20:36 -05:00
Mark Vian
e2e474767e rt: remove unused 'rust_compare_and_swap_ptr'. Closes #4836 2013-02-08 18:19:36 -06:00
Daniel Micay
a32c5c73ee oldmap: get rid of legacy _ref suffixes 2013-02-08 19:12:51 -05:00
Matthijs Hofstra
8d0c1cb406 Added related FIXME for 3260 2013-02-09 01:01:39 +01:00