Patrick Walton
5558ebb6b7
libcore: Fix level-of-indirection problem in str::buf_as_slice
2012-09-20 15:05:20 -07:00
Brian Anderson
7abf55736c
core: Move 'unreachable' to util. Improve docs
2012-09-20 14:27:37 -07:00
Niko Matsakis
1983e3d8d7
Make + mode by-value if the type is immediate, by-ref otherwise
...
Fixes #3523
2012-09-20 14:04:38 -07:00
Patrick Walton
69aaa410ca
rustc: Fix buf_as_slice export
2012-09-20 12:26:40 -07:00
Patrick Walton
5cd9d4d9dd
libcore: Make BytesWriters not require shared boxes.
2012-09-20 11:18:22 -07:00
Patrick Walton
9117dcb968
rustc: De-mode all overloaded operators
2012-09-20 09:48:05 -07:00
Brian Anderson
acc3ec7d6c
core: Hide the docs for the private TaskBuilder impl
2012-09-19 19:08:32 -07:00
Brian Anderson
4f5bff993b
core: Decompose task into more submodules
2012-09-19 19:08:32 -07:00
Brian Anderson
591c152dfc
core: Cleanup task_local docs
2012-09-19 19:08:32 -07:00
Brian Anderson
f996b3ae81
core: Split local_data into local_data/local_data_priv
2012-09-19 19:08:32 -07:00
Brian Anderson
1397dca2dd
core: Move TLS to task::local_data
2012-09-19 19:08:32 -07:00
Brian Anderson
7bf0aa1c43
core: More doc cleanup
2012-09-19 17:17:19 -07:00
Niko Matsakis
cfed923600
demode the each() method on vec and other iterables.
2012-09-19 17:03:01 -07:00
Brian Anderson
c115b82238
core: Clean up crate docs and give all mods a brief description
2012-09-19 16:52:59 -07:00
Graydon Hoare
5e41739562
Remove final bits of residual hokey-hash functions. Close #1616 .
2012-09-19 16:35:53 -07:00
Philipp Brüschweiler
d3e0a06578
V2: now with more locks!
2012-09-19 14:01:53 -07:00
Philipp Brüschweiler
68e755b1c2
core: Allocate threads on demand, not on scheduler startup
...
API change: rust_kernel::create_scheduler() or
rust_scheduler::rust_scheduler() respecitevly now take ownership of the
launch factory argument, it is needed to create new threads on demand.
Also renames rustrt::sched_threads() to rustrt::rust_sched_threads() for
consistency. Added rustrt::rust_max_sched_threads() to return the
maximal number of scheduled threads of the current scheduler.
Fixes #3493 .
2012-09-19 14:01:53 -07:00
Graydon Hoare
3cb0fcb803
De-export core::comm
2012-09-19 12:05:32 -07:00
Brian Anderson
0e3daa45e2
Export the correct raw module from core::at_vec
2012-09-19 11:44:04 -07:00
Niko Matsakis
9cf271fe96
De-mode vec::each() and many of the str iteration routines
...
Note that the method foo.each() is not de-moded, nor the other
vec routines.
2012-09-19 10:52:59 -07:00
Erick Tryzelaar
da568baea9
libcore: unsafe mod renamed to cast
2012-09-19 08:26:53 -07:00
Niko Matsakis
8d4928f780
Revert "replace explicit calls to vec::each with vec::each_ref, partially demode str"
...
This reverts commit 1be24f0758
.
Not quite ready.
2012-09-18 21:41:13 -07:00
Niko Matsakis
1be24f0758
replace explicit calls to vec::each with vec::each_ref, partially demode str
2012-09-18 21:31:00 -07:00
Brian Anderson
2906f2de31
core: Rename 'unsafe' mod to 'cast'
2012-09-18 19:36:25 -07:00
Patrick Walton
e653d493fb
rustc: Remove legacy mode inference, unless #[legacy_modes] is used
2012-09-18 15:53:04 -07:00
Brian Anderson
d53cfd225a
core: Move Exclusive and SharedMutableState to the private mod
2012-09-18 15:23:57 -07:00
Gareth Daniel Smith
5d925b212e
Make vec::view a method too.
2012-09-18 21:46:53 +01:00
Erick Tryzelaar
e3f5403052
libcore: str::unsafe::from_buf_len_nocopy => form_slice
2012-09-18 12:56:57 -07:00
Erick Tryzelaar
d0d68c6036
libcore: make a copyless io::BytesWriter
2012-09-18 12:56:57 -07:00
Patrick Walton
c755449fd6
Revert "rustc: Change all non-keyword uses of "link""
...
This reverts commit 3b013cd800
.
2012-09-18 11:47:04 -07:00
Brian Anderson
2cdb23bbc0
Replace uses of 'unchecked' with 'unsafe'
2012-09-18 11:31:57 -07:00
Niko Matsakis
efa6675f1d
make filetype() include the "." ( fixes #3412 )
2012-09-18 11:29:53 -07:00
Patrick Walton
3b013cd800
rustc: Change all non-keyword uses of "link"
2012-09-18 11:27:37 -07:00
Brian Anderson
5c18bf6cdd
core: Rename at_vec::unsafe to raw
2012-09-18 11:19:17 -07:00
Patrick Walton
409bc6fc2c
libcore: Fix cleanup for i386
2012-09-17 12:01:24 -07:00
Niko Matsakis
48496fc1b6
add a test and correct terminology
...
newtype'd enums have 1 variant, and 1 field.
denegerate have only 1 variant but may have more fields.
2012-09-17 06:34:36 -07:00
Patrick Walton
be162da961
libcore: Log newtyped enums correctly. Closes #3506 .
2012-09-16 09:28:21 -07:00
Erick Tryzelaar
d0d84348ef
Make most send_map functions pure
2012-09-15 13:38:41 -07:00
Erick Tryzelaar
1834249e8d
libcore: add find_ref/get_ref to SendMap trait
2012-09-15 13:38:41 -07:00
Erick Tryzelaar
10e317de54
vec::u8 => vec::bytes ( #3444 )
2012-09-15 13:38:41 -07:00
Erick Tryzelaar
8dc9e6643a
io::Reader::chars_from_buf => chars_from_bytes ( #3444 )
2012-09-15 13:38:41 -07:00
Erick Tryzelaar
b73f801cc1
int/uint parse_buf => parse_bytes ( #3444 )
2012-09-15 13:38:41 -07:00
Erick Tryzelaar
651e63cc5c
libcore: rename *flate_buf to *flate_bytes ( #3444 )
2012-09-15 13:38:41 -07:00
Erick Tryzelaar
f1f5739256
libcore: fix whitespace in str test
2012-09-15 13:38:41 -07:00
Erick Tryzelaar
8cf09305a7
libcore: send_map test simplification.
2012-09-15 13:38:41 -07:00
Patrick Walton
73e8ce1e1f
rustc: Back out box annihilator
2012-09-14 19:59:07 -07:00
Graydon Hoare
aa2ab2659f
Add core::reflect, start migrating core::repr to use it. Tidy up various Repr types.
2012-09-14 19:09:38 -07:00
Patrick Walton
1c5db46f8e
rustc: Call the box annihilator in main
2012-09-14 18:05:15 -07:00
Patrick Walton
24c89693f0
libcore: Remove the annihilation tests; there's no easy way to make them work.
...
This should hopefully put out the burning tree.
2012-09-14 16:58:23 -07:00
Patrick Walton
ce773352d0
rustc: Make the box annihilator a language item
2012-09-14 16:50:12 -07:00
Patrick Walton
bc96ea2a18
libcore: Implement a box annihilator, not called yet
2012-09-14 16:13:13 -07:00
Niko Matsakis
34cece99cc
replace with_find_ref() with find_ref(), which is just nicer to use
2012-09-14 15:22:15 -07:00
Patrick Walton
bbfc6f8945
libcore: Make enum logging significantly less clownshoes.
...
Fixes the log-knows-the-names* tests.
2012-09-14 11:22:17 -07:00
Graydon Hoare
127c0d40ac
Teach path to collapse double-slashes in components. Close #3430 .
2012-09-13 19:53:30 -07:00
Graydon Hoare
c5347b4bf9
Fix implicit-instantiation of non-implicitly-copyable warnings.
2012-09-13 19:53:30 -07:00
Graydon Hoare
989536083d
Fix stray vec::as_buf, try to put out fire on win32.
2012-09-13 16:16:15 -07:00
Graydon Hoare
ccd4a0e362
Doc fix, close #3419
2012-09-13 16:10:21 -07:00
Brian Anderson
8a8ca1863d
Fix broken test in core::task
2012-09-13 15:06:40 -07:00
Brian Anderson
a544b83788
core: Fix stray usage of vec::unsafe on FreeBSD
2012-09-13 14:33:15 -07:00
Niko Matsakis
2f6b66ecd3
s/vec::as_buf/vec::as_imm_buf/, fix comment, remove set.rs
...
hat tip to @jruderman
2012-09-13 13:24:33 -07:00
Brian Anderson
6f9539a15c
Merge pull request #3487 from Blei/fix-3465
...
rt: Implement ThreadPerCore scheduling mode
2012-09-13 12:01:15 -07:00
Brian Anderson
b776395263
core: Remove old definition of rt_fail
2012-09-13 11:49:55 -07:00
Philipp Brüschweiler
62b51d9152
rt: Implement ThreadPerCore scheduling mode
...
Fixes #3465 .
2012-09-13 20:48:33 +02:00
Patrick Walton
57f99326a7
libcore: Make logging of structural subcomponents after a pointer not crash
2012-09-13 11:20:19 -07:00
Niko Matsakis
e0845eb589
repr: emit closing )
for enum variants, test that nullary variants names print
2012-09-13 11:10:05 -07:00
Niko Matsakis
109055c7d3
make iter::position() not require Eq
2012-09-13 09:14:49 -07:00
Brian Anderson
308ca06012
Rename str::unsafe to str::raw
2012-09-12 19:55:16 -07:00
Patrick Walton
59c3c6c147
libcore: Remove debugging code from transmute.
...
Was causing huge code bloat.
2012-09-12 19:08:01 -07:00
Patrick Walton
df712ab3d5
libcore: Make %? use the visitor, not shape glue
2012-09-12 18:59:14 -07:00
Patrick Walton
45f5f8ec45
libcore: Add some visitor-based logging functionality
2012-09-12 18:22:08 -07:00
Erick Tryzelaar
8299f3a447
libcore: add send_map::with_find_ref and with_get_ref.
2012-09-12 18:19:06 -07:00
Erick Tryzelaar
35a418eb88
libcore: modernize send_map's whitespacing
2012-09-12 18:19:06 -07:00
Brian Anderson
ff54ac8e59
Rename vec::unsafe to vec::raw
2012-09-12 17:45:36 -07:00
Graydon Hoare
37cf649311
Document IterBytes, Eq, Cmp, Hash. Close #3449 .
2012-09-12 17:08:25 -07:00
Philipp Brüschweiler
7a6df9c90f
core: Implement ToStr for @str
2012-09-12 17:08:25 -07:00
Niko Matsakis
7eb10c4ce1
purge the separate path for rel ops (e.g., ==) vs other bin ops
2012-09-12 15:41:22 -07:00
Brian Anderson
287114a3b9
Remove some transitional code
2012-09-12 15:09:21 -07:00
Graydon Hoare
4ce2ee12be
Add a bunch of inline hints.
2012-09-12 14:48:18 -07:00
Niko Matsakis
5d540de769
fixup mutability of vec::each, make iter_bytes pure
...
also, change DVec() to work with imm vectors rather than mut ones
2012-09-12 13:29:31 -07:00
Brian Anderson
8fbe4b5841
Rename core::rt_fail to core::rt_fail_
2012-09-12 11:52:00 -07:00
Brian Anderson
320331fe35
Use a different strategy for transitioning to camel case extfmt
2012-09-12 11:22:48 -07:00
Niko Matsakis
2eef6658c3
update to store map on stack, taking advantage of auto-ref
2012-09-12 06:47:28 -07:00
Niko Matsakis
8a8f200d10
Introduce auto adjustment table to subsume autoderef/autoref/borrowings.
...
Fixes #3261
Fixes #3443
2012-09-11 21:25:01 -07:00
Tim Chevalier
c087886e93
Make moves explicit in arguments
2012-09-11 20:02:34 -07:00
Brian Anderson
2c6c963f61
Convert core::extfmt to camel case
2012-09-11 19:41:07 -07:00
Brian Anderson
be1fdf983f
Promote 'impl' from restricted keyword to strict
2012-09-11 19:28:44 -07:00
Brian Anderson
ea01ee2e9e
Convert 'use' to 'extern mod'. Remove old 'use' syntax
2012-09-11 19:25:43 -07:00
Brian Anderson
fb851242b7
Promote 'pub' and 'priv' from restricted to strict keywords
2012-09-11 18:17:26 -07:00
Brian Anderson
8672b9003f
Merge pull request #3440 from jld/vec-dedup
...
Add vec::dedup for in-place consecutive duplicate element removal.
2012-09-11 17:25:21 -07:00
Brian Anderson
298eb8c726
Convert 'import' to 'use'. Remove 'import' keyword.
2012-09-10 19:04:26 -07:00
Tim Chevalier
f8b3eaae82
Make all moves explicit in libsyntax
2012-09-10 18:28:47 -07:00
Patrick Walton
2aa67e9aa9
rustc: Stop calling cmp shape glue in trans.
...
XFAIL's alt-borrowed_str for now. Will need to fix this up in the future.
2012-09-10 17:26:17 -07:00
Niko Matsakis
29003c799f
Rename the poorly named Managed<T> type to Mut<T>.
...
The Mut<T> type is intended to allow freezable data stuctures to be stored in
`@mut` boxes. Currently this causes borrowck to be very conserivative since it
cannot prove that you are not modifying such a structure while iterating over
it, for example. But if you do `@Mut<T>` instead of `@mut T`, you will
effectively convert borrowck's static checks into dynamic ones. This lets
you use the e.g. send_map just like a Java Map or something else.
2012-09-10 16:50:07 -07:00
Niko Matsakis
2026359518
fix a implicitly copyable warning
2012-09-10 16:50:07 -07:00
Tim Chevalier
f2d9d0ba41
Make all remaining moves explicit in libcore
2012-09-10 16:31:39 -07:00
Brian Anderson
93d3b8aa6b
Convert class methods to impl methods. Stop parsing class methods
2012-09-10 16:13:08 -07:00
Tim Chevalier
1a33c25d6f
Make moves explicit in pipes and pipe compiler
2012-09-10 15:15:10 -07:00
Tim Chevalier
a07ea73bdb
Make moves explicit in task; also make option::unwrap take its argument by move
2012-09-10 13:36:54 -07:00
Patrick Walton
22b8757705
rustc: Make shape-based compare glue never called for comparison operators.
...
Only called for string patterns.
2012-09-10 12:48:42 -07:00
Tim Chevalier
e666fe89dd
Make more moves explicit in libcore
2012-09-10 12:38:52 -07:00
Tim Chevalier
c104745255
Make moves explicit in vec
...
I'm continuing to make moves explicit, despite #3413 , because that
seems like the most reliable way to make these changes. Once I've made
all the moves explicit, the test for #3413 will be that I can remove them.
2012-09-10 11:15:36 -07:00
Jed Davis
4ea45669b8
Add vec::dedup for in-place consecutive duplicate element removal.
2012-09-10 00:42:58 -07:00
Brian Anderson
f53c2948aa
Rename variables that clash with keywords
2012-09-09 16:53:19 -07:00
Brian Anderson
a026e9a5cd
core: warn(non_camel_case_types) -> deny
2012-09-09 14:51:56 -07:00
Jeff Olson
2508c24276
core: fix separator for Future<A> property
2012-09-08 14:22:16 -07:00
Jeff Olson
12439b0b24
core: missed rebase cruft cleanup
2012-09-08 14:22:16 -07:00
Jeff Olson
3e58158375
core: most rebase cruft cleanup
2012-09-08 14:22:16 -07:00
Jeff Olson
6d84d86736
core: change FutureState Forced(A) to Forced(~A)
2012-09-08 14:22:16 -07:00
Jeff Olson
2ed00ff928
core: change notify_chan eq checks to is_none(), instead
2012-09-08 14:22:16 -07:00
Jeff Olson
02ddbadc10
core: patch from nmatsakis to make futures non-copyable
2012-09-08 14:22:15 -07:00
Jeff Olson
27129c6aba
core/std: finish making futures sendable + test.. still issues
2012-09-08 14:22:15 -07:00
Jeff Olson
6bdda1e0de
core/std: an unending parade of minor tweaks due to renaming Option et al
2012-09-08 14:22:15 -07:00
Jeff Olson
2f32c0d5c3
core: cleanup in task.rs for things missed in last rebase
2012-09-08 14:22:15 -07:00
Jeff Olson
d41af3e002
core: fix breakage in TaskBuilder.future_result
...
the actual "fix" in this change is the chunk that moves
`let x = self.consume()` to after the option dance that results in
the `notify_chan` in TaskBuilder.try()
the rest is cleanup/sense-making of what some of this code is doing (I'm
looking at you, future_result)
2012-09-08 14:22:15 -07:00
Jeff Olson
a8fc771f20
core: changing pipes::port/chan_one to Port/ChanOne in unsafe.rs
2012-09-08 14:22:15 -07:00
Brian Anderson
70e5a19ebf
core: Fix stage0 build errors
2012-09-08 14:22:15 -07:00
Jeff Olson
63e25946f0
core: port task.rs to comm::Chan/Port to pipes::Chan/Port
2012-09-08 14:22:15 -07:00
Brian Anderson
3bd1f32cd9
Convert all kind bounds to camel case. Remove send, owned keywords.
2012-09-07 18:10:11 -07:00
Brian Anderson
2810ea9a68
Convert 'again' to 'loop'. Remove 'again' keyword
2012-09-07 17:39:03 -07:00
Graydon Hoare
5d823d46ad
Migrate std::map to use core: #️⃣ :Hash trait. Disable many hokey hashes.
2012-09-07 17:24:16 -07:00
Graydon Hoare
e9f5a099df
Add an ignore! macro, remove support for nested block comments, re: #2755 .
2012-09-07 16:58:36 -07:00
Brian Anderson
f0eae8f1c1
Convert field terminators to commas. Stop parsing semis.
2012-09-07 16:12:15 -07:00
Patrick Walton
3078830934
libcore: Make str_eq not break with coretest
2012-09-07 16:09:38 -07:00
Patrick Walton
1fcfee674a
rustc: Add a str_eq lang item for pattern matching
2012-09-07 15:46:08 -07:00
Brian Anderson
2572e80355
Remove 'let' syntax for struct fields
2012-09-07 14:02:33 -07:00
Patrick Walton
feb014eb3c
rustc: Add an "ne" method to the Eq trait, and implement it everywhere
2012-09-07 12:24:48 -07:00
Elliott Slaughter
cb53623341
gc: Add early abort when GC is disabled.
2012-09-07 09:21:22 -07:00
Elliott Slaughter
244b95490b
gc: Refactoring.
2012-09-07 09:21:22 -07:00
Elliott Slaughter
d22b7ca39a
gc: Documentation.
2012-09-07 09:21:22 -07:00
Elliott Slaughter
961bd48724
gc: Fix for GC missing stack frames across segment boundaries.
2012-09-07 09:21:22 -07:00
Elliott Slaughter
578b036f9b
gc: Don't expect sentinel when core is compiled without GC.
2012-09-07 09:21:22 -07:00
Elliott Slaughter
7823ad8586
gc: Avoid walking stack above caller frame.
...
Mark the base GC stack frame with a sentinel value so we know when to
start collecting.
2012-09-07 09:21:21 -07:00
Elliott Slaughter
88f5ab3163
gc: Fix for deallocating resources on the shared heap while cleaning stack.
2012-09-07 09:21:21 -07:00
Elliott Slaughter
3405c548e8
gc: Avoid freeing null pointers.
2012-09-07 09:21:21 -07:00
Elliott Slaughter
9ea4afe5da
gc: Avoid double free when pointer appears on stack multiple times.
2012-09-07 09:21:21 -07:00
Elliott Slaughter
3f0d207b32
gc: Add stack walker for new garbage collector.
...
Safe points are exported in a per-module list via the crate map. A C
runtime call walks the crate map at startup and aggregates the list of
safe points for the program.
Currently the GC doesn't actually deallocate memory on malloc and
free. Adding the GC at this stage is primarily of testing value.
The GC does attempt to clean up exchange heap and stack-allocated
resource on failure.
A result of this patch is that the user now needs to be careful about
what code they write in destructors, because the GC and/or failure
cleanup may need to call destructors. Specifically, calls to malloc
are considered unsafe and may result in infinite loops or segfaults.
2012-09-07 09:21:21 -07:00
Niko Matsakis
5e36a99794
Refactor trans to replace lvalue and friends with Datum.
...
Also:
- report illegal move/ref combos whether or not ref comes first
- commented out fix for #3387 , too restrictive and causes an ICE
2012-09-06 06:11:12 -07:00
Patrick Walton
adc1427282
libcore: Expose glues to core
2012-09-05 21:10:22 -07:00
Patrick Walton
f6d50d866a
libcore: Make to_upper() and to_lower() pure
2012-09-05 20:55:28 -07:00
Tim Chevalier
2d116cbbed
Start making moves explicit in libcore
...
This is in preparation for issue 2633. Replaced implicit moves that
rely on last-use with explicit moves in char, float, and str.
2012-09-05 19:20:01 -07:00
Graydon Hoare
0ddae5ec7d
Add str::trim{_,_left_,_right_}chars.
2012-09-05 16:53:55 -07:00
Brian Anderson
200959d7ce
Remove 'with'
2012-09-04 15:47:04 -07:00
Brian Anderson
02b1c32e4d
core: Remove struct ctors
2012-09-04 15:46:33 -07:00
Patrick Walton
8415515cbe
libcore: Make as_bytes_slice() not include the null byte
2012-09-04 15:23:30 -07:00
Brian Anderson
f445497d6b
Merge pull request #3383 from crabtw/fbsd
...
use native log2 function and enable freebsd tests in uv_ll
2012-09-04 12:14:09 -07:00
Andrew Paseltiner
225cdc4894
add test for eq_slice fix
2012-09-04 11:27:11 -07:00
Andrew Paseltiner
21172ee280
fix str::eq_slice off-by-one error
2012-09-04 11:27:11 -07:00
Patrick Walton
437073868e
libcore: "import" -> "use"
2012-09-04 11:12:17 -07:00
Jyun-Yan You
ff4b754958
use native log2 function and enable freebsd tests in uv_ll
2012-09-05 02:03:56 +08:00
Patrick Walton
cd15eac9cf
libcore: Add missing from_str.rs
2012-09-03 15:59:37 -07:00
Brian Anderson
e767011b77
core: Add missing from_str.rs
2012-09-03 14:14:17 -07:00
Patrick Walton
aefc884cf6
libcore: Add a from_str trait
2012-09-03 13:09:24 -07:00
Patrick Walton
c2f8cf9dc1
libcore: Remove as_bytes_slice
2012-09-03 12:33:43 -07:00
Brian Anderson
f393100b7c
Camel case core::ops
2012-09-02 18:13:56 -07:00
Brian Anderson
49c9ac175f
Silence non-implicitly-copyable-typarams in coretest
2012-09-02 16:34:36 -07:00
Brian Anderson
ffa5d76a78
core: Only warn about implicitly copying vecs
2012-09-02 16:21:57 -07:00
Brian Anderson
117aa8cfee
core: warn(non_camel_case_types) everywhere, with few exceptions
2012-09-02 16:14:26 -07:00
Brian Anderson
a80b7dc709
Fix use of reinterpret_cast in to_mut_unsafe_ptr
2012-09-02 16:03:37 -07:00
Patrick Walton
f03ed73c5e
libcore: Add ptr::to_mut_unsafe_ptr
2012-09-02 15:54:24 -07:00
Brian Anderson
087c5032a8
core: deny(vecs_implicity_copyable)
2012-09-02 15:38:18 -07:00
Brian Anderson
80c4f74c29
Remove the 'to' keyword
2012-09-01 18:38:18 -07:00
Brian Anderson
d777e51333
Demode reinterpret_cast
2012-09-01 18:18:29 -07:00
Tim Chevalier
4128cc4cb4
Make utility funs in core::int, core::uint, etc. not by-reference
...
Closes #3302
2012-08-31 16:21:47 -07:00
Erick Tryzelaar
5c6be13b29
libcore: add result::unwrap_err.
2012-08-30 21:11:28 -07:00
Erick Tryzelaar
7649860339
libcore: result::unwrap should use moves
2012-08-30 21:11:28 -07:00
Erick Tryzelaar
afeaf7d88c
libcore: fix a typo
2012-08-30 21:11:27 -07:00
Erick Tryzelaar
c0f357924d
libcore: vec::u8::hash is pure.
2012-08-30 20:40:52 -07:00
Erick Tryzelaar
628b946186
libcore: rewrite str::reserve in pure rust.
2012-08-30 20:40:52 -07:00
Erick Tryzelaar
9074d9b581
libcore: rewrite io::MemBuffer.write to use memcpy ( #2004 )
2012-08-30 20:40:52 -07:00
Erick Tryzelaar
7bb65848a1
libcore: Rewrite str::unsafe::push_byte in pure rust.
2012-08-30 20:40:52 -07:00
Erick Tryzelaar
94c3975a9a
libcore: str::push_char should use str::unsafe::set_len.
2012-08-30 20:40:52 -07:00
Erick Tryzelaar
0e1a4a4da2
libcore: rewrite vec::unsafe::from_buf in pure rust
2012-08-30 20:40:52 -07:00
Graydon Hoare
536cb90a21
Migrate core::send_map to random, keyed hashes w/ hash::Hash trait.
2012-08-30 19:05:54 -07:00
Graydon Hoare
54a8d69c4f
Change str : Eq to use memcmp.
2012-08-30 16:27:31 -07:00
Brian Anderson
65b05a6ce8
Bump version to 0.4
2012-08-30 14:05:59 -07:00
Graydon Hoare
bb8a510113
Add an impl path::WindowsPath : Eq.
2012-08-30 13:22:31 -07:00
Graydon Hoare
a9619306a5
Start moving core::hash to support a Hash trait. Add to_bytes::IterBytes trait.
2012-08-30 12:38:28 -07:00
Patrick Walton
5c721bd810
libstd: More test fixes
2012-08-30 12:15:53 -07:00
Patrick Walton
470a301467
libcore: Fix test issues harder
2012-08-30 11:02:13 -07:00
Patrick Walton
27576af73e
libcore: Fix test issues
2012-08-30 10:42:48 -07:00
Patrick Walton
9518fc79ea
cargo: Fix some lack of knowledge of basic algebraic identities
2012-08-30 10:39:28 -07:00
Patrick Walton
45e46f5fc0
libcore: Add missing unit.rs
2012-08-30 10:14:54 -07:00
Patrick Walton
a1c11cab2d
rustc: Make <=
, >=
, and >
use traits as well
2012-08-29 19:23:15 -07:00
Patrick Walton
59bdd8bde6
libcore: Fix build breakage
2012-08-29 18:27:26 -07:00
Patrick Walton
96534365c2
rustc: Make <
and =
into traits
2012-08-29 18:25:22 -07:00
Brian Anderson
c0c8d3aa8f
core: Demode int/uint mods
2012-08-29 16:23:36 -07:00
Brian Anderson
8aca44ee0c
core: Don't normalize paths by default. Add a normalize method
2012-08-29 14:28:37 -07:00
Brian Anderson
fd12188c07
core: Export sys::Closure
2012-08-29 14:05:27 -07:00
Brian Anderson
6e20ffeb8d
Add sys::Closure type
2012-08-29 14:04:22 -07:00
Jed Davis
3e4b55807d
Add vec::truncate, for efficiently shortening a vector.
2012-08-29 13:46:49 -07:00
Graydon Hoare
6d22a805d7
Replace core::path with contents of core::path2. Back to one path module.
2012-08-29 13:26:51 -07:00
Erick Tryzelaar
e398a72c42
libcore: fix a typo exporting Err.
2012-08-28 20:16:21 -07:00
Niko Matsakis
a19dce6c16
correct name of SendMap trait
2012-08-28 19:10:44 -07:00
Graydon Hoare
b769e29680
Compress metadata section. Seems a minor speed win, major space win.
2012-08-28 14:50:39 -07:00
Brian Anderson
31bbcf0267
Import Result, Ok, and Err by default. Closes #3287
2012-08-28 14:49:49 -07:00
Brian Anderson
cfbc7cbdc7
Convert core::pipes to camel case
2012-08-28 14:33:18 -07:00
Niko Matsakis
e9b7ce6f57
refactor send_map impl to be based on structs
2012-08-28 12:00:42 -07:00
Niko Matsakis
206edf66c9
make rand code use slices
2012-08-27 19:56:42 -07:00
Niko Matsakis
0a01d82f6f
preliminary work on making future's sendable
...
also various improvements to the ptr casting fns:
- rename assimilate() to to_unsafe_ptr() (fixes #3110 )
- introduce `unsafe::copy_lifetime()` to copy the lifetime from one ptr to another
2012-08-27 19:56:16 -07:00
Patrick Walton
ff513b1bcd
libcore: Replace a bunch of "== None" with ".is_none()".
...
Generally, "== None" calls into the shape glue, and it's also more useful.
2012-08-27 17:49:35 -07:00
Patrick Walton
f2dcd7663a
libcore: Use is_none() in pipes
2012-08-27 17:43:15 -07:00
Patrick Walton
303e105677
libcore: Fix equality for pointers... again
2012-08-27 17:42:47 -07:00
Patrick Walton
32b13ce2ce
libcore: Fix signature of the impl for *T
2012-08-27 17:37:41 -07:00
Patrick Walton
daf10a2a6c
libcore: Fix a use of the shape glue in TLS
2012-08-27 17:37:31 -07:00
Patrick Walton
9c04454e7b
libcore: Implement equality for pointers
2012-08-27 17:33:22 -07:00
Patrick Walton
5792244d03
rustc: Implement equality for option types
2012-08-27 17:24:50 -07:00
Brian Anderson
161a82e433
Camel case various core constructors
2012-08-27 17:22:18 -07:00
Patrick Walton
0e5a0e1da5
libcore: Implement equality and ordering on vectors
2012-08-27 17:16:41 -07:00
Patrick Walton
060609cd56
libcore: Implement Eq for string types
2012-08-27 16:57:20 -07:00
Patrick Walton
381a628c4c
libcore: Fix build harder
2012-08-27 15:44:44 -07:00
Patrick Walton
180202fa4d
libcore: Fix core test
2012-08-27 15:04:47 -07:00
Brian Anderson
0c6e470a25
Convert core::result to camel case
2012-08-27 14:37:04 -07:00
Patrick Walton
3a1582012e
libcore: Implement ord and eq language items
2012-08-27 14:27:43 -07:00
Erick Tryzelaar
1dc92d44be
libcore: fix indention.
2012-08-27 14:10:54 -07:00
Graydon Hoare
5d56da1678
Convert over some residual uses of #oldmacros.
2012-08-27 13:54:12 -07:00
Ben Blum
a831726b94
Fix region-related unsafety in arc::get's signature
2012-08-27 14:03:23 -04:00
Ben Blum
5dadee1ee7
minor core/std cleanup
2012-08-26 21:17:39 -04:00
Brian Anderson
8337fa1a54
Camel case the option type
2012-08-26 15:56:16 -07:00
Patrick Walton
77b8144295
libcore: Implement result::get_ref.
...
This can be more efficient than unwrapping for large structural
types.
2012-08-26 11:50:21 -07:00
Patrick Walton
db71ff3eb6
libcore: Add some methods to make working with string slices easier
2012-08-25 23:13:50 -07:00
Patrick Walton
ed1ab9a598
libstd: Don't make task-local GC data when creating TCP streams.
...
This exposed an ICE in a test; it's commented out for now.
2012-08-25 18:43:38 -07:00
Patrick Walton
7d86429415
libcore: Add an implementation of to_str for &str.
...
It duplicates the string.
2012-08-25 18:43:38 -07:00
Ben Blum
6277046fa0
Add either::unwrap_{left,right}
2012-08-25 03:07:30 -04:00
Ben Blum
8d00603d78
Use less move_it in pipes and future (all but one use)
2012-08-25 03:07:30 -04:00
Ben Blum
6cf2f89452
Implement option::unwrap safely...!
2012-08-25 03:07:30 -04:00
Michael Sullivan
1ce7902a41
Add a Buildable interface for constructing general sequences. Work on #2921 .
2012-08-24 22:56:05 -07:00
Michael Sullivan
c87e9a5815
Get rid of the unseemly reinterpret_casts in build_sized implementations. Closes #3272 .
2012-08-24 22:56:05 -07:00
Tim Chevalier
c7a3d0eb58
Remove one last match check, in send_map
2012-08-24 21:35:35 -07:00
Graydon Hoare
c284b8b1dc
Start using core::path2::Path in a lot of places.
2012-08-24 15:51:16 -07:00
Michael Sullivan
b5dd01eb2a
Add a bunch more unsafe blocks to prepare for the new semantics of unsafe/closure interactions.
2012-08-24 14:21:26 -07:00
Niko Matsakis
d320848bf7
wrap long line
2012-08-23 18:56:56 -07:00
Niko Matsakis
a08f3a7d4d
More complete fix to #3162 (borrowck bug related to access to rec fields)
2012-08-23 18:54:08 -07:00
Patrick Walton
83e7c869bd
libcore: Add from_buf_len_nocopy
2012-08-23 18:10:16 -07:00
Ben Blum
dcbeebc801
Make vec::zip not require T:copy ( close #3254 )
2012-08-23 21:09:57 -04:00
Erick Tryzelaar
bf0ea66dac
libcore: update bytes/str reader to work with regions.
...
This optimizes away a copy.
2012-08-23 17:42:50 -07:00
Tim Chevalier
9f591319dd
Rename str::bytes to str::to_bytes
...
Closes #3245
2012-08-23 15:46:10 -07:00
Ben Blum
c47342e7c2
Convert pipes to new atomic intrinsics
2012-08-23 16:54:25 -04:00
Paul Stansifer
77e83d83a9
Change calls of proto!
to use parens.
2012-08-23 11:14:15 -07:00
Paul Stansifer
c74a442e86
Eliminate some extraneous curly brackets inside invocations of macro_rules!
.
2012-08-23 11:14:14 -07:00
Paul Stansifer
29f32b4a72
m1!{...}
-> m1!(...)
2012-08-23 11:14:14 -07:00
Michael Sullivan
226fd87199
Make a bunch more of the iteration functions/methods marked pure. Closes #3253 .
2012-08-23 10:22:33 -07:00
Niko Matsakis
511e7626ae
Infer variance of types with respect to the region parameter.
...
A similar approach could be used for type parameters.
Fixes #2282 .
2012-08-23 06:30:43 -07:00
Niko Matsakis
8185ede1fa
convert send_map to use explicit self
2012-08-22 21:14:32 -07:00
Ben Blum
fe2566777d
Use swap_remove in pipes::select(). Close #3219 .
2012-08-22 22:20:42 -04:00
Ben Blum
20773f33f5
Add vec::swap_remove ( #3219 )
2012-08-22 22:20:42 -04:00
Ben Blum
95bc9d4aef
export unwrap_arc functions in core/std
2012-08-22 21:16:35 -04:00
Tim Chevalier
73ffc7e700
Remove match check in send_map
2012-08-22 15:24:33 -07:00
Tim Chevalier
6f77fcbd07
Comments only: update issue number for FIXME
2012-08-22 15:24:33 -07:00
Brian Anderson
48a4bca066
Merge pull request #3251 from fsouza/to_digit_fix
...
libcore: fix doc for char::to_digit
2012-08-22 15:13:59 -07:00
Brian Anderson
91c652b1ca
Merge pull request #3244 from dbp/osbug
...
core: removing repeated code in os.rs homedir() test
2012-08-22 15:12:53 -07:00
Ben Blum
0e620ac030
Remove one last default argument mode from core::os
2012-08-22 14:10:56 -04:00
Ben Blum
d2e2d97602
Merge pull request #3231 from killerswan/modes1
...
Remove deprecated modes from os.rs
2012-08-22 10:37:45 -07:00
Francisco Souza
493117dcda
libcore: fix doc for char::to_digit
...
Closes #3249 .
2012-08-22 13:51:45 -03:00
Niko Matsakis
907f5b4672
ignore should_fail tests on windows
2012-08-21 20:49:35 -07:00
Niko Matsakis
b5411f765c
add tests to manage, fix test breakage I inadvertently introduced
2012-08-21 20:15:22 -07:00
Michael Sullivan
5f32e18011
Make std::arena run destructors. Closes #2831 .
2012-08-21 17:03:00 -07:00
Daniel Patterson
6083409f17
core: removing repeated code in os.rs homedir() test
2012-08-21 19:26:32 -04:00
Niko Matsakis
236f833007
remove tab character
2012-08-21 16:08:18 -07:00
Niko Matsakis
bc5eb95222
implement a map testing benchmark
...
This involved some other changes:
- add a managed<T> wrapper that makes send_map usable from @-data
- implement map<K,V> for managed<send_map>
Unit tests are coming.
2012-08-21 16:07:53 -07:00
Niko Matsakis
182814ef81
remove some FIXMEd code as the relevant issue is fixed
2012-08-21 16:07:53 -07:00
Patrick Walton
9440f8e9b8
libcore: Implement a dup2
2012-08-21 16:01:00 -07:00
Daniel Patterson
8b8e0c2a45
core: switching os::tmpdir() to always return a directory, by defaulting to Windows dir on windows, as per .NET
2012-08-21 15:51:36 -07:00
Daniel Patterson
9bb2963b7e
core: adding test for os::tmpdir()
2012-08-21 15:51:36 -07:00
Daniel Patterson
3f1f6bf9e3
core: adding os::tmpdir() that returns a system temporary directory if it can find one, and none otherwise.
2012-08-21 15:51:36 -07:00
Ben Blum
47cca22d54
Bypass lifecycle_lock in inhibit_kill/allow_kill for 3% to 5% speedup. Close #3213 .
2012-08-21 18:03:41 -04:00
Ben Blum
0229bc4def
Remove fixmes about exporting. Close #2648 , close #3119 .
2012-08-21 15:30:53 -04:00
Ben Blum
932f239a9c
respect distinct anonymous regions in unsafe::transmute_*
2012-08-21 15:30:53 -04:00
Niko Matsakis
652b312122
more sound treatment of fn& regions; change all & to be distinct
2012-08-21 10:28:34 -07:00
Niko Matsakis
8ee79c79aa
new region inference, seperate infer into modules, improve error msgs
...
Fixes #2806
Fixes #3197
Fixes #3138
2012-08-20 22:00:06 -07:00
Ben Blum
bd736a0f9b
oops, remove #[cfg(stage1)]s from arc::unwrap functions+tests
2012-08-20 22:00:06 -04:00
Ben Blum
05accaa167
implement arc::unwrap and add exclusive_unwrap tests
2012-08-20 21:51:39 -04:00
Daniel Patterson
62ea688e50
core: adding option::or, a function to return the leftmost of two some() values or none if both are none
2012-08-20 21:29:41 -04:00
Kevin Cantu
77ef394d72
Remove deprecated modes from os.rs
2012-08-20 14:11:37 -07:00
Graydon Hoare
08441fca76
Add PosixPath to path2. Add path2 to core build. Add dot/dotdot-normalizing.
2012-08-20 13:59:47 -07:00
Graydon Hoare
3e52a0acde
Initial sketch of path2 module, starting with WindowsPath.
2012-08-17 19:12:08 -07:00
Niko Matsakis
4b1d83ca64
fix deprecated-mode lint warning to consider dtors
2012-08-17 17:31:03 -07:00
Patrick Walton
9ea6b3a32e
rustc: Remove a few allocations from metadata. Shaves a few milliseconds off compilation of hello world.
2012-08-17 15:54:18 -07:00
Brian Anderson
3ab4b014cf
Remove the class keyword
2012-08-17 10:13:45 -07:00
Ben Blum
0e3825d38c
Add option::get_ref
2012-08-16 21:07:55 -04:00
Eric Holk
5f57588887
Update the rock-paper-scissors example in the tutorial, and rename some types in core::pipes
2012-08-16 17:50:36 -07:00
Eric Holk
b2452896d1
Don't use move, because it is less safe than the unsafe move_it macro.
2012-08-16 16:46:20 -07:00
Eric Holk
942649a260
Make wait_many work on selectable types instead.
...
This should avoid allocation in many select paths.
2012-08-16 16:46:20 -07:00
Brian Anderson
9c6890f488
Convert more core types to camel case
2012-08-15 17:46:05 -07:00
Brian Anderson
913f7bdae7
Modify pipec to not emit calls to some and none
2012-08-15 16:53:41 -07:00
Brian Anderson
74c69e1053
Convert more core types to camel case
2012-08-15 14:14:20 -07:00
Eric Holk
8be0f665bc
De-mode pipes
2012-08-15 13:58:08 -07:00
Tim Chevalier
51d98d9c7b
Expunge match checks
2012-08-15 12:38:32 -07:00
Ben Blum
00ef5418d4
Change TLS key type to stack closure
2012-08-15 14:38:38 -04:00
Ben Blum
fa8fc4b2b5
Add 1shot pipe chan_one/port_one type aliases and convert std::sync to use them
2012-08-15 13:22:50 -04:00
Ben Blum
a63f85ce8c
add some inlines to shared mutable state
2012-08-15 13:22:50 -04:00
Tim Chevalier
fa0e96e0f7
Fix build breakage
2012-08-14 21:13:05 -07:00
Tim Chevalier
ccd36439f7
Make Num::from_int a static method
2012-08-14 20:03:31 -07:00
Brian Anderson
11258310e2
Convert more core types to camel case
2012-08-14 18:26:03 -07:00
Graydon Hoare
c1fad07758
Add a map::str_slice_map constructor to libstd.
2012-08-14 16:45:51 -07:00
Ben Blum
958df4b003
De-mode comm, libc, priv, rt, sync, arc. Super easy.
2012-08-14 19:36:04 -04:00
Ben Blum
4377802202
De-mode task.rs and add some option::foo_ref() helpers
2012-08-14 19:32:52 -04:00
Brian Anderson
4f3aeb4703
Attempt to fix windows bustage
2012-08-14 15:58:21 -07:00
Ben Blum
589ee65fd4
Add rw_arc.downgrade() + std and cfail tests. Tons of region FIXMEs... (cf #2282 , #3154 )
2012-08-14 17:53:18 -04:00
Graydon Hoare
1795cda1b7
De-mode more pieces of core.
2012-08-14 12:15:00 -07:00
Graydon Hoare
36883186ab
De-mode core::future.
2012-08-13 19:08:02 -07:00
Graydon Hoare
bc6eaf2acb
More core mode forbidding.
2012-08-13 19:08:02 -07:00
Brian Anderson
5394e34aa4
core: Camel case some lesser-used modules
2012-08-13 18:59:48 -07:00
Brian Anderson
6b43c0c1ad
Stop parsing old operator overloading syntax
2012-08-13 18:59:17 -07:00
Graydon Hoare
91612dbb7e
De-mode-ify a few minor libcore modules.
2012-08-13 17:11:33 -07:00
Ben Blum
3a403e36d3
Add pipes::oneshot() to wrap pipes::oneshot::init()
2012-08-13 19:45:48 -04:00
Ben Blum
2ac288383d
Add pipes::oneshot(), pipes::send_one(), pipes::try_send_one() wrappers.
2012-08-13 19:45:48 -04:00
Eric Holk
8bb5f077c4
Comments describing the packet structures for pipes.
2012-08-13 16:20:23 -07:00
Patrick Walton
5bd4110170
rustc: Mostly implement region-bounded stack closures
2012-08-13 15:34:36 -07:00
Brian Anderson
28cd0ad54b
core: Export to_str trait from top level. Closes #3175
2012-08-13 14:58:34 -07:00
Ben Blum
6c4843d9da
Add ptr::ref_eq()
2012-08-13 17:18:24 -04:00
Chris Peterson
9470e5d7d5
core: Export f32::ge(), f64::ge(), and float::ge()
2012-08-13 14:03:14 -07:00
Eric Holk
ebe7b0cc37
Remove print
2012-08-10 18:27:48 -07:00
Eric Holk
d2e9d99f81
Handle failure during select nicely. Fixes #3176
2012-08-10 18:19:42 -07:00
Ben Blum
42825fbea6
Split libcore/arc.rs: arc -> std::arc; exclusive -> unsafe::exclusive
2012-08-10 20:53:09 -04:00
Eric Holk
4808d59909
Terminate blocked receive packets on failure. Fixes #3168 .
2012-08-10 16:26:22 -07:00
Ben Blum
e1086b0175
Implement sync::rwlock::write_cond (and task::rekillable)
2012-08-09 23:23:18 -04:00
Ben Blum
4c9f168372
Convert sync to the new struct syntax
2012-08-09 23:23:17 -04:00
Ben Blum
758dd786f6
Make rwlocks fail-proof
2012-08-09 22:07:59 -04:00
Niko Matsakis
1b2d91c79d
de-mode-ify infer and some parts of typeck
...
also, fix bug in the various lint passes that fn() was considered
not suitable for the default mode
2012-08-09 18:26:50 -07:00
Ben Blum
bcb6a68cbd
sync: Add rwlocks (half-done) and test cases
2012-08-09 20:29:34 -04:00
Ben Blum
be2e4ef624
Allow failing in arc::exclusive; poison to fail subsequent accesses ( fix #3092 )
2012-08-09 17:22:19 -04:00
Ben Blum
190ecc220a
Make sync primitives fail-unwind-friendly
2012-08-09 17:22:19 -04:00
Eric Holk
6a10e3a713
Added oneshot protocol. Fixes #3125
2012-08-09 11:55:17 -07:00
Graydon Hoare
71bc2673ed
Fix number-peek code in fmt!, close #1610 .
2012-08-08 18:40:30 -07:00
Brian Anderson
6a0720b439
Convert impls to new syntax
2012-08-08 18:19:24 -07:00
Eric Holk
e997948c8a
Remove an invalid assert and some commented out code.
2012-08-08 18:03:28 -07:00
Eric Holk
c0874dbd21
Adding try_send for pipes::chan and pipes::shared_chan
2012-08-08 18:03:27 -07:00
Ben Blum
35db5b7be1
Merge pull request #3153 from jruderman/sconv
...
Add spawn_conversation
2012-08-08 17:05:31 -07:00
Ben Blum
604e4add4a
sync: add blocking mutexes, condvars, and testcases
2012-08-08 19:59:38 -04:00
Michael Sullivan
79b5f68176
Implement + for @-vectors.
2012-08-08 14:30:45 -07:00
Jesse Ruderman
a76e4334b3
Add spawn_conversation
2012-08-08 16:57:13 -04:00
Eric Holk
c5fbff01ce
Add a really optimistic fast path in receive. Gives about a 7% performance improvement in msgsend-ring-pipes
2012-08-08 10:28:57 -07:00
Ben Blum
64ba7a31cb
Touch up semaphores; add another test
2012-08-07 18:57:49 -04:00
Ben Blum
1a6dadad5b
fix trailing whitespace
2012-08-07 18:20:02 -04:00
Ben Blum
f2ca54991f
Add sync.rs with counting blocking semaphores
2012-08-07 18:18:48 -04:00
Ben Blum
bdbad614ac
Remove rust_cond_lock and sys::condition (rename to little_lock)
2012-08-07 18:18:48 -04:00
Brian Anderson
2772b2e5c7
syntax: Make match arm parsing more restrictive again
...
Require comma separators for all expression types except the plain block
2012-08-07 12:23:43 -07:00
Eric Holk
abf4421e7c
Generate try_send versions for all the messages. Fixes #3128
2012-08-07 11:47:12 -07:00
Eric Holk
8d1922d4c8
Add a selectable implementation for *packet_header
2012-08-07 11:47:12 -07:00
Ben Blum
18ac4a8e6d
Change task().future_result's argument mode
2012-08-07 14:26:41 -04:00
Ben Blum
ae6d84f573
Rework task::try for new task_builder interface ( close #3103 )
2012-08-07 14:26:41 -04:00
Ben Blum
0cc6cefaec
Add util::ignore
2012-08-07 14:26:41 -04:00
Tim Chevalier
6bd01d0ac8
In resolve, forbid duplicate value, type, and module items
...
Closes #3099
2012-08-06 16:37:18 -07:00
Brian Anderson
ecaf9e39c9
Convert alt to match. Stop parsing alt
2012-08-06 15:36:30 -07:00
Brian Anderson
74370042aa
core: Rename task::osmain to platform_thread. #3090
2012-08-06 14:07:51 -07:00
Eric Holk
4544c015b3
Fill out rust docs for pipes some more.
2012-08-06 13:25:34 -07:00
Eric Holk
9f287c211e
Refcount tasks in packets to avoid races.
...
Revert "Once again, revert "Use pipes in compiletest""
Fixes #3098
2012-08-06 09:10:19 -07:00
Eric Holk
86947e47ad
More documentation on pipes, and moving assert in runtime.
2012-08-06 09:07:40 -07:00
Brian Anderson
025d86624d
Switch alts to use arrows
2012-08-05 22:08:09 -07:00
Ben Blum
0c623c4474
Document arc::exclusive.
2012-08-03 17:50:59 -04:00