ruby-changes:34756
From: ngoto <ko1@a...>
Date: Wed, 16 Jul 2014 20:46:11 +0900 (JST)
Subject: [ruby-changes:34756] ngoto:r46839 (trunk): * vm_core.h (struct rb_iseq_struct): stack_max is changed to int
ngoto 2014-07-16 20:46:06 +0900 (Wed, 16 Jul 2014) New Revision: 46839 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=46839 Log: * vm_core.h (struct rb_iseq_struct): stack_max is changed to int because all calculations related to stack_max in compile.c (iseq_set_sequence) and vm_insnhelper.c (vm_push_frame) are conducted by using int. This partly reverts r23945. * vm_insnhelper.c (vm_push_frame): ditto. This reverts r42401. Modified files: trunk/ChangeLog trunk/vm_core.h trunk/vm_insnhelper.c Index: ChangeLog =================================================================== --- ChangeLog (revision 46838) +++ ChangeLog (revision 46839) @@ -1,3 +1,11 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Wed Jul 16 20:21:49 2014 Naohisa Goto <ngotogenome@g...> + + * vm_core.h (struct rb_iseq_struct): stack_max is changed to int + because all calculations related to stack_max in compile.c + (iseq_set_sequence) and vm_insnhelper.c (vm_push_frame) are + conducted by using int. This partly reverts r23945. + * vm_insnhelper.c (vm_push_frame): ditto. This reverts r42401. + Wed Jul 16 19:55:32 2014 Naohisa Goto <ngotogenome@g...> * vm_core.h (struct rb_iseq_struct): temporal workaround of [Bug 10037]. Index: vm_core.h =================================================================== --- vm_core.h (revision 46838) +++ vm_core.h (revision 46839) @@ -208,7 +208,7 @@ struct rb_iseq_struct { https://github.com/ruby/ruby/blob/trunk/vm_core.h#L208 #if defined(WORDS_BIGENDIAN) && (SIZEOF_VALUE > SIZEOF_INT) char dummy[SIZEOF_VALUE - SIZEOF_INT]; /* [Bug #10037][ruby-core:63721] */ #endif - uint32_t stack_max; /* for stack overflow check */ + int stack_max; /* for stack overflow check */ rb_iseq_location_t location; Index: vm_insnhelper.c =================================================================== --- vm_insnhelper.c (revision 46838) +++ vm_insnhelper.c (revision 46839) @@ -49,13 +49,13 @@ vm_push_frame(rb_thread_t *th, https://github.com/ruby/ruby/blob/trunk/vm_insnhelper.c#L49 VALUE *sp, int local_size, const rb_method_entry_t *me, - size_t stack_max) + int stack_max) { rb_control_frame_t *const cfp = th->cfp - 1; int i; /* check stack overflow */ - CHECK_VM_STACK_OVERFLOW0(cfp, sp, local_size + (int)stack_max); + CHECK_VM_STACK_OVERFLOW0(cfp, sp, local_size + stack_max); th->cfp = cfp; -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/