about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMichael Sullivan <sully@msully.net>2012-06-18 12:48:47 -0700
committerMichael Sullivan <sully@msully.net>2012-06-18 15:54:37 -0700
commitb4484d51c14ec3b70ed8d4b6700bc3536a3ee766 (patch)
treecb7fabe779a02116b0bcba3d8ef8eb86ce185b4a
parent8967a6672477dce9fb8e765b07df4e54615cf265 (diff)
downloadrust-b4484d51c14ec3b70ed8d4b6700bc3536a3ee766.tar.gz
rust-b4484d51c14ec3b70ed8d4b6700bc3536a3ee766.zip
Some cleanup in the runtime.
-rw-r--r--src/rt/rust_builtin.cpp5
-rw-r--r--src/rt/rust_shape.h1
-rw-r--r--src/rt/rust_task.cpp2
-rw-r--r--src/rt/rust_type.h9
4 files changed, 9 insertions, 8 deletions
diff --git a/src/rt/rust_builtin.cpp b/src/rt/rust_builtin.cpp
index 2a65012b52a..4f2510b1bd3 100644
--- a/src/rt/rust_builtin.cpp
+++ b/src/rt/rust_builtin.cpp
@@ -271,9 +271,8 @@ static void
 debug_tydesc_helper(type_desc *t)
 {
     rust_task *task = rust_get_current_task();
-    LOG(task, stdlib, "  size %" PRIdPTR ", align %" PRIdPTR
-        ", first_param 0x%" PRIxPTR,
-        t->size, t->align, t->first_param);
+    LOG(task, stdlib, "  size %" PRIdPTR ", align %" PRIdPTR,
+        t->size, t->align);
 }
 
 extern "C" CDECL void
diff --git a/src/rt/rust_shape.h b/src/rt/rust_shape.h
index af447498185..a1108272eaa 100644
--- a/src/rt/rust_shape.h
+++ b/src/rt/rust_shape.h
@@ -47,7 +47,6 @@ const uint8_t SHAPE_VEC = 11u;
 const uint8_t SHAPE_TAG = 12u;
 const uint8_t SHAPE_STRUCT = 17u;
 const uint8_t SHAPE_BOX_FN = 18u;
-const uint8_t SHAPE_OBJ = 19u;
 const uint8_t SHAPE_RES = 20u;
 const uint8_t SHAPE_UNIQ = 22u;
 const uint8_t SHAPE_UNIQ_FN = 25u;
diff --git a/src/rt/rust_task.cpp b/src/rt/rust_task.cpp
index a5097dff4d0..19785e3a24e 100644
--- a/src/rt/rust_task.cpp
+++ b/src/rt/rust_task.cpp
@@ -171,7 +171,7 @@ void task_start_wrapper(spawn_args *a)
     if(env) {
         // free the environment (which should be a unique closure).
         const type_desc *td = env->td;
-        td->drop_glue(NULL, NULL, td->first_param, box_body(env));
+        td->drop_glue(NULL, NULL, NULL, box_body(env));
         upcall_exchange_free(env);
     }
 
diff --git a/src/rt/rust_type.h b/src/rt/rust_type.h
index 8a105c1db0f..fec61e5e906 100644
--- a/src/rt/rust_type.h
+++ b/src/rt/rust_type.h
@@ -2,8 +2,11 @@
 #ifndef RUST_TYPE_H
 #define RUST_TYPE_H
 
+#include "rust_globals.h"
 #include "rust_refcount.h"
 
+struct rust_opaque_box;
+
 // The type of functions that we spawn, which fall into two categories:
 // - the main function: has a NULL environment, but uses the void* arg
 // - unique closures of type fn~(): have a non-NULL environment, but
@@ -45,21 +48,21 @@ static inline void *box_body(rust_opaque_box *box) {
 // N.B. If you want to add a field to tydesc, please use one of the
 // unused fields!
 struct type_desc {
-    const type_desc **first_param;
+    uintptr_t UNUSED_1;
     size_t size;
     size_t align;
     glue_fn *take_glue;
     glue_fn *drop_glue;
     glue_fn *free_glue;
     glue_fn *visit_glue;
-    uintptr_t UNUSED_1;
     uintptr_t UNUSED_2;
     uintptr_t UNUSED_3;
     uintptr_t UNUSED_4;
+    uintptr_t UNUSED_5;
     const uint8_t *shape;
     const rust_shape_tables *shape_tables;
-    uintptr_t UNUSED_5;
     uintptr_t UNUSED_6;
+    uintptr_t UNUSED_7;
 };
 
 extern "C" type_desc *rust_clone_type_desc(type_desc*);