@Override public String toString() { return "MixedElementsFlow<" + source.getName() + "\n" + getState() + ">"; }
@Override public void forNullArrayElement(JavaConstant array, AnalysisType arrayType, int elementIndex) { ArrayElementsTypeFlow arrayObjElementsFlow = getArrayElementsFlow(array, arrayType); if (!arrayObjElementsFlow.getState().canBeNull()) { /* Signal that the constant array can contain null. */ arrayObjElementsFlow.addState(bb, TypeState.forNull()); } }
for (AnalysisObject object : arrayElementsTypeStore.readFlow().getState().objects()) { objectsSet.add(object);
@Override public void forNonNullArrayElement(JavaConstant array, AnalysisType arrayType, JavaConstant elementConstant, AnalysisType elementType, int elementIndex) { assert elementType.isInstantiated(); /* * *ALL* constants are scanned after each analysis iteration, thus the elementType will * eventually be added to the AllInstantiatedTypeFlow and the array elements flow will * eventually be updated. */ if (bb.getAllInstantiatedTypeFlow().getState().containsType(elementType)) { ArrayElementsTypeFlow arrayObjElementsFlow = getArrayElementsFlow(array, arrayType); AnalysisObject constantObject = bb.analysisPolicy().createConstantObject(bb, elementConstant, elementType); if (!arrayObjElementsFlow.getState().isUnknown() && !arrayObjElementsFlow.getState().containsObject(constantObject)) { /* Add the constant element to the constant's array type flow. */ TypeState elementTypeState = TypeState.forNonNullObject(bb, constantObject); arrayObjElementsFlow.addState(bb, elementTypeState); } } }
if (this.getContextInsensitiveAnalysisObject().isObjectArray()) { for (AnalysisType type : getContextInsensitiveAnalysisObject().getArrayElementsFlow(bb, false).getState().types()) {
@Override public ArrayElementsTypeFlow getArrayElementsFlow(BigBang bb, boolean isStore) { assert type.isArray(); assert PointstoOptions.AllocationSiteSensitiveHeap.getValue(bb.getOptions()); if (!arrayElementsTypeStore.writeFlow().getState().canBeNull()) { /* * Initialize the elements flow of all heap allocated arrays with the null type state. */ /* The constant array elements flows are initialized in BigBang.scan() ? */ arrayElementsTypeStore.writeFlow().addState(bb, TypeState.forNull()); } return isStore ? arrayElementsTypeStore.writeFlow() : arrayElementsTypeStore.readFlow(); }