Commit graph

9409 commits

Author SHA1 Message Date
Haitao Li
18597b22b5 Remove a FIXME note about closed issue #1001 2012-04-08 18:24:32 +08:00
Brian Anderson
01dc4a8b26 core: Add priv::weaken_task 2012-04-07 19:56:41 -07:00
Brian Anderson
a6e748a1d9 rustc: Hash the CMH into symbol names 2012-04-07 17:50:49 -07:00
Brian Anderson
0094ffd99b test: Add test for mismatched nominal types when using multiple crate vers 2012-04-07 17:40:34 -07:00
Brian Anderson
e0f2341da1 test: Add another test using multiple versions of the same crate 2012-04-07 17:40:25 -07:00
Brian Anderson
320e6cebf4 test: Un-xfail run-pass/crateresolve2 2012-04-07 17:39:59 -07:00
Brian Anderson
d9070b4751 rustc: Append the crate version to symbols 2012-04-07 17:39:55 -07:00
Brian Anderson
19b7a7d803 Revert "Mangle exported names using node IDs rather than types"
This reverts commit c83d61de93.
2012-04-07 17:29:06 -07:00
Niko Matsakis
1e42c9a367 Do not consider ty_bot to be a "resolved type".
Fixes #2149. Fixes #2150. Fixes #2151.
2012-04-07 17:12:48 -07:00
Haitao Li
7aaa120bcc Check version when resolving transitive dependent crates
Issue #2138
2012-04-08 02:05:09 +08:00
Haitao Li
5aa5220f8a Encode crate dependencies' hash and version data 2012-04-08 02:00:58 +08:00
Niko Matsakis
5300662b4e Refactor inference so that subtyping/lub/glb share more code 2012-04-07 07:25:41 -07:00
Haitao Li
2f42b14b4f Use version and hash in crate_map name
Related issue #2137
2012-04-07 22:11:23 +08:00
Haitao Li
13686b6778 Use real crate name in crate_map name
`use` statement may introduce an crate name alias. This patch always
uses the link attrbute "name" as the crate's name when building the
crate map.

