File tree 2 files changed +8
-5
lines changed
substratevm/src/com.oracle.graal.pointsto/src/com/oracle/graal/pointsto
2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -650,10 +650,10 @@ public boolean finish() throws InterruptedException {
650
650
@ Override
651
651
public void afterAnalysis () {
652
652
/*
653
- * Only verify in the context-insensitive configuration as context-sensitive analysis is not
653
+ * Only verify in the context-insensitive analysis because context-sensitive analysis is not
654
654
* compatible with predicates.
655
655
*/
656
- assert ! PointstoOptions . AnalysisContextSensitivity . getValue ( options ). equals ( "insens" ) || validateFixedPointState ();
656
+ assert analysisPolicy (). isContextSensitiveAnalysis ( ) || validateFixedPointState ();
657
657
}
658
658
659
659
/**
Original file line number Diff line number Diff line change @@ -955,18 +955,21 @@ private void notifySaturated(PointsToAnalysis bb) {
955
955
956
956
/** This flow will swap itself out at all uses and observers. */
957
957
protected void swapOut (PointsToAnalysis bb , TypeFlow <?> newFlow ) {
958
+ assert isSaturated () : "This operation should only be called on saturated flows:" + this ;
958
959
for (TypeFlow <?> use : getUses ()) {
959
960
swapAtUse (bb , newFlow , use );
960
961
}
961
962
for (TypeFlow <?> observer : getObservers ()) {
962
963
swapAtObserver (bb , newFlow , observer );
963
964
}
965
+ /*
966
+ * Before performing the swap, make sure addPredicated will immediately enable any newly
967
+ * added predicated flows.
968
+ */
969
+ AtomicUtils .atomicMark (this , PREDICATE_TRIGGERED_UPDATER );
964
970
for (TypeFlow <?> predicatedFlow : getPredicatedFlows ()) {
965
971
swapAtPredicated (bb , newFlow , predicatedFlow );
966
972
}
967
- if (isSaturated ()) {
968
- AtomicUtils .atomicMark (this , PREDICATE_TRIGGERED_UPDATER );
969
- }
970
973
}
971
974
972
975
protected void swapAtUse (PointsToAnalysis bb , TypeFlow <?> newFlow , TypeFlow <?> use ) {
You can’t perform that action at this time.
0 commit comments