diff options
| author | Patrick Walton <pcwalton@mimiga.net> | 2012-09-24 13:57:48 -0700 |
|---|---|---|
| committer | Patrick Walton <pcwalton@mimiga.net> | 2012-09-24 13:57:48 -0700 |
| commit | bb0ad11252c493ca8de85025411c3f068f529039 (patch) | |
| tree | 8e05edaee5d7445512e3ef7713164210e8e6ffad /src/rt/rust_task.cpp | |
| parent | afd91f8a5698e7767ddfbf90c665c08dcd4f0de0 (diff) | |
| download | rust-bb0ad11252c493ca8de85025411c3f068f529039.tar.gz rust-bb0ad11252c493ca8de85025411c3f068f529039.zip | |
rt: Call the Rust box annihilator; stop calling the cycle collector
Diffstat (limited to 'src/rt/rust_task.cpp')
| -rw-r--r-- | src/rt/rust_task.cpp | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/src/rt/rust_task.cpp b/src/rt/rust_task.cpp index 1efd641b343..1d1dae046f0 100644 --- a/src/rt/rust_task.cpp +++ b/src/rt/rust_task.cpp @@ -9,6 +9,8 @@ #include "rust_cc.h" #include "rust_env.h" #include "rust_port.h" +#include "rust_globals.h" +#include "rust_crate_map.h" // Tasks rust_task::rust_task(rust_sched_loop *sched_loop, rust_task_state state, @@ -125,18 +127,9 @@ cleanup_task(cleanup_args *args) { main_task_failed_without_spawning = true; } - // FIXME (#2676): For performance we should do the annihilator - // instead of the cycle collector even under normal termination, but - // since that would hide memory management errors (like not derefing - // boxes), it needs to be disableable in debug builds. - if (threw_exception) { - // FIXME (#2676): When the annihilator is more powerful and - // successfully runs resource destructors, etc. we can get rid - // of this cc - cc::do_cc(task); - annihilate_boxes(task); - } - cc::do_final_cc(task); + // Call the box annihilator. + cratemap* map = reinterpret_cast<cratemap*>(global_crate_map); + task->call_on_rust_stack(NULL, const_cast<void*>(map->annihilate_fn())); task->die(); |
