Commit Graph

598 Commits

Author SHA1 Message Date
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
Michael Sullivan
1c62f5ff74 Get rid of all of the remaining /~s in the code base. 2012-07-12 15:13:18 -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
Brian Anderson
ccee8cb4f9 std: Fix deadlock by unsupervising the global I/O task 2012-07-10 15:10:13 -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
aa232a5269 Merge pull request #2846 from gwillen/1c882842e06431767676887f97f9dcc0ee50a7b9
Add map::clear
2012-07-09 13:26:48 -07:00
Patrick Walton
e41029d236 rustc: Switch to the new resolution pass 2012-07-09 10:27:13 -07:00
Glenn Willen
1c882842e0 Add clear() to the map interface.
Add clear to the map interface, and implement it in hashmap and smallintmap.
2012-07-08 16:06:48 -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
Tim Chevalier
889be71cb4 Comments only: change TODOs to FIXMEs and annotate them 2012-07-05 16:10:29 -07: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
7babcf55d7 std: Actually buildbase64 2012-07-05 14:40:51 -07:00
Brian Anderson
73f1f686e9 std: Export base64 2012-07-05 14:39:08 -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
Brian Anderson
a52135f5a7 Tidy 2012-07-04 15:01:24 -07:00
Brian Anderson
34660f099e Merge pull request #2798 from erickt/incoming
adding base64 and to_bytes to stdlib
2012-07-04 14:36:03 -07:00
Josh Matthews
10fd19580e When getopts encounters an option that takes an argument, it should treat the remainder of the current option string as the argument if it is non-empty. Fix #2791. 2012-07-04 14:23:22 -07:00
Erick Tryzelaar
abee158945 Add a basic base64 module 2012-07-03 21:29:45 -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
Patrick Walton
af38333f75 rustc: Speed up def ID parsing in the metadata 2012-07-03 17:12:02 -07:00
Graydon Hoare
be2c92078b Change crust -> extern. 2012-07-03 16:49:46 -07:00
Graydon Hoare
dc98165443 Mop up a few extra native -> foreign changes. 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
1c2843c8ad core: Eliminate some overloading of the name "future" in future.rs 2012-07-03 11:24:01 -07:00
Michael Sullivan
c854d6ebdb Remove some bogus exports. 2012-07-03 10:52:32 -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
18ac4eee3b std: Ignore a test that doesn't terminate on windows 2012-07-02 16:50:47 -07:00
Brian Anderson
3c6a5385d6 std: Add missing cfg attr for freebsd 2012-07-02 14:32:15 -07: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
5b41592f21 Make list::from_vec take a slice, not a ~. 2012-07-02 15:49:46 -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
Michael Sullivan
98e161f00e Switch the compiler over to using ~[] notation instead of []/~. Closes #2759. 2012-06-29 17:41:45 -07:00
Brian Anderson
483aee8dc4 Ignore various uv tests that fail 2012-06-29 17:16:16 -07:00
Jeff Olson
a3c933e0a0 std: uv::ll fixes for 32bit linux 2012-06-29 15:41:56 -07:00
Jeff Olson
087c4244b1 std: adding some basic docs for net::ip::get_addr 2012-06-29 15:41:56 -07:00
Jeff Olson
a696193bab std: cleanups, post-rebase 2012-06-29 15:41:56 -07:00
Jeff Olson
cfcd3e683b std/rt: cleanup and adding sockaddr_in6 mapping for win32 2012-06-29 15:41:56 -07:00
Jeff Olson
b074774232 rename net::ip tests en masse 2012-06-29 15:41:56 -07:00
Jeff Olson
b0c4b8ba18 std: fix errors from recent rebase and vec expr/type syntax update 2012-06-29 15:41:56 -07:00
Jeff Olson
9edcb104ff std: addressing #2656 (ipv6 support in net::tcp)
.. there are some additional FIXME nags in net_tcp (L 1012) about blocking
because libuv is holding unsafe ptrs to task local data. the proposed
fix going is not really feasible w/ the current design, IMO, but i'll
leave it there in case someone really wants to make the case without
creating more hassle than it's worth.
2012-06-29 15:41:56 -07:00
Jeff Olson
e097ff6398 std: add test for net::ip::get_addr failure 2012-06-29 15:41:56 -07:00
Jeff Olson
e5212de671 std: beef up ipv4 validation a bit
now the best of what we had prior to libuv integration (proper
validation of an ipv4 string), along with libuv support
(initial ipv6 support)

libuv has even weaker facilities for validating an input ipv6
(but still more than what we had), so eventually the "right"
answer would be to roll a proper ipv6 address string parser
in rust
2012-06-29 15:41:56 -07:00
Jeff Olson
81157ff1d2 std: add uv::ll::is_ipv6_addrinfo and get_INADDR_NONE 2012-06-29 15:41:56 -07:00
Jeff Olson
5014a2a413 std: whitespace/comment clean 2012-06-29 15:41:56 -07:00
Jeff Olson
5304698621 std: net::ip::get_addr is working w/ happy path test. needs more. 2012-06-29 15:41:56 -07:00
Jeff Olson
467e4fba33 WIP set aside unshift 2012-06-29 15:41:56 -07:00
Jeff Olson
b2894752e4 std: roughcut impl of net::ip::get_addr()
still needs tests
2012-06-29 15:41:56 -07:00
Jeff Olson
8afc113b61 std: wire-up low-level bindings to libuv's uv_getaddrinfo API and friends 2012-06-29 15:41:56 -07:00
Jeff Olson
ccd4bfb6ca std: mapped addrinfo, addr_in and uv_getaddrinfo_t as rust records 2012-06-29 15:41:55 -07:00
Jeff Olson
334c783d36 std: adding net::ip::v6 utils and rudimentary tests, huzzah! (see caveats)
libuv's own ip vetting code appears to in a somewhat woeful state,
for both ipv4 and ipv6 (there are some notes in the tests for net_ip, as
well as stuff added in uv_ll). They are aware of this and welcome patches.

