diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-11-01 04:17:01 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-11-01 04:17:01 +0000 |
commit | 130bb41d0a71547505e4f3e071deaf397cb28e38 (patch) | |
tree | 8afaeaa8c7d801668eec5e07956ff9d36474eab4 | |
parent | 25a973e84b1e9879977010b3825b59faa740ff0d (diff) | |
download | ruby-130bb41d0a71547505e4f3e071deaf397cb28e38.tar.gz |
iseq.c: simplify
* iseq.c (set_relation): simplify and merge same conditions.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37397 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | iseq.c | 16 |
1 files changed, 2 insertions, 14 deletions
@@ -213,30 +213,18 @@ set_relation(rb_iseq_t *iseq, const VALUE parent) cref->nd_next = iseq->cref_stack; iseq->cref_stack = cref; } + iseq->local_iseq = iseq; } else if (type == ISEQ_TYPE_METHOD || type == ISEQ_TYPE_CLASS) { iseq->cref_stack = NEW_CREF(0); /* place holder */ iseq->cref_stack->nd_refinements = Qnil; - } - else if (RTEST(parent)) { - rb_iseq_t *piseq; - GetISeqPtr(parent, piseq); - iseq->cref_stack = piseq->cref_stack; - } - - if (type == ISEQ_TYPE_TOP || - type == ISEQ_TYPE_METHOD || type == ISEQ_TYPE_CLASS) { iseq->local_iseq = iseq; } else if (RTEST(parent)) { rb_iseq_t *piseq; GetISeqPtr(parent, piseq); + iseq->cref_stack = piseq->cref_stack; iseq->local_iseq = piseq->local_iseq; - } - - if (RTEST(parent)) { - rb_iseq_t *piseq; - GetISeqPtr(parent, piseq); iseq->parent_iseq = piseq; } } |