Skip to content

Commit e1c9a9c

Browse files
committed
Introduce TypeFlow.FlowState
1 parent 01cb552 commit e1c9a9c

File tree

4 files changed

+103
-78
lines changed

4 files changed

+103
-78
lines changed

substratevm/src/com.oracle.graal.pointsto/src/com/oracle/graal/pointsto/PointsToAnalysis.java

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -216,11 +216,8 @@ public void registerUnsafeStore(UnsafeStoreTypeFlow unsafeStore) {
216216
/**
217217
* Force update of the unsafe loads and unsafe store type flows when a field is registered as
218218
* unsafe accessed 'on the fly', i.e., during the analysis.
219-
*
220-
* @param field the newly unsafe registered field. We use its declaring type to filter the
221-
* unsafe access flows that need to be updated.
222219
*/
223-
public void forceUnsafeUpdate(AnalysisField field) {
220+
public void forceUnsafeUpdate() {
224221
if (analysisPolicy.useConservativeUnsafeAccess()) {
225222
return;
226223
}
@@ -239,7 +236,7 @@ public void forceUnsafeUpdate(AnalysisField field) {
239236
* update; an update of the receiver object flow will trigger an updated of the
240237
* observers, i.e., of the unsafe load.
241238
*/
242-
if (unsafeLoad.receiver().isFlowEnabled()) {
239+
if (unsafeLoad.receiver().isActive()) {
243240
this.postFlow(unsafeLoad.receiver());
244241
}
245242
}
@@ -254,7 +251,7 @@ public void forceUnsafeUpdate(AnalysisField field) {
254251
* update; an update of the receiver object flow will trigger an updated of the
255252
* observers, i.e., of the unsafe store.
256253
*/
257-
if (unsafeStore.receiver().isFlowEnabled()) {
254+
if (unsafeStore.receiver().isActive()) {
258255
this.postFlow(unsafeStore.receiver());
259256
}
260257
}

substratevm/src/com.oracle.graal.pointsto/src/com/oracle/graal/pointsto/flow/DynamicNewInstanceTypeFlow.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ public TypeFlow<BytecodePosition> copy(PointsToAnalysis bb, MethodFlowsGraph met
6767

6868
@Override
6969
public void initFlow(PointsToAnalysis bb) {
70-
assert !bb.usePredicates() || newTypeFlow.getPredicate() != null || MethodFlowsGraph.nonMethodFlow(newTypeFlow) : "Missing predicate for the flow " + newTypeFlow + ", which is input for " +
71-
this;
70+
assert !bb.usePredicates() || newTypeFlow.getPredicate() != null || MethodFlowsGraph.nonMethodFlow(newTypeFlow) || newTypeFlow.isFlowEnabled() : "Missing predicate for the flow " +
71+
newTypeFlow + ", which is input for " + this;
7272
newTypeFlow.addObserver(bb, this);
7373
}
7474

0 commit comments

Comments
 (0)