Commit Graph

1780 Commits

Author SHA1 Message Date
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
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
bors
0bc1ca4045 auto merge of #8631 : anasazi/rust/homing-io, r=brson
libuv handles are tied to the event loop that created them. In order to perform IO, the handle must be on the thread with its home event loop. Thus, when as task wants to do IO it must first go to the IO handle's home event loop and pin itself to the corresponding scheduler while the IO action is in flight. Once the IO action completes, the task is unpinned and either returns to its home scheduler if it is a pinned task, or otherwise stays on the current scheduler.

Making new blocking IO implementations (i.e. files) thread safe is rather simple. Add a home field to the IO handle's struct in uvio and implement the HomingIO trait. Wrap every IO call in the HomingIO.home_for_io method, which will take care of the scheduling.

I'm not sure if this remains thread safe in the presence of asynchronous IO at the libuv level. If we decide to do that, then this set up should be revisited.
2013-08-20 17:12:09 -07:00
bors
5034792c88 auto merge of #8584 : thestinger/rust/jemalloc, r=graydon
This reverts commit 371a316ec9.

Closes #7217
2013-08-19 20:21:58 -07:00
Daniel Micay
ef436637ea jemalloc: use $(AR), not ar 2013-08-19 20:53:02 -04:00
Graydon Hoare
517e611271 regenerate configure 2013-08-19 20:48:11 -04:00
Eric Reed
88f718341e Instruct event loops to ignore SIGPIPE when constructed.
libuv does not always catch SIGPIPE.
2013-08-19 16:26:50 -07:00
Graydon Hoare
2c7164595f rt: make jemalloc header conform to android signature. 2013-08-19 16:09:46 -07:00
bors
3bc6858428 auto merge of #8551 : huonw/rust/speling, r=alexcrichton
(This doesn't add/remove `u`s or change `ize` to `ise`, or anything like that.)
2013-08-18 05:11:58 -07:00
Brian Anderson
a4d171e009 rt: Remove unused uv helpers 2013-08-16 13:24:25 -07:00