Commit Graph

619 Commits

Author SHA1 Message Date
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