Commit Graph

1421 Commits

Author SHA1 Message Date
Elliott Slaughter 244b95490b gc: Refactoring. 2012-09-07 09:21:22 -07:00
Elliott Slaughter 8d17308eca rt: Add rust_gc_metadata to rustrt.def.in. 2012-09-07 09:21:22 -07:00
Elliott Slaughter 5637126449 rt: Fix GC metadata for 64-bit systems. 2012-09-07 09:21:22 -07:00
Elliott Slaughter 961bd48724 gc: Fix for GC missing stack frames across segment boundaries. 2012-09-07 09:21:22 -07:00
Elliott Slaughter 3f0d207b32 gc: Add stack walker for new garbage collector.
Safe points are exported in a per-module list via the crate map. A C
runtime call walks the crate map at startup and aggregates the list of
safe points for the program.

Currently the GC doesn't actually deallocate memory on malloc and
free. Adding the GC at this stage is primarily of testing value.

The GC does attempt to clean up exchange heap and stack-allocated
resource on failure.

A result of this patch is that the user now needs to be careful about
what code they write in destructors, because the GC and/or failure
cleanup may need to call destructors. Specifically, calls to malloc
are considered unsafe and may result in infinite loops or segfaults.
2012-09-07 09:21:21 -07:00
Niko Matsakis 5e36a99794 Refactor trans to replace lvalue and friends with Datum.
Also:
- report illegal move/ref combos whether or not ref comes first
- commented out fix for #3387, too restrictive and causes an ICE
2012-09-06 06:11:12 -07:00
Patrick Walton d155410674 rt: Make the boxed region come earlier in the rust_task structure.
This is so that GC can find it more easily.
2012-09-05 20:08:00 -07:00
Brian Anderson 97bb812238 Add rust_annihilate_box to rustrt.def.in 2012-08-31 16:19:02 -07:00
Brian Anderson a0de6b6d5f Merge remote-tracking branch 'erickt/incoming' 2012-08-31 16:14:18 -07:00
Elliott Slaughter f022f566a4 rt: Fix box annihilator to deallocate exchange heap boxes properly. 2012-08-31 15:10:52 -07:00
Elliott Slaughter f8323ac615 rt: Add interface to box annihilator. 2012-08-31 15:10:52 -07:00
Erick Tryzelaar 628b946186 libcore: rewrite str::reserve in pure rust. 2012-08-30 20:40:52 -07:00
Erick Tryzelaar 7bb65848a1 libcore: Rewrite str::unsafe::push_byte in pure rust. 2012-08-30 20:40:52 -07:00
Erick Tryzelaar 0e1a4a4da2 libcore: rewrite vec::unsafe::from_buf in pure rust 2012-08-30 20:40:52 -07:00
Jed Davis b043349833 Fix MZ_FORCEINLINE define to work with GCC 4.7.1.
Using just __always_inline__ without inline results in several instances
of "error: always_inline function might not be inlinable".
2012-08-29 01:18:00 -07:00
Graydon Hoare b769e29680 Compress metadata section. Seems a minor speed win, major space win. 2012-08-28 14:50:39 -07:00
Ben Blum 01866fae4e Document task shutdown protocol and justify its concurrency safety. Close #2696. Close bblum's internship. 2012-08-24 19:59:03 -04:00
Ben Blum 5ba7434cb1 Avoid lifecycle_lock traffic in call_on_rust_stack. (close #3270) 2012-08-24 18:28:26 -04:00
Michael Sullivan dc107898b2 Fix logging code to not sign extend chars being printed in hex. 2012-08-23 12:48:08 -07:00
Michael Sullivan 5f32e18011 Make std::arena run destructors. Closes #2831. 2012-08-21 17:03:00 -07:00
Ben Blum 47cca22d54 Bypass lifecycle_lock in inhibit_kill/allow_kill for 3% to 5% speedup. Close #3213. 2012-08-21 18:03:41 -04:00
Ben Blum a076c287de Fix issue-506.rs by adding a void-returning stub in the runtime (close #2957) 2012-08-16 21:07:55 -04:00
Ben Blum bdbad614ac Remove rust_cond_lock and sys::condition (rename to little_lock) 2012-08-07 18:18:48 -04:00
Eric Holk 9f287c211e Refcount tasks in packets to avoid races.
Revert "Once again, revert "Use pipes in compiletest""

Fixes #3098
2012-08-06 09:10:19 -07:00
Eric Holk 86947e47ad More documentation on pipes, and moving assert in runtime. 2012-08-06 09:07:40 -07:00
Ben Blum 4174de8bb9 rt: expose rust_task refcounts to rustland 2012-08-03 21:00:23 -04:00
Eric Holk 01ca0d1f68 Be more defensive in pipes (#3098) 2012-08-03 12:04:18 -07:00
Eric Holk ce6d6511c7 Set thread name on Mac to make gdb thread info more useful. 2012-08-02 19:26:33 -07:00
Ben Blum 7cb3f3e86a Linked failure: enable unidirectional propagate test; replace FIXMEs with comments (tag #1868). 2012-08-01 23:08:06 -04:00
Lindsey Kuper 439afaa329 Change remaining "iface" occurrences to "trait"; deprecate "iface" 2012-07-31 11:52:16 -07:00
Ben Blum 60d682b577 Fix asserts & short-read bug in isaac_seed (#2870) 2012-07-25 18:03:00 -04:00
Ben Blum 729c37f3cc (minor) remove config_notify from rustrt.def.in 2012-07-25 13:29:50 -04:00
Ben Blum 8d43724087 minor rt cleanup 2012-07-25 13:24:00 -04:00
Ben Blum c68f2d9aab Remove notification channels in runtime (closes #1078) 2012-07-25 13:22:43 -04:00
Ben Blum 695ab09899 Change yield() and wait_event() to be MUST_CHECK and return the killed flag. (closes #2875) 2012-07-24 18:24:24 -04:00
Ben Blum 2040a5c632 tiny runtime cleanup 2012-07-24 17:35:08 -04:00
Ben Blum f42a5a1acd Remove unsupervise 2012-07-24 17:31:43 -04:00
Ben Blum ae094a7adc Add 'do atomically { .. }' for exclusives 2012-07-24 15:28:35 -04:00
Elliott Slaughter 66e5a8ca18 Add rustrt wrapper functions to export list. 2012-07-23 12:21:41 -07:00
Elliott Slaughter d257382863 Moved malloc and free upcalls into rust runtime. 2012-07-23 10:45:58 -07:00
Elliott Slaughter de82a9be61 Move fail upcall into rust libcore. 2012-07-23 10:45:58 -07:00
Ben Blum 3dc52da989 [4/4 for #2365, #2671] Reassign one last fixme to #908. Close #2365. Close #2671. 2012-07-20 19:23:19 -04:00
Ben Blum af7b769465 [3/4 for #2365, #2671] Fix exit/kill race with scheds during rust_kernel::fail 2012-07-20 19:23:19 -04:00
Ben Blum 18c645a883 [2/4 for #2365, #2671] Fix exit/kill race with tasks during rust_kernel::fail 2012-07-20 19:23:19 -04:00
Ben Blum 5bb4a12900 [1/4 for #2365, #2671] Fix create/kill race with schedulers and tasks during rust_kernel::fail 2012-07-20 19:23:19 -04:00
Ben Blum 4cf6b4d3b4 Tasks should not hold a ref to their parent (Close #1789) 2012-07-17 20:45:07 -04:00
Michael Sullivan aa5b5ab886 Create some infrastructure for building up @-vectors. Work on #2921. 2012-07-17 17:09:25 -07:00
Ben Blum 1f2ee4b384 Oops, switch more TODOs to FIXMEs 2012-07-13 20:33:08 -04:00
Ben Blum cd38377b1b Add asserts to check fail_sched_loop() only once 2012-07-13 20:13:53 -04:00
Ben Blum d338879ba5 Reintroduce linked failure (killing runtime)
This reverts commit 5724c64549.
2012-07-13 20:13:53 -04:00