summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2016-08-01 12:41:06 +0100
committerDavid Mitchell <davem@iabyn.com>2016-08-03 20:54:42 +0100
commit097e9660df79edd7f79559a622cb8f847af3dc15 (patch)
tree1da40faa6c3bf5ffe09f43e531451aa275723303 /lib
parent71986b3382e8d0e3eff561cab5c4872e8bd1898a (diff)
downloadperl-097e9660df79edd7f79559a622cb8f847af3dc15.tar.gz
Deparse.pm - avoid deep recursion warning
also add some basic descriptions to a few functions.
Diffstat (limited to 'lib')
-rw-r--r--lib/B/Deparse.pm10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/B/Deparse.pm b/lib/B/Deparse.pm
index 731e9cefc4..5254f86d66 100644
--- a/lib/B/Deparse.pm
+++ b/lib/B/Deparse.pm
@@ -460,6 +460,7 @@ sub _pessimise_walk_exe {
sub pessimise {
my ($self, $root, $start) = @_;
+ no warnings 'recursion';
# walk tree in root-to-branch order
$self->_pessimise_walk($root);
@@ -474,6 +475,9 @@ sub null {
return class($op) eq "NULL";
}
+
+# Add a CV to the list of subs that still need deparsing.
+
sub todo {
my $self = shift;
my($cv, $is_form, $name) = @_;
@@ -490,6 +494,9 @@ sub todo {
push @{$self->{'subs_todo'}}, [$seq, $cv, $is_form, $name];
}
+
+# Pop the next sub from the todo list and deparse it
+
sub next_todo {
my $self = shift;
my $ent = shift @{$self->{'subs_todo'}};
@@ -1300,6 +1307,9 @@ sub deparse_argops {
return ($o, join(', ', @sig));
}
+# Deparse a sub. Returns everything except the 'sub foo',
+# e.g. ($$) : method { ...; }
+# or ($a, $b) : prototype($$) lvalue;
sub deparse_sub {
my $self = shift;