ruby-changes:22239
From: kosaki <ko1@a...>
Date: Fri, 13 Jan 2012 04:07:20 +0900 (JST)
Subject: [ruby-changes:22239] kosaki:r34288 (ruby_1_9_3): merge revision(s) 34278:
kosaki 2012-01-13 04:07:09 +0900 (Fri, 13 Jan 2012) New Revision: 34288 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=34288 Log: 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. Modified files: branches/ruby_1_9_3/ChangeLog branches/ruby_1_9_3/cont.c branches/ruby_1_9_3/version.h Index: ruby_1_9_3/ChangeLog =================================================================== --- ruby_1_9_3/ChangeLog (revision 34287) +++ ruby_1_9_3/ChangeLog (revision 34288) @@ -1,3 +1,13 @@ +Thu Jan 12 13:52:13 2012 NARUSE, Yui <naruse@r...> + + * 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. + Thu Jan 12 01:42:08 2012 CHIKANAGA Tomoyuki <nagachika00@g...> * test/ruby/test_io.rb (test_autoclose_true_closed_by_finalizer, Index: ruby_1_9_3/cont.c =================================================================== --- ruby_1_9_3/cont.c (revision 34287) +++ ruby_1_9_3/cont.c (revision 34288) @@ -669,10 +669,9 @@ } #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 @@ 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 @@ 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 Index: ruby_1_9_3/version.h =================================================================== --- ruby_1_9_3/version.h (revision 34287) +++ ruby_1_9_3/version.h (revision 34288) @@ -1,5 +1,5 @@ #define RUBY_VERSION "1.9.3" -#define RUBY_PATCHLEVEL 25 +#define RUBY_PATCHLEVEL 26 #define RUBY_RELEASE_DATE "2012-01-13" #define RUBY_RELEASE_YEAR 2012 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/