diff options
author | shugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-12-14 08:04:55 +0000 |
---|---|---|
committer | shugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-12-14 08:04:55 +0000 |
commit | 1d7f737553b2d7071fc4e28e4bfaf40778acf9a6 (patch) | |
tree | 0f72fd6a1491b9132a77730ad6747fe99aa95918 /vm_insnhelper.c | |
parent | 72360463598453e7a79eb81a3974cbd2d20de016 (diff) | |
download | ruby-1d7f737553b2d7071fc4e28e4bfaf40778acf9a6.tar.gz |
* 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
Diffstat (limited to 'vm_insnhelper.c')
-rw-r--r-- | vm_insnhelper.c | 21 |
1 files changed, 14 insertions, 7 deletions
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); } |