Closes #1706
2012-04-07 22:08:54 +08:00
Jesse Ruderman
139420f664 Correctly filter . and .. from the file list. 2012-04-06 19:07:22 -07:00
Brian Anderson
63942c969d core: Add priv::chan_from_global_ptr
This allows singleton, globally accessible tasks to be created
2012-04-06 17:44:26 -07:00
Jeff Olson
52e084b92a ignore tcp server/client test on linux 32bit, pending #2064
also println->log(debug,) and assorted cleanup ahead of merge to master
2012-04-06 15:35:50 -07:00
Jeff Olson
82f8d8cb2a removing some unneeded native fn mappingsin uv.rs and misc clean
.. 32bit linux issues persist.
2012-04-06 15:35:50 -07:00
Jeff Olson
6b349f3d11 experimenting with a different uv_buf_init impl to placate 32bit linux 2012-04-06 15:35:50 -07:00
Jeff Olson
ce34ccfec9 removed this binding a few commits back. missed it in rustrt.def.in 2012-04-06 15:35:50 -07:00
Jeff Olson
6189a0814b whitespace cleanup in uv_* 2012-04-06 15:35:50 -07:00
Jeff Olson
ed3c8610c3 adding 32bit-unix struct struct size differences 2012-04-06 15:35:50 -07:00
Jeff Olson
79269ea064 fixing some libuv stuff that leaked through the rebase 2012-04-06 15:35:50 -07:00
Jeff Olson
b39a43cd5c adding uv_hl module and some doc work 2012-04-06 15:35:50 -07:00
Jeff Olson
7c0fed469f rename uv::direct:: to uv::ll:: and put into its own crate 2012-04-06 15:35:50 -07:00
Jeff Olson
f18991d900 getting rid of ip4 port byval test... 2064 workarounds in place, for now 2012-04-06 15:35:50 -07:00
Jeff Olson
625c518eec whitespace cleanup after rebase 2012-04-06 15:35:50 -07:00
Jeff Olson
b712e5e132 line length fixes for make check 2012-04-06 15:35:49 -07:00
Jeff Olson
55143bb14c docs tweak for uv module 2012-04-06 15:35:49 -07:00
Jeff Olson
26addfdd81 fix size of uv_async_t on windows. is this the cause of the libuv segfault? 2012-04-06 15:35:49 -07:00
Jeff Olson
2b606ae5f3 add libuv error msg helpers.. flushing out windows tcp issue. 2012-04-06 15:35:49 -07:00
Jeff Olson
2c26cf7f96 add low-level uv_async bindings for use in tcp test 2012-04-06 15:35:49 -07:00
Jeff Olson
7176321685 refactored the tcp request and server tests into 1 test using loopback
..plus whitespace cleanup for make check
2012-04-06 15:35:49 -07:00
Jeff Olson
922ed6f947 hello world test for a tcp server in libuv
.. im now going to refactor the tcp request and server tests to utilize
each other, so no more external network ugliness
2012-04-06 15:35:49 -07:00
Jeff Olson
85e26eff6a fixing libuv stuff in win32 (see #2064) .. pass sockaddr_in by-ref, for now 2012-04-06 15:35:49 -07:00
Jeff Olson
ab1efb900e fixed unix uv struct err from prev commit, also starting uv docs 2012-04-06 15:35:49 -07:00
Jeff Olson
fcc973b5ac massaging out struct-size differences between unix and win32 2012-04-06 15:35:49 -07:00
Jeff Olson
f920d38808 adding missing rust_uv_* entries in rustrt.def.in 2012-04-06 15:35:48 -07:00
Jeff Olson
1eff88f434 win32 tweaks 2012-04-06 15:35:48 -07:00
Jeff Olson
9ad67e8c14 test_uv_tcp_request() fully working on linux
.. up next: windows!
.. impl'd uv::direct::read_stop() and uv::direct::close() to wrap things up
.. demonstrated sending data out of the uv_read_cb via a channel (which
we block on to recv all of it, complete w/ EOF notification) that is
read from after the loop exits.
.. helpers to read the guts of a uv_buf_t
.. an idea im kicking around: starting to pile up all of these hideous
data accessor functions in uv::direct .. I might make impl/iface pairs
for the various uv_* types that I'm using, in order to encapsulate those
data access functions and, perhaps, make the access look a little cleaner
(it still won't be straight field access, but it'll be a lot better)
.. formatting cleanup to satisfy make check
2012-04-06 15:35:48 -07:00
Jeff Olson
877747d0ac wired up uv_read_start and some helper funcs around uv_alloc_cb tasks 2012-04-06 15:35:48 -07:00
Jeff Olson
e0193dac6e uv_buf_t's for uv_write() passed by-val .. no more mallocs or ptr cop-outs
so we're now adhering the libuv C api and passing structs by-val where
it is expected, instead of pulling pointer trickery (or worse having to
malloc structs in c++ to be passed back to rust and then into C again)
2012-04-06 15:35:48 -07:00
Jeff Olson
e5ccc76bc4 fixed by-val from rust->c, use ++ sigil in native fn sig <-- NEVAR FORGET
have to use ++ sigil in rust-side extern fn decls in order to have rust
actually copy the struct, by value, onto the C stack. gotcha, indeed.

also adding a helper method to verify/remind how to pass a struct by-val
into C... check out the rust fn sig for rust_uv_ip4_test_verify_port_val()
for more infos
2012-04-06 15:35:48 -07:00
Jeff Olson
43c82bdb45 fixed passing in uv_buf_t ptr array in uv_write.. return status 0
ways to go, still..
2012-04-06 15:35:48 -07:00
Jeff Olson
f179029296 uv_write works, buffer passing still broke, can get sockaddr_in by val
.. but passing sockaddr_in by val back to C is broken, still passing by
ptr
.. the uv_write_cb is processed, but we have a status -1.. there is
also valgrind spew.. so buf passing is broken, still.
2012-04-06 15:35:48 -07:00
Jeff Olson
da779988d5 impl of rustrt::rust_uv_write in c++ and whitespace cleanup 2012-04-06 15:35:48 -07:00
Jeff Olson
05e2c131c4 changing ctypes:: to libc:: and impl of uv::direct::write() 2012-04-06 15:35:48 -07:00
Jeff Olson
af08aba573 some more stuff for libuv dealing w/ 1402.. should go away soon 2012-04-06 15:35:48 -07:00
Jeff Olson
3817ba7578 adding uv::direct and beginning to work out tcp request case
lots of changes, here.. should've commited sooner.
- added uv::direct module that contains rust fns that map, neatly, to
the libuv c library as much as possible. they operate on ptrs to libuv
structs mapped in rust, as much as possible (there are some notable
exceptions). these uv::direct fns should only take inputs from rust and,
as neccesary, translate them into C-friendly types and then pass to the
C functions. We want to them to return ints, as the libuv functions do,
so we can start tracking status.
- the notable exceptions for structs above is due to ref gh-1402, which
prevents us from passing structs, by value, across the Rust<->C barrier
(they turn to garbage, pretty much). So in the cases where we get back
by-val structs from C (uv_buf_init(), uv_ip4_addr(), uv_err_t in callbacks)
, we're going to use *ctypes::void (or just errnum ints for uv_err_t) until
gh-1402 is resolved.
- using crust functions, in these uv::direct fns, for callbacks from libuv,
will eschew uv_err_t, if possible, in favor a struct int.. if at all
possible (probably isn't.. hm.. i know libuv wants to eventually move to
replace uv_err_t with an int, as well.. so hm).
- started flushing out a big, gnarly test case to exercise the tcp request
side of the uv::direct functions. I'm at the point where, after the
connection is established, we write to the stream... when the writing is
done, we will read from it, then tear the whole thing down.

overall, it turns out that doing "close to the metal" interaction with
c libraries is painful (and more chatty) when orchestrated from rust. My
understanding is that not much, at all, is written in this fashion in the
existant core/std codebase.. malloc'ing in C has been preferred, from what
I've gathered. So we're treading new ground, here!
2012-04-06 15:35:48 -07:00
Tim Chevalier
9d274ec5f2 Re-rename option functions
get_with_default (nee from_maybe) => get_default
with_option (nee maybe) => map_default
with_option_do (nee may) => iter

As per discussion of 21be1379d5
2012-04-06 12:20:13 -07:00