simplify op_dump() / -Dx sequencing
authorDavid Mitchell <davem@iabyn.com>
Mon, 17 Oct 2011 11:46:51 +0000 (12:46 +0100)
committerDavid Mitchell <davem@iabyn.com>
Mon, 17 Oct 2011 11:55:10 +0000 (12:55 +0100)
commitb6f05621f8846ec3e3b279fc32f6bbe9bce20cfb
treeb9a3960ffdd1fe87b96b863b9d0fcea20ed5d9bc
parent567f3b56280708b687bbc7050db07137b81b9fd9
simplify op_dump() / -Dx sequencing

Currently, whenever we dump an op tree, we first call sequence(),
which walks the tree, creating address => sequence# mappings in
PL_op_sequence. Then when individual ops or op-next fields are displayed,
the sequence is looked up.

Instead, do away with the initial walk, and just map addresses on request.
This simplifies the code.

As a deliberate side-effect, it no longer assigns a seq# of zero to
null ops. This makes it easer to work out what's going on when you
call op_dump() during a debugging session with partially constructed
op-trees. It also removes the ambiguity in "====> 0" as to whether
op_next is NULL or just points to an op_null.
dump.c
embed.fnc
embed.h
proto.h