Commit Graph

17115 Commits

Author SHA1 Message Date
Brian Anderson
a292d51750 mk: Pass CFLAGS to the uv build 2013-04-22 19:20:12 -07:00
Brian Anderson
42c0f88232 core::rt: Add unwinding to newsched tasks 2013-04-22 17:15:31 -07:00
Brian Anderson
5fbb0949a5 core::rt: Add implementations of Reader, Writer, and Listener for Option
These will make it easier to write I/O code without worrying about errors
2013-04-22 15:08:47 -07:00
Brian Anderson
fe13b86519 Make conditions public. #6009 2013-04-22 14:43:02 -07:00
Brian Anderson
6644a034f0 core::rt: Move the definition of Listener to rt::io 2013-04-22 13:26:37 -07:00
Brian Anderson
e5d21b9ff1 core::rt: Make I/O constructors return Option instead of Result
For consistency, for all I/O calls, inspecting the error can be done with
the io_error condition.
2013-04-22 13:11:02 -07:00
Brian Anderson
d0786fdffc core::rt Wire up task-local storage to the new scheduler 2013-04-22 13:05:16 -07:00
Brian Anderson
d7f5e437a2 core::rt: Add the local heap to newsched tasks
Reusing the existing boxed_region implementation from the runtime
2013-04-21 19:03:54 -07:00
Brian Anderson
2fe118b26f rt: Don't make memory_region depend on rust_env
I am going to use memory_region and boxed_region as the local heap
in the new scheduler, for now at least, and I don't have a rust_env
available.
2013-04-21 17:42:45 -07:00
Brian Anderson
f9069baa70 core::rt: Add LocalServices for thread-local language services
Things like the GC heap and unwinding are desirable everywhere the language
might be used, not just in tasks. All Rust code should have access to
LocalServices.
2013-04-21 16:28:19 -07:00
Brian Anderson
4eff3130c5 core::rt:: Implement Reader/Writer for MemReader/MemWriter 2013-04-20 17:25:00 -07:00
Brian Anderson
fa478f5775 core: Speed up a test case 2013-04-20 16:15:32 -07:00
Brian Anderson
00474c13f3 core: Ignore two long-running tests 2013-04-20 16:15:06 -07:00
Brian Anderson
d818ea8154 core::rt: Listener constructors are called and return a 2013-04-20 15:55:37 -07:00
Brian Anderson
bcb3cfb8ce core::rt: Improve docs for run_in_newsched_task testing function 2013-04-20 15:55:07 -07:00
Brian Anderson
6e17202ff4 core::rt: Add next_test_ip4 for generating test addresses 2013-04-20 14:50:06 -07:00
Brian Anderson
a11c032f36 core::rt: Fix a broken uvio test 2013-04-20 02:16:21 -07:00
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
Brian Anderson
744ba627f3 core::rt: Add a test mod and put run_in_newsched_task there 2013-04-20 00:33:49 -07:00
Brian Anderson
1f97e6d47f rt: Add rust_dbg_next_port for generating test port numbers 2013-04-20 00:24:44 -07:00
Brian Anderson
6a5c4f68c2 core::rt: Just some poking at the I/O docs 2013-04-19 18:47: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
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
bors
465666d5c8 auto merge of #5957 : huonw/rust/core-char-at-doc, r=thestinger
The documentation was unclear/wrong: it implies the functions operated on unicode char indices, but they actually operate on byte indices. Also, the `char_at_reverse` documentation was unclear whether it counted from the beginning or the end (causing #5956).
2013-04-19 05:45:51 -07: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
d3a58f3797 auto merge of #5943 : brson/rust/struct-return, r=graydon
Mac appears to follow the same ABI as MSVC. This fixes one case
but leaves others broken, like windows.
2013-04-18 19:45:48 -07:00
bors
9618e5b459 auto merge of #5938 : thestinger/rust/iterator, r=pcwalton 2013-04-18 18:51:49 -07:00
bors
225d74f211 auto merge of #5914 : catamorphism/rust/copy-cops, r=catamorphism 2013-04-18 17:51:51 -07:00
Tim Chevalier
3d43af15d8 rustc: Anti-copy police
In this case, some copies are still necessary to convert from
a mutable to an immutable @-box. It's still an improvement,
I hope.
2013-04-18 17:40:42 -07:00
bors
df9cc2eb66 auto merge of #5924 : catamorphism/rust/non-fatal-errors, r=catamorphism 2013-04-18 16:57:51 -07:00
bors
50cd218c1e auto merge of #5920 : catamorphism/rust/rustpkg, r=catamorphism
r? @graydon
2013-04-18 16:06:52 -07:00