Commit Graph

1708 Commits

Author SHA1 Message Date
Seth Pink
1f4c758f9b Remove use of capture clause #4965 2013-02-17 11:02:23 +10:00
Daniel Micay
6190661018 deque: avoid Copy in pop_{front,back} 2013-02-16 19:44:58 -05:00
Daniel Micay
373c072e83 deque: avoid Copy in peek_{front,back} 2013-02-16 19:10:10 -05:00
Daniel Micay
5929f15999 deque: avoid Copy in the get function 2013-02-16 19:05:27 -05:00
Daniel Micay
5832fe968f deque: separate the methods that need Copy 2013-02-16 19:00:51 -05:00
Daniel Micay
15879d3f74 deque: rm old return statements 2013-02-16 18:57:45 -05:00
Daniel Micay
ed7c9c4e2a add a Mutable implementation (clear) to std::deque 2013-02-16 18:57:01 -05:00
Daniel Micay
b47e1e9eda modernize std::deque
* use a proper exported data type with private fields
* implement core::container::Container
* use the current constructor convention
* use explicit self
* get rid of DVec and the mutable fields

Closes #2343
2013-02-16 18:20:54 -05:00
Graydon Hoare
585d6f7b00 rustpkg: Massage for landing. 2013-02-15 18:50:51 -08:00
Zack Corr
b10dc1af06 Move semver to std and finish rustpkg 2013-02-15 18:04:10 -08:00
Zack Corr
2192d11cd1 Correct Zack Corr's email in AUTHORS.txt 2013-02-15 18:04:10 -08:00
Patrick Walton
bb833ca0f0 librustc: Stop parsing impl Type : Trait and fix several declarations that slipped through. r=tjc 2013-02-15 16:59:56 -08:00
bors
566bcf2225 auto merge of #4969 : nickdesaulniers/rust/issue3869, r=brson
Issue #3869
review? @nikomatsakis 

Convert all uses of vec::slice to vec::view Issue #3869
Rename const_view to const_slice
Renamed mut_view to mut_slice
Fix windows build error.  `buf` is borrowed by the call to
`as_mut_buf()` and so we must invoke `slice()` outside of that
call.
2013-02-15 13:54:49 -08:00
Luqman Aden
03757482f0 libstd: Fix broken test. 2013-02-15 02:49:54 -08:00
Luqman Aden
4cf51c2531 libstd: Get rid of move. 2013-02-15 02:49:54 -08:00
bors
20fd0c53ed auto merge of #4938 : thestinger/rust/no_zero, r=brson
I removed the unused wrappers methods named `calloc` because they relied on the malloc wrapper having a `bool zero = true` default parameter (which resulted in some accidental zeroing). Perhaps wrapping the actual calloc function would be useful, but I don't know of an existing use case that could use it so I just removed these.

This gives an ~1% performance improvement for TreeMap, which does a lot of small allocations. Vectors use `realloc` which didn't zero before these changes so there's no measurable change in performance.
2013-02-14 18:27:54 -08:00
bors
af2f0ef088 auto merge of #4927 : sanxiyn/rust/remove-dvec, r=catamorphism 2013-02-14 17:23:18 -08:00
Nick Desaulniers
5d62a4a52e Convert all uses of vec::slice to vec::view Issue #3869
Rename const_view to const_slice
Renamed mut_view to mut_slice
2013-02-14 16:14:32 -08:00
bors
3c07d037cd auto merge of #4934 : nickdesaulniers/rust/issue4524cleanup, r=brson
review? @brson
Issue #4524
2013-02-14 15:37:48 -08:00
Daniel Micay
f2f4edd8a7 fix bug in uv_ll tests uncovered by not zeroing 2013-02-14 17:47:15 -05:00
Patrick Walton
9143688197 librustc: Replace impl Type : Trait with impl Trait for Type. rs=implflipping 2013-02-14 14:44:12 -08:00
Nick Desaulniers
4699ac67c6 Remove all final references to die! 2013-02-14 13:09:09 -08:00
Seo Sanghyeon
26697c371d Remove DVec from workcache 2013-02-14 23:12:12 +09:00
Seo Sanghyeon
9324f497b2 Remove DVec from json 2013-02-14 22:51:01 +09:00
Nick Desaulniers
4445b38df2 Remove die!, raplace invocations with fail! Issue #4524 pt 3 2013-02-13 17:01:32 -08:00
bors
d5bf3b85d1 auto merge of #4908 : bstrie/rust/rimov3, r=pcwalton
This patch finishes removing inner vector mutability from the vast majority of the compiler. Exceptions:

* core::dvec: ideally this entire type will be able to be replaced by `~[]`, but Niko asked me to hold off on removing Dvecs until he makes some fixes to borrowed pointers. 
* liveness: liveness.rs is an impenetrable neutron star of deprecated semantics.
* compile-fail: I'm not sure if a lot of these tests are testing inner mutability or mutability in general. I figure that RIMOVing this folder should wait until this syntax is removed from the parser.

I also took this chance to remove many of the inner-mutability-related functions from core::vec, or as many uses of those functions as possible where still necessary. consume_mut and append_mut have been axed. cast_to_mut and cast_from_mut are still needed in a few places.
2013-02-13 15:09:07 -08:00
bors
5e6d7871c6 auto merge of #4840 : jbclements/rust/add-json-enum-encoding, r=catamorphism
r?

I added code to the JSON encoder to support the serialization of enums.  Before this, the JSON serializer only handled Option, and encoded None as 'null'. Following this change, all enums are encoded as arrays containing the enum name followed by the encoded fields. This appears consistent with the unstated invariant that the resulting output can be mapped back to the input *if* there's a decoder around that knows the types that were in existence when the serialization occurred.

Also, added test cases.
2013-02-13 13:18:38 -08:00
Graydon Hoare
e5aa399e0d rustc and std: teach about #[bench], modernize to use quote_expr! some. 2013-02-13 11:46:25 -08:00
Graydon Hoare
ebe99637fd std: add stats. 2013-02-13 11:46:25 -08:00
Ben Striegel
e6c82c0375 RIMOV core::vec
Also remove as many uses as possible of vec::cast_to_mut and
cast_from_mut
2013-02-13 12:48:24 -05:00
Niko Matsakis
ab2534974c Adjust borrow checker algorithm to address #4856 unsoundness,
and then adjust code to match. rs=unsound (will review post-landing)
2013-02-12 20:10:50 -08:00
bors
210fa2d017 auto merge of #4874 : thestinger/rust/option, r=catamorphism 2013-02-12 10:35:12 -08:00
Brian Anderson
9701517703 std: Fix uv_tcp_t size on i686-apple-darwin 2013-02-11 19:24:35 -08:00
Brian Anderson
b126c742e5 Merge remote-tracking branch 'thestinger/treemap' 2013-02-11 16:13:50 -08:00
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
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
Jeff Olson
4696fb367c std: fix libuv structs on macos 2013-02-10 14:30:07 -08:00
Daniel Micay
99ff74c1bd make Option's iter method use a lifetime 2013-02-10 16:30:17 -05:00
Jeff Olson
73507c1961 std: strip sillyness from debug comment in iotask teardown 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
John Clements
c05954a76b added issue for reference in FIXME 2013-02-10 11:25:46 -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
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
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
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
Daniel Micay
a32c5c73ee oldmap: get rid of legacy _ref suffixes 2013-02-08 19:12:51 -05:00
Matthew McPherrin
46df7985a5 Merge branch 'master' of https://github.com/mozilla/rust 2013-02-08 15:21:46 -05:00
Niko Matsakis
a380df809c Fix subtle error in caching during kind computation that could cause linear
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.
2013-02-08 07:20:39 -08:00
Daniel Micay
8c32cd2dc8 fix map tests 2013-02-07 22:58:16 -05:00
Daniel Micay
9599cc86f0 implement BaseIter for LinearMap 2013-02-07 22:28:58 -05:00
Daniel Micay
fe841f3e56 implement ReverseIter for SmallIntMap 2013-02-07 22:04:38 -05:00
Daniel Micay
a2f922f282 implement ReverseIter for TreeMap and TreeSet 2013-02-07 22:04:38 -05:00
Daniel Micay
66d5030763 implement BaseIter for SmallIntMap 2013-02-07 22:04:38 -05:00
Daniel Micay
e018244777 make Option's map and map_default use a lifetime 2013-02-07 22:04:38 -05:00
Daniel Micay
f6e0df6563 implement BaseIter for TreeMap 2013-02-07 22:04:37 -05:00
Daniel Micay
83270d2d79 rm each method from the Map trait
the map types should implement BaseIter instead
2013-02-07 22:04:35 -05:00
Daniel Micay
d903231f1e add a BaseIter implementation for PriorityQueue 2013-02-07 20:18:15 -05:00
Patrick Walton
472797b04a librustc: Lots of de-muting. rs=demuting 2013-02-07 16:17:39 -08:00
bors
37a610a7d9 auto merge of #4831 : bjz/rust/incoming, r=pcwalton
This is useful for comparing more complex types that include floats.
2013-02-07 08:32:09 -08:00
Niko Matsakis
a32498d846 Make ~fn non-copyable, make &fn copyable, split barefn/closure types,
correct handling of moves for struct-record update.

