summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2000-12-10 18:07:55 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2000-12-10 18:07:55 +0000
commitb2590c4eed970cd7ecbb1ec3a1d5b37545bacdd2 (patch)
tree297809c7d44ded31a9a9a73197ca99156f1a449e
parentfb79c7d7595eb45bb729c67fca489db647f2df72 (diff)
downloadperl-b2590c4eed970cd7ecbb1ec3a1d5b37545bacdd2.tar.gz
The walkoptree confusion rages; walkoptree() seems to be coming
from B.xs, while walkoptree_slow() comes from B.pm. p4raw-id: //depot/perl@8072
-rw-r--r--ext/B/B.pm12
1 files changed, 7 insertions, 5 deletions
diff --git a/ext/B/B.pm b/ext/B/B.pm
index a9ea704d78..982395bb72 100644
--- a/ext/B/B.pm
+++ b/ext/B/B.pm
@@ -9,12 +9,16 @@ package B;
use XSLoader ();
require Exporter;
@ISA = qw(Exporter);
+
+# walkoptree comes from B.pm (you are there), walkoptree comes from B.xs
@EXPORT_OK = qw(minus_c ppname save_BEGINs
class peekop cast_I32 cstring cchar hash threadsv_names
- main_root main_start main_cv svref_2object opnumber amagic_generation
+ main_root main_start main_cv svref_2object opnumber
+ amagic_generation
walkoptree_slow walkoptree walkoptree_exec walksymtable
parents comppadlist sv_undef compile_stats timing_info
begin_av init_av end_av);
+
sub OPf_KIDS ();
use strict;
@B::SV::ISA = 'B::OBJECT';
@@ -80,7 +84,7 @@ sub peekop {
return sprintf("%s (0x%x) %s", class($op), $$op, $op->name);
}
-sub walkoptree {
+sub walkoptree_slow {
my($op, $method, $level) = @_;
$op_count++; # just for statistics
$level ||= 0;
@@ -90,14 +94,12 @@ sub walkoptree {
my $kid;
unshift(@parents, $op);
for ($kid = $op->first; $$kid; $kid = $kid->sibling) {
- walkoptree($kid, $method, $level + 1);
+ walkoptree_slow($kid, $method, $level + 1);
}
shift @parents;
}
}
-*walkoptree_slow = \&walkoptree; # Who is using this?
-
sub compile_stats {
return "Total number of OPs processed: $op_count\n";
}