Working on 2 argument spawn. The arguments seem to be copied correctly once, but then they get lost.

This commit is contained in:
Eric Holk
2011-05-23 19:29:45 -07:00
parent bb4c7a9c68
commit dad426419c
3 changed files with 22 additions and 5 deletions

View File

@@ -171,7 +171,12 @@ rust_task::start(uintptr_t spawnee_fn,
src += 1; // spawn-call task slot
src += 1; // spawn-call closure-or-obj slot
*spp-- = (uintptr_t) *src; // vec
spp -= (args_size / sizeof(uintptr_t)) - 1;
memmove(spp, src, args_size);
spp--;
//*spp-- = (uintptr_t) *src; // vec
*spp-- = (uintptr_t) 0x0; // closure-or-obj
*spp-- = (uintptr_t) this; // task
*spp-- = (uintptr_t) dummy_ret; // output address
@@ -179,7 +184,6 @@ rust_task::start(uintptr_t spawnee_fn,
I(dom, spp == align_down(spp));
*spp-- = (uintptr_t) (uintptr_t) spawnee_fn;
*spp-- = (uintptr_t) 0x0; // retp
*spp-- = (uintptr_t) rust_new_exit_task_glue;