Part of #3678.  Fixes #2828, #3904, #4719.
2013-02-07 05:53:30 -08:00
Brendan Zabarauskas
17a14fe0e9 Merge branch 'incoming' of https://github.com/mozilla/rust into incoming 2013-02-07 22:55:23 +11:00
Brendan Zabarauskas
e4c7d8ec87 Add type parameter for epsilon value 2013-02-07 22:54:52 +11:00
Matthew McPherrin
64fedfbc4e Fix sample program to compile in modern rust 2013-02-06 23:42:55 -05:00
Brendan Zabarauskas
b081f59495 Convert fuzzy_epsilon constant to upper case and make public 2013-02-07 10:25:41 +11:00
Daniel Micay
dab2f2fac0 remove old snapshot workaround from smallintmap 2013-02-06 17:37:56 -05:00
Daniel Micay
bdfb930f34 treemap: make map_next and set_next public 2013-02-06 17:37:56 -05:00
Daniel Micay
1694168783 update treemap FIXME 2013-02-06 17:37:56 -05:00
Daniel Micay
37e998696f get rid of implicit vec copies in treemap iterator
Each call to next() was doing a copy rather than a move. There's
currently no way for this to be a method that uses &mut self, so it has
to be a free function. Closes #4763.
2013-02-06 17:37:56 -05:00
Daniel Micay
5b6c26b4e4 treemap: get rid of some implicit vector copies 2013-02-06 17:37:56 -05:00
Daniel Micay
b91a51daca remove issue #3148 workarounds (no longer needed) 2013-02-06 17:37:56 -05:00
Patrick Walton
801f3225b2 oldmap: use &K instead of K in find and get
This reverts commit a4250a96fd.

This is not the cause of the nonexhaustive-match failure.
2013-02-05 19:41:45 -08:00
Graydon Hoare
a4250a96fd Revert "oldmap: use &K instead of K in find and get"
This reverts commit 8e643525d4.
2013-02-05 14:30:53 -08:00
Tim Chevalier
33e2c979ce Merge branch 'incoming' into removing 2013-02-05 10:33:35 -08:00
Tim Chevalier
2dcb3ed745 Merge 2013-02-05 10:33:28 -08:00
bors
f1b05ece93 auto merge of #4796 : catamorphism/rust/derecord_std, r=catamorphism
See #4665
2013-02-05 07:04:15 -08:00
bors
80cd485b49 auto merge of #4784 : alexcrichton/rust/bitv-clear-fix, r=graydon
I think that the inversion of `op(&mut w)` may have just been a mistake?
2013-02-04 22:39:53 -08:00
Alex Crichton
406a73fde2 Fix the each_storage() iterator on big bit vectors 2013-02-04 22:59:33 -05:00
bors
bffe3088c7 auto merge of pull req #4777 from thestinger/rust, r=graydon 2013-02-04 17:24:40 -08:00
Tim Chevalier
73a7672b8d std: Stamp out structural records
See #4665
2013-02-04 16:48:52 -08:00
Brian Anderson
e08a805b30 Merge remote-tracking branch 'bstrie/rimov' into incoming
Conflicts:
	src/libsyntax/parse/parser.rs
	src/test/bench/graph500-bfs.rs
	src/test/bench/sudoku.rs
	src/test/run-pass/borrowck-mut-vec-as-imm-slice.rs
	src/test/run-pass/empty-mutable-vec.rs
	src/test/run-pass/foreach-nested.rs
	src/test/run-pass/swap-2.rs
2013-02-04 11:58:30 -08:00
Erick Tryzelaar
9adfa59d8e core: convert ToStr::to_str to take explicit &self 2013-02-03 20:47:26 -08:00
Daniel Micay
8e643525d4 oldmap: use &K instead of K in find and get 2013-02-03 23:30:56 -05:00
Brian Anderson
3b396d17d6 Merge remote-tracking branch 'thestinger/old_map' into incoming
Conflicts:
	src/test/bench/core-map.rs
2013-02-03 17:56:49 -08:00
Marvin Löbel
af4972f3ce Fixed fmt!, tests, doc-tests. 2013-02-03 15:37:25 -08:00
Marvin Löbel
a612e49a21 Converted the floating point types to the new string conversion functions.
Also fixed all conflicting calls of the old functions in the rest of the codebase.

The set of string conversion functions for each float type now consists of those items:
- to_str(), converts to number in base 10
- to_str_hex(), converts to number in base 16
- to_str_radix(), converts to number in given radix
- to_str_exact(), converts to number in base 10 with a exact number of trailing digits
- to_str_digits(), converts to number in base 10 with a maximum number of trailing digits
- implementations for to_str::ToStr and num::ToStrRadix
- from_str(), parses a string as number in base 10 including decimal exponent and special values
- from_str_hex(), parses a string as a number in base 16 including binary exponent and special values
- from_str_radix(), parses a string as a number in a given base excluding any exponent and special values
- implementations for from_str::FromStr and num::FromStrRadix
2013-02-03 15:37:24 -08:00
Marvin Löbel
7113fd150a Fixed tests still using old integer to_str
Fixed integer tests
2013-02-03 15:37:24 -08:00
Marvin Löbel
eb19462104 Converted libcore/uint-template.rs to the new string functions.
- Moved ToStr implementation of unsigned integers to uint-template.rs.
- Marked the `str()` function as deprecated.
- Forwarded all conversion functions to `core::num::to_str_common()`
  and `core::num::from_str_common()`.
