Brian Anderson
6bdf347418
rt: Make __morestack (without unwinding) work on 32-bit linux
2011-11-22 18:02:10 -08:00
Niko Matsakis
9fa44a41e6
get pure wrappers approach running
2011-11-18 16:32:19 -08:00
Brian Anderson
d6ab8ebb07
rt: Add more comments to rust_task_sleep
2011-11-18 16:02:48 -08:00
Brian Anderson
9aa67052e1
rt: Remove some stack-wasting macros from rust_task::yield
2011-11-18 15:59:10 -08:00
Brian Anderson
71bcba6815
intrinsics: Remove declaration of port_recv
2011-11-18 15:37:14 -08:00
Brian Anderson
1e58049da2
rt: Remove fail calls from rust_task::yield
2011-11-18 15:36:48 -08:00
Brian Anderson
792068d871
rt: Remove unblock call from rust_task::yield
2011-11-18 14:45:48 -08:00
Brian Anderson
0f339b481a
rt: Remove a lock from task_start_wrapper that does nothing
2011-11-18 13:38:20 -08:00
Brian Anderson
3cfcdb4bb2
rt: Replace two uses of yield with ctx->swap
...
These uses aren't really doing a full yield. They are just giving up control
to the scheduler and will never return.
2011-11-18 13:38:18 -08:00
Brian Anderson
57b43b53f9
rt: Add comments to rust_task::yield
2011-11-18 13:28:12 -08:00
Brian Anderson
d1ef29ab37
rt: rust_task::conclude_failure doesn't need to call unblock
2011-11-18 13:23:27 -08:00
Brian Anderson
3a6320f71b
intrinsics: Eliminate recv intrinsic
...
This intrinsic existed just to get ahold of the return pointer. I replaced it
with a call_with_retptr intrinsic that grabs the return pointer and passes it
to another Rust function, thereby eliminating the need to call C functions on
the Rust stack.
2011-11-18 12:48:54 -08:00
Brian Anderson
93931311ff
rt: Add FIXMEs about races in rust_task
2011-11-18 10:32:27 -08:00
Brian Anderson
0dfa1410d3
rt: Remove task::on_wakeup. Unused
2011-11-18 10:32:27 -08:00
Brian Anderson
63d40b8ab6
rt: Remove some unnecessary setting of rust_task::killed
...
The value of this variable doesn't matter after the task fails.
2011-11-18 10:32:27 -08:00
Brian Anderson
d52888f0ba
rt: Remove rust_task::yield. Unused
2011-11-18 10:32:27 -08:00
Brian Anderson
5e9f9e8c48
rt: Add some comments about methods that run on the Rust stack
2011-11-18 10:32:27 -08:00
Brian Anderson
21865ddce6
intrinsics: Remove the call to get_task from task_sleep
2011-11-18 10:32:27 -08:00
Brian Anderson
eecbc815ac
intrinsics: Add some comments
2011-11-18 10:32:27 -08:00
Brian Anderson
3feaecd757
intrinsics: Move the call to upcall_fail out of rust_intrinsic_cast
2011-11-18 10:32:27 -08:00
Brian Anderson
9ca2005959
rt: Remove size_of and align_of functions. Now written in Rust
2011-11-18 10:32:27 -08:00
Niko Matsakis
eff7fae7b9
comparing/walking two pointers still aligns same as 1 ptr
2011-11-17 15:41:45 -08:00
Niko Matsakis
60e93cd1ec
Re-enable cycle coll. on x86_64, seems to work better now.
2011-11-17 14:40:03 -08:00
Niko Matsakis
f597971441
make ref cnts a long not an int
2011-11-17 14:23:48 -08:00
Niko Matsakis
11187437c5
Merge branch 'master' of github.com:graydon/rust
2011-11-17 13:44:04 -08:00
Brian Anderson
6a0e85b81c
Remove intrinsic_2 functions
2011-11-17 13:23:35 -08:00
Niko Matsakis
f9231e932c
add an extra underscore
2011-11-17 12:02:15 -08:00
Brian Anderson
dd275cd749
Stop using temporary intrinsic_2 functions
2011-11-17 11:55:04 -08:00
Brian Anderson
30871408a6
rt: Remove debug printf in rust_start
2011-11-17 11:48:10 -08:00
Brian Anderson
a92699fe58
rt: Make morestack link on x86_64. Still utterly broken
2011-11-17 11:12:59 -08:00
Brian Anderson
d624e523c9
rt: Make stack growth code build on Linux
2011-11-17 10:53:06 -08:00
Patrick Walton
e6c3c4e48c
rt: More work on morestack
2011-11-17 10:52:59 -08:00
Brian Anderson
02cebbb9f1
Revert "rt: More work on morestack"
...
This reverts commit 68aff2ad6d
.
2011-11-16 18:49:19 -08:00
Brian Anderson
5559e149e4
Revert "rt: Make stack growth code build on Linux"
...
This reverts commit da4b7da4e1
.
2011-11-16 18:49:07 -08:00
Brian Anderson
da4b7da4e1
rt: Make stack growth code build on Linux
2011-11-16 18:33:00 -08:00
Patrick Walton
68aff2ad6d
rt: More work on morestack
2011-11-16 18:00:57 -08:00
Brian Anderson
8199558443
rt: Remove an unnecessary check from rust_task::yield
2011-11-16 17:55:04 -08:00
Brian Anderson
bae817efe6
rt: Remove rust_task::notify_tasks_wating_to_join
2011-11-16 17:22:14 -08:00
Brian Anderson
342dc21d2c
Disconnect ports before draining them. Issue #1155
2011-11-16 17:22:14 -08:00
Niko Matsakis
cbcdeb80d9
remove wrappers from intrinsics
2011-11-16 15:27:08 -08:00
Brian Anderson
d2199e8716
Various fixes for x86_64 on linux
...
Configure LLVM correctly, use the right data layout, add the readlink
function back, fix C constants, etc.
2011-11-16 15:24:56 -08:00
Niko Matsakis
5aaafa704f
adjust alignment, size of tag variant id and make it easy to
...
adjust in the future
2011-11-16 15:16:43 -08:00
Niko Matsakis
26b0662fb8
fix alignment for chan_handle structs; rust equiv is translated
...
to char[16], not struct{long,long}
2011-11-16 15:16:42 -08:00
Niko Matsakis
69911c2bc1
temp. disable cycle coll. on x86_64
2011-11-16 15:16:41 -08:00
Niko Matsakis
b78c096ebc
enum does not have a size consistent with a tag, so use unsigned long instead
2011-11-16 15:16:41 -08:00
Niko Matsakis
59e2a0a9c1
add shim upcall func
2011-11-16 15:16:40 -08:00
Niko Matsakis
3617f0377f
correct alignment
2011-11-16 15:16:40 -08:00
Niko Matsakis
85083ec51b
begin efforts to use shim functions for c-stack calls
2011-11-16 15:16:40 -08:00
Patrick Walton
b3cf0c4d1b
Revert "rt: More work on morestack"
...
This reverts commit ced0d4f15e
.
2011-11-14 16:20:53 -08:00
Patrick Walton
ced0d4f15e
rt: More work on morestack
2011-11-14 16:17:08 -08:00
Brian Anderson
5b9f76eb7c
stdlib: Run cleanups on data that fails to send
2011-11-14 14:07:52 -08:00
Brian Anderson
f619d5e9e2
rt: Add locking invariants to rust_port
2011-11-13 16:38:34 -08:00
Brian Anderson
58e923de6e
rt: Perform task notification before killing the parent task
2011-11-13 16:36:47 -08:00
Brian Anderson
138d9ca5d5
Drop enqueued elements when a port is destructed. Closes #1155
2011-11-13 15:43:58 -08:00
Brian Anderson
a6f9f73f06
rt: Make rust_port's ref counting non-atomic
...
Now that the task lock must be held there's no need for atomicity
2011-11-11 16:12:48 -08:00
Brian Anderson
3d9023fa4d
rt: Take the task lock when dropping port refcounts
...
Sucks, but otherwise there are races when one task drops the refcount to zero
followed by another bumping it again
2011-11-11 16:11:31 -08:00
Brian Anderson
07771ec25b
Fix run-fail/spawnfail
...
Catch the case where a parent is killed immediately before it terminates
normally.
2011-11-11 14:20:00 -08:00
Brian Anderson
2385deaa0d
rt: Add locking invariants to rust_task
2011-11-11 12:11:21 -08:00
Brian Anderson
5e0e32faac
rt: Remove drop_port. Unused
2011-11-11 12:11:21 -08:00
Brian Anderson
5d1e321ecb
rt: Remove rust_chan
2011-11-11 12:11:21 -08:00
Brian Anderson
f705f68121
rt: Remove rust_aio.cpp. Bitrotted.
2011-11-10 18:02:08 -08:00
Brian Anderson
793da65a8e
rt: Move rust_chan::send to rust_port::send
2011-11-10 17:53:19 -08:00
Brian Anderson
371574f64b
rt: Remove rust_token. Unused
2011-11-10 17:35:21 -08:00
Brian Anderson
f5c4ce79a7
rt: Remove del_chan, take_chan, drop_chan. Unused
2011-11-10 17:28:28 -08:00
Brian Anderson
e4f980810b
rt: Simplify channel-port association
...
It turns out that there's only ever a single channel per port these days,
and it always has the same lifetime as the port, so we don't need a list or a
complex association protocol.
2011-11-10 17:26:22 -08:00
Brian Anderson
08d0ff38bc
rt: Remove new_chan. Not needed
2011-11-10 15:59:31 -08:00
Brian Anderson
0dc8387995
rt: Remove chan_send. Unused.
2011-11-10 15:36:09 -08:00
Niko Matsakis
7baf68b0bd
hack around the problem that x86_64 expects first few args in regs.
...
call on c-stack expects all data to be delivered on the stack.
2011-11-09 20:05:49 -08:00
Niko Matsakis
fc064f4410
use uint64_t when adjusting stack ptr
2011-11-09 20:05:49 -08:00
Niko Matsakis
ff5b319ce5
correct stack alignment
2011-11-08 21:14:09 -08:00
Niko Matsakis
2edd3135ad
cleanup, removing comments and dead code
2011-11-08 21:14:09 -08:00
Niko Matsakis
1a28ad4fa4
fix bug in loading argument regs
2011-11-08 21:14:09 -08:00
Niko Matsakis
b30a76ed1b
correct calling convention for x86_64
2011-11-08 21:14:09 -08:00
Niko Matsakis
0668eed81e
fix alignment of xmm register storage
2011-11-08 21:11:47 -08:00
Niko Matsakis
e24d1dd6f5
rewrite so that memory allocations have 0 overhead by default
2011-11-08 21:11:47 -08:00
Niko Matsakis
75b98a9076
Correct the arithmetic on 64-bit builds.
2011-11-08 21:11:47 -08:00
Erick Tryzelaar
1c87b9708c
Removing the baked in libuv.
2011-11-08 19:01:47 -08:00
Brian Anderson
061d2c2f77
Make task_sleep an intrinsic.
2011-11-08 15:58:08 -08:00
Brian Anderson
68f82de817
rt: Remove task_yield builtin
...
This is just a special case of task_sleep
2011-11-08 14:28:41 -08:00
Erick Tryzelaar
a727bbaf70
Revert "Removing the baked in libuv."
...
This reverts commit df30663fdd
.
2011-11-07 21:38:33 -08:00
Erick Tryzelaar
e8519b5b2f
Revert "Reimporting libuv as a submodule."
...
This reverts commit cbae254d8a
.
2011-11-07 21:38:18 -08:00
Erick Tryzelaar
cbae254d8a
Reimporting libuv as a submodule.
...
Closes #1152 .
2011-11-07 21:34:17 -08:00
Erick Tryzelaar
df30663fdd
Removing the baked in libuv.
2011-11-07 21:34:17 -08:00
Brian Anderson
8857657640
Rename rust_uv.cpp to rust_aio.cpp
2011-11-07 19:35:39 -08:00
Brian Anderson
fdeb5ba304
Upgrade libuv to f1859eb841be2fe48512bc10e64556383f408b01
2011-11-07 19:24:25 -08:00
Brian Anderson
b0c2416270
Clean up logging output. Closes #1088
2011-11-07 14:14:36 -08:00
Niko Matsakis
b578ed9b2a
add required symbols
2011-11-02 14:14:20 -07:00
Niko Matsakis
0982c7f78c
hastily port so we don't fail to build
2011-11-02 14:14:20 -07:00
Niko Matsakis
f1bc9307d8
get things checking on ia32
2011-11-02 14:14:19 -07:00
Niko Matsakis
f05761ddb3
enable intrinsics for multiple arch
2011-11-02 14:13:22 -07:00
Niko Matsakis
20946e6970
start going back to an i386 build
2011-11-02 14:13:22 -07:00
Niko Matsakis
8011e3fabb
hack around on makefiles trying to get a 64 bit build
...
right now there are many temporary hacks, search for NDM to find them
2011-11-02 14:13:22 -07:00
Niko Matsakis
020cd360e1
modify x64 assembly and so forth
2011-11-02 14:13:22 -07:00
Niko Matsakis
d3e865438f
do not preserve caller-saved registers
2011-11-02 14:13:22 -07:00
Niko Matsakis
6a0d86c754
copy over x86-specific code
2011-11-02 14:13:22 -07:00
Patrick Walton
587c118cac
rt: Fix long lines
2011-10-31 15:50:15 -07:00
Patrick Walton
956812bda5
rt: Have __morestack conform to the calling convention that LLVM generates on x86
2011-10-31 15:41:19 -07:00
Patrick Walton
c9003d301f
Stub a __morestack implementation and stack segment allocation. Untested.
2011-10-31 14:20:56 -07:00
Brian Anderson
17c651b3b0
Remove task::join_id
...
This is the old, racy way of joining to a task. It is no longer used.
2011-10-26 20:43:47 -07:00
Niko Matsakis
c78b1639b4
fix c-stack-cdecl when used w/ i64
2011-10-24 17:03:18 -07:00
Niko Matsakis
8f2d75d53c
switch over sqrt from llvm to c-stack-cdecl, exposing a bug in
...
the supported return types of upcall_c_stack
2011-10-24 16:06:18 -07:00
Niko Matsakis
c81808a9f7
update intrinsics file
2011-10-24 16:06:18 -07:00
Niko Matsakis
02d7a1e781
move sys fns into c-stack-cdecl and get_type_desc() into rusti
...
there is one test failure, stdtest/sys.rs, which inexplicably
(thus far) fails to compile because it invokes
sys::rustrt::last_os_error() instead of invoking
sys::last_os_error(). If stdtest/sys.rs is updated to invoke
the wrapper, it passes. Still tracing the source of this error.
2011-10-24 16:06:17 -07:00
Niko Matsakis
0598635bdc
migrate leak
2011-10-24 16:06:17 -07:00
Niko Matsakis
5ddc15e42e
migrate debugging funcs
2011-10-24 16:06:17 -07:00
Niko Matsakis
96629d5c21
move rand functions into c-stack-cdecl mode
2011-10-24 16:06:17 -07:00
Niko Matsakis
b13e7e0f3d
move fs routines to c-stack-stdlib
2011-10-24 16:06:16 -07:00
Niko Matsakis
4880065429
rip out unused task pointers
2011-10-24 16:06:16 -07:00
Niko Matsakis
d9b23cb022
move comm functions out of rust abi
2011-10-24 16:06:16 -07:00
Austin Seipp
1703e9ec89
Fix an insane rt build error running 'make check -j3'
2011-10-23 19:04:49 -07:00
Brian Anderson
bdbeb75bfb
Upgrade libuv to 179f475b2ad64729feb0422f06ce133cb364482a
2011-10-22 17:37:18 -07:00
Brian Anderson
160c56e768
Get 'make tidy' to work rustllvm and rt again
2011-10-21 17:35:52 -07:00
Brian Anderson
739b1b5b53
Cycle-collect objects
2011-10-21 17:21:59 -07:00
Niko Matsakis
67d3d9308f
add get_type_desc to list of exported funcs
2011-10-21 16:19:27 -07:00
Niko Matsakis
cdf91bbf9a
add get_type_desc function to library
2011-10-21 16:19:27 -07:00
Brian Anderson
7ab6315f5f
Free vectors during cc sweep
2011-10-21 16:07:40 -07:00
Brian Anderson
2d713215a8
Record the internal reference count of environment boxes. Closes #981
2011-10-21 14:05:16 -07:00
Brian Anderson
034408c40a
Convert DPRINT to LOG in rust_cc.cpp and add more logging
2011-10-20 18:19:06 -07:00
Marijn Haverbeke
ba1c6fcf38
Remove the last vestiges of main.ll
...
Closes #992
2011-10-20 17:36:28 +02:00
Marijn Haverbeke
ef63f09dcd
Don't rely on main.ll anymore
...
I'll remove the actual file after I register a snapshot.
Issue #992
2011-10-20 17:18:38 +02:00
Marijn Haverbeke
8124846b2c
Get rid of taskpointer-passing throughout the compiler
...
Only intrinsics still take a dummy taskptr. We'll have to do some
makefile stunts to snapshot a version without taskptrs-in-intrinsics.
Issue #466
2011-10-20 14:22:17 +02:00
Marijn Haverbeke
457683c7fe
Do not pass taskpointers to "rust" native functions
...
Issue #466
2011-10-20 14:22:17 +02:00
Marijn Haverbeke
6323a012bd
Remove taskptr argument from upcalls
...
Issue #466
2011-10-20 13:15:21 +02:00
Marijn Haverbeke
e927df17f7
Remove spawn_wrap and main_wrap kludges
...
This isn't needed now that our functions are cdecl (and was apparently
only still working by accident).
Issue #992
2011-10-20 13:15:09 +02:00
Marijn Haverbeke
243c5c3479
Use snap runtime, and the old main.o, for stage1
...
This is intended to be reverted again after I register the next
snapshot.
2011-10-20 13:14:28 +02:00
Patrick Walton
8d8b48a901
rt: Make C stack switching Valgrind-clean by warning Valgrind when we're about to write to the C stack from the Rust stack
2011-10-05 16:33:17 -07:00
Niko Matsakis
61c9c46d94
remove pthread_exit() from rust_start()
...
It was causing OS X Lion to hang and (according to Apple) is undefined
in any case
2011-10-05 16:10:36 -07:00
Patrick Walton
af60cf407c
rt: Switch the AIO stuff to the C stack
2011-10-04 12:08:06 -07:00
Patrick Walton
53c9b9a5dd
rt: Switch the libuv bindings over to not using explicit task pointers
2011-10-03 18:23:30 -07:00
Patrick Walton
3ad4fa00ac
rt: Fix comment typo in rust_uv.cpp
2011-10-03 18:23:30 -07:00
Patrick Walton
a7b44e847a
rt: Make the builtins no longer take an explicit task parameter
2011-10-03 18:23:30 -07:00
Patrick Walton
4793a02376
rt: Omit leading underscore on symbol names on Linux
2011-09-30 18:50:05 -07:00
Patrick Walton
e31849fb79
rt: Fix assembler for C calls to work more like a regular function call
2011-09-29 17:34:49 -07:00
Patrick Walton
d8a80cb31f
rt: Add a call stub that switches to the C stack, untested as of yet
2011-09-28 12:26:36 -07:00
Patrick Walton
1eaaae860f
rt: Add an upcall to allocate space on the C stack. This will be used for native calls on the C stack.
2011-09-28 11:31:44 -07:00
Patrick Walton
e8757ea01f
rt: Expose the C stack inside the Rust scheduler so that C calls can switch to it
2011-09-28 10:22:02 -07:00
Patrick Walton
dbf472b0df
rustc: Switch to cdecl for all calls. This is needed to make stack growth efficient, as I need to use eax and ecx in the function prologue and can't afford to stomp on incoming arguments.
2011-09-28 10:22:02 -07:00
Patrick Walton
9ba86178ef
rt: Store the task in TLS
2011-09-27 18:12:03 -07:00
Patrick Walton
a88d9effbc
rt: Don't run arbitrary destructors on cycle collection; that's just broken.
2011-09-26 17:41:22 -07:00
Patrick Walton
5c973142df
rt: Turn on cycle collection at task death; add a test case
2011-09-26 16:59:15 -07:00
Patrick Walton
ad19ab4c6f
rt: Make the logic that moves environments between tasks update the GC alloc chain correctly
2011-09-26 16:59:15 -07:00
Patrick Walton
81f1863de7
rt: Remove obsolete comment
2011-09-26 10:24:21 -07:00
Patrick Walton
7979bbbf51
rt: Sweep in cycle collection
2011-09-23 17:57:25 -07:00
Patrick Walton
41082c6b83
rt: Whitespace police
2011-09-23 17:57:25 -07:00
Patrick Walton
b995028c47
rt: Turn off some debug code
2011-09-23 17:57:25 -07:00
Patrick Walton
0c4e0fdfae
rt: Get rid of the hack that looks for captured type descriptors adjacent to the root one for functions and objects
2011-09-23 17:57:25 -07:00
Erick Tryzelaar
5f066e06b9
Update to libuv commit 3ca382.
...
This patch changes libuv's gyp build system to
make it's own makefiles. To generate them for rust,
run these commands. They requires python 2.x to
work:
$ mkdir -p src/rt/libuv/build
$ svn co http://gyp.googlecode.com/svn src/rt/libuv/build/gyp
$ ./etc/src/gyp_uv
2011-09-23 16:53:06 -07:00
Patrick Walton
87700adb2f
rt: Add missing <stdint.h> in rust_abi.h
2011-09-23 15:14:44 -07:00
Patrick Walton
e036c9d8d2
rt: Add missing const on the Windows path
2011-09-23 15:08:37 -07:00
Patrick Walton
557d641175
rt: Get RUST_TRACK_ORIGINS working. You can now call 'debug::dump_origin' in gdb and get a backtrace saying where a box came from.
2011-09-23 15:06:28 -07:00
Patrick Walton
aabff480c9
rt: Factor out stack walking into rust_abi.cpp
2011-09-23 12:49:20 -07:00
Patrick Walton
82935c2d17
rt: Fix message formatting issues in rust_debug
2011-09-23 12:27:13 -07:00
Patrick Walton
03f0932a6d
rt: ifdef out backtrace() on Windows
2011-09-23 12:26:41 -07:00
Patrick Walton
9226ac9ec5
rt: Fix build bustage due to gcc's format string warnings
2011-09-23 12:09:52 -07:00
Patrick Walton
61afef29a1
rt: Add a RUST_TRACK_ORIGINS debug flag to help track down memory corruption
2011-09-23 11:42:20 -07:00
Patrick Walton
dbdeff659f
rt: Factor out the logic that handles the various magic debug environment variables
2011-09-23 11:04:14 -07:00
Patrick Walton
f8007b5535
rt: Remove the problematic min()/max()/align()/abs() macros from isaac/standard.h, as they're unused
2011-09-23 11:04:14 -07:00
Brian Anderson
dbd2ee015a
Remove is_stateful flag from tydesc. Closes #136
2011-09-22 22:15:25 -07:00
Marijn Haverbeke
aad1342e13
Fix long line
2011-09-22 09:23:07 +02:00
Marijn Haverbeke
5e3d0e304f
Fix missing cast in do_cc
...
Apparently not needed on Mac (clang?), but breaking the win and linux boxes.
2011-09-22 09:17:26 +02:00
Patrick Walton
8c02adc630
rustc: Port the fn and obj traversal logic over from the GC branch. Doesn't actually do anything yet due to lack of support in trans.
2011-09-21 19:08:26 -07:00
Patrick Walton
ad3b9c41b4
rt: Implement cycle collection marking. Simple cycles can now be detected.
2011-09-21 18:14:23 -07:00
Brian Anderson
a993621e43
Log and compare unique boxes
...
Issue #409
2011-09-21 17:08:40 -07:00
Jesse Ruderman
01ea880196
Re-wrap long line
2011-09-20 19:40:47 -07:00
Patrick Walton
eafb70072a
rt: Zero out allocations so that the CC won't die if it happens to run while a box is being constructed.
...
This is kind of unfortunate.
2011-09-20 19:15:46 -07:00
Patrick Walton
a63cc03a07
rt: Add some debug code (ifdef'd out) for diagnosing marking problems
2011-09-20 19:15:13 -07:00
Patrick Walton
ab76305cb9
rt: Skip over the reference count properly before walking the contents of the box when determining internal reference counts
2011-09-20 19:14:58 -07:00
Patrick Walton
74194df7dd
rt: Remove obsolete comment
2011-09-20 19:14:18 -07:00
Patrick Walton
b39c7c4c45
rt: Increase the tolerance of the vector range sanity check
2011-09-20 19:13:45 -07:00
Patrick Walton
e27279d7db
rt: Clean up debugging print statements in rust_obstack.cpp
2011-09-20 18:26:09 -07:00
Patrick Walton
be1feaa918
rt: First stab at computing internal reference counts
2011-09-20 17:49:49 -07:00
Patrick Walton
e26b1883dd
rt: Stub code for the cycle collector
2011-09-20 16:49:31 -07:00
Patrick Walton
c61691110a
rt: Make rust_shape.h able to be included in more contexts
2011-09-20 16:49:31 -07:00
Patrick Walton
77f0101edb
rt: Add an on-the-side GC chain
2011-09-20 15:35:14 -07:00
Patrick Walton
5209b19255
rt: Rename rand() to isaac_rand() since the former prevents lots of standard headers from being included
2011-09-20 15:34:47 -07:00
Patrick Walton
307957710c
rt: Remove the GC alloc chain
2011-09-20 14:20:16 -07:00
Patrick Walton
45086b7bfd
rt: Remove #include "rust_box.h"
2011-09-20 14:07:10 -07:00
Patrick Walton
9a8b4a1be6
Revert "rt: Rename rust_box to rust_box_legacy, as they're about to become self-describing"
...
This reverts commit f6871e832c
.
2011-09-20 13:57:04 -07:00
Patrick Walton
d73a8606c9
rt: Remove rust_box.h; I'm going to switch to an external map.
2011-09-20 13:55:23 -07:00
Patrick Walton
e981abdb01
rt: Remove upcall_malloc_box and upcall_free_box; I don't think they'll be necessary after all
2011-09-20 13:50:15 -07:00
Patrick Walton
3632629acc
rt: Introduce a self-describing box representation and functions to create and free them
2011-09-19 11:40:41 -07:00
Brian Anderson
4028a099f5
Yield after send
2011-09-16 11:08:01 -07:00
Patrick Walton
469853d5ff
rt: Add a new rust_box structure to the runtime that describes a self-describing box
2011-09-16 10:51:59 -07:00
Patrick Walton
f6871e832c
rt: Rename rust_box to rust_box_legacy, as they're about to become self-describing
2011-09-16 10:51:58 -07:00
Brian Anderson
25394950ae
Handle the case where a child task tries to kill a parent while it is dying
...
Still looks pretty racy
2011-09-16 10:05:12 -07:00
Patrick Walton
18cf4d904c
rt: Add libunwind.h support on Mac OS X
2011-09-15 12:52:50 -07:00
Brian Anderson
a0ad9a42cd
Unsupervise tasks before the scheduler kills them. Unblock before yield->fail
2011-09-14 17:05:35 -07:00
Brian Anderson
103197bc42
Make failure propagation to dead parents work
...
The failure will basically go 'through' the dead parent and continue
propagating the failure (as if the child was reparented).
2011-09-14 15:48:14 -07:00
Brian Anderson
9505d70513
Make linked task failure work again
2011-09-14 14:20:41 -07:00
Brian Anderson
22001d1dce
Remove hack_allow_leaks
...
Happy to close the loop on this one.
Issue #236
2011-09-11 17:31:40 -07:00
Brian Anderson
0ea55ffdc8
Use a unique exit status when the runtime fails normally
...
Check for it in run-fail tests
2011-09-11 17:31:40 -07:00
Brian Anderson
6f6f36172b
Remove unused task_exit function
...
Issue #236
2011-09-11 17:31:40 -07:00
Brian Anderson
9f4b4d89ce
Add upcall_rust_personality
...
This just wraps __gxx_personality_v0 with our upcall naming convention
Issue #236
2011-09-11 17:31:38 -07:00
Marijn Haverbeke
139b1d1b31
Get rid of some unused upcalls
...
I guess these became obsolete when the communication stuff moved into
the stdlib.
2011-09-09 14:02:07 +02:00
Marijn Haverbeke
bd2ec03771
Remove unused logging upcalls from runtime
2011-09-09 13:55:43 +02:00
Patrick Walton
87c6416d0c
rt: Don't double-print commas when logging e.g. a vec of boxes
2011-09-08 13:24:21 -07:00
Brian Anderson
c047cfb710
Unwind the stack on task failure
...
When a task fails, we will throw an exception, then catch it at the bottom of
the stack.
On Windows we don't do this yet because the exception doesn't propagate
correctly.
No cleanups yet.
Issue #236
2011-09-07 10:32:58 -07:00
Brian Anderson
c337fd5467
Child tasks take a ref to their parents
...
This is so that when a child dies after the parent, it still holds a valid
pointer and can call supervisor->kill() safely.
2011-09-07 10:32:58 -07:00
Brian Anderson
25ae3d655c
Rewrite spawn yet again
...
The motivation here is that the bottom of each stack needs to contain a C++
try/catch block so that we can unwind. This is already the case for main, but
not spawned tasks.
Issue #236
2011-09-07 10:32:58 -07:00
Brian Anderson
bb08ffbaf4
Refactor task failure a bit
...
Issue #236
2011-09-07 10:32:58 -07:00