Skip to content

Commit

Permalink
Added _RUST_STAGEN guard to rust_call_tydesc_glue
Browse files Browse the repository at this point in the history
  • Loading branch information
thomaslee committed May 28, 2013
1 parent cddd274 commit a85993f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/rt/rust_builtin.cpp
Expand Up @@ -731,10 +731,17 @@ rust_task_deref(rust_task *task) {
// Must call on rust stack.
extern "C" CDECL void
rust_call_tydesc_glue(void *root, size_t *tydesc, size_t glue_index) {
#ifdef _RUST_STAGE0
void (*glue_fn)(void *, void *, void *, void *) =
(void (*)(void *, void *, void *, void *))tydesc[glue_index];
if (glue_fn)
glue_fn(0, 0, 0, root);
#else
void (*glue_fn)(void *, void *, void *) =
(void (*)(void *, void *, void *))tydesc[glue_index];
if (glue_fn)
glue_fn(0, 0, root);
#endif
}

// Don't run on the Rust stack!
Expand Down

0 comments on commit a85993f

Please sign in to comment.