- Fixed most places in the codebase where `to_str()` is being used.
- Added uint-template to_str and from_str overflow tests.
2013-02-03 15:37:24 -08:00
Daniel Micay
4fd9264875 oldmap: &K instead of K for the remove parameter 2013-02-03 18:20:59 -05:00
Daniel Micay
119c78073b oldmap: start conversion to explicit self 2013-02-03 15:55:11 -05:00
Daniel Micay
81b4f36d49 oldmap: remove legacy each method 2013-02-03 15:55:11 -05:00
Daniel Micay
2e496818a5 oldmap: get rid of the legacy each_key method 2013-02-03 15:55:10 -05:00
Daniel Micay
88d9d417a1 oldmap: remove the legacy each_value method 2013-02-03 15:55:10 -05:00
Daniel Micay
643479f2e5 oldmap: implement core::container::Mutable 2013-02-03 15:55:10 -05:00
Daniel Micay
1b4eb145f9 oldmap: implement core::container::Container 2013-02-03 15:55:10 -05:00
Daniel Micay
f4a27b2c7d oldmap: get rid of the legacy contains_key method 2013-02-03 15:55:10 -05:00
Daniel Micay
319eeb1c79 rename map -> oldmap and mark it as deprecated
LinearMap is quite a bit faster, and is fully owned/sendable without
requiring copies. The older std::map also doesn't use explicit self and
relies on mutable fields.
2013-02-03 15:55:10 -05:00
Daniel Micay
df31373406 rm commented out std::map code from json module
it was replaced by LinearMap
2013-02-03 15:55:09 -05:00
Daniel Micay
ed45354a95 remove old StdMap trait
this has been replaced by core::container::Map
2013-02-03 15:55:09 -05:00
Nick Desaulniers
6fb4239bb3 Replace most invocations of fail keyword with die! macro 2013-01-31 22:25:12 -08:00
Daniel Micay
74b317ddc2 modernize smallintmap
* switch to explicit self
* get rid of the @ box
* replace DVec with ~[] (to get rid of the mutable field)
* implement the new container::Map trait
2013-01-31 23:22:51 -05:00
Daniel Micay
348d770fed copy oldsmallintmap.rs to smallintmap.rs 2013-01-31 23:13:56 -05:00
Daniel Micay
70855f5a07 move smallintmap to oldsmallintmap 2013-01-31 23:13:56 -05:00
Daniel Micay
9ba7114515 implement container::Mutable for SmallIntMap 2013-01-31 23:13:56 -05:00
Daniel Micay
aac91267e3 clean up SmallIntMap tests a bit 2013-01-31 23:13:56 -05:00
Daniel Micay
1057eea7ac drop the StdMap implementation from SmallIntMap 2013-01-31 23:13:55 -05:00
Daniel Micay
274e75cd82 implement container::Container for SmallIntMap 2013-01-31 23:13:55 -05:00
Nick Desaulniers
aee7929469 Replace most invocations of fail keyword with die! macro 2013-01-31 20:12:49 -08:00
Tim Chevalier
793f20ad32 std: remove transitional code 2013-01-31 19:35:57 -08:00
Niko Matsakis
0682ad0eb9 Finalize moves-based-on-type implementation.
Changes:

- Refactor move mode computation
- Removes move mode arguments, unary move, capture clauses
  (though they still parse for backwards compatibility)
- Simplify how moves are handled in trans
- Fix a number of illegal copies that cropped up
- Workaround for bug involving def-ids in params
  (see details below)

Future work (I'll open bugs for these...):

- Improve error messages for moves that are due
  to bindings
- Add support for moving owned content like a.b.c
  to borrow check, test in trans (but I think it'll
  "just work")
- Proper fix for def-ids in params

Def ids in params:

Move captures into a map instead of recomputing.

This is a workaround for a larger bug having to do with the def-ids associated
with ty_params, which are not always properly preserved when inlining.  I am
not sure of my preferred fix for the larger bug yet.  This current fix removes
the only code in trans that I know of which relies on ty_param def-ids, but
feels fragile.
2013-01-31 12:09:00 -08:00
Ben Striegel
df36bfa758 Repair RIMOV damage to libstd tests 2013-01-30 23:21:57 -05:00
Ben Striegel
dafd759b20 Repair RIMOV damage to libstd 2013-01-30 23:21:16 -05:00
Ben Striegel
0336a8633f RIMOV, round 10
find ./ -type f -name "*.rs" -exec sed -i "s/~\[mut /~\[/g" {} \;
2013-01-30 23:19:08 -05:00
Ben Striegel
3e95a13577 RIMOV, round 8
find ./ -type f -name "*.rs" -exec sed -i "s/  \([a-zA-Z_]\+\): ~\[mut /
mut \1: ~\[/g" {} \;
2013-01-30 23:19:08 -05:00
Ben Striegel
b4f47eca2a RIMOV, round 7
find ./ -type f -name "*.rs" -exec sed -i "s/ mut \([a-zA-Z_]\+\):
~\[mut / mut \1: ~\[/g" {} \;
2013-01-30 23:18:08 -05:00
Ben Striegel
f08af9a7a5 RIMOV, round 5
find ./ -type f -name "*.rs" -exec sed -i "s/\&\[mut /\&mut \[/g" {} \;
2013-01-30 23:18:08 -05:00
Ben Striegel
12e8151fb0 RIMOV, round 4
find ./ -type f -name "*.rs" -exec sed -i "s/let mut \(.*\)\[mut[
]\?/let mut \1\[/g" {} \;
2013-01-30 23:16:56 -05:00
Ben Striegel
5577ce635f RIMOV, round 3
find ./ -type f -name "*.rs" -exec sed -i "s/let \(.*\)\[mut[ ]\?/let
mut \1\[/g" {} \;
2013-01-30 23:16:56 -05:00
Patrick Walton
366812a5c3 librustc: Change self as a type to Self everywhere. r=brson 2013-01-30 19:52:45 -08:00
Graydon Hoare
4030aaff20 rustc: make integral type inference transactional, close #3211, close #4401, close #3398. 2013-01-30 16:21:19 -08:00
Tim Chevalier
b927e48a26 Merge pull request #4682 from thestinger/treemap
Set trait improvements + minor treemap cleanup
2013-01-29 20:09:15 -08:00
Brian Anderson
da4b376897 std: Stop using oldcomm 2013-01-29 19:54:55 -08:00
Tim Chevalier
0aef28dd6d De-capitalize "note" to get rid of spurious tidy warnings 2013-01-29 19:26:55 -08:00
Daniel Micay
6b08683e15 add intersection and union to the Set trait 2013-01-29 22:24:00 -05:00
Daniel Micay
99eb4ddddd add difference and symmetric_difference to Set 2013-01-29 21:59:58 -05:00
Daniel Micay
42cafcee2c add is_disjoint to the Set trait 2013-01-29 21:30:55 -05:00
Daniel Micay
bfa9c9a00f add is_subset and is_superset to the Set trait 2013-01-29 21:30:55 -05:00
Daniel Micay
456af7a79d update comments documenting issue #4492 workaround 2013-01-29 21:30:55 -05:00
Daniel Micay
a388e2c1a4 treemap: rm a bit of redundant code 2013-01-29 21:30:55 -05:00
Tim Chevalier
a80a65b3b7 Merge pull request #4676 from thestinger/fuzzy
fix FuzzyEq
2013-01-29 13:58:39 -08:00
Daniel Micay
1aa9fdff56 fix FuzzyEq 2013-01-29 16:54:55 -05:00
Tim Chevalier
66b07f1e5d Fix licenseck to allow 2012-2013 as the year range 2013-01-29 13:48:40 -08:00
Tim Chevalier
5e77d55326 Merge pull request #4664 from thestinger/fuzzy
FuzzyEq improvements
2013-01-29 13:36:43 -08:00
Daniel Micay
e0728d41f2 implement fuzzy_eq with fuzzy_eq_eps 2013-01-29 15:35:26 -05:00
Patrick Walton
f1ddb2a32c libstd: De-export libstd. rs=deexport 2013-01-29 12:06:09 -08:00
Patrick Walton
226cd68f13 librustc: De-implicit-self the visitor. r=graydon 2013-01-29 10:43:12 -08:00
Patrick Walton
6ce74460e6 librustc: Disallow trait bounds in types, enumerations, and structure definitions. r=tjc 2013-01-29 10:42:58 -08:00
Patrick Walton
eb4d39e1fe libstd: Remove "dual impls" from the language and enforce coherence rules. r=brson
"Dual impls" are impls that are both type implementations and trait
implementations. They can lead to ambiguity and so this patch removes them
from the language.

This also enforces coherence rules. Without this patch, records can implement
traits not defined in the current crate. This patch fixes this, and updates
all of rustc to adhere to the new enforcement. Most of this patch is fixing
rustc to obey the coherence rules, which involves converting a bunch of records
to structs.
2013-01-29 10:42:45 -08:00
Tim Chevalier
31d78b2f07 Add #[legacy_records] crate attribute
In rustc, rustdoc, rusti, syntax, and std.
2013-01-28 19:41:56 -08:00
Daniel Micay
fce6446e7e add a FuzzyEq method that accepts an epsilon value 2013-01-28 21:25:58 -05:00
Tim Chevalier
3a6849f36b Revert "Revert "Merge pull request #4633 from thestinger/treemap""
This reverts commit d73077f82d.
2013-01-28 17:20:29 -08:00
Daniel Micay
abb79cb52d update FuzzyEq to explicit self 2013-01-28 19:28:40 -05:00
Daniel Micay
52975202af fix std::cmp docstring 2013-01-28 19:28:23 -05:00
Brian Anderson
d9170e14b1 Tidy 2013-01-28 14:41:20 -08:00
Michael Neumann
1ecdf3abc1 Greatly improve performance for TcpSocketBuf.read
For every call to the read() function the internal buffer was copied
into a new buffer (minus the bytes copied into the result buffer). When
the internal buffer is large enough, this severely affects performance,
especially when read_line() is used which calls read_byte() (which calls
read()) for each read byte.

For line oriented I/O this wasn't all that bad, because the internal
buffers usually never were very big. The effect is much more visible
once the buffer grows larger.

Now we always first look into the internal buffer and copy as many bytes
as possible (and desired) into the result buffer. If we need more, we
call the socket read function and use the result as the new internal
buffer, then continue to copy from the (new) internal buffer, and so on.
2013-01-28 14:40:11 -08:00
Michael Neumann
0c3ef3cc6b Convert log(debug, ...) to debug!(...) 2013-01-28 14:40:11 -08:00
Brian Anderson
2a48aef0a8 Merge remote-tracking branch 'thestinger/hashmap' into deriving 2013-01-28 14:28:59 -08:00
Brian Anderson
c75cc0aa10 Merge remote-tracking branch 'codeblack08/treemap-ord' into deriving 2013-01-28 14:15:58 -08:00
Daniel Micay
8eaf0737b7 get rid of LinearMap's find_copy method 2013-01-28 16:06:09 -05:00
Niko Matsakis
08bc19cbcd Remove bounds from type decl of smallintmap
r=brson
2013-01-28 10:01:55 -08:00
Cody Schroeder
6a4d1855bf std: implement lexicographical Ord for TreeMap/TreeSet 2013-01-26 16:39:17 -08:00
Brian Anderson
83ca034d2e Merge remote-tracking branch 'brson/nocommupstream2' 2013-01-26 14:57:58 -08:00
Tyler Bindon
edc94f5c23 Fix Option camel case in xfailed/ignored tests 2013-01-25 19:42:23 -07:00
Tyler Bindon
3a5d2cdbf3 Fix Option camel case in comments 2013-01-25 19:42:23 -07:00
Brian Anderson
1ef83945c1 Merge remote-tracking branch 'brson/nocommupstream'
Conflicts:
	src/libcore/private.rs
	src/libcore/task/mod.rs
	src/libcore/task/spawn.rs
	src/libstd/net_tcp.rs
	src/libstd/uv_global_loop.rs
	src/libstd/uv_iotask.rs
2013-01-25 18:06:30 -08:00
Cody Schroeder
265b33c239 Declare std::arc::unwrap to be pub 2013-01-25 17:25:41 -08:00
Graydon Hoare
10eb620537 register snapshots 2013-01-25 15:06:07 -08:00
Tim Chevalier
d73077f82d Revert "Merge pull request #4633 from thestinger/treemap"
I was too hasty in merging -- this needs a snapshot.

This reverts commit 4a7e1ab374, reversing
changes made to e447521c1c.
2013-01-25 13:39:04 -08:00
Tim Chevalier
85a34c2898 Merge pull request #4625 from thestinger/container
more little container improvements
2013-01-25 11:57:51 -08:00
Daniel Micay
ca8f09a39e use mut function argument syntax in priority_queue 2013-01-25 13:28:43 -05:00
Daniel Micay
aff3db26aa use mutable function argument syntax in treemap 2013-01-25 10:55:18 -05:00
Brian Anderson
19aa88cd64 Stop using oldcomm in uv_global_loop tests 2013-01-24 23:55:11 -08:00
Tim Chevalier
e447521c1c std: Mop up Mac/Linux breakage 2013-01-24 22:02:09 -08:00
Daniel Micay
e4337a9def remove remaining is_not_empty functions/methods 2013-01-24 23:24:57 -05:00
Tim Chevalier
d191e89d9e std: Fix broken Windows function 2013-01-24 20:12:07 -08:00
Daniel Micay
d95c9cbe38 replace ConstVector trait with the Container trait 2013-01-24 23:02:44 -05:00
Tim Chevalier
9898485d4f Merge pull request #4613 from erickt/incoming
convert most of libcore and libstd to structs, work around tzset race
2013-01-24 17:24:45 -08:00
Tim Chevalier
f19e16881e syntax/rustc: Less copy 2013-01-24 16:45:20 -08:00
Erick Tryzelaar
3c24419c19 time tests are racing on tzset, so merge the tests together.
This attempts to fix issue #3327.
2013-01-24 16:24:31 -08:00
Erick Tryzelaar
e84576b888 convert most of libstd over to structs 2013-01-24 16:24:31 -08:00
Patrick Walton
ad25e208ee librustc: Allow &mut to be loaned; allow self to be loaned; make &mut loanable to &. r=nmatsakis 2013-01-24 13:52:22 -08:00
Patrick Walton
bbbb80559c librustc: Disallow &mut loans from overlapping with any other loans 2013-01-24 13:52:21 -08:00
Patrick Walton
163b97b7bb librustc: Make C functions unsafe 2013-01-24 13:52:21 -08:00
Tim Chevalier
e43cff6657 Merge pull request #4616 from thestinger/priority_queue
remove is_not_empty method from PriorityQueue
2013-01-24 12:16:03 -08:00
Daniel Micay
d912d53ea9 remove is_not_empty method from PriorityQueue 2013-01-24 14:46:09 -05:00
Daniel Micay
acde90dc1c remove old LinearMap constructor 2013-01-24 13:36:04 -05:00
Tim Chevalier
a202dcccca Merge pull request #4594 from thestinger/map
more work on the map trait and TreeMap/LinearMap
2013-01-23 20:10:47 -08:00
Daniel Micay
bba5520d62 fix tests 2013-01-23 21:46:33 -05:00
Brian Anderson
a3e087cefa core: Remove private::chan_from_global_ptr. #3915 2013-01-23 17:35:34 -08:00
Brian Anderson
b9608fe423 std: Convert uv_global_loop to use pipes 2013-01-23 17:35:34 -08:00
Daniel Micay
7f0fa143bc switch LinearMap to current constructor convention 2013-01-23 18:01:24 -05:00
Patrick Walton
54b2cad8b3 libsyntax: Remove fn() unsafe { ... }. r=graydon 2013-01-23 14:41:08 -08:00
Daniel Micay
591eefd740 improve hashmap/treemap documentation 2013-01-23 16:47:27 -05:00
Daniel Micay
45c9f6a099 add find method to the core::container::Map trait 2013-01-23 14:25:06 -05:00
Daniel Micay
ee0a8c68ab rename hashmap find_ref/get_ref -> find/get 2013-01-23 14:25:06 -05:00
Daniel Micay
203fcbd0f3 rename hashmap find/get -> find_copy/get_copy 2013-01-23 14:25:06 -05:00
Daniel Micay
bc96fe9c49 get rid of the std::map::Map LinearMap impl
This legacy trait needs to be dropped in order to migrate to
core::container::Map, which doesn't require @ and Copy, and will make
proper use of borrowed pointers.
2013-01-23 14:25:06 -05:00
Daniel Micay
b7ef28c33a rename send_map to hashmap
This makes the module much more discoverable, and is in line with the
'treemap' naming.
2013-01-23 14:25:01 -05:00
Tim Chevalier
995ccc0d82 Merge pull request #4596 from Trinick/tomutrename
core: Rename to_mut and from_mut to cast_to_mut and cast_from_mut
2013-01-23 10:56:08 -08:00
Trinick
9dc8e96c5f core: Rename to_mut and from_mut to cast_to_mut and cast_from_mut 2013-01-23 10:09:45 +00:00
Tim Chevalier
dfa97c21a5 Merge pull request #4586 from thestinger/treemap
drop is_not_empty from TreeSet/TreeMap
2013-01-22 23:08:18 -08:00
Graydon Hoare
93e969e356 std: un-ignore strptime test; fix bug introduced by 1a226f instead. 2013-01-22 21:42:24 -08:00
Daniel Micay
7eb8642aed drop is_not_empty from TreeSet/TreeMap 2013-01-22 22:36:29 -05:00
Tim Chevalier
e31ebeadc1 std: Ignore time::tests::test_strptime, it's failing for some reason
I'll file an issue.
2013-01-22 19:09:21 -08:00
Graydon Hoare
499f00de1d std: various hacking on workcache. 2013-01-22 17:55:36 -08:00
Tim Chevalier
1a226f5807 Merge pull request #4466 from ScriptDevil/master
Range checking and miscellaneous fixes tin time library
2013-01-22 16:10:48 -08:00
Tim Chevalier
e02449c41d Merge pull request #4571 from thestinger/container
more work on container traits
2013-01-22 10:57:26 -08:00
Daniel Micay
6f4d86ed90 add a base Container trait 2013-01-22 08:10:08 -05:00
Daniel Micay
d635a6e506 add a container::Map trait 2013-01-22 08:10:08 -05:00
Daniel Micay
ffb9049274 add a Mutable container trait with clear 2013-01-22 08:09:53 -05:00
Chris Peterson
f5a3ce687d Add Timespec comment and assert about negative nsec 2013-01-21 20:51:58 -08:00
Daniel Micay
66e50892c1 style fix 2013-01-21 21:27:21 -05:00
Tim Chevalier
0a8c039135 Merge pull request #4506 from thestinger/mkdtemp
clean up tempfile module and rm FIXME
2013-01-20 14:18:00 -08:00
Tim Chevalier
fa4f4fa673 Merge pull request #4519 from cpeterso/impl-timespec-ord
Implement Ord trait for Timespec
2013-01-20 14:15:29 -08:00
Daniel Micay
13d07ad0a6 add a Set trait and implement it for TreeSet 2013-01-20 14:58:19 -05:00
Alex Crichton
95d25ca47c Fix the difference method on bit vectors 2013-01-19 20:17:12 -05:00
Brian Anderson
6b6acde972 Add a license check to tidy. #4018 2013-01-17 23:28:42 -08:00
Daniel Micay
c7abdd3847 re-borrow in heir_swap (fixes compile) 2013-01-17 16:54:12 -08:00
Daniel Micay
f7d9485331 indentation fix 2013-01-17 16:54:12 -08:00
Daniel Micay
3fe6faace8 make is_superset/is_subset O(n+m) instead of O(n*log(m)) 2013-01-17 16:54:12 -08:00
Daniel Micay
4f92d8fb52 make intersection O(n+m) instead of O(n*log(m)) 2013-01-17 16:54:12 -08:00
Daniel Micay
9fb49088b3 make is_disjoint O(n+m) instead of O(n*log(m)) 2013-01-17 16:54:12 -08:00
Daniel Micay
8935771377 cleanup 2013-01-17 16:54:12 -08:00
Daniel Micay
4b567dd067 add TreeSetIterator 2013-01-17 16:54:12 -08:00
Daniel Micay
2b17e2fc18 docstring/comment fixes 2013-01-17 16:54:11 -08:00
Daniel Micay
3df183e7ab fix bug in union implementation (missing return) 2013-01-17 16:54:11 -08:00
Daniel Micay
a73f4b1baa implement symmetric_difference 2013-01-17 16:54:11 -08:00
Daniel Micay
d44084e100 implement set union 2013-01-17 16:54:11 -08:00
Daniel Micay
b8caba2fce make TreeSet tests a bit more paranoid 2013-01-17 16:54:11 -08:00
Daniel Micay
1aaeda1e1e add scaffolding for symmetric_difference/union 2013-01-17 16:54:11 -08:00
Daniel Micay
90b111f4bf range search would be nice 2013-01-17 16:54:11 -08:00
Daniel Micay
670748e383 implement set difference 2013-01-17 16:54:11 -08:00
Daniel Micay
3b3ecc9ffc fix API of union 2013-01-17 16:54:11 -08:00
Daniel Micay
dc27759bd1 remove 'TODO' from the list of future improvements 2013-01-17 16:54:11 -08:00
Daniel Micay
d001171435 rm extra newline 2013-01-17 16:54:11 -08:00
Daniel Micay
cae273abc0 clean up equality code a bit 2013-01-17 16:54:11 -08:00
Daniel Micay
1e5c553b7c make Eq implementation O(n) 2013-01-17 16:54:11 -08:00
Daniel Micay
9cc9a7582c add a lazy forward iterator to TreeMap 2013-01-17 16:54:11 -08:00
Daniel Micay
7f754764d6 replace treemap with a balanced tree 2013-01-17 16:54:11 -08:00
Patrick Walton
f405e41d7a librustc: Implement write guards for borrowing @mut to & or &mut. r=nmatsakis 2013-01-17 11:50:20 -08:00
Chris Peterson
ed17ce1dda Implement Ord trait for Timespec 2013-01-16 23:37:21 -08:00
Daniel Micay
46880337f4 clean up tempfile module and rm FIXME
This removes the FIXME suggesting that mkdtemp should rely on the
default umask, because that would make it unusable for making a secure
work area in a world writable directory (have to assume that other users
have created files, directories, hard links, etc. in your directory).
The POSIX mkdtemp function creates a directory with 700 permissions to
avoid this problem.
2013-01-16 06:19:41 -05:00
Nick Desaulniers
bb7d7204e2 Swap return value order in pipes::oneshot Issue #4496 2013-01-15 17:18:00 -08:00
Brian Anderson
f1d0478002 Add cfg attrs to handle auto_encode transition 2013-01-14 13:17:20 -08:00
Brian Anderson
fc582bcfce Merge remote-tracking branch 'mneumann/f-serialize' 2013-01-14 12:56:31 -08:00
Ashok Gautham
e69d491aea Tidied up long lines 2013-01-14 10:01:09 +05:30
kyeongwoon
987f824f23 Support ARM and Android
Conflicts:
	src/libcore/os.rs
	src/librustc/back/link.rs
	src/librustc/driver/driver.rs
	src/librustc/metadata/loader.rs
	src/librustc/middle/trans/base.rs
2013-01-13 16:43:39 -08:00
Tim Chevalier
26334b64a2 Merge pull request #4411 from wting/4203_rename_memcpy
Rename memcpy, memmove, memset
2013-01-13 14:58:24 -08:00
Tim Chevalier
9bb399a6d6 Merge pull request #4444 from JensNockert/pub-semaphore
Make std::sync::semaphore() public
2013-01-13 14:56:14 -08:00
Ashok Gautham
a157f1d5bf Add range checking in the time library
This was requested in Issue #2350. New function match_digits_in_range
added and used instead of match_digits wherever needed.
2013-01-13 17:18:10 +05:30
Ashok Gautham
406d2b3bfe Fix errors in how parsed time values were used
%u flag takes a value in the range of 1-7. However value needs to be
stored in tm.tm_wday between 0 and 6.
%y takes a two-digit year value. Subtracting 1900_i32 from it is not
needed.
2013-01-13 17:18:10 +05:30
Ashok Gautham
ca9358388a Fix incorrect error messages in the time library 2013-01-13 17:18:10 +05:30
Patrick Walton
802d475190 libstd: "target_os = win32", not "target_os = windows". rs=bustage 2013-01-12 10:11:44 -08:00
Tim Chevalier
0bc730f9b0 Merge pull request #4443 from wting/4386_add_privs
Adds priv qualifiers where they have been commented out before implementation.
2013-01-11 20:11:57 -08:00
Patrick Walton
063a7ad481 libstd: Ignore failing test on Windows 2013-01-11 15:47:11 -08:00
Tim Chevalier
4c441e95d6 Comment out test_decode_form_urlencoded again. Filed issue 4449. rs=breakage 2013-01-11 13:40:49 -08:00
Patrick Walton
9b3452e10a libstd: Fix std test. rs=busted 2013-01-11 09:22:23 -08:00
Jens Nockert
6df643981b Make std::sync::semaphore() public 2013-01-11 12:51:16 +01:00
William Ting
9fd970ad13 Adds priv qualifiers where they have been commented out before implementation.
Updates #4386.
2013-01-11 02:30:10 -06:00
Patrick Walton
ca71c6ec5b librustc: Make all external functions unsafe. r=tjc 2013-01-10 21:24:08 -08:00
Tim Chevalier
0274292bed std: Address XXXes in flatpipes 2013-01-10 20:10:10 -08:00
Tim Chevalier
3e7da96fd2 std: Fix pattern match on reference, address an XXX 2013-01-10 20:10:10 -08:00
Tim Chevalier
30c308b952 std: Fix net_url test that was commented out 2013-01-10 20:10:09 -08:00
Tim Chevalier
0ce0f83a38 std: Fix test that was commented out 2013-01-10 20:10:09 -08:00
Tim Chevalier
e1c52a4a9f core: Change XXXs into proper FIXMEs with issue numbers 2013-01-10 20:10:09 -08:00
gifnksm
360982f24f Fix: BigInt tests fail on 32-bit platforms 2013-01-10 22:47:55 +09:00
William Ting
5cfde77bca Rename memcpy, memmove, memset to prevent any confusion with the C equivalents.
Closes #4203.
2013-01-10 01:24:41 -06:00
Graydon Hoare
1f03ba134f std: fix net::tcp::test fallout from 2db3abd harder 2013-01-09 19:12:51 -08:00
Niko Matsakis
2b92962aa2 A collection of refactorings that I found it hard/tiresome to divide:
- Make `extern fn()` assignable to any closure type, rather than
  a subtype.
- Remove unused int_ty_set and float_ty_set
- Refactor variable unification and make it more DRY
- Do fn sub/lub/glb on the level of fn_sig
- Rename infer::to_str::ToStr to infer::to_str::InferStr
- Capitalize names of various types
- Correct hashing of FnMeta
- Convert various records-of-fns into structs-of-fns.  This is both
  eliminating use of deprecated features and more forwards compatible
  with fn reform.

r=pcwalton
2013-01-09 14:59:07 -08:00
Graydon Hoare
aebbd6bb46 std: fix net::tcp::test fallout from 2db3abd 2013-01-09 09:26:59 -08:00
Patrick Walton
2db3abddcd librustc: Make unqualified identifier searches terminate at the nearest module scope. r=tjc 2013-01-08 22:02:35 -08:00
Brian Anderson
3a5b641720 Only ignore failing bigint tests on 32-bit platforms 2013-01-08 19:46:03 -08:00
Patrick Walton
44ab00ee37 Revert "librustc: Make unqualified identifier searches terminate at the nearest module scope. r=tjc"
This reverts commit a8d37af247.
2013-01-08 19:29:16 -08:00
Patrick Walton
a8d37af247 librustc: Make unqualified identifier searches terminate at the nearest module scope. r=tjc 2013-01-08 19:27:57 -08:00
Brian Anderson
fd872284bb Ignore some failing bigint tests 2013-01-08 17:47:41 -08:00
Brian Anderson
2d9b1fee8f Merge remote-tracking branch 'gifnksm/bigint' into kind-names 2013-01-08 11:28:56 -08:00
Tim Chevalier
0d4cf3ed72 remove apparently-superfluous extra parens from types 2013-01-02 15:33:13 -08:00
Peter Williams
ae69c2fc7d std: Constify the bytes sent to Sha1::input
We are of course never going to modify the data, and this change allows us to
accept data from to_bytes::IterBytes types.
2013-01-02 15:33:13 -08:00
Brian Anderson
587ce4894e Merge pull request #4324 from steveklabnik/std_net
Add some extra description for std::net
2012-12-31 22:04:36 -08:00
Steve Klabnik
9433284a11 Add some extra description for std::net 2013-01-01 01:02:48 -05:00
Patrick Walton
10333a5f3d libstd: Comment out mysteriously failing net-url test. rs=busted 2012-12-29 21:43:18 -08:00
Ben Alpert
5910773c2e doc: Rename mention of insert_or_update_with_key
As far as I can tell, these docs were meant to refer to update_with_key.
2012-12-28 14:04:43 -08:00
Patrick Walton
13879d8e9f libstd: Fix tests. rs=bustage 2012-12-28 12:48:27 -08:00
Patrick Walton
fa5ee934ed libstd: Fix a bunch of resolve errors in tests. rs=fire 2012-12-27 18:24:18 -08:00
Patrick Walton
57c599914a librustc: Terminate name searches at the nearest module scope for paths that contain at least two components. r=graydon 2012-12-27 10:02:54 -08:00
Michael Neumann
2b6c456bf6 Enhance auto_encode to take number of struct fields
emit_struct and read_struct takes an additional len:uint parameter which tells
us how many fields the struct we are working on has.

This is required to implement an Encoder for the msgpack [1] serialization
format. To serialize a struct with msgpack you have to use arrays and the size
of the array has to be know before each of the elements are written out. JSON
as an example doesn't have this problem as it uses '[' and ']' delimiters for
arrays.

[1]: www.msgpack.org
2012-12-27 06:16:16 -06:00
gareth
fddc849d75 Convert core::io to use explicit self (for issue #4118 and issue #2004) 2012-12-24 18:29:02 -08:00
Chris Peterson
8060bd846a std: Mark some functions as pure 2012-12-24 18:29:02 -08:00
Graydon Hoare
329316ce15 bump 0.5 => 0.6, redirect some URLs in docs. 2012-12-24 18:29:01 -08:00
Erick Tryzelaar
b6f0f300d5 std: modernize net_url
This switches over to using structs and send_maps for
query string parsing.
2012-12-24 18:29:01 -08:00
Erick Tryzelaar
03b5fcabbd Switch chain calls to use Option::chain method 2012-12-24 18:29:01 -08:00
Tim Chevalier
66dc4898c7 Merge pull request #4278 from cpeterso/incoming-pure-functions
Mark some more core and std functions as pure
2012-12-24 11:33:22 -08:00
gareth
feff3a9c6c Convert core::io to use explicit self (for issue #4118 and issue #2004) 2012-12-24 18:52:53 +00:00
Chris Peterson
ffaa477368 std: Mark some functions as pure 2012-12-23 14:38:01 -08:00
Tim Chevalier
197a1f9cfe Merge pull request #4243 from erickt/incoming
Fix a bug in Result::unwrap_err (and minor cleanup)
2012-12-23 13:49:32 -08:00
Tim Chevalier
b1b0c297a4 Merge pull request #4249 from graydon/0.6-bump
bump 0.5 => 0.6, redirect some URLs in docs.
2012-12-23 13:47:11 -08:00
Tim Chevalier
79a68ef212 Merge pull request #4251 from erickt/url
std: modernize net_url
2012-12-23 13:45:31 -08:00
gifnksm
68c689f1ca Convert @[BigDigit] to ~[BigDigit] 2012-12-22 15:14:26 +09:00
gifnksm
54b548795f Impl Zero, One of BigInt, BigUint 2012-12-22 15:14:26 +09:00
gifnksm
0e83d70cc1 Convert std::bigint to explicit self. 2012-12-22 15:14:26 +09:00
gifnksm
c6a8778ef7 Move BigUint and BigDIgit to std::bigint. 2012-12-22 15:14:26 +09:00
gifnksm
ccc1f8d5e8 Implement BigInt and BigUint. 2012-12-22 15:14:26 +09:00
Graydon Hoare
dbd36111fe bump 0.5 => 0.6, redirect some URLs in docs. 2012-12-21 15:35:49 -08:00
Erick Tryzelaar
d6faf23ca3 std: modernize net_url
This switches over to using structs and send_maps for
query string parsing.
2012-12-21 07:47:32 -08:00
Brian Anderson
2fd8ebd03a Ignore some time tests 2012-12-20 21:39:11 -08:00
Erick Tryzelaar
beec519316 Switch chain calls to use Option::chain method 2012-12-20 21:16:02 -08:00
Erick Tryzelaar
76a2891feb Remove the cfg(stageN)-specific serialize code. 2012-12-20 12:52:53 -08:00
Erick Tryzelaar
b865b4b70d Fix a warning in the workcache test. 2012-12-19 18:16:20 -08:00
Erick Tryzelaar
c14105bb8a Remove serialize::traits submodule. 2012-12-19 18:16:20 -08:00
Erick Tryzelaar
9c673b246c Remove the old serialization code
Closes #3713.
2012-12-19 18:16:20 -08:00
Erick Tryzelaar
82a983de68 Remove superfluous parentheses. 2012-12-18 20:54:13 -08:00
Brian Anderson
97ddf3c7bd Stop resolving static methods at the module level. Closes #4179 2012-12-18 18:35:18 -08:00
Brian Anderson
5827f1caf6 Fix build breakage 2012-12-17 20:23:09 -08:00
Erick Tryzelaar
8650c6f683 Switch from serialization to std::serialize. (snapshot) 2012-12-17 20:00:36 -08:00
Brian Anderson
ec9305802b std: Add flatpipes 2012-12-17 18:46:42 -08:00
Brian Anderson
5bf7ba0773 Register snapshots 2012-12-17 16:44:27 -08:00
Brian Anderson
68998724c6 Revert "Register snapshots"
This reverts commit d6d12d90ff.
2012-12-17 16:26:44 -08:00
Brian Anderson
d6d12d90ff Register snapshots 2012-12-17 16:22:21 -08:00
Daniel Micay
f1e87733bd add an empty PriorityQueue constructor 2012-12-17 15:23:12 -08:00
Brian Anderson
161d289cc7 Long lines 2012-12-16 19:56:09 -08:00
Brian Anderson
8cbf817c2c Fix doc comment 2012-12-16 19:53:24 -08:00
Brian Anderson
60ef6095f2 Add priority_queue test for unique pointers 2012-12-16 19:53:14 -08:00
Brian Anderson
90bebe3522 Add various workaround attributes to priority_queue 2012-12-16 19:41:07 -08:00
Daniel Micay
ac695aa21a priority_queue: add docstring for from_vec 2012-12-16 19:27:06 -08:00
Daniel Micay
b3463ea657 priority_queue: replace copies with moves 2012-12-16 19:27:06 -08:00
Daniel Micay
6c433f22a1 priority_queue: clean up naming 2012-12-16 19:27:06 -08:00
Daniel Micay
ab75d3937d priority_queue: fix test compilation 2012-12-16 19:27:06 -08:00
Daniel Micay
04df723619 priority_queue: fix siftup/siftdown naming 2012-12-16 19:27:06 -08:00
Daniel Micay
7bd0d71554 priority_queue: avoid copy with top and maybe_top 2012-12-16 19:27:06 -08:00
Daniel Micay
e00c3b05e1 priority_queue: fix to_sorted_vec off-by-one error 2012-12-16 19:27:06 -08:00
Daniel Micay
8b13bf7530 priority_queue: replace some copies with swaps 2012-12-16 19:27:06 -08:00
Daniel Micay
285496bd55 priority_queue: make from_vec a static method 2012-12-16 19:27:05 -08:00
Daniel Micay
757a2afb6b priority_queue: make to_vec/to_sorted_vec methods 2012-12-16 19:27:05 -08:00
Daniel Micay
dd2b32be56 add priority queue implementation (binary heap) 2012-12-16 19:27:05 -08:00
Brian Anderson
e6d1b02359 Rename core::comm to core::oldcomm 2012-12-14 14:59:32 -08:00
Erick Tryzelaar
786c143a70 Begin renaming serialization to std::serialize. (snapshot) 2012-12-13 18:16:31 -08:00
Brian Anderson
77982112d3 Long lines 2012-12-13 16:17:32 -08:00
Brian Anderson
e7ef82dd70 Change some uses of static methods to use the trait path 2012-12-13 16:15:08 -08:00
Brian Anderson
d809e89c26 Replace some Eq impls with deriving_eq 2012-12-13 16:14:28 -08:00
Brian Anderson
742f354ffb std: Convert records to structs in getopts 2012-12-13 16:14:28 -08:00
Brian Anderson
ed4fac01b5 Rename Send trait to Owned 2012-12-13 15:52:50 -08:00
Brian Anderson
a277081ee4 Rename Owned trait to Durable 2012-12-13 15:52:50 -08:00
Patrick Walton
4c2e4c37ce librustc: Make use statements crate-relative by default. r=brson 2012-12-13 13:05:22 -08:00
Tim Chevalier
38bd694df1 Reverse the order of the results of pipes::stream
As per #3637.
2012-12-11 19:23:28 -08:00
Huon Wilson
76dc7818ea libstd: Implement read_managed_str for the JSON deserialiser.
The FIXME is an underlying issue (a core::at_str library) that this
doesn't address.
2012-12-11 16:04:58 -08:00
Graydon Hoare
a55ea48d2b libstd: refactor future, remove with(), remove ~ indirection.
Conflicts:

	src/libstd/future.rs
2012-12-11 15:56:47 -08:00
Graydon Hoare
3ee1adb7ec libstd: teach workcache to check freshness. 2012-12-11 15:55:08 -08:00
Graydon Hoare
12c32e944d Add license boilerplate to more files. 2012-12-10 17:32:58 -08:00
Brian Anderson
1b481017ac Minor cleanups to pipes and serialization 2012-12-10 15:42:34 -08:00
Brian Anderson
9723d3ac2f Remove transitional code 2012-12-09 17:59:21 -08:00
Tim Chevalier
7b37730598 Make short flags with a single-char arg work in getopts
This looks like a big patch, but it's mostly just modernization.
The real change is in the fn called `getopts`, the line
                       if arg_follows && j < curlen {

Minor bugfix, no review.

Closes #2822
2012-12-07 20:38:40 -08:00
Patrick Walton
98fdcb0b9d librustc: De-mode pattern bindings. r=nmatsakis 2012-12-07 19:34:57 -08:00
Tim Chevalier
7a365e4aa4 make bblum happy 2012-12-06 21:53:25 -08:00
Tim Chevalier
d2ad028a7c Rename std::ebml::Reader => std::ebml::reader, same for writer
Closes #4076
2012-12-06 16:14:54 -08:00
Patrick Walton
33c1e47c1b librustc: Implement moves based on type. r=nmatsakis 2012-12-04 15:38:04 -08:00
Patrick Walton
d1ebdbeb6c librustc: Implement explicit self for Add and Index; add a hack in the borrow checker to support this. r=nmatsakis 2012-12-04 14:51:31 -08:00
Graydon Hoare
00c856c0b1 Update license, add license boilerplate to most files. Remainder will follow. 2012-12-03 17:12:14 -08:00
Graydon Hoare
d783f4d7bb libs: Remove transitionary material on iter_bytes, add workcache to build. 2012-11-30 10:33:16 -08:00
Brian Anderson
3ed9fbd63c impls of traits cannot define methods on the anonymous trait 2012-11-29 22:07:49 -08:00
Patrick Walton
a0617eae68 librustc: Eliminate most expressions of the form a.b() that are not method calls. rs=refactoring 2012-11-29 17:51:56 -08:00
Patrick Walton
9e1c9be16f librustc: Make the Drop trait use explicit self 2012-11-29 11:06:15 -08:00
Brian Anderson
5a282ec26f core: Convert some records to structs 2012-11-28 21:50:09 -08:00
Brian Anderson
16f72df704 Merge remote-tracking branch 'erickt/time'
Conflicts:
	src/libstd/time.rs
2012-11-28 14:49:58 -08:00
Brian Anderson
fc06114ddf Merge remote-tracking branch 'brson/companion' into incoming
Conflicts:
	src/compiletest/compiletest.rs
	src/libcargo/cargo.rs
	src/libcore/core.rs
	src/librustc/rustc.rs
	src/librustdoc/rustdoc.rc
2012-11-28 13:17:33 -08:00
Brian Anderson
8179e268ef Register snapshots 2012-11-28 12:33:00 -08:00
Patrick Walton
669fbddc44 librustc: Add explicit self to IterBytes. r=nmatsakis 2012-11-28 11:36:04 -08:00
Graydon Hoare
082a88e42c Merge pull request #4032 from catamorphism/getopts
[libstd] getopts, now with fewer copies
2012-11-28 08:47:25 -08:00
Brian Anderson
b21e9d52de core: Add Clone trait 2012-11-27 11:08:19 -08:00
Erick Tryzelaar
cd6300e938 libstd: turn time::Tm and time::Timespec into structs
This avoids #4044 by not using the enum wrapper, and turning Tm_
directly into a struct. Along the way it modernizes the codebase
to eliminate no-implicit-copies warnings.
2012-11-26 22:22:22 -08:00
Jesse Jones
a18f0d413c Made Tm_ a struct instead of a record and added serialization support to Tm and Tm_.
Not entirely clear what the best way to do this is. Right now we persist the entire
struct which seems to be both portable and exactly round-trippable.
2012-11-26 21:49:29 -08:00
Brian Anderson
5c0206a1e4 Rename insert_with functions to update, update_with_key 2012-11-25 13:26:37 -08:00
Kevin Cantu
ff4075e553 Add improvements to insert_with_key
This commit adds a lower-level implementation of the generic
`insert_with_key` which I expect to be faster. Now insert could be
defined with insert_with_key, too, although I'm not sure we want to do that.

This also clarifies the tests a bit and adds an `insert_with` function.
2012-11-25 12:41:11 -08:00
Kevin Cantu
7b13ef7d50 Test insert_with_key... 2012-11-25 12:41:11 -08:00
Kevin Cantu
a343e435d5 Add an insert_with_key function to the Map trait 2012-11-25 12:41:11 -08:00
Tim Chevalier
77e5498868 Long lines 2012-11-24 13:59:21 -08:00
Tim Chevalier
ec0c029a7e Split EBML module into a reader and a writer module
Minor refactoring, no review.

Closes #2739
2012-11-24 13:40:00 -08:00
Tim Chevalier
f74fe894fc [libstd] getopts, now with fewer copies
Change the opt_ functions in getopts to take a reference to a
Matches, instead of taking a Matches by-value, as suggested in
2012-11-24 12:52:27 -08:00
Graydon Hoare
dc34fb9219 std: try to fix breakage. 2012-11-22 23:32:30 -08:00
Graydon Hoare
eeb584ccbd std: initial sketch of workcache, barely does anything. 2012-11-22 18:31:12 -08:00
Erick Tryzelaar
77ef4e7176 change json::Deserializer to take a json enum
This allows the deserializer to be used on an already
parsed json object.
2012-11-21 11:48:16 -08:00
Erick Tryzelaar
e1a552a628 libstd: fix warnings in sort 2012-11-20 16:39:30 -08:00
Erick Tryzelaar
9539724e8b Remove parentheses from closure argument types 2012-11-20 16:39:30 -08:00
Patrick Walton
318e534895 rustc: Implement explicit self for Eq and Ord. r=graydon 2012-11-19 15:33:11 -08:00
Brian Anderson
68c73dc5f2 Whitespace 2012-11-18 15:00:43 -08:00
Tim Chevalier
5e4ed709cb Merge pull request #3998 from jesse99/feature/getopts
Added support for options that take no arguments and may be repeated.
2012-11-18 13:56:57 -08:00
Jesse Jones
361aea94f2 Fixing warnings for long and blank lines 2012-11-18 13:25:26 -08:00
Jesse Jones
333d268b3e Made merge_sort pure 2012-11-18 13:25:26 -08:00
Jesse Jones
6d99a2f8a9 Made more stuff pure.
escape functions in char, io.with_str_reader, base64 and md5sum, cell.empty_cell
and is_empty.
2012-11-18 13:25:26 -08:00
Jesse Jones
15989ecb13 Made most of the URL functions pure.
This closes #3782.
2012-11-18 13:25:25 -08:00
Jesse Jones
2c0dab02ad Made the time to string functions pure as well as empty_tm.
This closes #3919.
2012-11-18 13:25:25 -08:00
Jesse Jones
c58951ea7d Replace TmMut with inherited mutability 2012-11-18 13:25:24 -08:00
Jesse Jones
a9e13586a3 Moved strptime and strftime into private helper functions.
Makes the public API much easier to see and prepares the way for making them pure.
2012-11-18 13:25:24 -08:00
Jesse Jones
68c852ad3a Made Map.contains_key, contains_key_ref, and get pure. 2012-11-18 13:25:24 -08:00
Jesse Jones
340955b3a5 Added support for options that take no arguments and may be repeated.
Closes #3568.
2012-11-17 19:43:39 -08:00
Tim Chevalier
9b6f025eb6 Rename thread_pool to task_pool
Minor change, no review.

Closes #3972
2012-11-15 12:35:14 -08:00
Brian Anderson
872cb5ee8b std: Don't use Drop trait in thread_pool 2012-11-14 16:15:35 -08:00
Ben Striegel
4589597785 Convert libstd to use the Drop trait 2012-11-14 16:15:34 -08:00
Brian Anderson
c44c9a47d8 Revert "Convert libstd to use the Drop trait"
This reverts commit 28c7a25151.
2012-11-14 14:51:16 -08:00
Ben Striegel
28c7a25151 Convert libstd to use the Drop trait 2012-11-14 12:40:44 -08:00
Graydon Hoare
4e1ce014c8 cleanup: convert some remaining #foo invocations to foo! form. 2012-11-13 08:57:31 -08:00