logic / sh2dis

An SH2-compatible (Renesas SuperH) disassembler.
http://code.logic.net/sh2dis/
23 stars 4 forks source link

Move reference tracking into Segment #1

Closed logic closed 13 years ago

logic commented 13 years ago

References should be tracked by Segment, rather than by individual SegmentData objects.

Move add_reference() into Segment, fix up references to it and Segment.references. Should add remove_reference() for completeness, although nothing needs it today.

logic commented 13 years ago

Labels may end up being a good candidate for extracting out to Segment as well. SegmentData is a representation of the data, while Segment tracks locations; labels and references are properties of the location, not the data.