[前][次][番号順一覧][スレッド一覧]

ruby-changes:39172

From: normal <ko1@a...>
Date: Wed, 15 Jul 2015 18:32:29 +0900 (JST)
Subject: [ruby-changes:39172] normal:r51253 (trunk): remove redundant NULL checks after RUBY_VM_IFUNC_P

normal	2015-07-15 18:32:08 +0900 (Wed, 15 Jul 2015)

  New Revision: 51253

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=51253

  Log:
    remove redundant NULL checks after RUBY_VM_IFUNC_P
    
    * proc.c (proc_mark): remove redundant check
    * vm.c (env_mark): ditto
    
    This doesn't change object code size, but the unstripped
    executable is smaller and the code less confusing.

  Modified files:
    trunk/ChangeLog
    trunk/proc.c
    trunk/vm.c
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 51252)
+++ ChangeLog	(revision 51253)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Wed Jul 15 18:31:18 2015  Eric Wong  <e@8...>
+
+	* proc.c (proc_mark): remove redundant check
+	* vm.c (env_mark): ditto
+
 Wed Jul 15 17:27:40 2015  Eric Wong  <e@8...>
 
 	* iseq.c (iseq_mark): remove check for data pointer
Index: proc.c
===================================================================
--- proc.c	(revision 51252)
+++ proc.c	(revision 51253)
@@ -50,7 +50,7 @@ proc_mark(void *ptr) https://github.com/ruby/ruby/blob/trunk/proc.c#L50
     RUBY_MARK_UNLESS_NULL(proc->block.self);
     RUBY_MARK_UNLESS_NULL(rb_vm_proc_envval(proc));
     if (proc->block.iseq && RUBY_VM_IFUNC_P(proc->block.iseq)) {
-	RUBY_MARK_UNLESS_NULL((VALUE)(proc->block.iseq));
+	rb_gc_mark((VALUE)(proc->block.iseq));
     }
     RUBY_MARK_LEAVE("proc");
 }
Index: vm.c
===================================================================
--- vm.c	(revision 51252)
+++ vm.c	(revision 51253)
@@ -422,7 +422,7 @@ env_mark(void * const ptr) https://github.com/ruby/ruby/blob/trunk/vm.c#L422
 
     if (env->block.iseq) {
 	if (RUBY_VM_IFUNC_P(env->block.iseq)) {
-	    RUBY_MARK_UNLESS_NULL((VALUE)env->block.iseq);
+	    rb_gc_mark((VALUE)env->block.iseq);
 	}
 	else {
 	    RUBY_MARK_UNLESS_NULL(env->block.iseq->self);

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]