Declare a match between our a bin context and a source context. Args: match (SourceContext): the matching source context
(self, match)
| 771 | |
| 772 | # Overridden base function |
| 773 | def declareMatch(self, match): |
| 774 | """Declare a match between our a bin context and a source context. |
| 775 | |
| 776 | Args: |
| 777 | match (SourceContext): the matching source context |
| 778 | """ |
| 779 | self.match = match |
| 780 | # notify our hints that we are out of the game |
| 781 | if self.call_hints is not None: |
| 782 | for hint in list(self.call_hints): |
| 783 | self.removeHint(hint, clear=True) |
| 784 | for hint in list(self.xref_hints): |
| 785 | self.removeHint(hint, clear=True) |
| 786 | # If we chose a collision candidate, when we saw the possibility for a collision, it means it is indeed an active collision |
| 787 | if match.hash in self.collision_map or (len(self.files) > 0 and match.file not in self.files): |
| 788 | self.merged_sources.append(match) |
| 789 | self.taken_collision = True |
| 790 | # make sure that our match will always be in our map |
| 791 | if match.hash not in self.collision_map: |
| 792 | self.collision_map[match.hash] = set() |
| 793 | # make sure the collision map won't allow conflicting collisions |
| 794 | new_collisions = defaultdict(set) |
| 795 | if match.hash in self.collision_map: |
| 796 | new_collisions[match.hash] = self.collision_map[match.hash] |
| 797 | self.collision_map = new_collisions |
| 798 | |
| 799 | # Overridden base function |
| 800 | def isPartial(self): |
nothing calls this directly
no test coverage detected