diff options
| author | Roy Frostig <rfrostig@mozilla.com> | 2010-07-12 23:58:00 -0700 |
|---|---|---|
| committer | Roy Frostig <rfrostig@mozilla.com> | 2010-07-15 12:30:46 -0700 |
| commit | 7c8c98a6d7fe02ee697d8490a7203d1da676d908 (patch) | |
| tree | a5c8e952168c086e7eb36010fceef6836f278d3c /src/rt/rust_task.cpp | |
| parent | e21865a4407495a5724798a59276e4f276bc93f6 (diff) | |
| download | rust-7c8c98a6d7fe02ee697d8490a7203d1da676d908.tar.gz rust-7c8c98a6d7fe02ee697d8490a7203d1da676d908.zip | |
Adjust call args laid out by fake frame created in rust_task::start to reflect new position of closure-or-obj pointer.
Diffstat (limited to 'src/rt/rust_task.cpp')
| -rw-r--r-- | src/rt/rust_task.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/rt/rust_task.cpp b/src/rt/rust_task.cpp index 43213b46773..7c92c4ca7cd 100644 --- a/src/rt/rust_task.cpp +++ b/src/rt/rust_task.cpp @@ -130,6 +130,7 @@ rust_task::start(uintptr_t exit_task_glue, uintptr_t *spp = (uintptr_t *)rust_sp; // The exit_task_glue frame we synthesize above the frame we activate: + *spp-- = (uintptr_t) 0; // closure-or-obj *spp-- = (uintptr_t) this; // task *spp-- = (uintptr_t) 0; // output *spp-- = (uintptr_t) 0; // retpc @@ -153,6 +154,7 @@ rust_task::start(uintptr_t exit_task_glue, uintptr_t *src = (uintptr_t *)args; src += 1; // spawn-call output slot src += 1; // spawn-call task slot + src += 1; // spawn-call closure-or-obj slot // Memcpy all but the task and output pointers callsz -= (2 * sizeof(uintptr_t)); spp = (uintptr_t*) (((uintptr_t)spp) - callsz); @@ -168,6 +170,7 @@ rust_task::start(uintptr_t exit_task_glue, // The *implicit* incoming args to the spawnee frame we're // activating: + *spp-- = (uintptr_t) 0; // closure-or-obj *spp-- = (uintptr_t) this; // task *spp-- = (uintptr_t) 0; // output addr *spp-- = (uintptr_t) exit_task_glue; // retpc |
