(self, other)
| 1088 | self.size -= 1 |
| 1089 | |
| 1090 | def merge_shellcode(self, other): |
| 1091 | shared_labels = set(self.labels) & set(other.labels) |
| 1092 | if shared_labels: |
| 1093 | raise ValueError("Cannot merge shellcode: shared labels {0}".format(shared_labels)) |
| 1094 | for offset, instr in sorted(other.instrs.items()): |
| 1095 | for label_name in [name for name, label_offset in other.labels.items() if label_offset == offset]: |
| 1096 | self.add_instruction(Label(label_name)) |
| 1097 | self.add_instruction(instr) |
| 1098 | |
| 1099 | def __iadd__(self, other): |
| 1100 | if isinstance(other, MultipleInstr): |
no test coverage detected