public void mergeSummary(XField fieldOperand, OpcodeStack.Item mergeValue) { if (SystemProperties.ASSERTIONS_ENABLED) { String mSignature = mergeValue.getSignature(); Type mergeType = Type.getType(mSignature); Type fieldType = Type.getType(fieldOperand.getSignature()); IncompatibleTypes check = IncompatibleTypes.getPriorityForAssumingCompatible(mergeType, fieldType, false); if (check.getPriority() <= Priorities.NORMAL_PRIORITY) { AnalysisContext.logError(fieldOperand + " not compatible with " + mergeValue, new IllegalArgumentException(check.toString())); } } OpcodeStack.Item oldSummary = summary.get(fieldOperand); if (oldSummary != null) { Item newValue = OpcodeStack.Item.merge(mergeValue, oldSummary); newValue.clearNewlyAllocated(); summary.put(fieldOperand, newValue); } else { if (mergeValue.isNewlyAllocated()) { mergeValue = new OpcodeStack.Item(mergeValue); mergeValue.clearNewlyAllocated(); } summary.put(fieldOperand, mergeValue); } }
public void mergeSummary(XField fieldOperand, OpcodeStack.Item mergeValue) { if (SystemProperties.ASSERTIONS_ENABLED) { String mSignature = mergeValue.getSignature(); Type mergeType = Type.getType(mSignature); Type fieldType = Type.getType(fieldOperand.getSignature()); IncompatibleTypes check = IncompatibleTypes.getPriorityForAssumingCompatible(mergeType, fieldType, false); if (check.getPriority() <= Priorities.NORMAL_PRIORITY) { AnalysisContext.logError(fieldOperand + " not compatible with " + mergeValue, new IllegalArgumentException(check.toString())); } } OpcodeStack.Item oldSummary = summary.get(fieldOperand); if (oldSummary != null) { Item newValue = OpcodeStack.Item.merge(mergeValue, oldSummary); newValue.clearNewlyAllocated(); summary.put(fieldOperand, newValue); } else { if (mergeValue.isNewlyAllocated()) { mergeValue = new OpcodeStack.Item(mergeValue); mergeValue.clearNewlyAllocated(); } summary.put(fieldOperand, mergeValue); } }