diff options
author | kosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-01-12 19:07:09 +0000 |
---|---|---|
committer | kosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-01-12 19:07:09 +0000 |
commit | edfc3526a70e77f04ddc67f6c3dbe57c999c5d94 (patch) | |
tree | 8a5420db1c71f8fdd41071726d92333f02a4a24a /cont.c | |
parent | 6fe410d42636fea9f6208d7ae8bcb76b44f5b43a (diff) |
merge revision(s) 34278:
* cont.c (cont_restore_0): prevent optimizing out `sp'. sp is used for
reserving a memory space with ALLOCA_N for restoring machine stack
stored in cont->machine_stack, but clang optimized out it (and
maybe #5851 is also caused by this).
This affected TestContinuation#test_check_localvars.
* cont.c (cont_restore_1): revert workaround introduced in r32201.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34288 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'cont.c')
-rw-r--r-- | cont.c | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -669,10 +669,9 @@ cont_restore_1(rb_context_t *cont) } #endif if (cont->machine_stack_src) { - size_t i; FLUSH_REGISTER_WINDOWS; - for (i = 0; i < cont->machine_stack_size; i++) - cont->machine_stack_src[i] = cont->machine_stack[i]; + MEMCPY(cont->machine_stack_src, cont->machine_stack, + VALUE, cont->machine_stack_size); } #ifdef __ia64 @@ -742,7 +741,7 @@ cont_restore_0(rb_context_t *cont, VALUE *addr_in_prev_frame) if (&space[0] > end) { # ifdef HAVE_ALLOCA volatile VALUE *sp = ALLOCA_N(VALUE, &space[0] - end); - (void)sp; + space[0] = *sp; # else cont_restore_0(cont, &space[0]); # endif @@ -758,7 +757,7 @@ cont_restore_0(rb_context_t *cont, VALUE *addr_in_prev_frame) if (&space[STACK_PAD_SIZE] < end) { # ifdef HAVE_ALLOCA volatile VALUE *sp = ALLOCA_N(VALUE, end - &space[STACK_PAD_SIZE]); - (void)sp; + space[0] = *sp; # else cont_restore_0(cont, &space[STACK_PAD_SIZE-1]); # endif |