diff options
author | mame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-05-22 14:45:54 +0000 |
---|---|---|
committer | mame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-05-22 14:45:54 +0000 |
commit | 846ea1727fd34b4eb7c5a9b9d2643d04567c8f86 (patch) | |
tree | c261c7480568af4a231a7f06d8a2b4d8d5935cb9 /compile.c | |
parent | 2b791b2ddd65241d8e95d6bca25eeb770d244570 (diff) | |
download | ruby-846ea1727fd34b4eb7c5a9b9d2643d04567c8f86.tar.gz |
* compile.c (get_destination_insn, get_next_insn, get_prev_insn):
peephole optimization should not ignore ISEQ_ELEMENT_ADJUST.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16535 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'compile.c')
-rw-r--r-- | compile.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1362,7 +1362,7 @@ get_destination_insn(INSN *iobj) list = lobj->link.next; while (list) { - if (list->type == ISEQ_ELEMENT_INSN) { + if (list->type == ISEQ_ELEMENT_INSN || list->type == ISEQ_ELEMENT_ADJUST) { break; } list = list->next; @@ -1376,7 +1376,7 @@ get_next_insn(INSN *iobj) LINK_ELEMENT *list = iobj->link.next; while (list) { - if (list->type == ISEQ_ELEMENT_INSN) { + if (list->type == ISEQ_ELEMENT_INSN || list->type == ISEQ_ELEMENT_ADJUST) { return list; } list = list->next; @@ -1390,7 +1390,7 @@ get_prev_insn(INSN *iobj) LINK_ELEMENT *list = iobj->link.prev; while (list) { - if (list->type == ISEQ_ELEMENT_INSN) { + if (list->type == ISEQ_ELEMENT_INSN || list->type == ISEQ_ELEMENT_ADJUST) { return list; } list = list->prev; |