Commit Graph

1788 Commits

Author SHA1 Message Date
Alex Crichton
6aba140fa7 rustdoc: Add sundown to src/rt/
This also starts compiling it in the same manner as linenoise, it's just bundled
with librustrt directly, and we export just a few symbols out of it.
2013-09-25 14:27:41 -07:00
Huon Wilson
0951313c1e Remove the C(++) ISAAC Rng from the old rt.
This has to leave rust_gen_seed and rng_gen_seed around since they're
used to initialise the std::rand RNGs.
2013-09-23 00:11:43 +10:00
bors
3c0013134c auto merge of #9280 : alexcrichton/rust/less-c++, r=brson
Some of the functions could be converted to rust, but the functions dealing with
signals were moved to rust_builtin.cpp instead (no reason to keep the original
file around for one function).

Closes #2674

Because less C++ is better C++!
2013-09-18 22:15:59 -07:00
Alex Crichton
c3ad785d83 Remove rust_run_program.cpp
Some of the functions could be converted to rust, but the functions dealing with
signals were moved to rust_builtin.cpp instead (no reason to keep the original
file around for one function).

Closes #2674
2013-09-18 20:58:56 -07:00
Alex Crichton
cb7756a81d Implement process bindings to libuv
This is a re-landing of #8645, except that the bindings are *not* being used to
power std::run just yet. Instead, this adds the bindings as standalone bindings
inside the rt::io::process module.

I made one major change from before, having to do with how pipes are
created/bound. It's much clearer now when you can read/write to a pipe, as
there's an explicit difference (different types) between an unbound and a bound
pipe. The process configuration now takes unbound pipes (and consumes ownership
of them), and will return corresponding pipe structures back if spawning is
successful (otherwise everything is destroyed normally).
2013-09-18 13:52:18 -07:00
Jeff Olson
bf399d558e std: bind uv_fs_readdir(), flesh out DirectoryInfo and docs/cleanup 2013-09-16 23:19:24 -07:00
Jeff Olson
b49fc4cf4e std: adding file::{stat,mkdir,rmdir}, FileInfo and FileReader/FileWriter
add ignores for win32 tests on previous file io stuff...
2013-09-16 23:17:46 -07:00
Jeff Olson
055488df1a merge cleanup 2013-09-16 23:17:46 -07:00
Jeff Olson
af650572e0 std/rt: in-progress file io work
std: remove unneeded field from RequestData struct

std: rt::uv::file - map us_fs_stat & start refactoring calls into FsRequest

std: stubbing out stat calls from the top-down into uvio

std: us_fs_* operations are now by-val self methods on FsRequest

std: post-rebase cleanup

std: add uv_fs_mkdir|rmdir + tests & minor test cleanup in rt::uv::file

WORKING: fleshing out FileStat and FileInfo + tests

std: reverting test files..

refactoring back and cleanup...
2013-09-16 23:17:46 -07:00
Alex Crichton
0af2bd829e Remove all usage of change_dir_locked
While usage of change_dir_locked is synchronized against itself, it's not
synchronized against other relative path usage, so I'm of the opinion that it
just really doesn't help in running tests. In order to prevent the problems that
have been cropping up, this completely removes the function.

All existing tests (except one) using it have been moved to run-pass tests where
they get their own process and don't need to be synchronized with anyone else.

There is one now-ignored rustpkg test because when I moved it to a run-pass test
apparently run-pass isn't set up to have 'extern mod rustc' (it ends up having
linkage failures).
2013-09-13 21:58:00 -07:00
bors
323e8f07ff auto merge of #9087 : fhahn/rust/rust_crate_map, r=brson
This patch converts the rust_crate_map.cpp to Rust as mentioned at the end of #8880.
2013-09-12 23:00:51 -07:00
Florian Hahn
2b5f4b55c0 Convert rust_crate_map.cpp to Rust
Conflicts:
	src/libstd/rt/logging.rs
