Brian Anderson
e564fc7f6b
core::rt: Don't directly create scheduler types in I/O tests
...
There are some better abstractions for this now
2013-04-20 01:55:10 -07:00
Brian Anderson
1a7561be4d
core::rt: Remove redundant copy of run_in_newsched_task
2013-04-20 01:37:59 -07:00
Brian Anderson
eac629bf5c
core::rt: Unignore some networking tests
...
These should work now, I hope
2013-04-20 01:32:08 -07:00
Brian Anderson
d24a3a4b01
core::rt: Use generated port numbers in tests
2013-04-20 01:16:06 -07:00
bors
4ff701b7db
auto merge of #5965 : alexcrichton/rust/issue-4364, r=pcwalton
...
This closes #4364 . I came into rust after modes had begun to be phased out, so I'm not exactly sure what they all did. My strategy was basically to turn on the compilation warnings and then when everything compiles and passes all the tests it's all good.
In most cases, I just dropped the mode, but in others I converted things to use `&` pointers when otherwise a move would happen.
This depends on #5963 . When running the tests, everything passed except for a few compile-fail tests. These tests leaked memory, causing the task to abort differently. By suppressing the ICE from #5963 , no leaks happen and the tests all pass. I would have looked into where the leaks were coming from, but I wasn't sure where or how to debug them (I found `RUSTRT_TRACK_ALLOCATIONS`, but it wasn't all that useful).
2013-04-20 01:00:49 -07:00
Brian Anderson
744ba627f3
core::rt: Add a test mod and put run_in_newsched_task there
2013-04-20 00:33:49 -07:00
bors
ce4f73a243
auto merge of #5945 : graydon/rust/fix-unicode-tables, r=pcwalton
...
This switches the unicode functions in core to use static character-range tables and a binary search helper rather than open-coded switch statements. It adds about 50k of read only data to the libcore binary but cuts out a similar amount of compiled IR. Would have done it this way in the first place but we didn't have structured statics for a long time.
2013-04-19 23:03:52 -07:00
bors
e67f1c0fd2
auto merge of #5968 : gifnksm/rust/windowed, r=brson
...
vec::windowed fails if given window size is greater than vector length + 1.
```rust
for vec::windowed(7, &[1,2,3,4,5,6]) |vs| { fail!(); } // => do nothing
for vec::windowed(8, &[1,2,3,4,5,6]) |vs| { fail!(); } // => assertion failure in vec::slice
```
2013-04-19 22:12:52 -07:00
Huon Wilson
5c2e9b29f1
libcore: wrappers for size/align_of to act on values without needing explicit ::<type> annotations
2013-04-20 15:05:36 +10:00
Alex Crichton
98dfeb173f
core: clean up tests (mostly unused unsafe blocks)
2013-04-19 23:23:23 -04:00
bors
8b3c09a103
auto merge of #5962 : pcwalton/rust/shootout, r=pcwalton
...
r? @brson
2013-04-19 19:24:52 -07:00
gifnksm
a1a9326c6d
libcore: Fix assertion failure in vec::windowe.
...
vec::windowed fails if given window size is greater than vector length + 1.
2013-04-20 11:15:25 +09:00
Brian Anderson
6a5c4f68c2
core::rt: Just some poking at the I/O docs
2013-04-19 18:47:31 -07:00
Patrick Walton
dcea717208
librustc: Fix botched merge. rs=merge
2013-04-19 15:57:31 -07:00
Brian Anderson
e47ee779cd
wip
2013-04-19 15:18:38 -07:00
Brian Anderson
7270fadfcc
core::rt: Rename Closeable to Close, Seekable to Seek, blocking to native
2013-04-19 14:58:21 -07:00
Brian Anderson
e782e1f371
Tidy
2013-04-19 12:05:19 -07:00
Brian Anderson
b57611d10c
core::rt: Simplify some scheduler operations
2013-04-19 12:05:19 -07:00
Brian Anderson
eddd817bf0
core::rt: Add another context switching operation to the scheduler
...
`switch_running_tasks_and_then` does a context switch to another
task then immediatly runs a closure.
2013-04-19 12:05:18 -07:00
Brian Anderson
d261bb32d9
core: More tweaks to the thread-local scheduler interface
2013-04-19 12:05:18 -07:00
Brian Anderson
15ece0c23e
core: Wire up spawn to the new scheduler
...
It will check which scheduler it is running under and create the
correct type of task as appropriate. Most options aren't supported
but basic spawning works.
2013-04-19 12:05:18 -07:00
Brian Anderson
6773b63671
core: Don't use managed boxes in TaskBuilder
2013-04-19 12:05:18 -07:00
Brian Anderson
b96765179e
core: Add rt::context for figuring out what runtime services are available
...
Conflicts:
src/libcore/rt/sched/mod.rs
2013-04-19 12:05:18 -07:00
Brian Anderson
c44d7a6486
core::rt: Declare large parts of the I/O API
2013-04-19 12:05:18 -07:00
Patrick Walton
c995a62d44
librustc: WIP patch for using the return value.
2013-04-19 12:00:08 -07:00
Patrick Walton
10aa1c3c05
test: Add fannkuch-redux and fasta-redux shootout benchmarks
2013-04-19 11:56:52 -07:00
Patrick Walton
9738c2a45c
test: Rewrite nbody and spectralnorm shootout benchmarks
2013-04-19 11:56:52 -07:00
Patrick Walton
4c29b4cb93
librustc: Optimize metadata::decoder::item_name.
2013-04-19 11:53:33 -07:00
Patrick Walton
f903ae9e72
librustc: Implement fast-ffi and use it in various places
2013-04-19 11:53:31 -07:00
bors
10e6869a54
auto merge of #5955 : thestinger/rust/iterator, r=graydon
2013-04-19 09:48:50 -07:00
Daniel Micay
a2e5350284
iterator: add a bit of documentation
2013-04-19 12:42:59 -04:00
Daniel Micay
1d81b7b286
iterator: add a chain adaptor
2013-04-19 11:50:50 -04:00
Huon Wilson
90313b789c
libcore: add an UnfoldrIterator like Haskell's unfoldr
2013-04-19 10:37:15 -04:00
Daniel Micay
d7a2ae6c42
re-organize the iterator module a bit
2013-04-19 09:18:22 -04:00
Daniel Micay
ae1c9ebf3c
move iterator adaptor tests to iterator module
2013-04-19 09:01:40 -04:00
Huon Wilson
8ae6b33ed0
libcore: clarify documentation for char_at(_reverse)
2013-04-19 22:30:49 +10:00
Daniel Micay
962a753890
takewhile -> take_while, dropwhile -> skip_while
2013-04-19 07:28:51 -04:00
Daniel Micay
0f85cf180a
iterator: add skip and take
2013-04-19 07:22:20 -04:00
bors
9618e5b459
auto merge of #5938 : thestinger/rust/iterator, r=pcwalton
2013-04-18 18:51:49 -07:00
Graydon Hoare
5a3d26f271
core: replace unicode match exprs with bsearch in const arrays, minor perf win.
2013-04-18 14:39:40 -07:00
Graydon Hoare
14b7277c4f
core: add vec::bsearch.
2013-04-18 14:39:40 -07:00
Brian Anderson
decd3901d5
core::comm: Modernize constructors to use new
2013-04-18 14:07:35 -07:00
Brian Anderson
bc60d84507
core::pipes: Just reordering declarations
2013-04-18 14:07:35 -07:00
Brian Anderson
0617d580e6
core::comm: Remove functions in favor of methods
...
`send`, etc. are never used. I've left the functions for oneshot pipes
because by-value methods don't work.
2013-04-18 14:07:35 -07:00
Brian Anderson
4e22461cd8
core: Remove a stray #[doc(hidden)] attribute
2013-04-18 14:07:35 -07:00
Brian Anderson
056164ac19
core: Inline the protocol definitions of sendp and oneshot
...
I want to be able to see what is going on
2013-04-18 14:07:35 -07:00
Brian Anderson
3dce936753
core: Remove #[doc(hidden)] attributes and atomic wrapper functions from pipes
...
Neither are needed
2013-04-18 14:07:35 -07:00
Brian Anderson
8f2d21dc0d
core: Just reordering some code
2013-04-18 14:07:35 -07:00
Brian Anderson
ab08b4fbfd
core: Remove pipes::spawn_service, spawn_service_recv
...
These are only used in test cases; pipes isn't the right place for them;
they are unnecessary.
Conflicts:
src/libcore/rt/uv/mod.rs
2013-04-18 14:07:35 -07:00
Daniel Micay
a523abd75c
add dropwhile and takewhile iterators
2013-04-18 13:22:38 -04:00