about summary refs log tree commit diff
path: root/src/rt
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2013-06-25 19:03:12 -0700
committerBrian Anderson <banderson@mozilla.com>2013-06-25 19:32:00 -0700
commit5d3ca4b8439d043dc77c19424348fac670acc46f (patch)
tree32ce48a428a42a09b93950a6d91f327a132b2214 /src/rt
parentc06ee9f7a7fe1ad311c9fd0eb57e00646297cdbd (diff)
parentefd1438770ae371406327304cb6ad4501db256ae (diff)
downloadrust-5d3ca4b8439d043dc77c19424348fac670acc46f.tar.gz
rust-5d3ca4b8439d043dc77c19424348fac670acc46f.zip
Merge remote-tracking branch 'mozilla/master' into incoming
Conflicts:
	src/librustc/middle/astencode.rs
	src/librustc/middle/check_const.rs
Diffstat (limited to 'src/rt')
-rw-r--r--src/rt/rust_builtin.cpp19
-rw-r--r--src/rt/rust_task.cpp6
-rw-r--r--src/rt/rust_type.h8
-rw-r--r--src/rt/rust_util.cpp2
-rw-r--r--src/rt/rustrt.def.in5
5 files changed, 23 insertions, 17 deletions
diff --git a/src/rt/rust_builtin.cpp b/src/rt/rust_builtin.cpp
index e476fa0ad5e..de46d7b3e8a 100644
--- a/src/rt/rust_builtin.cpp
+++ b/src/rt/rust_builtin.cpp
@@ -154,6 +154,16 @@ debug_abi_2(floats f) {
     return ff;
 }
 
+extern "C" int
+debug_static_mut;
+
+int debug_static_mut = 3;
+
+extern "C" void
+debug_static_mut_check_four() {
+    assert(debug_static_mut == 4);
+}
+
 /* Debug builtins for std::dbg. */
 
 static void
@@ -729,15 +739,6 @@ rust_task_deref(rust_task *task) {
     task->deref();
 }
 
-// Must call on rust stack.
-extern "C" CDECL void
-rust_call_tydesc_glue(void *root, size_t *tydesc, size_t glue_index) {
-    void (*glue_fn)(void *, void *, void *) =
-        (void (*)(void *, void *, void *))tydesc[glue_index];
-    if (glue_fn)
-        glue_fn(0, 0, root);
-}
-
 // Don't run on the Rust stack!
 extern "C" void
 rust_log_str(uint32_t level, const char *str, size_t size) {
diff --git a/src/rt/rust_task.cpp b/src/rt/rust_task.cpp
index fe1b4622137..81ae991623f 100644
--- a/src/rt/rust_task.cpp
+++ b/src/rt/rust_task.cpp
@@ -183,7 +183,11 @@ 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, box_body(env));
+        td->drop_glue(NULL,
+#ifdef _RUST_STAGE0
+                      NULL,
+#endif
+                      box_body(env));
         task->kernel->region()->free(env);
     }
 
diff --git a/src/rt/rust_type.h b/src/rt/rust_type.h
index 6d36d2c960a..30ff5f1fa54 100644
--- a/src/rt/rust_type.h
+++ b/src/rt/rust_type.h
@@ -25,7 +25,11 @@ typedef void (*CDECL spawn_fn)(rust_opaque_box*, void *);
 
 struct type_desc;
 
-typedef void CDECL (glue_fn)(void *, const type_desc **, void *);
+typedef void CDECL (glue_fn)(void *,
+#ifdef _RUST_STAGE0
+                             const type_desc **,
+#endif
+                             void *);
 
 // Corresponds to the boxed data in the @ region.  The body follows the
 // header; you can obtain a ptr via box_body() below.
@@ -57,8 +61,6 @@ struct type_desc {
     glue_fn *drop_glue;
     glue_fn *free_glue;
     glue_fn *visit_glue;
-    const uint8_t *unused;
-    const uint8_t *unused2;
 };
 
 extern "C" type_desc *rust_clone_type_desc(type_desc*);
diff --git a/src/rt/rust_util.cpp b/src/rt/rust_util.cpp
index 8d80a344063..4a15830e529 100644
--- a/src/rt/rust_util.cpp
+++ b/src/rt/rust_util.cpp
@@ -21,8 +21,6 @@ struct type_desc str_body_tydesc = {
     NULL, // drop_glue
     NULL, // free_glue
     NULL, // visit_glue
-    NULL, // shape
-    NULL, // shape_tables
 };
 
 //
diff --git a/src/rt/rustrt.def.in b/src/rt/rustrt.def.in
index ba7ada04a27..a4876618c97 100644
--- a/src/rt/rustrt.def.in
+++ b/src/rt/rustrt.def.in
@@ -7,6 +7,8 @@ debug_tydesc
 debug_get_stk_seg
 debug_abi_1
 debug_abi_2
+debug_static_mut
+debug_static_mut_check_four
 get_task_id
 get_time
 rust_tzset
@@ -174,7 +176,6 @@ rust_set_task_local_data
 rust_task_local_data_atexit
 rust_task_ref
 rust_task_deref
-rust_call_tydesc_glue
 tdefl_compress_mem_to_heap
 tinfl_decompress_mem_to_heap
 rust_gc_metadata
@@ -239,4 +240,4 @@ rust_valgrind_stack_deregister
 rust_take_env_lock
 rust_drop_env_lock
 rust_update_log_settings
-rust_running_on_valgrind
\ No newline at end of file
+rust_running_on_valgrind