|
|
|
@ -114,12 +114,15 @@ class Disassembly: |
|
|
|
|
except IndexError: |
|
|
|
|
continue |
|
|
|
|
|
|
|
|
|
self.xrefs.append((block.id, self.blocks[j].id)) |
|
|
|
|
|
|
|
|
|
if not (block.id, self.blocks[j].id) in self.xrefs: |
|
|
|
|
self.xrefs.append((block.id, self.blocks[j].id)) |
|
|
|
|
|
|
|
|
|
# if the last instruction isn't an unconditional jump or halt, also add a reference to the following block |
|
|
|
|
|
|
|
|
|
if (block.id < len(self.blocks)) and (block.instruction_list[block.length - 1]['opcode'] not in ['JUMP', 'STOP', 'THROW', 'REVERT', 'INVALID']): |
|
|
|
|
self.xrefs.append((block.id, block.id + 1)) |
|
|
|
|
if not (block.id, self.blocks[j].id) in self.xrefs: |
|
|
|
|
self.xrefs.append((block.id, block.id + 1)) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def get_easm(self): |
|
|
|
|