This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
in op_dump() / -Dx, replace "DONE" with "NULL"
authorDavid Mitchell <davem@iabyn.com>
Mon, 17 Oct 2011 12:00:32 +0000 (13:00 +0100)
committerDavid Mitchell <davem@iabyn.com>
Mon, 17 Oct 2011 12:00:32 +0000 (13:00 +0100)
When displaying op_next, it currently shows a null value as "DONE",
which while meaningful on a completely compiled tree, is confusing
on a partially-built tree, where multiple ops may have an op_next of null.

dump.c

diff --git a/dump.c b/dump.c
index 3859da5..d1803cd 100644 (file)
--- a/dump.c
+++ b/dump.c
@@ -849,7 +849,7 @@ Perl_do_op_dump(pTHX_ I32 level, PerlIO *file, const OP *o)
                        o->op_type == OP_NULL ? "(%"UVuf")\n" : "%"UVuf"\n",
                                sequence_num(o->op_next));
     else
-       PerlIO_printf(file, "DONE\n");
+       PerlIO_printf(file, "NULL\n");
     if (o->op_targ) {
        if (optype == OP_NULL) {
            Perl_dump_indent(aTHX_ level, file, "  (was %s)\n", PL_op_name[o->op_targ]);