diff options
| author | bors <bors@rust-lang.org> | 2013-06-25 04:38:06 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2013-06-25 04:38:06 -0700 |
| commit | 7aee5da08db11dc597907bf228c2e716a408fdab (patch) | |
| tree | 7217207f8ec916aca96034f94d64a15746e22f79 /src/rt | |
| parent | b11346bb5d2659313eb96f3108137f01239785c9 (diff) | |
| parent | f8ae3cdcaacb29c7b56e546a9ddab1396b615f8f (diff) | |
auto merge of #7254 : Blei/rust/intrinsic-overhaul, r=cmr
This sets the `get_tydesc()` return type correctly and removes the intrinsic module. See #3730, #3475. Update: this now also removes the unused shape fields in tydescs.
Diffstat (limited to 'src/rt')
| -rw-r--r-- | src/rt/rust_builtin.cpp | 9 | ||||
| -rw-r--r-- | src/rt/rust_task.cpp | 6 | ||||
| -rw-r--r-- | src/rt/rust_type.h | 8 | ||||
| -rw-r--r-- | src/rt/rust_util.cpp | 2 | ||||
| -rw-r--r-- | src/rt/rustrt.def.in | 1 |
5 files changed, 10 insertions, 16 deletions
diff --git a/src/rt/rust_builtin.cpp b/src/rt/rust_builtin.cpp index 6ae5e978106..de46d7b3e8a 100644 --- a/src/rt/rust_builtin.cpp +++ b/src/rt/rust_builtin.cpp @@ -739,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 505de6e20b7..a4876618c97 100644 --- a/src/rt/rustrt.def.in +++ b/src/rt/rustrt.def.in @@ -176,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 |
