Skip to content

Commit

Permalink
Merge branch 'GP-0_ryanmkurtz_PR-3787_GameCubeGBA_outerloop'
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanmkurtz committed Jun 24, 2022
2 parents f57cf98 + d8bf2f9 commit a59c42d
Showing 1 changed file with 14 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -718,14 +718,8 @@ public boolean added(Program addedProgram, AddressSetView addedSet,
while (addresses.hasNext() && !addedMonitor.isCancelled()) {
Address address = addresses.next();
// if there are any conditional references, then this can't be a function start
ReferenceIterator referencesTo =
addedProgram.getReferenceManager().getReferencesTo(address);
while (referencesTo.hasNext()) {
Reference reference = referencesTo.next();
if (reference.getReferenceType().isConditional()) {
continue;
}

if (hasConditionalReferences(addedProgram, address)) {
continue;
}
Function funcAt =
addedProgram.getFunctionManager().getFunctionContaining(address);
Expand All @@ -743,6 +737,18 @@ public boolean added(Program addedProgram, AddressSetView addedSet,
}
return true;
}

private boolean hasConditionalReferences(Program addedProgram, Address address) {
ReferenceIterator refsTo =
addedProgram.getReferenceManager().getReferencesTo(address);
while (refsTo.hasNext()) {
Reference reference = refsTo.next();
if (reference.getReferenceType().isConditional()) {
return true;
}
}
return false;
}
}, potentialFuncResult);
}

Expand Down

0 comments on commit a59c42d

Please sign in to comment.