summaryrefslogtreecommitdiffstats
path: root/compile.c
diff options
context:
space:
mode:
authormame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-05-22 14:45:54 +0000
committermame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-05-22 14:45:54 +0000
commitad8477fc5c58f335a740c74e5a4a4809d4178d9f (patch)
treec261c7480568af4a231a7f06d8a2b4d8d5935cb9 /compile.c
parenteadb90ca2dcdef2f0e5df69cd12af1cdb983f704 (diff)
downloadruby-ad8477fc5c58f335a740c74e5a4a4809d4178d9f.tar.gz
ruby-ad8477fc5c58f335a740c74e5a4a4809d4178d9f.tar.xz
ruby-ad8477fc5c58f335a740c74e5a4a4809d4178d9f.zip
* compile.c (get_destination_insn, get_next_insn, get_prev_insn):
peephole optimization should not ignore ISEQ_ELEMENT_ADJUST. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@16535 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'compile.c')
-rw-r--r--compile.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/compile.c b/compile.c
index 5e2400a2c..ec8b26f33 100644
--- a/compile.c
+++ b/compile.c
@@ -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;