ruby-changes:39500
From: normal <ko1@a...>
Date: Sat, 15 Aug 2015 04:23:25 +0900 (JST)
Subject: [ruby-changes:39500] normal:r51581 (trunk): iseq.c (rb_iseq_mark): reduce NULL checks
normal 2015-08-15 04:23:02 +0900 (Sat, 15 Aug 2015) New Revision: 51581 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=51581 Log: iseq.c (rb_iseq_mark): reduce NULL checks iseq_location_setup always sets path, label and base_label fields, and the only caller of iseq_location_setup (prepare_iseq_build) will always pass non-nil `name' and `path' arguments. Modified files: trunk/ChangeLog trunk/iseq.c Index: ChangeLog =================================================================== --- ChangeLog (revision 51580) +++ ChangeLog (revision 51581) @@ -1,3 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Sat Aug 15 04:16:13 2015 Eric Wong <e@8...> + + * iseq.c (rb_iseq_mark): reduce NULL checks + Fri Aug 14 18:50:57 2015 Eric Wong <e@8...> * method.h (METHOD_ENTRY_VISI_SET): cast visi to int Index: iseq.c =================================================================== --- iseq.c (revision 51580) +++ iseq.c (revision 51581) @@ -108,9 +108,9 @@ rb_iseq_mark(const rb_iseq_t *iseq) https://github.com/ruby/ruby/blob/trunk/iseq.c#L108 const struct rb_iseq_constant_body *body = iseq->body; RUBY_MARK_UNLESS_NULL(body->mark_ary); - RUBY_MARK_UNLESS_NULL(body->location.label); - RUBY_MARK_UNLESS_NULL(body->location.base_label); - RUBY_MARK_UNLESS_NULL(body->location.path); + rb_gc_mark(body->location.label); + rb_gc_mark(body->location.base_label); + rb_gc_mark(body->location.path); RUBY_MARK_UNLESS_NULL(body->location.absolute_path); } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/