about summary refs log tree commit diff
path: root/src/rt/rust_task.cpp
diff options
context:
space:
mode:
authorGraydon Hoare <graydon@mozilla.com>2011-05-26 18:20:48 -0700
committerGraydon Hoare <graydon@mozilla.com>2011-05-26 18:21:02 -0700
commit79c9e130731c6fc471c946fb289a67348749a0b7 (patch)
treef2c7c9de98883872b2302d698ebfb12f6499bb7b /src/rt/rust_task.cpp
parent4f792f2dbb40ae069b2625425fab58009e19ac74 (diff)
downloadrust-79c9e130731c6fc471c946fb289a67348749a0b7.tar.gz
rust-79c9e130731c6fc471c946fb289a67348749a0b7.zip
More delicious dead code removal from runtime, upcalls.
Diffstat (limited to 'src/rt/rust_task.cpp')
-rw-r--r--src/rt/rust_task.cpp13
1 files changed, 2 insertions, 11 deletions
diff --git a/src/rt/rust_task.cpp b/src/rt/rust_task.cpp
index b660c5fb545..e937bd42ffc 100644
--- a/src/rt/rust_task.cpp
+++ b/src/rt/rust_task.cpp
@@ -131,8 +131,6 @@ rust_task::~rust_task()
       (ref_count == 1 && this == dom->root_task));
 
     del_stk(dom, stk);
-    if (cache)
-        cache->deref();
 }
 
 extern "C" void rust_new_exit_task_glue();
@@ -597,18 +595,11 @@ rust_task::unblock() {
 }
 
 rust_crate_cache *
-rust_task::get_crate_cache(rust_crate const *curr_crate)
+rust_task::get_crate_cache()
 {
-    if (cache && cache->crate != curr_crate) {
-        DLOG(dom, task, "switching task crate-cache to crate 0x%"
-             PRIxPTR, curr_crate);
-        cache->deref();
-        cache = NULL;
-    }
-
     if (!cache) {
         DLOG(dom, task, "fetching cache for current crate");
-        cache = dom->get_cache(curr_crate);
+        cache = dom->get_cache();
     }
     return cache;
 }