Skip to content

Commit 7e88258

Browse files
committed
use a proper fixpoint iteration in ReachabilityAnalysis.finish
1 parent 19b6f41 commit 7e88258

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

substratevm/src/com.oracle.graal.reachability/src/com/oracle/graal/reachability/ReachabilityAnalysis.java

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -259,13 +259,20 @@ private void onMethodInvoked(AnalysisMethod method) {
259259
@Override
260260
public boolean finish() throws InterruptedException {
261261
universe.setAnalysisDataValid(false);
262-
// todo transform into a real 'run until fixpoint' loop
263-
for (int i = 0; i < 10; i++) {
262+
263+
int numTypes;
264+
do {
264265
runReachability();
265266

267+
assert executor.getPostedOperations() == 0;
268+
numTypes = universe.getTypes().size();
269+
266270
checkObjectGraph();
267-
}
271+
272+
} while (executor.getPostedOperations() != 0 || numTypes != universe.getTypes().size());
273+
268274
universe.setAnalysisDataValid(true);
275+
269276
return true;
270277
}
271278

0 commit comments

Comments
 (0)