auto merge of #5887 : jdm/rust/stackbounds, r=brson

This is needed to allow GC to work in SpiderMonkey.
This commit is contained in:
bors 2013-04-21 17:33:52 -07:00
commit 3830040a89
4 changed files with 8 additions and 0 deletions

View File

@ -73,6 +73,7 @@ pub unsafe fn rust_call_tydesc_glue(root: *Word,
pub unsafe fn rust_gc_metadata() -> *Word;
pub unsafe fn rust_get_stack_segment() -> *StackSegment;
pub unsafe fn rust_get_c_stack() -> *StackSegment;
}
}

View File

@ -549,6 +549,11 @@ rust_get_stack_segment() {
return rust_get_current_task()->stk;
}
extern "C" CDECL stk_seg *
rust_get_c_stack() {
return rust_get_current_task()->get_c_stack();
}
extern "C" CDECL void
start_task(rust_task *target, fn_env_pair *f) {
target->start(f->f, f->env, NULL);

View File

@ -374,6 +374,7 @@ public:
void call_on_c_stack(void *args, void *fn_ptr);
void call_on_rust_stack(void *args, void *fn_ptr);
bool have_c_stack() { return c_stack != NULL; }
stk_seg *get_c_stack() { return c_stack; }
rust_task_state get_state() { return state; }
rust_cond *get_cond() { return cond; }

View File

@ -49,6 +49,7 @@ rust_task_is_unwinding
rust_get_task
rust_try_get_task
rust_get_stack_segment
rust_get_c_stack
rust_log_str
start_task
vec_reserve_shared_actual