Commit Graph

205 Commits

Author SHA1 Message Date
Erick Tryzelaar
f630ebdb6a comp/std: rename io::string_reader to io::str_reader. 2012-03-02 19:15:35 -08:00
Erick Tryzelaar
1404a864a4 std: add a io::with_str_reader fn to remove a str copy 2012-03-02 19:15:34 -08:00
Brian Anderson
3ed6f6520f core: Remove _mut functions from vec
Instead, use vec::to_mut/from_mut to transform vectors in place as
needed.
2012-03-02 15:49:49 -08:00
Brian Anderson
77fc4e7ee7 std: vec::to_ptr -> vec::unsafe::to_ptr 2012-03-02 12:29:40 -08:00
Brian Anderson
1471b1f3ff std: DeCamelCase fs::splitDirnameBasename 2012-02-29 23:45:51 -08:00
Tycho Sci
ecf87c3180 libstd: Skip trailing whitespaces after JSON value 2012-02-29 17:47:17 +09:00
Tycho Sci
0465d5217d libstd: Skip trailing whitespaces after outer rparen
This makes "{ \"foo\": 1 }\n" and "[ 1 ]\n" valid json string
2012-02-29 16:24:28 +09:00
Erick Tryzelaar
012dec5e57 std: rewrite json.rs to fix bugs and use readers/writers
Our json implementation did not conform to the spec, and
was missing support for escpaed characters and exponental
numbers. This fixes it, and adds support for reading/writing
json directly from/to a stream.

There are two things left unimplemented. We could use a
"to_json" iface/impl, but that really needs traits to cut
down on code duplication. The other is it wouldn't be that
not that hard to turn this implementation into a event driven
parser like YAJL, but I ran into some type-inference bugs,
so I cut that out. It'd be nice to revisit this in the future
though.
2012-02-28 18:00:50 -08:00
Erick Tryzelaar
6865df2611 core/std: whitespace fixes. 2012-02-28 18:00:50 -08:00
Erick Tryzelaar
ec51d8fd03 std: Add helpers to simplify making str io::writers 2012-02-28 18:00:50 -08:00
Brian Anderson
b9089b5335 std: Ignore uv tests on FreeBSD 2012-02-28 17:56:15 -08:00
Jeff Olson
9831ee3e67 changing rust loop to 1 thread 2012-02-28 17:56:15 -08:00
Jeff Olson
b4c88cdcec add uv::loop_delete()
because of the last change, the loop ptr is no longer cleaned up
when the loop exits. This api call addresses that. Sadly, the loop
ptr is not "reusable" across multiple calls to uv::run().
2012-02-28 17:56:15 -08:00
Jeff Olson
0b3a06ab2c correcting for libuv behavior that differs between linux & windows
net complexity increase :/
2012-02-28 17:56:15 -08:00
Jeff Olson
bb5960aa57 moving new uv stuff into uv.rs and rust_uv.cpp
- removing the remains of uvtmp.rs and rust_uvtmp.rs
- removing the displaced, low-level libuv bindings
in uv.rs and rust_uv.cpp
2012-02-28 17:56:15 -08:00
Jeff Olson
828595151c trailing whitespace fixes 2012-02-28 17:56:15 -08:00
Jeff Olson
1d3e08d8c6 finishing up simple uv_timer impl
as it stands, basic async nad timer support is added
2012-02-28 17:56:15 -08:00
Jeff Olson
b68eb507da cleaning up uv_async stuff and stubbing uv_timer 2012-02-28 17:56:14 -08:00
Jeff Olson
974c23cbeb removed hello world and added uv_async_* 2012-02-28 17:56:14 -08:00
Jeff Olson
ffad8d7f0c everything is laid out and working through a basic hw
the core impl is there, with a async handle in place
to take incoming operations from user code. No actual
uv handle/operations are implemented yet, though.
2012-02-28 17:56:14 -08:00
Niko Matsakis
5c1338a18e add ability to run multi-crate tests, run tests with --inline 2012-02-28 06:31:29 -08:00
Niko Matsakis
8cffc6f84c add debugging mode which emits more verbose info 2012-02-28 06:31:28 -08:00
Brian Anderson
61691c2428 std: Make merge_sort faster 2012-02-27 18:32:45 -08:00
Niko Matsakis
f3ca50c9ca Encode/decode AST into metadata, re-instantiate inlined items 2012-02-24 20:46:27 -08:00
Marijn Haverbeke
780f8277f4 Finish cleanup of core::str
Closes #1849
2012-02-23 17:00:19 +01:00
Marijn Haverbeke
d802c1fbd2 Various cleanups and optimizations in core::str 2012-02-23 17:00:19 +01:00
Kevin Cantu
c3318f29fe (core::str) rename substr_len_bytes to substr_len, and delete unused byte_index[_from] 2012-02-23 17:00:19 +01:00
Kevin Cantu
7782f5d692 (core::str) remove len_bytes alias 2012-02-23 17:00:19 +01:00
Kevin Cantu
1b957c0942 (core::str) replace uses of unsafe::slice_bytes; replace find[_from]_bytes with find[_from] 2012-02-23 17:00:19 +01:00
Kevin Cantu
6ea3d7935e (core::str) replace byte_index[_from] with index[_from] 2012-02-23 17:00:19 +01:00
Kevin Cantu
280633a728 (core::str) do some replacements 2012-02-23 17:00:19 +01:00
Kevin Cantu
454b53a7c2 (core::char) rename slice -> slice_chars 2012-02-23 17:00:19 +01:00
Kevin Cantu
1cd5a0945a (core::str) rename rindex -> rindex_chars 2012-02-23 17:00:19 +01:00
Kevin Cantu
98447f5236 (core::str) mostly rename len -> len_chars 2012-02-23 17:00:19 +01:00
Marijn Haverbeke
ffd50b9cdf Make the various from_str functions return options
So that they can be used with user input without causing task
failures.

Closes #1335
2012-02-22 13:18:15 +01:00
Marijn Haverbeke
ad03761a97 Remove preconditions from libraries
Closes #1805
2012-02-22 11:47:47 +01:00
Brian Anderson
4220dcf1e9 core: New task API 2012-02-20 18:58:04 -08:00
Brian Anderson
010f2abc70 core: When running tests sequentially, print the test name before running it
Useful for debugging hanging tests
2012-02-18 16:30:09 -08:00
Chris Peterson
3d202d7eae rt: rename nano_time() builtin to match time::precise_time_ns() 2012-02-18 01:39:42 -08:00
Chris Peterson
b73bc30858 std: Add tests for time module
Tested on OSX and Windows.
2012-02-18 01:32:52 -08:00
Chris Peterson
105b5f0be8 std: Expand doc comments for time module 2012-02-18 01:30:12 -08:00
Chris Peterson
94fe5011e2 std: Add some env() and getenv() tests 2012-02-17 08:47:45 +01:00
Chris Peterson
aec76d2515 std: Fix env() assert when an environment variable's value contains a '=' char 2012-02-17 08:47:44 +01: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
4b63826050 Replace some explicit fails with 'alt check' invocations 2012-02-15 15:47:42 +01: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
Niko Matsakis
3a2f1e1876 add serialization library; convert ebml lib to use u64 internally 2012-02-13 06:50:58 -08:00
Kevin Cantu
c81867474a (core::str) add find_bytes and export it... 2012-02-13 01:56:58 -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