Erick Tryzelaar
23703c0661
core: add str::find_from.
2012-02-16 19:16:08 -08:00
Erick Tryzelaar
042a5222d1
core: rewrite str::byte_index to use vec functions
2012-02-16 18:35:45 -08:00
Erick Tryzelaar
d1c9b160ad
core: slim down str.rs by importing some and none.
2012-02-16 17:30:56 -08:00
Brian Anderson
601f7144d8
core: Add comm::select2
...
Receives on two ports simultaneously
2012-02-16 12:53:18 -08:00
Marijn Haverbeke
67cc89f38d
Rewrite exhaustiveness checker
...
Issue #352
Closes #1720
The old checker would happily accept things like 'alt x { @some(a) { a } }'.
It now properly descends into patterns, checks exhaustiveness of booleans,
and complains when number/string patterns aren't exhaustive.
2012-02-15 15:47:42 +01:00
Marijn Haverbeke
9ff5ba085d
Fix bad line printing for parse errors
...
The code that extracted lines from partially-parsed files
was broken.
Closes #1848
2012-02-15 11:53:32 +01:00
Brian Anderson
ff6b71f78b
core: Add core::future
...
Futures will be required for upcoming changes to the task API
2012-02-14 16:45:17 -08:00
Brian Anderson
b157f0b263
core: Add comm::peek for looking into the message queue
2012-02-14 14:07:06 -08:00
Brian Anderson
acabd821d2
Merge pull request #1831 from killerswan/str_fixes
...
(core::str) changes to find / find_bytes
2012-02-14 11:22:31 -08:00
Marijn Haverbeke
f2e880b750
Add [X].len() to core, use it in trans modules
2012-02-14 13:43:36 +01:00
Graydon Hoare
9caca02dac
Merge pull request #1827 from uasi/from-cstr
...
Avoid extra memory allocations in core::str::from_cstr{,_len}
2012-02-13 11:29:58 -08:00
Kevin Cantu
69834646d2
(core::str) more test cases
2012-02-13 03:07:29 -08:00
Kevin Cantu
2600db4778
(core::str) added FIXME comment
2012-02-13 02:17:19 -08:00
Kevin Cantu
07ef368c60
(core::str) rename find_chars -> find
2012-02-13 01:57:05 -08:00
Kevin Cantu
c81867474a
(core::str) add find_bytes and export it...
2012-02-13 01:56:58 -08:00
Kevin Cantu
748b63f63f
(core::str) add find_chars and b2c_pos functions
2012-02-13 01:56:10 -08:00
Kevin Cantu
0e61fe2eea
(core::str) use slice_bytes in starts_with for a little bit less string traversal
2012-02-13 01:56:10 -08:00
Brian Anderson
8309d50ff4
core: Add iter::filter_map
2012-02-12 22:30:58 -08:00
Brian Anderson
e360ddbd65
core: Add iterable implementation for strings
2012-02-12 22:17:10 -08:00
Brian Anderson
092c244d3a
core: Rename iter::reverse to iter::reversed for consistency with vec mod
2012-02-12 22:11:42 -08:00
Brian Anderson
ad2f566ff2
core: Add abs functions for signed integer types
2012-02-12 22:04:06 -08:00
Brian Anderson
acc57a44fd
core: Add compl functions for the rest of the integer types
2012-02-12 21:58:06 -08:00
Tomoki Aonuma
4d788be80d
from_cstr and from_cstr_len are not unsafe, I think
2012-02-13 12:44:14 +09:00
Tomoki Aonuma
8d29e87056
core::str::from_cstr uses from_cstr_len
2012-02-13 12:44:14 +09:00
Tomoki Aonuma
e5cc9193f8
Avoid extra memory allocations in core::str::from_cstr_len
2012-02-13 12:44:14 +09:00
Brian Anderson
fde719f635
core: Implement foldl/r without copying the accumulator
2012-02-12 19:24:24 -08:00
Brian Anderson
d679c0eb34
core: Add iter::foldr
2012-02-12 19:24:24 -08:00
Brian Anderson
3edad3555e
core: Add iter::count
2012-02-12 19:24:24 -08:00
Brian Anderson
85175d639f
core: Add iter::reverse
2012-02-12 19:24:24 -08:00
Brian Anderson
c21db3bbc2
core: Add iter::min/max
2012-02-12 19:24:24 -08:00
Kevin Cantu
f5e1108fc3
(core::str) comments and cleanup
2012-02-12 15:30:21 -08:00
Kevin Cantu
faa513b1f6
(core::str) fixed replace, fixed starts_with, and added more find/contains/replace test cases
2012-02-12 15:30:21 -08:00
Kevin Cantu
2ba44e24d5
(core::str) rename byte_len_range -> substr_len_bytes and
...
rename char_len_range -> substr_len_chars
2012-02-12 15:30:20 -08:00
Kevin Cantu
2b4f5136a5
(core::str) rename byte_len -> len_bytes and rename char_len -> len
2012-02-12 15:30:20 -08:00
Kevin Cantu
944f5a6598
(core::str) move push_byte, push_bytes, pop_byte, and shift_byte into str::unsafe
2012-02-12 15:30:20 -08:00
Brian Anderson
5fb0906f43
core: Formulate all unsigned max_values as 0 - 1 for consistency
2012-02-12 00:00:15 -08:00
Brian Anderson
4838d7860e
core: Add min/max functions for all int types
2012-02-11 23:56:53 -08:00
Brian Anderson
3bdb627b5d
core: Make uint::min/max pure
2012-02-11 23:52:40 -08:00
Brian Anderson
910c6a5df8
core: Fill out missing functions for basic types
2012-02-11 23:49:13 -08:00
Brian Anderson
87d17be846
core: Add modules for remaining scalar types
2012-02-11 23:18:26 -08:00
Tomoki Aonuma
70b04a14d1
Add a test for core::str::from_cstr_len
2012-02-12 13:28:54 +09:00
Tomoki Aonuma
6408d54c13
Implement core::str::from_cstr_len, close #1666
2012-02-12 13:25:15 +09:00
Brian Anderson
d2debed605
core: Change the argument order for vec::contains, vec::count
2012-02-11 18:00:52 -08:00
Brian Anderson
1040b47078
core: Rename vec::member to vec::contains to match str mod
2012-02-11 18:00:52 -08:00
Brian Anderson
737db5b49a
Merge pull request #1812 from killerswan/indexing2
...
(core::str) Fixing index and rindex
2012-02-11 17:42:45 -08:00
Kevin Cantu
207bb3d2df
(core::str) removed [r]index_byte
2012-02-11 17:04:08 -08:00
Kevin Cantu
0121cd5b0e
(core::char) export is_digit
2012-02-11 16:50:03 -08:00
Kevin Cantu
50360873f8
(core::str) added rindex and rewrote pop_char with char_range_at_reverse
2012-02-11 16:39:39 -08:00
Kevin Cantu
27161f4415
using str::index...
2012-02-11 16:39:39 -08:00
Kevin Cantu
14baf88f89
core::str: added index (char)
2012-02-11 16:39:39 -08:00
Kevin Cantu
a131b430a0
core::str rename [r]index -> [r]index_bytes
2012-02-11 16:39:39 -08:00
Kevin Cantu
5c58dde2f8
core: added char::is_digit (matching Nd, Nl, No)
2012-02-11 16:39:19 -08:00
Kevin Cantu
b3444db161
core: added a rough char::is_ascii
2012-02-11 16:39:19 -08:00
Tomoki Aonuma
0e5922a0b1
Fix typo in either.rs
2012-02-12 03:42:11 +09:00
Niko Matsakis
fdddf8f9e1
put serializer into the build and encode full item paths
2012-02-10 20:48:28 -08:00
Brian Anderson
ae2968d10a
core: Use rust_task_config_notify instead of twiddling rust_task's innards
2012-02-09 19:00:15 -08:00
Brian Anderson
9effae8413
Merge pull request #1794 from matricks/bugfix
...
fixed memmove. were using memcpy due to copy paste error
2012-02-09 13:47:55 -08:00
Magnus Auvinen
a422cd7ddb
fixed memmove. were using memcpy due to copy paste error
2012-02-09 21:47:12 +01:00
Marijn Haverbeke
50fb4c30ed
Increase precedence of as operator
...
Closes #1717
2012-02-09 11:58:08 +01:00
Brian Anderson
149d1d4a6e
core: Add a test for blocking in native code
2012-02-08 15:42:51 -08:00
Brian Anderson
35ba9715fa
core: Add task::spawn_sched
...
This function creates a new scheduler with a specified number of threads and
immediately executes a task on it. The scheduler is configured to terminate
when the task dies. This is the minimum API necessary to enable blocking C
calls.
2012-02-08 15:42:51 -08:00
Erick Tryzelaar
3a413aabd4
core: add str::as_bytes function
...
This pattern is used in a couple places, so it'd be nice
to abstract it away.
2012-02-08 10:18:36 -08:00
Brian Anderson
708f7b927c
core: Export floor functions
2012-02-07 22:02:55 -08:00
Graydon Hoare
93450abb4b
Make process-spawning take environments and working directories, remove procsrv task from compiletest.
2012-02-07 19:57:03 -08:00
Brian Anderson
0c13ee22ad
core: Use substr in extfmt instead of slice_bytes
2012-02-07 16:34:02 -08:00
Kevin Cantu
1aa23947a6
core: add str::splitn_char and fix str::splitn_char_iter
2012-02-07 16:25:35 -08:00
Kevin Cantu
2b0396c34a
core: make str::substr use char positions (and replace other uses)
2012-02-07 16:25:35 -08:00
Kevin Cantu
a3f5626ad1
String split renaming:
...
* Renamed str::split -> str::split_byte
* Renamed str::splitn -> str::splitn_byte
* Renamed str::split_func -> str::split
* Renamed str::split_char -> str::split_char
* Renamed str::split_chars_iter -> str::split_char_iter
* Added u8::is_ascii
* Fixed the behavior of str::split_str, so that it matches split_chars
and split (i.e. ["", "XXX", "YYY", ""] == split_str(".XXX.YYY.", "."))
* Fixed str::split_byte and str::splitn_byte so that they handle
splitting UTF-8 strings on a given UTF-8/ASCII byte and also handle ""
as the others do
2012-02-07 16:25:35 -08:00
Brian Anderson
159aebc28b
core: Whitespace policia
2012-02-07 15:08:54 -08:00
Magnus Auvinen
a5fc0b08de
added some documentation and made the memcpy and memmove unsafe
2012-02-07 15:08:54 -08:00
Magnus Auvinen
3e9859362b
made leak an intrinsic to avoid a c-call. added memmove and memcpy intrinsics
2012-02-07 15:08:54 -08:00
Erick Tryzelaar
be35893834
core: Implement str::escape with str::chars_iter.
2012-02-05 19:42:56 -08:00
Brian Anderson
c04b897cb2
core: Resolve some FIXMEs
2012-02-05 17:30:47 -08:00
Brian Anderson
91b6dc5c8e
Merge remote-tracking branch 'erickt/master'
...
Conflicts:
src/libcore/vec.rs
src/libstd/getopts.rs
2012-02-05 15:15:21 -08:00
Kevin Cantu
6be25c8a0c
Adding str::reserve
2012-02-05 14:56:16 -08:00
Kevin Atkinson
e127bf680f
Fix byte_len in char_len_range to be what it is advertised.
2012-02-03 17:48:16 -08:00
Tom Lee
31b0d1b4bd
core: rename str::lteq to str::le
2012-02-03 14:09:44 +01:00
Marijn Haverbeke
c1b075d042
Remove experimental GC code
...
It's been sitting unused long enough to have bitrotted completely.
2012-02-03 11:34:12 +01:00
Brian Anderson
57cad61353
rt: Remove task pinning. Does nothing
2012-02-02 18:10:24 -08:00
Brian Anderson
18de0f2aeb
rt: Rename task_sleep intrinsic to task_yield. Remove usec param
2012-02-02 18:10:24 -08:00
Kevin Cantu
ae0d49aa06
Rename str::char_slice -> str::slice
2012-02-01 21:56:53 -08:00
Kevin Cantu
fc9169f09c
Make the tests work, too
2012-02-01 21:56:53 -08:00
Kevin Cantu
8f367ebfeb
Rename (again) str::unsafe::slice -> str::unsafe::slice_bytes and
...
str::unsafe::safe_slice -> str::unsafe::slice_bytes_safe_range
2012-02-01 21:56:53 -08:00
Kevin Cantu
01c01f68af
Stop exporting str::slice and str::safe_slice (use unsafe instead)
2012-02-01 21:56:53 -08:00
Kevin Cantu
4e406d7fdd
Make it work 1
2012-02-01 21:56:53 -08:00
Kevin Cantu
cccf9e5389
Copy str::slice -> str::unsafe::slice (and unsafe_slice)
2012-02-01 21:56:53 -08:00
Kevin Cantu
5a19bafeea
Actually export the str::unsafe module for now
2012-02-01 21:56:53 -08:00
Niko Matsakis
196d69beb2
make boxes self-describing ( fixes #1493 )" (take 2)
...
this will be used to generate a new snapshot.
2012-02-01 18:52:08 -08:00
Niko Matsakis
3116643806
Revert "make boxes self-describing ( fixes #1493 )" until a new
...
snapshot is prepared.
2012-02-01 18:50:19 -08:00
Niko Matsakis
c36207bfb8
make boxes self-describing ( fixes #1493 )
2012-02-01 18:18:07 -08:00
Tim Chevalier
49cb3fc7df
Remove remaining references to option::t outside option itself
2012-02-01 16:49:57 -08:00
Brian Anderson
d24eb58a09
core: Ignore should_fail tests on win32
2012-02-01 15:35:59 -08:00
Marijn Haverbeke
694de53d28
Make vec::pop efficient
2012-02-01 12:23:13 +01:00
Marijn Haverbeke
856a544d0c
Remove native types from stdlib
2012-02-01 12:23:13 +01:00
Niko Matsakis
56db37d4c7
add iter library in preliminary form (limited syntactic support)
2012-01-31 19:21:26 -08:00
Tim Chevalier
e5d095d67e
Change option::t to option
...
Now that core exports "option" as a synonym for option::t, search-and-
replace option::t with option.
The only place that still refers to option::t are the modules in libcore
that use option, because fixing this requires a new snapshot
(forthcoming).
2012-01-31 17:05:20 -08:00
Kevin Cantu
1f795ff3b0
Re-implementing str::to_upper and str::to_lower using str::map
2012-01-31 14:29:11 -08:00
Kevin Cantu
a8b657397a
Add str::split_chars_iter and str::splitn_chars_iter
2012-01-31 14:29:11 -08:00
Kevin Cantu
ebf14cb3a9
Rename str::iter_chars -> str::chars_iter
2012-01-31 14:29:11 -08:00
Kevin Cantu
c7454f5595
Rename str::to_chars -> str::chars
2012-01-31 14:29:11 -08:00
Kevin Cantu
685a434e0a
Rename str::loop_chars to str::all,
...
rename str::loop_chars_sub to str::substr_all, and
propagate this change to std::rope and rustdoc's calls to these
2012-01-31 14:29:11 -08:00
Kevin Cantu
be9129f556
Comment fixes in str
2012-01-31 14:29:11 -08:00
Kevin Cantu
03b8c8df01
Rename str::from_byte(s) to str::unsafe::from_byte(s),
...
mark them as unsafe,
make comp/driver/driver.rs use str::from_bytes...
2012-01-31 14:29:10 -08:00
Brian Anderson
b9bb58f104
core: Add ctypes::c_char
2012-01-30 22:08:57 -08:00
Paul Woolcock
e1251f7b00
Change all ternary ops to if/then/else
...
All the files below had at least one instance of the ternary operator
present in the source. All have been changed to the equivalent
if/then/else expression.
2012-01-30 18:21:01 +01:00
Brian Anderson
cad4918b2a
core: Remove sys::set_min_stack
...
This was a temporary hack with global effect. Eventually there will
be a real solution for controlling stack sizes.
2012-01-29 21:27:09 -08:00
Erick Tryzelaar
29ba196336
Adding a function to concatanate vectors with a separator
2012-01-28 15:41:53 -08:00
Erick Tryzelaar
f98210db07
core: Flesh out vec find functions.
2012-01-28 09:18:34 -08:00
Erick Tryzelaar
025e6ff158
core: add vec spliting functions.
2012-01-28 09:18:34 -08:00
Erick Tryzelaar
1be3a7c263
core: add (,r)position(,_from) functions
...
This is to help search through a vector better.
2012-01-28 09:18:34 -08:00
Erick Tryzelaar
259636a112
core: rename vec::position* functions
...
Almost all of the vec functions that predicates don't have a
corresponding function that takes a single element, so this
commit renames the common fn usecase to be the default.
2012-01-28 09:18:34 -08:00
Brian Anderson
3321880f13
Merge remote-tracking branch 'killerswan/fixing_strings_2'
...
Conflicts:
src/comp/driver/driver.rs
src/comp/middle/trans/base.rs
src/comp/syntax/parse/lexer.rs
2012-01-27 16:44:40 -08:00
Marijn Haverbeke
362625008a
Allow moving out of mutable unsafe pointers
...
This makes it possible to de-initialize values anywhere in
memory, which is needed, for example, for a fast imlementation
of vec::pop.
2012-01-27 17:15:40 +01:00
Brian Anderson
7c925cfaaf
core: Long lines
2012-01-26 23:12:30 -08:00
Roland Tanglao
4e1bf8d692
rustdocs for f32.rs and f64.rs
2012-01-26 22:46:39 -08:00
Brian Anderson
28fbb19664
rustc: Switch the --no-core switch to a #[no_core] attribute
2012-01-26 16:43:33 -08:00
Kevin Cantu
3afc16f7a4
Change FIXME comments in str
2012-01-25 23:20:10 -08:00
Kevin Cantu
fec36de94e
Making str::from_cstr UTF-8 safe
2012-01-25 02:25:57 -08:00
Kevin Cantu
64ce563c05
Replacing str::unsafe_from_bytes with str::from_bytes (part 2)
2012-01-25 01:00:21 -08:00
Kevin Cantu
c7b23f9a86
Replacing str::unsafe_from_bytes with str::from_bytes (part 1)
2012-01-25 00:53:17 -08:00
Kevin Cantu
9750e83a17
Replace uses of str::unsafe_from_byte
2012-01-24 23:47:32 -08:00
Kevin Cantu
2496dccae4
Changed type of str::from_bytes and added str::from_byte
2012-01-24 23:44:19 -08:00
Kevin Cantu
4c4a5f734d
Reorganizing str.rs to group and document strings better (no functional changes, though FIXMEs added)
2012-01-24 14:08:48 -08:00
Brian Anderson
2898dcc5d9
core: Document the log levels
2012-01-24 00:54:17 -08:00
Tim Chevalier
a3c31a08e5
Add export{} syntax to encapsulate things that should be abstract
2012-01-23 22:36:38 -08:00
Kevin Cantu
69ffb4e3ae
s/fn&/fn/
2012-01-23 22:28:25 -08:00
Kevin Cantu
8f4d1f3d27
Added str::from_bytes (which is UTF-8 safe)
2012-01-23 22:28:25 -08:00
Kevin Cantu
7608a06b33
improved test case for str::any
2012-01-23 22:28:25 -08:00
Kevin Cantu
536dd2f5a7
Added str::lines_iter
2012-01-23 22:28:25 -08:00
Kevin Cantu
1c54744e3f
fixing indentation
2012-01-23 22:28:25 -08:00
Kevin Cantu
ff95029171
Added str::words_iter
2012-01-23 22:28:25 -08:00
Kevin Cantu
d4b287e852
Added str::any, str::bytes_iter, str::windowed, and vec::windowed functions
2012-01-23 22:28:25 -08:00
Kevin Cantu
0493a7c87d
Added str::map and str::all functions
2012-01-23 22:28:25 -08:00
Niko Matsakis
5e13d19cc0
s/block()/fn()/g
2012-01-23 19:06:33 -08:00
Brian Anderson
04351a84ca
core: Format comm docs correctly
2012-01-23 18:07:05 -08:00
Brian Anderson
93e9600a94
core: Write docs that format correctly in markdown or pandoc
2012-01-23 17:11:01 -08:00
Brian Anderson
3239f81898
core: More doc tweaks
2012-01-23 17:03:42 -08:00
Brian Anderson
7d58797453
core: Reformat the crate docs to look nicer
2012-01-23 16:58:30 -08:00
Brian Anderson
24b425567c
wip
2012-01-23 16:49:29 -08:00
Brian Anderson
4e2d8d8051
core: Add crate docs
2012-01-23 16:40:51 -08:00
Brian Anderson
a88c0847c2
core: Reexport all the imports in f32/64
2012-01-22 16:42:00 -08:00
Graham Fawcett
fc2ae08b9c
issue #1352 : change param order on {std,core}::extfmt::str_init_elt to mirror vec::init_elt.
2012-01-21 13:33:16 -08:00
Graham Fawcett
7763b40c71
issue #1352 : change param order on vec::init_elt, putting block in final position.
...
To match the init_fn() and init_fn_mut() changes.
2012-01-21 13:33:16 -08:00
Graham Fawcett
35d12be2ce
fix #1352 : change param order on vec::init_fn (and vec::init_fn_mut), putting block in final position.
2012-01-21 13:31:12 -08:00
Brian Anderson
8c92ea49d3
core: Shuffle around a #fmt test
2012-01-21 13:20:14 -08:00
Elly Jones
059e243b16
[core] extfmt: support %% to escape a %
2012-01-21 13:12:02 -08:00
Graydon Hoare
7b1a8f0a91
Additional ; to , changes, disable "tag" and ";" in parser. Close #1430 . Close #1428 .
2012-01-19 19:29:21 -08:00
Patrick Walton
6222e98dda
lib: ';' to ',' in enums in more places
2012-01-19 19:08:49 -08:00
Patrick Walton
194d8e3bd5
lib: ";" to "," in enums
2012-01-19 18:04:24 -08:00
Patrick Walton
97ed871fc1
libcore: "tag" -> "enum"
2012-01-19 15:56:54 -08:00
Tim Chevalier
5b028f527f
Remove support for the '.' after a nullary tag in a pattern
...
(Commit also includes lots of changes to remove '.'s that a git
merge messed up, or else it was monkeys.)
2012-01-19 01:04:59 -08:00
Tim Chevalier
04a2887f87
Remove '.' after nullary tags in patterns
...
Does what it says on the tin.
The next commit will remove support for this syntax.
2012-01-18 23:17:34 -08:00
Haitao Li
dde41869ce
Use ctypes in native function declarations
2012-01-19 02:10:36 +08:00
Brian Anderson
17bf4b0e1b
libcore: Move core tests into libcore
2012-01-17 19:41:05 -08:00
Brian Anderson
de4053f473
build: Start running libcore tests
2012-01-17 19:41:05 -08:00
Graydon Hoare
c4553caab3
Merge pull request #1554 from rtanglao/master
...
rustdocs for box.rs, comm.rs, ctypes.rs, char.rs
2012-01-17 12:44:25 -08:00
Roland Tanglao
93be00f995
Remove un-needed <
2012-01-17 11:56:13 -08:00
Brian Anderson
ac79f6100b
libcore: Remove bogus FIXME from core::tuple
2012-01-17 11:20:20 -08:00
Lenny222
b19fdcced2
libstd => libcore
2012-01-17 10:51:43 -08:00
Roland Tanglao
315e3ff8dd
Forgot to add some spaces before backslashes
2012-01-16 22:41:56 -08:00
Roland Tanglao
e631df3429
add spaces before newlines in rustdocs
2012-01-16 22:24:56 -08:00
Roland Tanglao
ca55a4b421
convert comments to rustdocs for box, char, comm and cytpes.rs
2012-01-16 18:34:03 -08:00
Josh Matthews
1223bbc4de
Make str::replace smarter.
2012-01-16 13:35:35 -05:00
Jyun-Yan You
79d7388455
add lgamma functions for FreeBSD
2012-01-16 00:38:52 -08:00
Kevin Cantu
d8b0a1910a
Added string functions: split_func, split_char, lines, lines_any, words,
...
and more tests
2012-01-15 20:20:06 -08:00
Brian Anderson
bc77d7bdb0
libcore: Add sys::set_min_stack
...
Adding this back to the library as a stopgap measure to recover some benchmark
performance. See #1527 .
2012-01-14 19:24:33 -08:00
Brian Anderson
84664304cc
libcore: Remove void declaration from comm::rustrt
2012-01-14 03:13:41 -08:00
Brian Anderson
d978aace53
libcore: Make ctypes::void an unconstructable, undestructurable tag
2012-01-14 03:13:09 -08:00
Brian Anderson
e66c036c9f
libcore: Add task::try
2012-01-13 14:21:17 -08:00
Brian Anderson
79207321ae
libcore: Add core::logging::console_on/off functions
...
These affect logging output to stdout globally, and turning the console off
has no effect when overridden by RUST_LOG.
2012-01-13 13:44:09 -08:00
Niko Matsakis
3f3bfeec27
make "native fn" the type for bare functions, remove fn exprs
2012-01-13 06:27:35 -08:00
Niko Matsakis
455f8b0d45
deprecate fn exprs and the fn() type, preferring fn@ and native fn
2012-01-13 06:27:34 -08:00
Brian Anderson
0616cba62b
libcore: Add sys::set_exit_status
...
Sets the process exit code
2012-01-12 22:24:27 -08:00
Brian Anderson
175196bbb8
libcore: Fix long lines
2012-01-11 22:54:12 -08:00
Roland Tanglao
81c3028699
make rustdocs more terse for bool.rs where it is obvious to programmers as per feedback from graydon
2012-01-11 22:37:25 -08:00
Roland Tanglao
350e87eaae
Change doc comments to rustdoc in bool.rs
2012-01-11 22:37:25 -08:00
Marijn Haverbeke
34d7f05292
Major clean-up of std::io
...
Use ifaces instead of objs, stop wrapping everything in two (or three)
layers of no-value-added indirection, and remove some of the more
pointless/outdated idioms from the code.
2012-01-11 21:00:11 +01:00
Niko Matsakis
c68345e57e
add a log_str() function and allow '%?' in fmt strings to use it
2012-01-11 10:32:54 -08:00
Niko Matsakis
110c3ccdca
add rust_task_is_unwinding predicate and do not kill if already unwinding
2012-01-09 19:53:32 -08:00
Erick Tryzelaar
ae76a7db5d
libcore: add longlong and ulonglong types.
2012-01-09 15:14:39 -08:00
Niko Matsakis
8944a390c6
change spawn_connected argument to copy mode
2012-01-09 06:50:39 -08:00
Marijn Haverbeke
f30c5ea686
Remove leftover comm.rs in std
...
(The actual comm module lives in core.)
2012-01-09 14:53:13 +01:00
Marijn Haverbeke
0945fcf1fb
Fix typo in example in libcore docs
2012-01-09 14:44:52 +01:00
Brian Anderson
c5564c9bae
Declare MIT license in crate attributes, not BSD
...
The Rust License is actually the MIT license, not BSD
2012-01-08 16:22:55 -08:00
Niko Matsakis
9775b480fd
add spawn_connected
2012-01-08 15:32:13 -08:00
Niko Matsakis
106385cb91
make spawned fn copy mode so that bare fns can be used
2012-01-08 14:57:03 -08:00
Brian Anderson
e3afc78fde
core: Update task spawning example
2012-01-07 17:11:54 -08:00
Niko Matsakis
d4410a9f9b
rewrite to use old C++-based mechanism
2012-01-06 22:40:32 -08:00
Niko Matsakis
98f5109cde
simplify task impl
2012-01-06 22:40:31 -08:00
Graydon Hoare
4f3171ea81
Merge pull request #1450 from erickt/master
...
adding some misc functions and some functions just for [u8]
2012-01-06 13:04:49 -08:00
Marijn Haverbeke
7c1f683c6d
Fix bug in method type parameter passing
...
It would occasionally pass the wrong type parameter, when calling
a generic method from a generic impl on a bounded param type.
2012-01-06 17:40:05 +01:00
Erick Tryzelaar
3e68803891
libcore: add [u8] helper functions to vec.
2012-01-06 07:47:14 -08:00
Erick Tryzelaar
7806180557
libcore: add a trivial uint hash function.
2012-01-06 07:47:13 -08:00
Erick Tryzelaar
ae225e2b6c
libcore: Add binop functions to u32 and u64
2012-01-06 07:47:13 -08:00
Brian Anderson
b1e2f04eb4
libcore: Use correct link name for lgamma_r on win32
2012-01-05 21:35:03 -08:00
Graydon Hoare
d2218d9c9c
Attempt to fix build breakage due to lgammaf_r having two leading underscores on mingw.
2012-01-05 17:54:30 -08:00
Stefan Plantikow
c8467977c4
Merge branch 'master' into kmath
...
Conflicts:
src/libcore/float.rs
2012-01-05 17:20:13 +01:00
Stefan Plantikow
1f10ee365c
Moved generic float::min, max to core::math and cleaned up some imports
2012-01-05 17:11:34 +01:00
Stefan Plantikow
494ad4e601
Merge branch 'master' into kmath
2012-01-05 16:25:51 +01:00
Marijn Haverbeke
60ae1590af
Switch to new param kind bound syntax
...
And remove support for the old syntax
2012-01-05 15:50:02 +01:00
Stefan Plantikow
a16acc0c10
added preliminary support for per-architecture generation of math constants (for porting)
2012-01-05 05:25:20 +01:00
Stefan Plantikow
6284190ef9
Merge branch 'master' into kmath
...
Conflicts:
src/libcore/cmath.rs
2012-01-05 02:07:12 +01:00
Marijn Haverbeke
e11d207113
Add either::is_left and either::is_right
2012-01-04 17:30:36 +01:00
Marijn Haverbeke
a7e1a35f88
Properly typecheck and compile invocations of generic methods.
...
Aligning the type parameters of the ifaces, impls, and methods
correctly in typeck is almost brain surgery. Seems to work now for
everything I threw at it, but might still break in other corner cases.
Issue #1227
2012-01-04 17:28:51 +01:00
Lenny222
d1ffe5034b
"str": rename "str_from_cstr" to "from_cstr" (analogous to the other "from_*")
2012-01-04 09:33:07 +01:00
Lenny222
dd284eb396
"char": use shorter names "to_lower"/"to_upper", analogous to the same names in "str"
2012-01-04 09:33:04 +01:00
Lenny222
e12b169247
implement str::is_whitespace using char::is_whitespace
2012-01-04 09:32:59 +01:00
Marijn Haverbeke
15be2fc73a
Add 'copy' bounds to functions that were faultily accepted without
...
Issue #1390
2012-01-02 15:31:58 +01:00
Lenny222
86279e8693
typo
2012-01-02 15:16:15 +01:00
User Jyyou
a59c4b1b47
freebsd support
2012-01-01 20:18:55 -08:00
Lenny222
f8d7a1c258
"str": extract to_upper/lower_case() into "char"
2012-01-01 13:15:30 -08:00
Stefan Plantikow
16405386f0
core: added support for bessel functions
2011-12-31 03:45:17 +01:00
Stefan Plantikow
a72b1413ed
Removed now obsolete mtypes module
2011-12-31 03:45:17 +01:00
Stefan Plantikow
57ac67a5aa
core: killed all math wrappers
2011-12-31 03:45:17 +01:00
Stefan Plantikow
49d36c7f85
Trying to remove wrappers from float
2011-12-31 03:45:17 +01:00
Stefan Plantikow
c314a9cad1
added more ops to cmath
2011-12-31 03:45:17 +01:00
Stefan Plantikow
e0cd06053a
added useful constants to math
2011-12-31 03:45:17 +01:00
Graydon Hoare
36c55b20a8
Add support in lexer for utf8 identifiers. No NFKC logic in char yet.
2011-12-29 14:45:18 -08:00
Erick Tryzelaar
38e796b943
libcore: Fix a typo.
2011-12-28 11:19:41 -08:00
Lenny222
eb0cdc02e3
char: add is_lowercase(), is_uppercase()
2011-12-24 10:41:11 +01:00
Graydon Hoare
47271ab4c8
Forgot typo-fix.
2011-12-23 18:53:52 -08:00
Graydon Hoare
ac13f0da9e
Add support to libcore for encoded-in-rust unicode character properties, at least. Add script to compute them from unicode.org.
2011-12-23 18:48:08 -08:00
Graydon Hoare
f0dfbe7b1b
Register new snapshots, purge log_err and log_full in favour of log(...).
2011-12-22 17:53:53 -08:00
Graydon Hoare
8b580954fe
Register snapshots and switch logging over to use of log_full or #error / #debug.
2011-12-22 14:42:52 -08:00
Graydon Hoare
3b61064631
Revert all of yesterday's snapshots and try again. Cursed!
2011-12-22 10:30:04 -08:00
Marijn Haverbeke
e2e077c831
Remove trivial cast checker
...
I consider the added complexity not justified at this point, and it
interacts badly with the patches for issue #828 . Feel free to discuss.
2011-12-22 15:04:00 +01:00
Brian Anderson
dedfef4c4c
Revert "wip"
...
This reverts commit aeadc6269e
.
2011-12-20 20:57:04 -08:00
Brian Anderson
aeadc6269e
wip
2011-12-20 20:15:09 -08:00
Graydon Hoare
a24c19e867
Add companion-module core.rs that exports log levels and option/some/none everywhere.
2011-12-20 12:41:44 -08:00
Brian Anderson
586281e2d6
libcore: Remove stack alignment from task spawning
...
This is already done by the native task start code. Closes #1324
2011-12-19 18:43:39 -08:00
Erick Tryzelaar
02d84d89e0
libcore: add splitn to split a string N times.
2011-12-19 10:22:07 -08:00
Erick Tryzelaar
8e54e74be4
libcore: add vec push.
...
This is a simple wrapper around grow for the common
case of pushing a value on the end of a vector.
2011-12-19 10:22:07 -08:00
Erick Tryzelaar
6b1c60d312
libcore: Add vec any2 and all2 functions.
2011-12-19 10:22:07 -08:00
Brian Anderson
12cde6ebee
libcore: Remove task::set_min_stack
...
This existed to make up for the lack of stack growth, and wasn't generally
safe.
2011-12-18 14:10:41 -08:00
Graydon Hoare
dbfa1b5689
Merge pull request #1317 from boggle/fix1315
...
fix to #1315 + small additions to std::either and result
2011-12-16 13:01:47 -08:00
Stefan Plantikow
bfbaadc694
core: marked fns as pure where possible
2011-12-16 17:41:07 +01:00
Stefan Plantikow
1fe4bd0f43
std: added either::flip, to_result and result::to_either
2011-12-16 16:31:42 +01:00
Niko Matsakis
ac6aba016e
rename iter2 to iteri to match typical convention
2011-12-16 07:17:29 -08:00
Niko Matsakis
2833ca478c
reorder args to the various vec, option fns so blk comes last
2011-12-16 07:17:23 -08:00
Marijn Haverbeke
4f826d81f6
Make 1.f parse as a field access on the integer 1
...
A dot is only considered part of a number when not followed by a letter
Closes #1306
2011-12-16 11:46:57 +01:00
Patrick Walton
fd1dd76977
stdlib: Add a str::split_str() to split on a delimiter string of any length
2011-12-15 17:39:53 -08:00
Stefan Plantikow
50db7ce906
Moved std::math to std::core
...
- merges math and float into core::float
- Splits core::ctypes into core::ctypes and core::mtypes
- cmath is not exported
- stdtest::math passes
2011-12-14 14:54:16 -08:00
Graydon Hoare
fa9ad984fb
Copy first batch of material from libstd to libcore.
2011-12-13 16:34:50 -08:00
Brian Anderson
4f17131855
Add crate_type attributes to rustc, std, core
2011-12-08 21:09:48 -08:00
Graydon Hoare
447414f007
Establish 'core' library separate from 'std'.
2011-12-06 12:13:04 -08:00