diff options
author | Stephen McCamant <smcc@mit.edu> | 1999-06-25 08:38:44 -0500 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1999-07-07 08:07:49 +0000 |
commit | 1a67a97c0300941ac67bfb1dd421467b8c59e21c (patch) | |
tree | 6af0288c91ab32f5ab3c8f6aabdca7d3b00e0e3e /ext/B/B.pm | |
parent | c4be5b273ea01a42f8bea870c9703dc3eaa652b6 (diff) | |
download | perl-1a67a97c0300941ac67bfb1dd421467b8c59e21c.tar.gz |
Eliminate CONDOPs
Message-ID: <14193.25034.113373.245377@alias-2.pr.mcs.net>
p4raw-id: //depot/perl@3637
Diffstat (limited to 'ext/B/B.pm')
-rw-r--r-- | ext/B/B.pm | 30 |
1 files changed, 4 insertions, 26 deletions
diff --git a/ext/B/B.pm b/ext/B/B.pm index cdbd3b297e..b39659d1c9 100644 --- a/ext/B/B.pm +++ b/ext/B/B.pm @@ -38,7 +38,6 @@ use strict; @B::UNOP::ISA = 'B::OP'; @B::BINOP::ISA = 'B::UNOP'; @B::LOGOP::ISA = 'B::UNOP'; -@B::CONDOP::ISA = 'B::UNOP'; @B::LISTOP::ISA = 'B::BINOP'; @B::SVOP::ISA = 'B::OP'; @B::GVOP::ISA = 'B::OP'; @@ -132,7 +131,9 @@ sub walkoptree_exec { savesym($op, sprintf("%s (0x%lx)", class($op), $$op)); $op->$method($level); $ppname = $op->ppaddr; - if ($ppname =~ /^pp_(or|and|mapwhile|grepwhile|entertry)$/) { + if ($ppname =~ + /^pp_(or|and|mapwhile|grepwhile|entertry|range|cond_expr)$/) + { print $prefix, uc($1), " => {\n"; walkoptree_exec($op->other, $method, $level + 1); print $prefix, "}\n"; @@ -148,19 +149,6 @@ sub walkoptree_exec { walkoptree_exec($op->other->pmreplstart, $method, $level + 1); print $prefix, "}\n"; $op = $op->other; - } elsif ($ppname eq "pp_cond_expr") { - # pp_cond_expr never returns op_next - print $prefix, "TRUE => {\n"; - walkoptree_exec($op->true, $method, $level + 1); - print $prefix, "}\n"; - $op = $op->false; - redo; - } elsif ($ppname eq "pp_range") { - print $prefix, "TRUE => {\n"; - walkoptree_exec($op->true, $method, $level + 1); - print $prefix, "}\n", $prefix, "FALSE => {\n"; - walkoptree_exec($op->false, $method, $level + 1); - print $prefix, "}\n"; } elsif ($ppname eq "pp_enterloop") { print $prefix, "REDO => {\n"; walkoptree_exec($op->redoop, $method, $level + 1); @@ -555,7 +543,7 @@ C<REFCNT> (corresponding to the C function C<SvREFCNT>). =head2 OP-RELATED CLASSES -B::OP, B::UNOP, B::BINOP, B::LOGOP, B::CONDOP, B::LISTOP, B::PMOP, +B::OP, B::UNOP, B::BINOP, B::LOGOP, B::LISTOP, B::PMOP, B::SVOP, B::GVOP, B::PVOP, B::CVOP, B::LOOP, B::COP. These classes correspond in the obvious way to the underlying C structures of similar names. The @@ -616,16 +604,6 @@ This returns the op description from the global C PL_op_desc array =back -=head2 B::CONDOP METHODS - -=over 4 - -=item true - -=item false - -=back - =head2 B::LISTOP METHOD =over 4 |