diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | gc.c | 2 | ||||
-rw-r--r-- | thread.c | 2 | ||||
-rw-r--r-- | vm_insnhelper.c | 4 |
4 files changed, 10 insertions, 4 deletions
@@ -1,3 +1,9 @@ +Thu Jun 16 23:40:49 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com> + + * 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 <sorah@tubusu.net> * test/testunit/test_parallel.rb: Fix Regexp for test. @@ -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(); @@ -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 { |