Skip to content

Commit cd9bb19

Browse files
committed
---
yaml --- r: 5392 b: refs/heads/master c: e981abd h: refs/heads/master v: v3
1 parent 10608f7 commit cd9bb19

File tree

2 files changed

+1
-38
lines changed

2 files changed

+1
-38
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: d607316b2f116372814a1e7b379b970071e21e00
2+
refs/heads/master: e981abdb019689150b65d7b0b9b0990b9d21bdcc

trunk/src/rt/rust_upcall.cpp

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -77,25 +77,6 @@ upcall_malloc(rust_task *task, size_t nbytes, type_desc *td) {
7777
return (uintptr_t) p;
7878
}
7979

80-
extern "C" CDECL rust_box *
81-
upcall_malloc_box(rust_task *task, size_t nbytes, type_desc *td) {
82-
LOG_UPCALL_ENTRY(task);
83-
84-
gc::maybe_gc(task);
85-
86-
rust_box *box = reinterpret_cast<rust_box *>
87-
(task->malloc(nbytes + sizeof(rust_box), "tdesc", td));
88-
box->ref_count = 1;
89-
box->tydesc = td;
90-
91-
box->gc_prev = NULL;
92-
if ((box->gc_next = task->gc_alloc_chain) != NULL)
93-
box->gc_next->gc_prev = box;
94-
task->gc_alloc_chain = box;
95-
96-
return box;
97-
}
98-
9980
/**
10081
* Called whenever an object's ref count drops to zero.
10182
*/
@@ -110,24 +91,6 @@ upcall_free(rust_task *task, void* ptr, uintptr_t is_gc) {
11091
task->free(ptr, (bool) is_gc);
11192
}
11293

113-
extern "C" CDECL void
114-
upcall_free_box(rust_task *task, rust_box *box) {
115-
LOG_UPCALL_ENTRY(task);
116-
117-
assert(!box->ref_count && "Box reference count is nonzero on free!");
118-
119-
if (box->gc_prev)
120-
box->gc_prev->gc_next = box->gc_next;
121-
else
122-
task->gc_alloc_chain = box->gc_next;
123-
if (box->gc_next)
124-
box->gc_next->gc_prev = box->gc_prev;
125-
126-
box->tydesc->drop_glue(NULL, task, (void *)box->tydesc,
127-
box->tydesc->first_param, box->data);
128-
task->free(box, false);
129-
}
130-
13194
extern "C" CDECL uintptr_t
13295
upcall_shared_malloc(rust_task *task, size_t nbytes, type_desc *td) {
13396
LOG_UPCALL_ENTRY(task);

0 commit comments

Comments
 (0)