I have rudimentary code in place that can verify whether the provided str
ip was, in fact, validly parsed by libuv, making a few assumptions:

* for ipv4, we assume that the platform's INADDR_NONE val is 0xffffffff ,
I should write a helper to return this value from the platform's libc
headers instead of hard-coding it in rust.
* for ipv6, we assume that the library will always return '::' for
malformed inputs.. as is the case in 64bit ubuntu. I need to verify this
on other platforms.. but at least the debugging output is in place, so
if expectations don't line up, it'll be straightforward to address
2012-06-29 15:41:55 -07:00
Jeff Olson
b6b138630e std: getting uv_ip6_* utils working in uv::ll
.. stub out some brokeness in net::tcp as a result of ipv6 coming online
2012-06-29 15:41:55 -07:00
Jeff Olson
30f26ddbc9 std: adding uv::ll::ip4_name and refactored net::ip to use it
replaces net::ip's previously, hand-rolled impl for ipv4 addr parsing..
we're relying on libuv, now
2012-06-29 15:41:55 -07:00
Jeff Olson
c027292846 std: mapping additional libuv ip string helpers.. add test for sockaddr_in6
.. but the test is kind of broken.. it appears that rust pads structs for
alignment purposes? I can't get the struct to == 28.. that appears to
be the native size of sockaddr_in6.. so we have a size 32 struct, for now.
2012-06-29 15:41:55 -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
942d3b527e std: test impl for using tcp_socket_buf and its reader/writer impls. fails.
needs work. probably the slice code and/or the way that the tcp_socket_buf
is wrapped in a shared box
2012-06-29 15:41:55 -07:00
Jeff Olson
99d2ec3ad1 std: renaming impl for tcp_socket and reshuffle/cleanup for tcp_socket_buf 2012-06-29 15:41:55 -07:00
Jeff Olson
156a4317f6 std: finish impl of io::writer for tcp_socket_buf 2012-06-29 15:41:55 -07:00
Jeff Olson
af3fa5306d std: rework signature of tcp::write common impl to make io::writer possible 2012-06-29 15:41:55 -07:00
Jeff Olson
28ab8b841a std: add buffered wrapper to tcp_socket + io::reader impl. no tests, yet.
need to do some other work, in the subsequent commit, to add io::writer,
then tests.
2012-06-29 15:41:55 -07:00
Jeff Olson
31c33ca5ff std: doc and misc cleanup in net::tcp
* updated rustdoc info for several functions
* changed read_stop to take control of the port returned by read_start
* made write_future do an explicit data copy with the binary vector it is
passed
2012-06-29 15:41:55 -07:00
Jeff Olson
f7e3a4e036 std: EADDRINUSE and EACCES err tests for tcp server + more cleanup
.. confounded resolve!
2012-06-29 15:41:55 -07:00
Jeff Olson
235f6c7ab7 std: factor main body of tcp::listen into reusable listen_common 2012-06-29 15:41:55 -07:00
Jeff Olson
d79d0aa1c8 std: some cleanup in net::tcp rename listen_to_conn->listen 2012-06-29 15:41:55 -07:00
Jeff Olson
68e129dc39 std: dump the tcp::new_listener server API 2012-06-29 15:41:55 -07:00
Jeff Olson
5d86686e7f std: mod cleanup, impl/test for conn. refused err + mem leak fix 2012-06-29 15:41:55 -07:00
Jeff Olson
900e446015 std: import/export cleanup in net_tcp 2012-06-29 15:41:54 -07:00
Jeff Olson
79e279ee12 std: kludge export of net_ip in std.rc until submodule export is sorted 2012-06-29 15:41:54 -07:00
Ben Blum
af2d01e36b Fix sys::refcount and remove dbg::refcount 2012-06-28 14:40:31 -04:00
Eric Holk
0b84437b68 Replace more vector additions (issue #2719) 2012-06-27 22:49:05 -07:00
Michael Sullivan
df9b43e27c Add an overloaded [] function to the map interface. Closes #2730. 2012-06-27 16:35:05 -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
Patrick Walton
d4672a078e libstd: Work around some metadata infelicities that are causing problems in resolve3, and remove an unused glob
Conflicts:

	src/libstd/net_tcp.rs
	src/libstd/par.rs
2012-06-26 14:37:29 -07:00
Eric Holk
ccd2394ff9 perf: improved the core-std benchmark 2012-06-26 14:08:16 -07:00
Michael Sullivan
329eca6044 Make vectors uglier ([]/~). Sorry. Should be temporary. Closes #2725. 2012-06-25 20:00:46 -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
Tim Chevalier
da470ff5b8 Merge 2012-06-25 13:29:41 -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
Tim Chevalier
21399dca12 Change resources to classes in libstd and rustc 2012-06-22 11:53:25 -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
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
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
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
Brian Anderson
8967a66724 std: Use the singular 'test' when running just 1. Closes #2554 2012-06-18 15:52:53 -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
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
Tim Chevalier
bc507c4ef5 Remove unneeded spawn in std::timer, and annotate a FIXME 2012-06-14 19:09:02 -07:00
Tim Chevalier
6b16325f43 Comments only: annotate FIXMEs 2012-06-14 18:46:33 -07:00
Brian Anderson
1db8515c08 Merge remote-tracking branch 'erickt/master' into incoming 2012-06-13 12:03:13 -07:00