diff options
author | kosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-06-16 14:42:02 +0000 |
---|---|---|
committer | kosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-06-16 14:42:02 +0000 |
commit | 3c23284734b60dac99339c300dff6c4bd2c226f4 (patch) | |
tree | 0fcf8c443b9ec1dc3282bbf8e0a3570f0f8ade50 | |
parent | e80b506ed9798ed9fc8af520cf9243e7de1cdab9 (diff) | |
download | ruby-3c23284734b60dac99339c300dff6c4bd2c226f4.tar.gz |
* 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
-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 { |