From 1d7f737553b2d7071fc4e28e4bfaf40778acf9a6 Mon Sep 17 00:00:00 2001 From: shugo Date: Fri, 14 Dec 2012 08:04:55 +0000 Subject: * 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] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38377 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- vm_insnhelper.c | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) (limited to 'vm_insnhelper.c') diff --git a/vm_insnhelper.c b/vm_insnhelper.c index d1b136e684..802ba75dd6 100644 --- a/vm_insnhelper.c +++ b/vm_insnhelper.c @@ -1556,7 +1556,13 @@ vm_call_bmethod(rb_thread_t *th, rb_control_frame_t *cfp, rb_call_info_t *ci) 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 klass) 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_control_frame_t *reg_cfp, rb_call_info_t *ci 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); } -- cgit v1.2.3