markModifiedParameters(method, offset, simpleInstruction.stackPopCount(clazz) - 1); case InstructionConstants.OP_SASTORE: markModifiedParameters(method, offset, simpleInstruction.stackPopCount(clazz) - 1);
markModifiedParameters(method, offset, simpleInstruction.stackPopCount(clazz) - 1); case InstructionConstants.OP_SASTORE: markModifiedParameters(method, offset, simpleInstruction.stackPopCount(clazz) - 1);
public void visitProgramMethod(ProgramClass programClass, ProgramMethod programMethod) { int accessFlags = programMethod.getAccessFlags(); // Is it a native method? if ((accessFlags & ClassConstants.ACC_NATIVE) != 0) { // Mark all parameters. markModifiedParameters(programMethod, -1L); markEscapingParameters(programMethod, -1L); markReturnedParameters(programMethod, -1L); markAnythingModified(programMethod); } }
public void visitProgramMethod(ProgramClass programClass, ProgramMethod programMethod) { int accessFlags = programMethod.getAccessFlags(); // Is it a native method? if ((accessFlags & ClassConstants.ACC_NATIVE) != 0) { // Mark all parameters. markModifiedParameters(programMethod, -1L); markEscapingParameters(programMethod, -1L); markReturnedParameters(programMethod, -1L); markAnythingModified(programMethod); } }
public void visitProgramMethod(ProgramClass programClass, ProgramMethod programMethod) { int accessFlags = programMethod.getAccessFlags(); // Is it a native method? if ((accessFlags & ClassConstants.ACC_NATIVE) != 0) { // Mark all parameters. markModifiedParameters(programMethod, -1L); markEscapingParameters(programMethod, -1L); markReturnedParameters(programMethod, -1L); markAnythingModified(programMethod); } }
markModifiedParameters(method, offset, simpleInstruction.stackPopCount(clazz) - 1); case InstructionConstants.OP_SASTORE: markModifiedParameters(method, offset, simpleInstruction.stackPopCount(clazz) - 1);
public void visitParameter(Clazz clazz, Member member, int parameterIndex, int parameterCount, int parameterOffset, int parameterSize, String parameterType, Clazz referencedClass) { if (!ClassUtil.isInternalPrimitiveType(parameterType.charAt(0))) { Method method = (Method)member; // Is the parameter escaping from the method, // or is it returned and then escaping? if (isParameterEscaping(method, parameterIndex) || (isParameterReturned(method, parameterIndex) && isReturnValueEscaping)) { markEscapingParameters(referencingMethod, referencingOffset, parameterSize - parameterOffset - 1); } // Is the parameter being modified in the method. // or is it returned and then modified? if (isParameterModified(method, parameterIndex) || (isParameterReturned(method, parameterIndex) && isReturnValueModified)) { markModifiedParameters(referencingMethod, referencingOffset, parameterSize - parameterOffset - 1); } } }
/** * Marks the producing reference parameters of the specified stack entry at * the given instruction offset. */ private void markModifiedParameters(Method method, int offset, int stackEntryIndex) { TracedStack stackBefore = partialEvaluator.getStackBefore(offset); Value stackEntry = stackBefore.getTop(stackEntryIndex); if (stackEntry.computationalType() == Value.TYPE_REFERENCE) { ReferenceValue referenceValue = stackEntry.referenceValue(); // The null reference value may not have a trace value. if (referenceValue.isNull() != Value.ALWAYS) { markModifiedParameters(method, referenceValue); } } }
public void visitParameter(Clazz clazz, Member member, int parameterIndex, int parameterCount, int parameterOffset, int parameterSize, String parameterType, Clazz referencedClass) { if (!ClassUtil.isInternalPrimitiveType(parameterType.charAt(0))) { Method method = (Method)member; // Is the parameter escaping from the method, // or is it returned and then escaping? if (isParameterEscaping(method, parameterIndex) || (isParameterReturned(method, parameterIndex) && isReturnValueEscaping)) { markEscapingParameters(referencingMethod, referencingOffset, parameterSize - parameterOffset - 1); } // Is the parameter being modified in the method. // or is it returned and then modified? if (isParameterModified(method, parameterIndex) || (isParameterReturned(method, parameterIndex) && isReturnValueModified)) { markModifiedParameters(referencingMethod, referencingOffset, parameterSize - parameterOffset - 1); } } }
public void visitParameter(Clazz clazz, Member member, int parameterIndex, int parameterCount, int parameterOffset, int parameterSize, String parameterType, Clazz referencedClass) { if (!ClassUtil.isInternalPrimitiveType(parameterType.charAt(0))) { Method method = (Method)member; // Is the parameter escaping from the method, // or is it returned and then escaping? if (isParameterEscaping(method, parameterIndex) || (isParameterReturned(method, parameterIndex) && isReturnValueEscaping)) { markEscapingParameters(referencingMethod, referencingOffset, parameterSize - parameterOffset - 1); } // Is the parameter being modified in the method. // or is it returned and then modified? if (isParameterModified(method, parameterIndex) || (isParameterReturned(method, parameterIndex) && isReturnValueModified)) { markModifiedParameters(referencingMethod, referencingOffset, parameterSize - parameterOffset - 1); } } }
/** * Marks the producing reference parameters of the specified stack entry at * the given instruction offset. */ private void markModifiedParameters(Method method, int offset, int stackEntryIndex) { TracedStack stackBefore = partialEvaluator.getStackBefore(offset); Value stackEntry = stackBefore.getTop(stackEntryIndex); if (stackEntry.computationalType() == Value.TYPE_REFERENCE) { ReferenceValue referenceValue = stackEntry.referenceValue(); // The null reference value may not have a trace value. if (referenceValue.isNull() != Value.ALWAYS) { markModifiedParameters(method, referenceValue); } } }
/** * Marks the producing reference parameters of the specified stack entry at * the given instruction offset. */ private void markModifiedParameters(Method method, int offset, int stackEntryIndex) { TracedStack stackBefore = partialEvaluator.getStackBefore(offset); Value stackEntry = stackBefore.getTop(stackEntryIndex); if (stackEntry.computationalType() == Value.TYPE_REFERENCE) { ReferenceValue referenceValue = stackEntry.referenceValue(); // The null reference value may not have a trace value. if (referenceValue.isNull() != Value.ALWAYS) { markModifiedParameters(method, referenceValue); } } }
stackEntryIndex); markModifiedParameters(referencingMethod, referencingOffset, stackEntryIndex);
stackEntryIndex); markModifiedParameters(referencingMethod, referencingOffset, stackEntryIndex);
markModifiedParameters(method, offset, constantInstruction.stackPopCount(clazz) - 1);
stackEntryIndex); markModifiedParameters(referencingMethod, referencingOffset, stackEntryIndex);
markModifiedParameters(method, offset, constantInstruction.stackPopCount(clazz) - 1);
/** * Marks the producing parameters of the given reference value. */ private void markModifiedParameters(Method method, ReferenceValue referenceValue) { TracedReferenceValue tracedReferenceValue = (TracedReferenceValue)referenceValue; InstructionOffsetValue producers = tracedReferenceValue.getTraceValue().instructionOffsetValue(); int producerCount = producers.instructionOffsetCount(); for (int index = 0; index < producerCount; index++) { if (producers.isMethodParameter(index)) { // We know exactly which parameter is being modified. markParameterModified(method, producers.methodParameter(index)); } else if (!producers.isNewinstance(index) && !producers.isExceptionHandler(index)) { // If some unknown instance is modified, any escaping parameters // may be modified. markModifiedParameters(method, getEscapingParameters(method)); markAnythingModified(method); } } }
/** * Marks the producing parameters of the given reference value. */ private void markModifiedParameters(Method method, ReferenceValue referenceValue) { TracedReferenceValue tracedReferenceValue = (TracedReferenceValue)referenceValue; InstructionOffsetValue producers = tracedReferenceValue.getTraceValue().instructionOffsetValue(); int producerCount = producers.instructionOffsetCount(); for (int index = 0; index < producerCount; index++) { if (producers.isMethodParameter(index)) { // We know exactly which parameter is being modified. markParameterModified(method, producers.methodParameter(index)); } else if (!producers.isNewinstance(index) && !producers.isExceptionHandler(index)) { // If some unknown instance is modified, any escaping parameters // may be modified. markModifiedParameters(method, getEscapingParameters(method)); markAnythingModified(method); } } }
/** * Marks the producing parameters of the given reference value. */ private void markModifiedParameters(Method method, ReferenceValue referenceValue) { TracedReferenceValue tracedReferenceValue = (TracedReferenceValue)referenceValue; InstructionOffsetValue producers = tracedReferenceValue.getTraceValue().instructionOffsetValue(); int producerCount = producers.instructionOffsetCount(); for (int index = 0; index < producerCount; index++) { if (producers.isMethodParameter(index)) { // We know exactly which parameter is being modified. markParameterModified(method, producers.methodParameter(index)); } else if (!producers.isNewinstance(index) && !producers.isExceptionHandler(index)) { // If some unknown instance is modified, any escaping parameters // may be modified. markModifiedParameters(method, getEscapingParameters(method)); markAnythingModified(method); } } }