diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 2000-03-19 05:27:31 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 2000-03-19 05:27:31 +0000 |
commit | 71a29c3c6e68e84b4c2fa366c4878918712829a9 (patch) | |
tree | 6006140239eb94671f06f42e3ac3ef2095053f25 /op.c | |
parent | 3dcd9d33ba0f5c25b8e7a1285e47073c4ec85071 (diff) | |
download | perl-71a29c3c6e68e84b4c2fa366c4878918712829a9.tar.gz |
fix sort optimizer to not hang inside loops
p4raw-id: //depot/perl@5815
Diffstat (limited to 'op.c')
-rw-r--r-- | op.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -5999,6 +5999,12 @@ Perl_ck_sort(pTHX_ OP *o) for (k = kLISTOP->op_first->op_next; k; k = k->op_next) { if (k->op_next == kid) k->op_next = 0; + /* don't descend into loops */ + else if (k->op_type == OP_ENTERLOOP + || k->op_type == OP_ENTERITER) + { + k = cLOOPx(k)->op_lastop; + } } } else |