diff options
| author | Graydon Hoare <graydon@mozilla.com> | 2012-03-05 15:50:01 -0800 |
|---|---|---|
| committer | Graydon Hoare <graydon@mozilla.com> | 2012-03-05 15:50:11 -0800 |
| commit | 6c87c342775e4e4e4cef927adac5fc625d1faa31 (patch) | |
| tree | d931c5358c4b7c05b48d19b5700ea3bde92a7d5f | |
| parent | 15df3950ad4a1d2e9deb30d0ebdcb8dc7da00b63 (diff) | |
| download | rust-6c87c342775e4e4e4cef927adac5fc625d1faa31.tar.gz rust-6c87c342775e4e4e4cef927adac5fc625d1faa31.zip | |
Remove dead code from rt (debug_obj, rust_obj, rust_closure, rust_box_obj, rust_vtable)
| -rw-r--r-- | src/libstd/dbg.rs | 16 | ||||
| -rw-r--r-- | src/rt/rust_builtin.cpp | 22 | ||||
| -rw-r--r-- | src/rt/rust_shape.h | 19 | ||||
| -rw-r--r-- | src/rt/rustrt.def.in | 1 |
4 files changed, 0 insertions, 58 deletions
diff --git a/src/libstd/dbg.rs b/src/libstd/dbg.rs index e1f82fedda0..f37a97bcb42 100644 --- a/src/libstd/dbg.rs +++ b/src/libstd/dbg.rs @@ -14,8 +14,6 @@ native mod rustrt { fn debug_opaque<T>(td: *sys::type_desc, x: T); fn debug_box<T>(td: *sys::type_desc, x: @T); fn debug_tag<T>(td: *sys::type_desc, x: T); - fn debug_obj<T>(td: *sys::type_desc, x: T, - nmethods: ctypes::size_t, nbytes: ctypes::size_t); fn debug_fn<T>(td: *sys::type_desc, x: T); fn debug_ptrcast<T, U>(td: *sys::type_desc, x: @T) -> @U; } @@ -36,20 +34,6 @@ fn debug_tag<T>(x: T) { rustrt::debug_tag::<T>(sys::get_type_desc::<T>(), x); } - -/** - * `nmethods` is the number of methods we expect the object to have. The - * runtime will print this many words of the obj vtbl). - * - * `nbytes` is the number of bytes of body data we expect the object to have. - * The runtime will print this many bytes of the obj body. You probably want - * this to at least be 4u, since an implicit captured tydesc pointer sits in - * the front of any obj's data tuple.x - */ -fn debug_obj<T>(x: T, nmethods: uint, nbytes: uint) { - rustrt::debug_obj::<T>(sys::get_type_desc::<T>(), x, nmethods, nbytes); -} - fn debug_fn<T>(x: T) { rustrt::debug_fn::<T>(sys::get_type_desc::<T>(), x); } diff --git a/src/rt/rust_builtin.cpp b/src/rt/rust_builtin.cpp index 05295bcd1a9..2a210a7fb54 100644 --- a/src/rt/rust_builtin.cpp +++ b/src/rt/rust_builtin.cpp @@ -268,28 +268,6 @@ debug_tag(type_desc *t, rust_tag *tag) { tag->variant[i]); } -struct rust_obj { - uintptr_t *vtbl; - rust_box *body; -}; - -extern "C" CDECL void -debug_obj(type_desc *t, rust_obj *obj, size_t nmethods, size_t nbytes) { - rust_task *task = rust_task_thread::get_task(); - - LOG(task, stdlib, "debug_obj with %" PRIdPTR " methods", nmethods); - debug_tydesc_helper(t); - LOG(task, stdlib, " vtbl at 0x%" PRIxPTR, obj->vtbl); - LOG(task, stdlib, " body at 0x%" PRIxPTR, obj->body); - - for (uintptr_t *p = obj->vtbl; p < obj->vtbl + nmethods; ++p) - LOG(task, stdlib, " vtbl word: 0x%" PRIxPTR, *p); - - for (uintptr_t i = 0; i < nbytes; ++i) - LOG(task, stdlib, " body byte %" PRIdPTR ": 0x%" PRIxPTR, - i, obj->body->data[i]); -} - struct rust_fn { uintptr_t *thunk; rust_box *closure; diff --git a/src/rt/rust_shape.h b/src/rt/rust_shape.h index ef9b4156230..bb163831c3e 100644 --- a/src/rt/rust_shape.h +++ b/src/rt/rust_shape.h @@ -274,25 +274,6 @@ struct rust_fn { void *env; }; -struct rust_closure { - type_desc *tydesc; - uint32_t target_0; - uint32_t target_1; - uint32_t bindings[0]; - - uint8_t *get_bindings() const { return (uint8_t *)bindings; } -}; - -struct rust_obj_box { - type_desc *tydesc; - - uint8_t *get_bindings() const { return (uint8_t *)this; } -}; - -struct rust_vtable { - CDECL void (*dtor)(void *rv, rust_task *task, rust_obj obj); -}; - struct rust_obj { rust_vtable *vtable; void *box; diff --git a/src/rt/rustrt.def.in b/src/rt/rustrt.def.in index 79255a63dd8..66fa87d0d3f 100644 --- a/src/rt/rustrt.def.in +++ b/src/rt/rustrt.def.in @@ -2,7 +2,6 @@ chan_id_send check_claims debug_box debug_fn -debug_obj debug_opaque del_port debug_ptrcast |
