Commit Graph

793 Commits

Author SHA1 Message Date
Tim Chevalier
81ecd272d3 Comments only: TODOs to FIXME in the runtime 2012-07-12 19:06:08 -07:00
Eric Holk
fec8059ed5 Move port_set and shared_chan into core. 2012-07-12 18:16:01 -07:00
Eric Holk
deb6476b29 Use unsafe pointers for recv_packet::header, because the region system is hard and this isn't safe anyway. 2012-07-12 18:16:00 -07:00
Eric Holk
aba665da32 Fix the signature on vec::view.
Due to limitations in region inference, this has the effect of making vec::view pretty much entirely unusable.
2012-07-12 18:16:00 -07:00
Graydon Hoare
18da7fef88 Merge remote-tracking branch 'origin/dist-snap' into incoming 2012-07-12 17:14:55 -07:00
Michael Sullivan
2ea9c8df0f Accept prefix notation for writing the types of str/~ and friends. 2012-07-12 16:52:26 -07:00
Ben Blum
acb86921a6 Revert linked failure
This reverts commit 5d6d3d0565.
2012-07-12 19:49:49 -04:00
Ben Blum
5724c64549 Revert linked failure (killing runtime)
This reverts commit 200a2ded32.
2012-07-12 19:49:49 -04:00
Michael Sullivan
1c62f5ff74 Get rid of all of the remaining /~s in the code base. 2012-07-12 15:13:18 -07:00
Ben Blum
200a2ded32 Fix linked failure with root taskgroup to kill the runtime too. 2012-07-12 18:08:36 -04:00
Michael Sullivan
9d2e5f3a65 Merge branch 'rt-changes' into incoming 2012-07-12 15:03:54 -07:00
Patrick Walton
fdf0c1b353 core: Newtype a bunch of types in libcore 2012-07-11 12:47:32 -07:00
Michael Sullivan
120773b2a7 Change the interface of placement new to take a tydesc as part of Issue #2831. 2012-07-11 11:42:49 -07:00
Graydon Hoare
aa7b3cc929 Fix some version numbers. 2012-07-11 09:09:08 -07:00
Ben Blum
5d6d3d0565 Linked failure in task.rs instead of rust_task.cpp (#1868, #1189) 2012-07-11 12:07:06 -04:00
Ben Blum
152f2eade8 arc.rs: make exclusive's data mutable 2012-07-11 12:07:06 -04:00
Eric Holk
71339d9e69 Pipe code cleanup 2012-07-10 22:00:48 -07:00
Eric Holk
22e955a76a Move streams into core. 2012-07-10 22:00:48 -07:00
Eric Holk
594d9a0554 Use protocol compiler in future.rs. Also split recv into recv and try_recv. 2012-07-10 22:00:48 -07:00
Eric Holk
26e6eb3d14 Handle failure conditions correctly in pipes. 2012-07-10 22:00:47 -07:00
Eric Holk
d07e537fc3 Remember to wake up blocked task on sender terminate. 2012-07-10 22:00:46 -07:00
Eric Holk
1c1b3a3339 Added peek for pipes. 2012-07-10 22:00:46 -07:00
Eric Holk
69cd8b5fcb Added select2 for pipes. 2012-07-10 22:00:45 -07:00
Michael Sullivan
260f73ed85 Get rid of unused fields in tydescs. Closes #2351. 2012-07-10 16:33:21 -07:00
Erick Tryzelaar
d0ac1bbfaf libcore: fix task::test_osmain test. 2012-07-10 11:39:59 -07:00
Brian Anderson
c992645250 Tidy 2012-07-10 10:05:20 -07:00
Erick Tryzelaar
1972ae23e5 libcore: add a task::set_sched_mode fn 2012-07-10 08:45:08 -07:00
Graydon Hoare
c26d02557e Switch 'cont' to 'again' everywhere. Close #2229. 2012-07-09 14:37:48 -07:00
Brian Anderson
3b399afa89 Merge pull request #2847 from ben0x539/incoming
Tiny documentation fixes in rust.md and src/libcore/task.rs
2012-07-09 13:59:03 -07:00
Patrick Walton
e41029d236 rustc: Switch to the new resolution pass 2012-07-09 10:27:13 -07:00
Benjamin Herr
4ac7159536 core: New closure syntax for comm.rs/task.rs docs 2012-07-09 13:46:32 +02:00
Benjamin Herr
b91358458b core: Formatting fix in documentation for task::unkillable 2012-07-09 05:02:05 +02:00
Benjamin Herr
cf4d5f4e4c core: Give task::spawn_with the documentation from task::run_with 2012-07-09 05:02:05 +02:00
Benjamin Herr
97a76b8eec core: Remove spurious newline in task::run_with documentation 2012-07-09 05:02:04 +02:00
Brian Anderson
5dd5a9ab89 core: Ignore to_str::test_vectors. It's busted 2012-07-08 00:50:46 -07:00
Ryan Scheel
69c2a9c26a Add test attributes to test functions missing test attributes. 2012-07-08 00:42:23 -07:00
Niko Matsakis
a856bccdc6 Revert "rustc: Switch to the new resolution pass"
This reverts commit c4af6e92fb.

Branch was burning...many, many unresolved imports.
2012-07-06 20:45:06 -07:00
Patrick Walton
c4af6e92fb rustc: Switch to the new resolution pass 2012-07-06 19:07:26 -07:00
Eric Holk
b925648ac7 Added a k-nucleotide version that uses pipes. 31% speedup. 2012-07-06 15:16:16 -07:00
Michael Sullivan
702f0cd734 Rename dvec::from_elt to dvec::from_elem. Closes #2792. 2012-07-06 14:52:57 -07:00
Michael Sullivan
ee0177b908 Move string append to libraries. Closes #2710. 2012-07-06 13:37:56 -07:00
Eric Holk
604f7c66ff Removing locked queue port/chan prototype. 2012-07-06 11:05:28 -07:00
Eric Holk
7b03832c95 Updating tests to use pipes. 2012-07-06 10:42:41 -07:00
Eric Holk
6806aa0e66 pingpong protocol parses, although I should probably rewrite this to use Paul's Early parser stuff. 2012-07-06 10:42:40 -07:00
Eric Holk
a787f40013 Select on pipes.
Updating syntax and test cases.
2012-07-06 10:42:39 -07:00
Eric Holk
89bdd481e5 Port future to pipes. Graph500 is about 21% faster now.
Making all tests pass.
2012-07-06 10:42:39 -07:00
Eric Holk
e5c9cb2b3d Pipes sleep and wake properly. 2012-07-06 10:42:39 -07:00
Eric Holk
a4838c93aa Enabling pipes for all stages, and updating closure syntax. 2012-07-06 10:42:39 -07:00
Eric Holk
67b0760592 Moved pipes runtime support to libcore, and add a test that will help verify that busy waiting is no longer happening.
Fixing the result of a bad merge.
2012-07-06 10:42:39 -07:00
Eric Holk
5c3889a02f Contracts work well enough to do the message ring benchmark, and it's really fast.
Fixing old-style vector, and xfail-prettying th contracts test because the pretty printer is unhappy.
2012-07-06 10:42:38 -07:00
Eric Holk
4dbd10a702 First example of a program using pipes. 2012-07-06 10:42:37 -07:00
Eric Holk
117b9a0b75 Basic functionality for new ports and chans
First test using the new comm system. About twice the throughput of the old system.
2012-07-06 10:42:37 -07:00
Brian Anderson
1eae49748d Ignore a should_fail test on windows 2012-07-05 23:26:41 -07:00
Ben Striegel
d162fa26ba A new times method on numeric types
This method is intended to elegantly subsume two common iteration functions.
The first is `iter::range`, which is used identically to the method introduced
in this commit, but currently works only on uints. The second is a common case
of `{int, i8, uint, etc.}::range`, in the case where the inductive variable is
ignored. Compare the usage of the three:
```
for iter::range(100u) {
    // do whatever
}

for int::range(0, 100) |_i| {
    // do whatever
}

for 100.times {
    // do whatever
}
```
I feel that the latter reads much more nicely than the first two approaches,
and unlike the first two the new method allows the user to ignore the specific
type of the number (ineed, if we're throwing away the inductive variable, who
cares what type it is?). A minor benefit is that this new method will be
somewhat familiar to users of Ruby, from which we borrow the name "times".
2012-07-05 19:44:20 -07:00
Ben Blum
2ee779c839 Add test case in task.rs for #2782 2012-07-05 21:01:18 -04:00
Ben Blum
7b3add0632 make disallow_kill an int for nested unkillables (closes #2782) 2012-07-05 19:56:09 -04:00
Tim Chevalier
50d2e7e07e Mostly change TODOs to FIXMEs and annotate them
But, one change in io to implement a TODO suggestion (using a
const u8)
2012-07-05 15:06:33 -07:00
Brian Anderson
8f92de3ce5 core: Actually build to_bytes 2012-07-05 14:40:45 -07:00
Brian Anderson
c199090130 core: Export to_bytes 2012-07-05 14:38:59 -07:00
Eric Holk
d93f3c5d83 Arc requires send trait (issue #2788) 2012-07-05 10:25:38 -07:00
Eric Holk
5bfb5cad3a Remove create_lock in favor of lock_and_signal() (issue #2780) 2012-07-05 10:11:25 -07:00
Gareth Daniel Smith
be0141666d convert doc-attributes to doc-comments using ./src/etc/sugarise-doc-comments.py (and manually tweaking) - for issue #2498 2012-07-04 19:18:13 -07:00
Ben Striegel
f2e2a14f36 Remove empty argument lists from do expressions 2012-07-04 17:21:29 -07:00
Erick Tryzelaar
2f9c0114fa Add a to_bytes iface and a handful of impls 2012-07-03 21:30:09 -07:00
Ben Blum
aa909dc60a oops, fix option.expect() and use it in libstd/map.rs 2012-07-03 21:03:51 -04:00
Brian Anderson
41bca84dd9 core: Convert iter::repeat to the for protocol 2012-07-03 17:31:31 -07:00
Ben Blum
e000d1db0a add option::expect and mark option methods as pure 2012-07-03 20:29:07 -04:00
Graydon Hoare
be2c92078b Change crust -> extern. 2012-07-03 16:49:46 -07:00
Graydon Hoare
debb7e4641 Switch 'native' to 'extern' (or 'foreign' in some descriptions) 2012-07-03 16:11:00 -07:00
Patrick Walton
e1ee198216 core: Import future::extensions 2012-07-03 15:56:27 -07:00
Ben Blum
70070b8bbc task.rs: minor doc/comment changes 2012-07-03 18:39:58 -04:00
Patrick Walton
1c2843c8ad core: Eliminate some overloading of the name "future" in future.rs 2012-07-03 11:24:01 -07:00
Erick Tryzelaar
39492782fa Export dvec::from_elt. 2012-07-03 09:14:46 -07:00
Brian Anderson
2ea8922b8a Merge remote-tracking branch 'brson/uv' 2012-07-02 21:39:08 -07:00
Patrick Walton
f093d374ed rustc: Implement a new resolve pass behind a compile flag 2012-07-02 18:30:12 -07:00
Brian Anderson
47f43da376 Merge branch 'doc-comments' 2012-07-02 15:31:33 -07:00
Brian Anderson
569467eb0d Merge remote-tracking branch 'Dretch/prettydocs'
Conflicts:
	src/compiletest/errors.rs
	src/libsyntax/parse/attr.rs
	src/libsyntax/parse/comments.rs
	src/test/compile-fail/ambig_impl_unify.rs
	src/test/compile-fail/assign-super.rs
	src/test/compile-fail/bad-for-loop.rs
	src/test/compile-fail/bad-var-env-capture-in-block-arg.rs
	src/test/compile-fail/block-arg-as-stmt-with-value.rs
	src/test/compile-fail/borrowck-assign-comp-idx.rs
	src/test/compile-fail/borrowck-lend-flow.rs
	src/test/compile-fail/borrowck-loan-blocks-move-cc.rs
	src/test/compile-fail/borrowck-loan-blocks-mut-uniq.rs
	src/test/compile-fail/borrowck-loan-rcvr.rs
	src/test/compile-fail/borrowck-loan-vec-content.rs
	src/test/compile-fail/borrowck-mut-vec-as-imm-slice-bad.rs
	src/test/compile-fail/cap-clause-with-stack-closure.rs
	src/test/compile-fail/do1.rs
	src/test/compile-fail/do2.rs
	src/test/compile-fail/empty-vec-trailing-comma.rs
	src/test/compile-fail/evec-subtyping.rs
	src/test/compile-fail/issue-1896.rs
	src/test/compile-fail/issue-2149.rs
	src/test/compile-fail/issue-2150.rs
	src/test/compile-fail/issue-2487-b.rs
	src/test/compile-fail/kindck-implicit-close-over-mut-var.rs
	src/test/compile-fail/liveness-issue-2163.rs
	src/test/compile-fail/liveness-use-in-index-lvalue.rs
	src/test/compile-fail/no-reuse-move-arc.rs
	src/test/compile-fail/no-send-res-ports.rs
	src/test/compile-fail/non-const.rs
	src/test/compile-fail/pure-higher-order.rs
	src/test/compile-fail/pure-loop-body.rs
	src/test/compile-fail/regions-addr-of-upvar-self.rs
	src/test/compile-fail/regions-escape-loop-via-vec.rs
	src/test/compile-fail/regions-scoping.rs
	src/test/compile-fail/seq-args.rs
	src/test/compile-fail/tstate-unsat-in-called-fn-expr.rs
	src/test/compile-fail/tstate-unsat-in-fn-expr.rs
	src/test/compile-fail/vec-add.rs
	src/test/compile-fail/vec-concat-bug.rs
	src/test/compile-fail/vector-no-ann.rs
2012-07-02 15:23:41 -07:00
Ben Blum
eb28b768af dlist should_fail tests ignore(cfg(windows)) 2012-07-02 18:08:09 -04:00
Brian Anderson
6d411342c6 Merge remote-tracking branch 'brson/uv'
Conflicts:
	src/libstd/net_ip.rs
	src/libstd/net_tcp.rs
2012-07-02 14:03:38 -07:00
Ben Blum
3ced5b0da2 add dlist.rs should_fail tests 2012-07-02 16:47:55 -04:00
Ben Blum
3777a14f08 Add doubly-linked list to libcore (to be used in task.rs). 2012-07-02 16:03:38 -04:00
Brian Anderson
d1fc2b5995 Convert to new closure syntax 2012-07-01 19:19:32 -07:00
Brian Anderson
a3382b6f26 Eliminate usages of old sugared call syntax 2012-06-30 16:01:49 -07:00
Gareth Daniel Smith
0b653ab953 initial draft of fix for issue #2498:
1. make /// ... and //! ... and /** ... */ and /*! ... */ into sugar for #[doc = ...] attributes.
2. add a script in etc/ to help converting doc-attributes to doc-comments
3. add some functions to core::str to help with (1)
2012-06-30 11:54:54 +01:00
Michael Sullivan
98e161f00e Switch the compiler over to using ~[] notation instead of []/~. Closes #2759. 2012-06-29 17:41:45 -07:00
Jeff Olson
708b5d986e core: str::as_slice is unneeded, yay! fixes std::net::tcp socket_buf test
i mistook an "unconstrained type" error, due to type-inference messup
because i didnt have return vals in some closure wired-up right, for being
due to not having a str as a str/& (a str will actually auto-coerce to a
str/&, so str::as_slice was erroneously added. my bad).
2012-06-29 15:41:55 -07:00
Jeff Olson
099d080233 core: adding str::as_slice .. most likely broken 2012-06-29 15:41:55 -07:00
Jeff Olson
5ec68ac482 core: export vec::unshift 2012-06-29 15:41:55 -07:00
Michael Sullivan
7aa43b2599 Make fmt use a bitmask instead of a vector of flags. Closes #1993. 2012-06-28 23:36:00 -07:00
Ben Blum
6fc730baf6 Cleanup failure handling around rust_new_task_in_sched - closes #2668 2012-06-28 19:02:48 -04:00
Ben Blum
54713afa20 add TLS failure test case in task.rs 2012-06-28 17:45:48 -04:00
Eric Holk
59221e9ac8 replace more vector + (issue #2719) 2012-06-28 13:52:23 -07:00
Ben Blum
af2d01e36b Fix sys::refcount and remove dbg::refcount 2012-06-28 14:40:31 -04:00
Eric Holk
ae06546bbf Replace more vector + (issue #2719) 2012-06-27 23:09:51 -07:00
Eric Holk
0b84437b68 Replace more vector additions (issue #2719) 2012-06-27 22:49:05 -07:00
Brian Anderson
6f57c61ed0 Tidy fixes 2012-06-27 22:03:12 -07:00
Ben Blum
1ff6f9b876 Add task-local storage in libcore. 2012-06-28 00:10:09 -04:00
Ben Blum
e56ba156e2 Add position() to iter/iter-trait 2012-06-28 00:02:16 -04:00
Eric Holk
0c42a3ffee vec::append reuses its left hand side when possible. (issue #2719) 2012-06-27 16:19:49 -07:00
Eric Holk
c3b98cabe1 Removed pretty much all the vector+ from core (issue #2719) 2012-06-27 15:22:06 -07:00