Brian Anderson
7e0fa3f852
std: Swap the argument order of list::foldl to match vec::foldl
2012-03-15 14:15:49 -07:00
Brian Anderson
5e8004d493
std: Follow conventions in bitv
2012-03-15 14:08:47 -07:00
Brian Anderson
3864d6d845
std: Rename the hashmap constructors to conform to new standards
...
Instead of using the new_ prefix just name them after their type
2012-03-14 18:19:08 -07:00
Niko Matsakis
a3d2882ffd
fixup auto_serialize's treatment of nullary variants
2012-03-14 21:05:06 -04:00
Niko Matsakis
e702d20191
allow immut vars to be moved. enforce mut vars after stage0 in std.
2012-03-14 20:46:36 -04:00
Niko Matsakis
6b35875dca
annotate libstd and start enforcing mutability
2012-03-14 20:46:36 -04:00
Niko Matsakis
1600be2c3b
fix auto_serialize for enums with type parameters
2012-03-14 17:19:33 -04:00
Niko Matsakis
ffa187db25
adjust auto_serialize to generate fns named serialize_T()
...
We used to generate a module T with a serialize() and deserialize() fn,
but this was suboptimal for a number of reasons:
- it required moving serialization into core so that uint etc worked
- it was harder to override the serialization behavior locally
(this is now trivial)
2012-03-14 11:49:28 -04:00
Niko Matsakis
b30cb8e43a
implement deserialization, rename mk_mem_buffer() to mem_buffer()
2012-03-13 21:30:07 -04:00
Niko Matsakis
d91742294f
first (functional) version of the auto_serialize syntax ext
2012-03-13 21:30:07 -04:00
Brian Anderson
b968c8e6cd
Name types after their modules instead of 't'
2012-03-13 15:14:17 -07:00
Brian Anderson
cd72b1f848
Overhaul constructor naming in libs
2012-03-13 11:07:22 -07:00
Graydon Hoare
6f5853f5a1
Libc/os/run/rand/io reorganization. Close #1373 . Close #1638 .
...
- Move io, run and rand to core.
- Remove incorrect ctypes module (use libc).
- Remove os-specific modules for os and fs.
- Split fs between core::path and core::os.
2012-03-12 20:08:29 -07:00
Patrick Walton
4571175568
stdlib: Make list::find do what the docs say it does.
...
Talked on #rust about this change, got approval from graydon and brson. Will bring up tomorrow at meeting to verify.
2012-03-12 18:28:16 -07:00
Brian Anderson
d60813146d
std: Sort test failures. Closes #1929
2012-03-12 17:31:17 -07:00
Tim Chevalier
40a5c56345
Fix Windows build breakage
2012-03-10 20:44:10 -08:00
Tim Chevalier
35400e13ad
Use loop instead of while(true) in libraries and compiler itself
...
And remove spurious fails/unreachable() calls.
2012-03-10 20:34:17 -08:00
Brian Anderson
91e5a1c8b3
core: Remove the nearly empty math module
...
This mod only had two functions, all of whose users have been changed
to use the uint module.
2012-03-10 17:43:19 -08:00
Brian Anderson
95521c4084
std: Convert to rustdoc
2012-03-09 22:56:53 -08:00
Tim Chevalier
321fd80219
Add an infinite loop construct
...
Add a loop {} construct for infinite loops, and use it in test
cases. See #1906 for details.
2012-03-09 16:40:58 -08:00
Tim Chevalier
0c5fdc8745
Rename last to last_opt, last_unsafe to last
...
As per discussion on IRC. I am about to file an RFC for further
discussion about the more general issue of whether to enforce
invariants through types, typestate, or dynamic checks, but for now,
removing the misleading name "last_unsafe".
2012-03-08 15:25:56 -08:00
Tim Chevalier
d048a00cf3
Change util::unreachable to core::unreachable
...
Closes #1931
2012-03-08 14:30:01 -08:00
Tim Chevalier
ebc1d3e704
Rename last_total to last_unsafe
...
See Issue 1943 for any discussion (reopen it if necessary).
Closes #1943
2012-03-08 13:07:31 -08:00
Patrick Walton
c9375fed8d
stdlib: Stop incurring vtable dispatch costs when hashmaps are used
...
This required changing almost all users of hashmaps to import the hashmap interface first.
The `size` member in the hashmap structure was renamed to `count` to work around a name conflict.
2012-03-07 17:35:13 -08:00
Patrick Walton
c245d9e980
Revert "stdlib: Stop incurring vtable dispatch costs when hashmaps are used"
...
This reverts commit f0250a23d3
.
2012-03-07 16:56:45 -08:00
Patrick Walton
f0250a23d3
stdlib: Stop incurring vtable dispatch costs when hashmaps are used
...
This required changing almost all users of hashmaps to import the hashmap interface first.
The `size` member in the hashmap structure was renamed to `count` to work around a name conflict.
2012-03-07 16:51:31 -08:00
Brian Anderson
d2135597e9
std: Use util::unreachable
2012-03-05 18:23:01 -08:00
Graydon Hoare
6c87c34277
Remove dead code from rt (debug_obj, rust_obj, rust_closure, rust_box_obj, rust_vtable)
2012-03-05 15:50:11 -08:00
Erick Tryzelaar
faccd4ac92
std: export json::error.
2012-03-05 08:47:21 -08:00
Erick Tryzelaar
6b0c4822c1
std: add a fs::remove_file function.
2012-03-02 19:15:36 -08:00
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