2013-09-13 00:47:30 +02:00
Huon Wilson
a9184975da Add linenoise lock helpers to rustrt.def.in. 2013-09-12 17:07:24 +10:00
Huon Wilson
21ce41d42d extra: use a mutex to wrap linenoise calls and make them threadsafe.
Fixes #3921.
2013-09-11 22:20:33 +10:00
Alex Crichton
b4c36c2d1b Upgrade libuv to the current master (again)
This is a reopening of the libuv-upgrade part of #8645. Hopefully this won't
cause random segfaults all over the place. The windows regression in testing
should also be fixed (it shouldn't build the whole compiler twice).

A notable difference from before is that gyp is now a git submodule instead of
always git-cloned at make time. This allows bundling for releases more easily.

Closes #8850
2013-09-06 11:12:49 -07:00
Brian Anderson
c218694cec std::rt: Add libuv bindings for getaddrinfo 2013-09-05 14:22:15 -07:00
bors
60fba4d7d6 auto merge of #8880 : fhahn/rust/issue_8703, r=brson
I've started working on #8703.

RUST_LOG="::help" should work, I hope I'll be able to finish the rest this weekend.
2013-09-04 13:05:50 -07:00
Florian Hahn
e38739bb44 Convert rust_log.cpp to Rust, closes #8703 2013-09-04 14:18:56 +02:00
Daniel Micay
09ad0cd362 add type name to the tydesc
Closes #8926
2013-09-03 04:44:47 -04:00
Birunthan Mohanathas
30fc2c8df2 Fix incorrect strftime error handling in rust_localtime
Closes #8702.
2013-09-01 14:57:29 +03:00
Brian Anderson
3c5a43e5b6 Revert "auto merge of #8645 : alexcrichton/rust/issue-6436-run-non-blocking, r=brson"
This reverts commit b8d1fa3994, reversing
changes made to f22b4b1698.

Conflicts:
	mk/rt.mk
	src/libuv
2013-08-29 14:23:44 -07:00
Alex Crichton
b89e1c000e Implement process bindings to libuv
Closes #6436
2013-08-27 20:46:43 -07:00
Alex Crichton
ed204257a0 Upgrade libuv to the current master + our patches
There were two main differences with the old libuv and the master version:

1. The uv_last_error function is now gone. The error code returned by each
   function is the "last error" so now a UvError is just a wrapper around a
   c_int.
2. The repo no longer includes a makefile, and the build system has change.
   According to the build directions on joyent/libuv, this now downloads a `gyp`
   program into the `libuv/build` directory and builds using that. This
   shouldn't add any dependences on autotools or anything like that.

Closes #8407
Closes #6567
Closes #6315
2013-08-27 20:46:17 -07:00
klutzy
442f4a5f2c Support Win64 context switching
This patch saves and restores win64's nonvolatile registers.
This patch also saves stack information of thread environment
block (TEB), which is at %gs:0x08 and %gs:0x10.
2013-08-26 22:16:54 +09:00
klutzy
63e53b8af2 rt: Support SEH/SJLJ personality routine 2013-08-26 22:15:45 +09:00
klutzy
ef20bd44bd rt: Make valgrind Win64-compatible 2013-08-26 22:15:45 +09:00
klutzy
a35bfa2e9b rt: Add {get,record}_sp_limit on Win64
Uses ArbitraryUserPointer area at gs:0x28.
2013-08-26 22:14:31 +09:00
klutzy
5118ef6ff0 rt: Remove leading underscore on Win64
Win64 convention does not use underscore.
2013-08-26 22:14:23 +09:00
Brian Anderson
8fc1d9db21 std: Convert the runtime TLS key to a Rust global to avoid FFI 2013-08-24 15:46:03 -07:00
Brian Anderson
9cdfe1e603 rt: Remove rust_abi 2013-08-23 18:38:59 -07:00
Brian Anderson
0ee24437ce rt: Remove rust_util.cpp 2013-08-23 18:38:59 -07:00
Brian Anderson
b72c43739d rt: Remove old precise GC code 2013-08-23 18:38:59 -07:00
Brian Anderson
c17447f8b3 rt: Move some test functions to rust_test_helpers 2013-08-23 18:38:59 -07:00
Brian Anderson
4541c6cfe3 rt: Remove exit_status helpers 2013-08-23 18:38:59 -07:00
Brian Anderson
b4ef59db2f rt: Remove sync.h 2013-08-23 18:38:59 -07:00
Brian Anderson
e3419f9c45 rt: Memory regions are never synchronized now 2013-08-23 18:38:59 -07:00
Brian Anderson
0a1baef4f5 rt: Remove timer 2013-08-23 18:38:56 -07:00
Brian Anderson
a9d28b2d9d rt: Remove indexed_list 2013-08-23 14:46:23 -07:00
Brian Anderson
b3fa43f6e0 rt: Remove rust_exchange_alloc 2013-08-23 14:46:23 -07:00
Brian Anderson
74b2d9e19b rt: Remove last use of C++ exchange alloc 2013-08-23 14:46:23 -07:00
bors
9e1e152091 auto merge of #8596 : vadimcn/rust/master, r=alexcrichton
This resolves issue #908.  

Notable changes:
-  On Windows, LLVM integrated assembler emits bad stack unwind tables when segmented stacks are enabled.  However, unwind info directives in the assembly output are correct, so we generate assembly first and then run it through an external assembler, just like it is already done for Android builds.

- Linker is invoked  via "g++" command instead of "gcc": g++ passes the appropriate magic parameters to the linker, which ensure correct registration of stack unwind tables in dynamic libraries.
2013-08-22 21:06:25 -07:00
Jeff Olson
744c46225e make check appeasement 2013-08-22 16:33:59 -07:00
Jeff Olson
c0fba3c4ac rt: re-adding lines erroneous stripped out in merge conflict 2013-08-22 16:31:58 -07:00
Jeff Olson
a7ee85b50b std: stripping unneeded fcntl.h include from rust_uv.cpp 2013-08-22 16:31:58 -07:00
Jeff Olson
f60bd75f4d std: remove fcntl const bindings + making valgrind clean w/ no owned vecs 2013-08-22 16:31:57 -07:00
Jeff Olson
c49c2921b0 std: add read and unlink to low-level FileDescriptor + end-to-end CRUD test 2013-08-22 16:31:57 -07:00
Jeff Olson
dabbac1d6c std: working tests for low-level libuv open, write and close operations 2013-08-22 16:31:57 -07:00
Jeff Olson
a901b16690 std: bootstrapping libuv-based fileio in newrt... open & close
the test "touch"es a new file
2013-08-22 16:31:57 -07:00
Vadim Chugunov
84e683063b Emit unwind info in rustrt assembly files on Windows. 2013-08-22 00:12:43 -07:00
Vadim Chugunov
9e7f1fce73 Un-disable stack unwinding on Windows. 2013-08-22 00:12:43 -07:00