From 3c23284734b60dac99339c300dff6c4bd2c226f4 Mon Sep 17 00:00:00 2001 From: kosaki Date: Thu, 16 Jun 2011 14:42:02 +0000 Subject: [PATCH] * thread.c (rb_thread_schedule_rec): fix {UN,}LIKELY macro misuse. * gc.c (rb_newobj): ditto. * vm_insnhelper.c (vm_method_search): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32131 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 6 ++++++ gc.c | 2 +- thread.c | 2 +- vm_insnhelper.c | 4 ++-- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 58cdea6647..ecda220923 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Thu Jun 16 23:40:49 2011 KOSAKI Motohiro + + * thread.c (rb_thread_schedule_rec): fix {UN,}LIKELY macro misuse. + * gc.c (rb_newobj): ditto. + * vm_insnhelper.c (vm_method_search): ditto. + Thu Jun 16 20:06:15 2011 Shota Fukumori * test/testunit/test_parallel.rb: Fix Regexp for test. diff --git a/gc.c b/gc.c index f1fb7568fb..137504ca7e 100644 --- a/gc.c +++ b/gc.c @@ -1155,7 +1155,7 @@ rb_newobj(void) rb_bug("object allocation during garbage collection phase"); } - if (UNLIKELY(ruby_gc_stress) && UNLIKELY(!ruby_disable_gc_stress)) { + if (UNLIKELY(ruby_gc_stress && !ruby_disable_gc_stress)) { if (!garbage_collect(objspace)) { during_gc = 0; rb_memerror(); diff --git a/thread.c b/thread.c index b2cbda0128..34068b0300 100644 --- a/thread.c +++ b/thread.c @@ -1024,7 +1024,7 @@ rb_thread_schedule_rec(int sched_depth, unsigned long limits_us) rb_thread_set_current(th); thread_debug("rb_thread_schedule/switch done\n"); - if (!sched_depth && UNLIKELY(GET_THREAD()->interrupt_flag)) { + if (UNLIKELY(!sched_depth && GET_THREAD()->interrupt_flag)) { rb_threadptr_execute_interrupts_rec(GET_THREAD(), sched_depth+1); } } diff --git a/vm_insnhelper.c b/vm_insnhelper.c index f40dfdfb8a..6e45574b17 100644 --- a/vm_insnhelper.c +++ b/vm_insnhelper.c @@ -1345,8 +1345,8 @@ vm_method_search(VALUE id, VALUE klass, IC ic) { rb_method_entry_t *me; #if OPT_INLINE_METHOD_CACHE - if (LIKELY(klass == ic->ic_class) && - LIKELY(GET_VM_STATE_VERSION() == ic->ic_vmstat)) { + if (LIKELY(klass == ic->ic_class && + GET_VM_STATE_VERSION() == ic->ic_vmstat)) { me = ic->ic_value.method; } else {