use XSLoader ();
require Exporter;
@ISA = qw(Exporter);
-@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
- walkoptree_slow walkoptree_exec walksymtable
- parents comppadlist sv_undef compile_stats timing_info
- begin_av init_av end_av);
+@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
+ 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';
return sprintf("%s (0x%x) %s", class($op), $$op, $op->name);
}
-sub walkoptree_slow {
+sub walkoptree {
my($op, $method, $level) = @_;
$op_count++; # just for statistics
$level ||= 0;
my $kid;
unshift(@parents, $op);
for ($kid = $op->first; $$kid; $kid = $kid->sibling) {
- walkoptree_slow($kid, $method, $level + 1);
+ walkoptree($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";
}
=cut
use strict;
-use B qw(walkoptree_slow main_root walksymtable svref_2object parents
+use B qw(walkoptree main_root walksymtable svref_2object parents
OPf_WANT_LIST OPf_WANT OPf_STACKED G_ARRAY
);
return if !$$cv || $done_cv{$$cv}++;
my $root = $cv->ROOT;
#warn " root = $root (0x$$root)\n";#debug
- walkoptree_slow($root, "lint") if $$root;
+ walkoptree($root, "lint") if $$root;
}
sub do_lint {
my %search_pack;
- walkoptree_slow(main_root, "lint") if ${main_root()};
+ walkoptree(main_root, "lint") if ${main_root()};
# Now do subs in main
no strict qw(vars refs);
package B::Terse;
use strict;
-use B qw(peekop class walkoptree_slow walkoptree_exec
+use B qw(peekop class walkoptree walkoptree_exec
main_start main_root cstring svref_2object);
use B::Asmdata qw(@specialsv_name);
if ($order eq "exec") {
walkoptree_exec($cv->START, "terse");
} else {
- walkoptree_slow($cv->ROOT, "terse");
+ walkoptree($cv->ROOT, "terse");
}
}
if ($order eq "exec") {
return sub { walkoptree_exec(main_start, "terse") }
} else {
- return sub { walkoptree_slow(main_root, "terse") }
+ return sub { walkoptree(main_root, "terse") }
}
}
}