Niko Matsakis
eb0a34c398
iterate only over immutable vectors; use newer region notation
...
Unfortunately, right now iterating over const vectors is
not safe. This is because the callback expects an *immutable*
reference (in region terms: &T), not a const reference (&const T).
This was not being caught by the type system due to the use of
unsafe operations. To fix this, we need to either (1) find a way
to parameterize over mutability or (2) add each_const, each_mut
etc
2012-07-18 11:48:58 -07:00
Michael Sullivan
7f3bbd57c0
Make task.rs export local_data. This is a hack to work around #2945 .
2012-07-18 11:01:45 -07:00
Eric Holk
7b8171ef2d
Added liveness analysis for protocols, and removed warnings about empty states.
2012-07-17 17:46:31 -07:00
Ben Blum
4cf6b4d3b4
Tasks should not hold a ref to their parent ( Close #1789 )
2012-07-17 20:45:07 -04:00
Michael Sullivan
aa5b5ab886
Create some infrastructure for building up @-vectors. Work on #2921 .
2012-07-17 17:09:25 -07:00
Ben Blum
8e6d66280f
dlist enhancements: concat/append/prepend/reverse/each_node ( close #2917 )
2012-07-17 20:03:14 -04:00
Ben Blum
e57745b48c
option: remove map's copy restriction and add map_consume
2012-07-17 20:03:14 -04:00
Patrick Walton
b71a8827e3
rustc: Fix coherence errors in the build
2012-07-17 16:49:54 -07:00
Patrick Walton
db020ab63c
rustc: Implement and enforce instance coherence
2012-07-17 15:46:43 -07:00
Ben Blum
bc87e66355
Add option::while_some; also add more pure ( close #2927 )
2012-07-17 13:57:36 -04:00
Eric Holk
c8739cb0bc
Error checking for protocols. We'll need spans though.
2012-07-17 10:35:59 -07:00
Ben Blum
156eceb24a
dvec/vec interface cleanup: fixing reach, reverse, adding more pure
2012-07-17 13:32:52 -04:00
Jed Davis
db34b5acd1
Prevent random floats from occasionally being greater than 1.
...
Previously, gen_f64 could generate numbers as high as 1.0000000002328306
in the case that u3 was 4294967295.0f64 and u2 was nonzero. This change
divides the random numbers by 2**32 instead, effectively concatenating
their bits as apparently intended. (Bonus fix: const.)
The comments are updated to be more specific than "random float"; note
that this can still generate 1.0f64 (P = 2**-54) due to rounding.
2012-07-16 21:54:57 -07:00
Eric Holk
c46bf6e716
Updating str syntax
2012-07-16 14:50:47 -07:00
Eric Holk
436d263aed
Add a selectable trait.
2012-07-16 14:50:46 -07:00
Gareth Daniel Smith
fe43d66613
replace core::tuple functions with methods
2012-07-16 22:33:20 +01:00
Niko Matsakis
41a21f053c
remove typestate from code, tests, and docs
2012-07-14 17:37:20 -07:00
Michael Sullivan
13c377b3b5
More platform specific deprecated strings...
2012-07-14 11:05:10 -07:00
Michael Sullivan
b1dafe49af
Get rid of more deprecated strs on non 64-bit linux platforms.
2012-07-14 10:27:09 -07:00
Michael Sullivan
08a4440d64
Fix a bunch of deprecated str/vec errors in code for non 64-bit linux platforms...
2012-07-14 10:05:49 -07:00
Michael Sullivan
5a7d139a38
Merge branch 'vector-reform' into incoming
2012-07-14 01:03:54 -07:00
Michael Sullivan
92743dc2a6
Move the world over to using the new style string literals and types. Closes #2907 .
2012-07-14 01:03:43 -07:00
Ben Blum
0b07a46222
core.rc export dlist
2012-07-14 01:24:26 -04:00
Ben Blum
e993b838ca
dlist: handle iter early break properly
2012-07-14 00:56:07 -04:00
Ben Blum
d39a33687c
Switch TODOs to FIXMEs
2012-07-13 20:31:24 -04:00
Ben Blum
1c0b457853
Workaround #2912 : Implement existential TLS and cheat with taskgroup key
2012-07-13 20:13:53 -04:00
Ben Blum
d338879ba5
Reintroduce linked failure (killing runtime)
...
This reverts commit 5724c64549
.
2012-07-13 20:13:53 -04:00
Ben Blum
df2d2604ca
Reintroduce linked failure
...
This reverts commit acb86921a6
.
2012-07-13 20:13:53 -04:00
Michael Sullivan
985b52be6d
Support prefix notation for vstore strings. Closes #2906 .
2012-07-13 17:03:49 -07:00
Michael Sullivan
ad5c4ed351
Make push_str overallocate. Use it in some places that were still doing +=.
2012-07-13 16:37:27 -07:00
Eric Holk
05543fd04d
Make tests pass
2012-07-12 20:09:30 -07:00
Patrick Walton
6e98416662
libcore: Add a to_slice_ptr function
2012-07-12 19:44:00 -07:00
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
Eric Holk
133fdc1148
Remove unnecessary bounds checks in vec::push_all (issue #2719 )
...
Don't needlessly drop closures (issue #2603 )
2012-06-27 11:32:22 -07:00
Eric Holk
404afcbb41
Mark exclusive arc-related functions as unsafe. Fixes #2727 .
2012-06-27 10:24:51 -07:00
Graydon Hoare
697f1e38d6
Change 'native' and 'crust' to 'extern'.
...
This comes with a terminology change. All linkage-symbols are 'extern'
now, including rust syms in other crates. Some extern ABIs are
merely "foreign". The term "native" is retired, not clear/useful.
What was "crust" is now "extern" applied to a _definition_. This
is a bit of an overloading, but should be unambiguous: it means
that the definition should be made available to some non-rust ABI.
2012-06-26 16:18:37 -07:00
Eric Holk
a08281616f
More perf tweaks (issue #2719 )
2012-06-26 14:08:16 -07:00
Patrick Walton
6413421c8c
core: make_a_sandwitch -> make_a_sandwich
2012-06-26 13:55:33 -07:00
Eric Holk
b9d3ad0736
Getting rid of lots more vector +=. (issue #2719 )
2012-06-26 00:39:18 -07:00
Michael Sullivan
329eca6044
Make vectors uglier ([]/~). Sorry. Should be temporary. Closes #2725 .
2012-06-25 20:00:46 -07:00
Eric Holk
b837f37d40
vec::slice is faster now (Issue #2719 )
2012-06-25 17:08:06 -07:00
Eric Holk
b19c98ea9a
Some perf fixes, although vec::slice is still too slow (Issue #2719 )
2012-06-25 16:38:12 -07:00
Brian Anderson
7e6cbf7431
Remove redundant 'extension' mods from numeric mods
2012-06-25 14:25:48 -07:00
Ben Striegel
43a48ca5bb
Automatically export methods on core numeric types
...
Each numeric type now contains an extensions module that is automatically
exported. At the moment each extensions module contains only the impl for the
`num::num` iface. Other impls soon to follow (hopefully).
2012-06-25 14:25:48 -07:00
Tim Chevalier
da470ff5b8
Merge
2012-06-25 13:29:41 -07:00
Brian Anderson
fad307d7b4
core: Convert declarations to not use the trailing 'unsafe' notation
2012-06-25 12:48:39 -07:00
Eric Holk
07e1d1c6b6
Improved graph500 performance (Issue #2719 )
2012-06-25 11:15:45 -07:00
Brian Anderson
2f060eb880
core: Name is_failure to is_err, is_success to is_ok
2012-06-22 18:26:25 -07:00
Brian Anderson
58983b2d92
core: Export result extensions from the top level
2012-06-22 17:33:53 -07:00
Brian Anderson
0cf730ed2a
core: Split up result extensions by kind bounds
2012-06-22 17:32:57 -07:00
Eric Holk
5cf99e02b5
Adding unshift again.
2012-06-22 16:31:57 -07:00
Eric Holk
26c11f7b50
Use must_have_lock instead of private functions. (Issue #2700 )
...
I hereby declare that messages sent from the same source arrive in order (Issue #2605 )
Removing FIXME, owned is the correct type here. (Issue #2704 )
Remove outdated FIXME (Issue #2703 )
Updating test for spawning native functions (Issue #2602 )
Removing bogus FIXME (Issue #2599 )
2012-06-22 15:14:42 -07:00
Tim Chevalier
25aa360595
[NEEDS SNAPSHOT] Port remainder of resources to classes in libcore
2012-06-21 22:20:09 -07:00
Tim Chevalier
fee78d296c
Port resources to classes in libcore
2012-06-21 21:30:16 -07:00
Graydon Hoare
312faf31df
Tag all remaining FIXMEs with bugs. Install rule in tidy script to enforce this.
2012-06-21 16:44:10 -07:00
Eric Holk
28ab0e8c03
Fixing illegal moves.
2012-06-21 16:11:11 -07:00
Eric Holk
dc3862bf58
This was unsafe, and will probably leak.
2012-06-21 16:11:11 -07:00
Eric Holk
3b9848b869
Remove some warnings and make tests pass.
2012-06-21 16:11:11 -07:00
Eric Holk
e4c291530e
Basic functionality for new ports and chans
...
The first benchmark shows about twice the throughput of the old system.
2012-06-21 16:11:11 -07:00
Eric Holk
9bdb2c9e48
Library vecs are fast now.
2012-06-21 16:11:11 -07:00
Eric Holk
0e5cfd9f33
Move vector addition out of trans and into libcore.
2012-06-21 16:11:11 -07:00
Brian Anderson
453e29cc39
core: Remove resolved FIXME around port destruction
2012-06-21 13:41:59 -07:00
Tim Chevalier
1b642bf02f
Change core::comm to use classes instead of resources
...
Ports now are represented internally as classes.
2012-06-20 20:12:14 -07:00
Tim Chevalier
0017116520
Don't shadow a class name with a local
...
The fix in 208621 means you now can't shadow a class name with a local,
which is consistent with other behavior. But stackwalk was doing that.
Fixed it.
2012-06-20 20:12:14 -07:00
Tim Chevalier
1b4dcbecac
Comments only: typos
2012-06-20 20:12:14 -07:00
Brian Anderson
4dcf84e4f4
Remove bind. Issue #2189
2012-06-20 17:27:28 -07:00
Eric Holk
514e8ded2f
Temporarily ignoring tests that can go into infinite loops.
2012-06-19 18:03:28 -07:00
Eric Holk
2a128fa205
Reference fixes.
2012-06-19 10:31:12 -07:00
Eric Holk
be664ddd29
Moved arc to libcore and added an arc that allows shared mutable state through mutual exclusion.
2012-06-19 10:31:12 -07:00
Eric Holk
dc718d97a6
Adding a lock/condition variable to libcore.
2012-06-19 10:31:12 -07:00
Brian Anderson
ff536f3fa5
core: Don't require copyable options where possible. Closes #2636
2012-06-18 12:57:30 -07:00
Tim Chevalier
3e2006a570
Revert "Adding a lock/condition variable to libcore."
...
This reverts commit e394ebda37
.
2012-06-16 15:34:15 -07:00
Tim Chevalier
0276a3376b
Revert "Moved arc to libstd and added an arc that allows shared mutable state through mutual exclusion."
...
This reverts commit 015527b0ce
.
2012-06-16 15:21:08 -07:00
Tim Chevalier
69447e9002
Revert "Reference and whitespace fixes."
...
This reverts commit 52f1904ddd
.
2012-06-16 15:17:10 -07:00
Eric Holk
52f1904ddd
Reference and whitespace fixes.
2012-06-15 22:14:02 -04:00
Eric Holk
21d56f2c68
Fixed a bug in extfmt where it couldn't parse unicode in format strings.
2012-06-15 22:01:07 -04:00
Eric Holk
015527b0ce
Moved arc to libstd and added an arc that allows shared mutable state through mutual exclusion.
2012-06-15 22:00:58 -04:00
Eric Holk
e394ebda37
Adding a lock/condition variable to libcore.
2012-06-15 22:00:24 -04:00
Niko Matsakis
e6c613ffa5
remove irrelevant fixme ( #2607 )
2012-06-15 06:24:52 -07:00
Tim Chevalier
a214e3abd2
Comments only: annotate FIXME in core::str
2012-06-14 19:32:41 -07:00
Tim Chevalier
d0e1591a6a
Comments only: annotate FIXMEs in core::run
2012-06-14 19:32:41 -07:00
Tim Chevalier
70dde68cfb
Annotate one FIXME and remove another
...
...since we probably won't have this kind of typestate.
2012-06-14 19:32:41 -07:00
Tim Chevalier
c96ae78c38
Comments only: annotate FIXMEs in core::os
2012-06-14 19:32:41 -07:00
Tim Chevalier
39d9c30a15
Remove code from parser that was awaiting snapshot
...
Remove old parser functions as well as support for old-style capture
clauses. Remove remaining old-style capture clauses.
2012-06-14 19:09:02 -07:00
Tim Chevalier
7ee7ba5955
Remove workaround
2012-06-14 18:21:17 -07:00
Tim Chevalier
7441a90fd9
Comments only: annotate FIXMEs
2012-06-14 18:21:17 -07:00
Tim Chevalier
9e9e280446
annotate FIXME in iter-trait
2012-06-14 17:57:22 -07:00
Tim Chevalier
8945255559
Comments only: Annotate FIXMEs in libcore
2012-06-14 17:56:41 -07:00
Tim Chevalier
ffc9fff720
In dvec, annotate a FIXME and uncomment append_iter
...
I uncommented append_iter and made it compile. I hope it wasn't
horribly flawed in some other way... but if so, there was no comment
explaining how.
2012-06-14 17:56:41 -07:00
Patrick Walton
e38eaed978
Add a Num typeclass
2012-06-14 10:55:49 -07:00
Erick Tryzelaar
48e877a435
Rewrite int/uint helper functions to use refs
...
This lets us pass them to generic functions.
2012-06-12 18:10:19 -07:00
Erick Tryzelaar
4335ce47f3
Convert most str and vec fns to slices
2012-06-12 18:10:18 -07:00
Brian Anderson
07bba397c5
core: More stack walking
2012-06-11 22:44:55 -07:00
Brian Anderson
8fea5260c2
core: Don't deadlock on io streams in run::program_output
...
We can't just read all of stdout before stderr or it will cause
deadlocks for children that want to write a lot to stderr
I could not come up with an obvious cross-platform way to easily
test this.
2012-06-08 23:00:59 -07:00
Brian Anderson
c91d5aa95c
Merge pull request #2560 from bstrie/num
...
Allow multiple `num` impls to be imported at once
2012-06-08 22:59:53 -07:00
Ben Striegel
d14d4155de
Allow multiple num
impls to be imported at once
...
If we import num::num, it gets reexported implicitly and causes collisions if
you try to import (for example) int::num and i8::num at the same time.
2012-06-09 01:36:26 -04:00
Patrick Walton
5a04069042
Merge pull request #2559 from mozilla/incoming
...
Incoming
2012-06-08 20:37:57 -07:00
Brian Anderson
45f2926144
core: Inline unsigned range function
2012-06-08 18:49:50 -07:00
Ben Striegel
89e424d373
Inline range
for all integral types
2012-06-08 21:18:41 -04:00
Patrick Walton
8ce0215f1b
core: "inlune" is not an attribute
2012-06-08 17:57:39 -07:00
Patrick Walton
fbd583bde2
core: Implement string equal natively to save a call into the shape code. Shaves a couple of seconds off rustc.
2012-06-08 17:38:12 -07:00
Brian Anderson
7a74545e97
Convert reinterpret_cast + forget to 'transmute'
2012-06-08 10:58:46 -07:00
Brian Anderson
f12adcbf93
core: Add unsafe::transmute
...
Like reinterpret_cast + forget
2012-06-08 10:58:46 -07:00
Brian Anderson
95b9d538b8
Use #[cfg(unix)] and #[cfg(windows)] everywhere
2012-06-07 22:28:00 -07:00
Brian Anderson
c058f1d992
core: Remove transitional code
2012-06-07 19:12:12 -07:00
Patrick Walton
7571ee85c4
Merge branch 'incoming'
2012-06-07 18:50:42 -07:00
Patrick Walton
e158ce8a9d
Add neg() to the num iface
2012-06-07 18:27:10 -07:00
Patrick Walton
02b7089e15
libcore: Add a num typeclass
2012-06-07 17:25:54 -07:00
Patrick Walton
3d7400f3ac
Add a Num typeclass
2012-06-07 16:08:38 -07:00
Niko Matsakis
3cbd1e221e
mark addr_or and friends pure
2012-06-07 07:18:29 -07:00
Brian Anderson
5f4837ad6a
core: Start on a stack walker
2012-06-06 23:39:56 -07:00
Brian Anderson
2c5a660c99
core: Add os::family. Returns either 'windows' or 'unix'
2012-06-06 23:39:09 -07:00
Niko Matsakis
3b4cfdeee2
Merge remote-tracking branch 'mozilla/incoming'
...
Conflicts:
src/rustc/middle/tstate/auxiliary.rs
2012-06-06 19:00:34 -07:00
Niko Matsakis
0d20717fab
add some purity annotations in dvec/vec, occasional accessor method
2012-06-06 18:37:07 -07:00
Niko Matsakis
b828df93f6
miscellaneous pure annotations and other small changes.
...
it seems that, to be truly useful, pure fns really need the
ability to modify their parameters. alternatively, we could
rewrite the functions that modify their arguments to take/return.
2012-06-06 18:36:54 -07:00
Niko Matsakis
83d290f461
add misc. pure modifiers in core
2012-06-06 18:36:29 -07:00
Niko Matsakis
bede54b14a
misc. copies in core/syntax to please borrowck
2012-06-06 18:36:15 -07:00
Brian Anderson
ef32ffd0b1
core: Remove swappable. Unused
2012-06-06 17:48:45 -07:00
Tim Chevalier
a6c92f0a17
Revert "Revert "Merge pull request #2516 from mozilla/incoming" due to failures"
...
This reverts commit 9fae95860de510f6874810cf43efb83f101246ef.
2012-06-06 15:08:24 -07:00
Patrick Walton
d64ff98311
Revert "core: Remove swappable. Unused" due to test failures
...
This reverts commit ec5cbb4f5e
.
2012-06-06 11:40:04 -07:00
Patrick Walton
055158d051
Revert "Merge pull request #2516 from mozilla/incoming" due to failures
...
This reverts commit adb717b5fa
, reversing
changes made to aabf84cdd8
.
2012-06-06 11:39:19 -07:00
Patrick Walton
d9cdddeb5f
stdlib: Introduce ord and eq interfaces. Make std::sort::quick_sort3 use them. i=#2348
2012-06-05 17:26:52 -07:00
Brian Anderson
ec5cbb4f5e
core: Remove swappable. Unused
2012-06-05 14:47:20 -07:00
Brian Anderson
78fe75a741
rt: Fix iaac_init using wrong type and not seeding correctly
...
This was a result of changing the vector representation to contain
a box header.
2012-06-05 00:21:19 -07:00
Michael Sullivan
6396e2c3c3
Make vecs implicitly copyable for all of our projects.
2012-06-04 19:53:30 -07:00
Eric Holk
1e8f501343
Machine types are different from int/uint, etc (Issue #2187 )
2012-06-04 19:16:47 -07:00
Graydon Hoare
5f904d278f
Shave off one more string append in a rare case.
2012-06-04 19:01:24 -07:00
Graydon Hoare
7803488a43
Implement stack-only variants of int/uint str conversion and output.
2012-06-04 18:06:59 -07:00
Brian Anderson
2d0e7cd272
core: Don't allow radix 1 in uint::to_str
2012-06-04 15:22:40 -07:00
Brian Anderson
6e0085210c
core: Make uint::to_str faster
2012-06-04 14:30:57 -07:00
Niko Matsakis
01b5777c8b
prohibit type parameters in native fns and other minor fixes
...
trans now can safely assert that it never sees a type param
2012-06-03 20:03:08 -07:00
Brian Anderson
8fbd5ac049
core: Add str::is_alphanumeric fn and method
2012-06-02 23:42:20 -07:00
Niko Matsakis
3f6e6532ac
make vec fns/methods take imm slices.
...
this also repairs the unsoundness in typing of unpack_slice,
which was silently converting a const ptr to an imm one.
2012-06-02 19:14:57 -07:00
Kevin Cantu
a7359f5b3b
(float) fix some rounding errors when showing as str
...
This seems to fix issue #1876 , and some of the superficial parts of
issue #1375 . The #fmt macro and the to_str functions will round,
rather than truncate, floats as strings.
Other issues remain, and I wrote more code here than intended, but the
following should pass now.
```
fn x() {
assert "3.1416" == #fmt["%.4f", 3.14159];
assert "3" == #fmt["%.0f", 3.14159];
assert "99" == #fmt["%.0f", 98.5];
assert "7.0000" == #fmt["%.4f", 6.999999999];
assert "3.141590000" == #fmt["%.9f", 3.14159];
}
```
2012-06-02 16:38:18 -07:00
Niko Matsakis
c5f2c1d61e
add some purity annotations in core
2012-06-02 10:08:00 -07:00
Tim Chevalier
053db0208b
Comment only: fix typo
2012-06-01 20:40:34 -07:00
Brian Anderson
7b862a5278
core: Fix handling of 0-padded floats with precision in #fmt
2012-06-01 16:10:37 -07:00
Graydon Hoare
57f399bd63
Implement 2 kinds of char / str escaping. Use in rustc. Close #2306 .
2012-05-31 15:32:29 -07:00
Brian Anderson
1523298bc7
core: Update vec_repr to include the box header
2012-05-30 21:23:34 -07:00
Eric Holk
ad292a8c73
Add xorshift to core::rand, which gave a 3x speedup for graph generation in the bfs code. Also, remove trailing white space.
2012-05-30 17:39:53 -07:00
Niko Matsakis
f90228b8a8
make all arguments modes immutable
...
note: you can still move from copy/move mode args
2012-05-29 16:22:17 -07:00
Eric Holk
3f0358bc5c
Updating comments.
2012-05-29 10:33:04 -07:00
Erick Tryzelaar
e45ed323c9
Add methods iter, iter_err, map, map_err to the result type.
2012-05-28 12:03:25 -07:00
Erick Tryzelaar
46173e98ef
Rename result::{iter,map,map2} to add _vec suffix
...
The result module doesn't follow the standard iter/map pattern
that we use in the rest of the library. So to
2012-05-28 12:03:25 -07:00
Brian Anderson
432c6cbde9
core: Make range follow the for loop protocol
2012-05-26 02:28:00 -07:00
Brian Anderson
5281db2bc2
core: Fix capitalization in docs
2012-05-26 00:16:32 -07:00
Brian Anderson
b4516590e4
core: Add to_str impls for remaining int types
2012-05-25 23:47:02 -07:00
Michael Sullivan
8668d06400
Get rid of many implicit copies as a preliminary to Issue #2448 .
2012-05-25 16:39:35 -07:00
Michael Sullivan
842f9d8616
Remove from_const hack from vec.rs.
2012-05-25 15:16:17 -07:00
Niko Matsakis
ccd8d5573e
remove dead assignments
2012-05-24 13:35:57 -07:00
Jeff Olson
bb88f772a4
core: doc/err feedback tweeks for result::unwrap
2012-05-22 22:29:17 -07:00