about summary refs log tree commit diff
path: root/src/rt/rust_upcall.cpp
diff options
context:
space:
mode:
authorPatrick Walton <pcwalton@mimiga.net>2011-09-20 13:50:15 -0700
committerPatrick Walton <pcwalton@mimiga.net>2011-09-20 13:50:15 -0700
commite981abdb019689150b65d7b0b9b0990b9d21bdcc (patch)
tree1847c00b23ed88d4d4f1d5b509c4aae819d947d5 /src/rt/rust_upcall.cpp
parentd607316b2f116372814a1e7b379b970071e21e00 (diff)
downloadrust-e981abdb019689150b65d7b0b9b0990b9d21bdcc.tar.gz
rust-e981abdb019689150b65d7b0b9b0990b9d21bdcc.zip
rt: Remove upcall_malloc_box and upcall_free_box; I don't think they'll be necessary after all
Diffstat (limited to 'src/rt/rust_upcall.cpp')
-rw-r--r--src/rt/rust_upcall.cpp37
1 files changed, 0 insertions, 37 deletions
diff --git a/src/rt/rust_upcall.cpp b/src/rt/rust_upcall.cpp
index 0150cc31e48..a0ab724818e 100644
--- a/src/rt/rust_upcall.cpp
+++ b/src/rt/rust_upcall.cpp
@@ -77,25 +77,6 @@ upcall_malloc(rust_task *task, size_t nbytes, type_desc *td) {
     return (uintptr_t) p;
 }
 
-extern "C" CDECL rust_box *
-upcall_malloc_box(rust_task *task, size_t nbytes, type_desc *td) {
-    LOG_UPCALL_ENTRY(task);
-
-    gc::maybe_gc(task);
-
-    rust_box *box = reinterpret_cast<rust_box *>
-        (task->malloc(nbytes + sizeof(rust_box), "tdesc", td));
-    box->ref_count = 1;
-    box->tydesc = td;
-
-    box->gc_prev = NULL;
-    if ((box->gc_next = task->gc_alloc_chain) != NULL)
-        box->gc_next->gc_prev = box;
-    task->gc_alloc_chain = box;
-
-    return box;
-}
-
 /**
  * Called whenever an object's ref count drops to zero.
  */
@@ -110,24 +91,6 @@ upcall_free(rust_task *task, void* ptr, uintptr_t is_gc) {
     task->free(ptr, (bool) is_gc);
 }
 
-extern "C" CDECL void
-upcall_free_box(rust_task *task, rust_box *box) {
-    LOG_UPCALL_ENTRY(task);
-
-    assert(!box->ref_count && "Box reference count is nonzero on free!");
-
-    if (box->gc_prev)
-        box->gc_prev->gc_next = box->gc_next;
-    else
-        task->gc_alloc_chain = box->gc_next;
-    if (box->gc_next)
-        box->gc_next->gc_prev = box->gc_prev;
-
-    box->tydesc->drop_glue(NULL, task, (void *)box->tydesc,
-                           box->tydesc->first_param, box->data);
-    task->free(box, false);
-}
-
 extern "C" CDECL uintptr_t
 upcall_shared_malloc(rust_task *task, size_t nbytes, type_desc *td) {
     LOG_UPCALL_ENTRY(task);