ruby-changes:26326
From: shugo <ko1@a...>
Date: Fri, 14 Dec 2012 17:05:05 +0900 (JST)
Subject: [ruby-changes:26326] shugo:r38377 (trunk): * vm_insnhelper.c (vm_call_super_method): remove volatile introduced
shugo 2012-12-14 17:04:55 +0900 (Fri, 14 Dec 2012) New Revision: 38377 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=38377 Log: * vm_insnhelper.c (vm_call_super_method): remove volatile introduced in r38365. * vm_insnhelper.c (vm_call_method): use __forceinline to prevent VC to make vm_call_general and vm_call_super_method as the same method. Thanks, Heesob Park. [Bug #7556] [ruby-core:50867] Modified files: trunk/ChangeLog trunk/vm_insnhelper.c Index: ChangeLog =================================================================== --- ChangeLog (revision 38376) +++ ChangeLog (revision 38377) @@ -1,3 +1,12 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Fri Dec 14 16:56:59 2012 Shugo Maeda <shugo@r...> + + * vm_insnhelper.c (vm_call_super_method): remove volatile introduced + in r38365. + + * vm_insnhelper.c (vm_call_method): use __forceinline to prevent + VC++ to make vm_call_general and vm_call_super_method as the same + method. Thanks, Heesob Park. [Bug #7556] [ruby-core:50867] + Fri Dec 14 14:59:14 2012 Nobuyoshi Nakada <nobu@r...> * test/ruby/envutil.rb (Test::Unit::Assertions#assert_separately): Index: vm_insnhelper.c =================================================================== --- vm_insnhelper.c (revision 38376) +++ vm_insnhelper.c (revision 38377) @@ -1556,7 +1556,13 @@ vm_call_bmethod(rb_thread_t *th, rb_cont https://github.com/ruby/ruby/blob/trunk/vm_insnhelper.c#L1556 return vm_call_bmethod_body(th, ci, argv); } -static inline VALUE vm_call_method(rb_thread_t *th, rb_control_frame_t *cfp, rb_call_info_t *ci); +static +#ifdef _MSC_VER +__forceinline +#else +inline +#endif +VALUE vm_call_method(rb_thread_t *th, rb_control_frame_t *cfp, rb_call_info_t *ci); static VALUE vm_call_opt_send(rb_thread_t *th, rb_control_frame_t *reg_cfp, rb_call_info_t *ci) @@ -1665,7 +1671,13 @@ find_refinement(VALUE refinements, VALUE https://github.com/ruby/ruby/blob/trunk/vm_insnhelper.c#L1671 static int rb_method_definition_eq(const rb_method_definition_t *d1, const rb_method_definition_t *d2); static VALUE vm_call_super_method(rb_thread_t *th, rb_control_frame_t *reg_cfp, rb_call_info_t *ci); -static inline VALUE +static +#ifdef _MSC_VER +__forceinline +#else +inline +#endif +VALUE vm_call_method(rb_thread_t *th, rb_control_frame_t *cfp, rb_call_info_t *ci) { int enable_fastpath = 1; @@ -1852,11 +1864,6 @@ vm_call_general(rb_thread_t *th, rb_cont https://github.com/ruby/ruby/blob/trunk/vm_insnhelper.c#L1864 static VALUE vm_call_super_method(rb_thread_t *th, rb_control_frame_t *reg_cfp, rb_call_info_t *ci) { -#ifdef _WIN32 - volatile int x = 0; /* a workaround to avoid VC++ optimization which - makes vm_call_super_method as an alias of - vm_call_general! */ -#endif return vm_call_method(th, reg_cfp, ci); } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/