зеркало из https://github.com/github/ruby.git
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. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51581 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
ea476e3678
Коммит
e7bb5d44e6
|
@ -1,3 +1,7 @@
|
|||
Sat Aug 15 04:16:13 2015 Eric Wong <e@80x24.org>
|
||||
|
||||
* iseq.c (rb_iseq_mark): reduce NULL checks
|
||||
|
||||
Fri Aug 14 18:50:57 2015 Eric Wong <e@80x24.org>
|
||||
|
||||
* method.h (METHOD_ENTRY_VISI_SET): cast visi to int
|
||||
|
|
6
iseq.c
6
iseq.c
|
@ -108,9 +108,9 @@ rb_iseq_mark(const rb_iseq_t *iseq)
|
|||
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);
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче