1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

vm.c: simplify

* vm.c (env_mark): remove redundant conditions and mark block.iseq
  simply unless null.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52130 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2015-10-15 04:44:58 +00:00
parent c2e8fb0f34
commit 7c4b03e775

10
vm.c
View file

@ -414,15 +414,7 @@ env_mark(void * const ptr)
RUBY_MARK_UNLESS_NULL(rb_vm_env_prev_envval(env));
RUBY_MARK_UNLESS_NULL(env->block.self);
RUBY_MARK_UNLESS_NULL(env->block.proc);
if (env->block.iseq) {
if (RUBY_VM_IFUNC_P(env->block.iseq)) {
rb_gc_mark((VALUE)env->block.iseq);
}
else {
RUBY_MARK_UNLESS_NULL((VALUE)env->block.iseq);
}
}
RUBY_MARK_UNLESS_NULL((VALUE)env->block.iseq);
RUBY_MARK_LEAVE("env");
}