Daniel Micay
3ab5ec4b7c
iterator: implement collect with FromIterator
...
This makes it take advantage of the size hint for pre-allocation.
2013-06-24 01:35:15 -04:00
Daniel Micay
8779be39e1
implement Clone for slices
2013-06-24 01:35:12 -04:00
Daniel Micay
e2e39234cc
remove old_iter
...
the `test/run-pass/class-trait-bounded-param.rs` test was xfailed and
written in an ancient dialect of Rust so I've just removed it
this also removes `to_vec` from DList because it's provided by
`std::iter::to_vec`
an Iterator implementation is added for OptVec but some transitional
internal iterator methods are still left
2013-06-24 01:35:11 -04:00
bors
ac4211ef52
auto merge of #7279 : hanny24/rust/master, r=msullivan
...
This commit adds filtered method for Option type. It is not exactly necessary (chain method can be used instead), however I believe that this approach using extra filtered method is more convinient.
2013-06-23 17:40:56 -07:00
Philipp Brüschweiler
e2f1049bd5
Remove unused TyDesc parameter from the glue functions
...
To remove the environment pointer, support for function pointers without
an environment argument is needed (i.e. a fixed version of #6661 ).
2013-06-23 13:02:00 +02:00
Philipp Brüschweiler
976c0b3dfb
Remove rust_call_tydesc_glue
...
Towards #4812 . Also includes some minor cleanups.
2013-06-23 12:49:16 +02:00
Philipp Brüschweiler
8bf0033345
Remove unused shape fields from typedescs
2013-06-23 12:49:16 +02:00
Philipp Brüschweiler
469f394b25
Remove intrinsic module
...
To achieve this, the following changes were made:
* Move TyDesc, TyVisitor and Opaque to std::unstable::intrinsics
* Convert TyDesc, TyVisitor and Opaque to lang items instead of specially
handling the intrinsics module
* Removed TypeDesc, FreeGlue and get_type_desc() from sys
Fixes #3475 .
2013-06-23 12:49:16 +02:00
Philipp Brüschweiler
f2c5642d13
Fix get_tydesc() return type
...
This fixes part of #3730 , but not all.
Also changes the TyDesc struct to be equivalent with the generated
code, with the hope that the above issue may one day be closed for good,
i.e. that the TyDesc type can completely be specified in the Rust
sources and not be generated.
2013-06-23 12:46:28 +02:00
Daniel Micay
ac2e167e7e
hashmap: add FIXME number
2013-06-23 05:13:13 -04:00
blake2-ppc
8baefec013
std::to_str: Use .iter() for HashMap and HashSet
2013-06-23 04:23:12 -04:00
blake2-ppc
13f666a724
std::hashmap: Remove BaseIter impl for HashSet
...
Remove the BaseIter impl, while keeping the .each method until callers
are converted.
2013-06-23 04:23:01 -04:00
blake2-ppc
f045210857
std::hashmap: Use .iter() instead of .each and similar
2013-06-23 04:23:00 -04:00
blake2-ppc
3af1d20bea
std::hashmap: Add test_iterate for HashSet
2013-06-23 04:23:00 -04:00
blake2-ppc
080d498af2
std::hashmap: Implement external iterator for HashMap and HashSet
2013-06-23 04:23:00 -04:00
Daniel Micay
d2e9912aea
vec: remove BaseIter implementation
...
I removed the `static-method-test.rs` test because it was heavily based
on `BaseIter` and there are plenty of other more complex uses of static
methods anyway.
2013-06-23 02:05:20 -04:00
Daniel Micay
c9342663df
iterator: add a FromIterator trait
...
This is able to take advantage of the lower bound from the size hint.
2013-06-22 15:59:59 -04:00
Daniel Micay
468cbd9d01
iterator: add a size_hint default method
...
also adds an implementation for the vector iterators
2013-06-22 15:59:59 -04:00
reus
9b2d9a9539
replaced some 'std::' with 'extra::' in comments
2013-06-22 17:49:32 +08:00
James Miller
81cf72c264
Finish up Type refactoring
2013-06-22 12:35:35 +12:00
James Miller
befbd3a680
Add the rest of the atomic operations.
...
This makes the handling of atomic operations more generic, which
does impose a specific naming convention for the intrinsics, but
that seems ok with me, rather than having an individual case for
each name.
It also adds the intrinsics to the the intrinsics file.
2013-06-22 12:26:33 +12:00
Brian Anderson
95eb01957b
std: Make console log off/on controls work with newsched
2013-06-21 16:52:07 -07:00
Brian Anderson
1b7c99655f
std::rt: Support os::args
2013-06-21 14:42:15 -07:00
Honza Strnad
f3966e4a08
Added filtered method for Option type
2013-06-21 21:27:58 +02:00
Daniel Micay
06bec77faf
replace vec::find with the IteratorUtil method
2013-06-21 03:24:03 -04:00
Daniel Micay
883c966d5c
vec: replace position with iter().position_
2013-06-21 03:23:59 -04:00
Daniel Micay
49c74524e2
vec: rm old_iter implementations, except BaseIter
...
The removed test for issue #2611 is well covered by the `std::iterator`
module itself.
This adds the `count` method to `IteratorUtil` to replace `EqIter`.
2013-06-21 03:20:22 -04:00
Daniel Micay
cbad1da3db
vec: remove eachi
...
replaced by the `enumerate` method from std::iterator
2013-06-21 03:20:22 -04:00
Daniel Micay
62dc4e0d4c
vec: remove each_const
...
An Iterator implementation can be made for &const [T] if it turns out
to be necessary for some use case.
2013-06-21 03:20:22 -04:00
Brian Anderson
7a9a6e4591
std: Port SharedChan to newsched
2013-06-20 18:26:56 -07:00
Kevin Ballard
b8b2d1e5b4
Make task_rng() return @mut R instead of @@mut R
2013-06-20 15:55:43 -07:00
Brian Anderson
357f087786
Merge remote-tracking branch 'brson/io' into io-upstream
...
Conflicts:
src/rt/rust_builtin.cpp
src/rt/rustrt.def.in
2013-06-20 12:17:00 -07:00
Brian Anderson
4d39253a96
std::rt: Whitespace
2013-06-20 12:16:04 -07:00
bors
f348465283
auto merge of #7128 : yichoi/rust/fix_sometc, r=brson
...
- Fix stat struct for Android (found by SEGV at run-pass/stat.rs)
- Adjust some test cases to rpass for Android
- Modify some script to rpass for Android
2013-06-20 11:35:34 -07:00
Brian Anderson
bbf5469b75
Merge remote-tracking branch 'brson/io-wip' into io
2013-06-20 11:26:29 -07:00
Eric Reed
55dda46cf6
Merge remote-tracking branch 'upstream/io' into io
2013-06-20 10:51:04 -07:00
James Miller
0702e53576
libstd: cleanup warnings
2013-06-21 02:43:02 +12:00
James Miller
3bc4d1a120
Remove all #[cfg(stage0)]-protected code
...
New snapshot means this can all go. Also removes places that have
comments that say they are workarounds for stage0 errors.
2013-06-21 02:43:02 +12:00
James Miller
3acdbfd2c8
ignore inherited environment test under valgrind r=snapshot
2013-06-20 22:43:21 +12:00
Brian Anderson
391bb0b4e7
std: Make newsched failures log correctly
2013-06-19 18:37:50 -07:00
Eric Reed
36c0e04e57
derived instances of Eq and TotalEq for IpAddr rather than implement them manually.
2013-06-19 17:39:02 -07:00
Eric Reed
ac49b74e82
socket based UDP io
2013-06-19 17:23:55 -07:00
Brian Anderson
5086c0850e
std::rt: Update GC metadata in init
2013-06-19 16:08:07 -07:00
Eric Reed
083c692565
Changed visibility from being on the impl to being on methods per language syntax change.
2013-06-19 15:39:18 -07:00
toddaaro
753b497b4e
Modified a match in resume_task_from_queue that was returning an int that was then matched on to instead use an enum.
2013-06-19 15:23:14 -07:00
Eric Reed
d777ba01cb
Wrote the Eq instance of IpAddr in a slightly different way.
2013-06-19 15:20:28 -07:00
Brian Anderson
e1555f9b56
std::rt: Document and cleanup the run function
2013-06-19 01:13:56 -07:00
Brian Anderson
5722c953e5
std::rt: Correct the numbers of default cores
2013-06-19 00:49:05 -07:00
Brian Anderson
915aaa7f67
std::rt: Set the process exit code
2013-06-19 00:39:10 -07:00
Brian Anderson
1120f8c1e5
std::rt: Work around a dynamic borrowck bug
2013-06-18 23:20:53 -07:00