/** * Marks the producing parameters (and the classes) of the given * reference value. */ private void markEscapingParameters(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 escaping. markParameterEscaping(method, producers.methodParameter(index)); } } }
/** * Marks the producing parameters (and the classes) of the given * reference value. */ private void markEscapingParameters(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 escaping. markParameterEscaping(method, producers.methodParameter(index)); } } }
/** * Marks the producing parameters (and the classes) of the given * reference value. */ private void markEscapingParameters(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 escaping. markParameterEscaping(method, producers.methodParameter(index)); } } }
/** * Returns whether the producing reference value is escaping or has escaped. */ private boolean hasEscaped(ReferenceValue referenceValue) { TracedReferenceValue tracedReferenceValue = (TracedReferenceValue)referenceValue; InstructionOffsetValue instructionOffsetValue = tracedReferenceValue.getTraceValue().instructionOffsetValue(); int count = instructionOffsetValue.instructionOffsetCount(); for (int index = 0; index < count; index++) { if (instructionOffsetValue.isMethodParameter(index) ? hasParameterEscaped(referencingMethod, instructionOffsetValue.methodParameter(index)) : referenceEscapeChecker.isInstanceEscaping(instructionOffsetValue.instructionOffset(index))) { return true; } } return false; }
/** * Returns whether the producing reference value is escaping or has escaped. */ private boolean hasEscaped(ReferenceValue referenceValue) { TracedReferenceValue tracedReferenceValue = (TracedReferenceValue)referenceValue; InstructionOffsetValue instructionOffsetValue = tracedReferenceValue.getTraceValue().instructionOffsetValue(); int count = instructionOffsetValue.instructionOffsetCount(); for (int index = 0; index < count; index++) { if (instructionOffsetValue.isMethodParameter(index) ? hasParameterEscaped(referencingMethod, instructionOffsetValue.methodParameter(index)) : referenceEscapeChecker.isInstanceEscaping(instructionOffsetValue.instructionOffset(index))) { return true; } } return false; }
/** * Returns whether the producing reference value is escaping or has escaped. */ private boolean hasEscaped(ReferenceValue referenceValue) { TracedReferenceValue tracedReferenceValue = (TracedReferenceValue)referenceValue; InstructionOffsetValue instructionOffsetValue = tracedReferenceValue.getTraceValue().instructionOffsetValue(); int count = instructionOffsetValue.instructionOffsetCount(); for (int index = 0; index < count; index++) { if (instructionOffsetValue.isMethodParameter(index) ? hasParameterEscaped(referencingMethod, instructionOffsetValue.methodParameter(index)) : referenceEscapeChecker.isInstanceEscaping(instructionOffsetValue.instructionOffset(index))) { return true; } } return false; }
/** * 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); } } }
/** * Marks the method and the producing parameters of the given reference * value. */ private void markReturnedParameters(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 returned. markParameterReturned(method, producers.methodParameter(index)); } else if (producers.isFieldValue(index)) { markReturnsExternalValues(method); } else if (producers.isNewinstance(index) || producers.isExceptionHandler(index)) { markReturnsNewInstances(method); } } }
/** * Marks the method and the producing parameters of the given reference * value. */ private void markReturnedParameters(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 returned. markParameterReturned(method, producers.methodParameter(index)); } else if (producers.isFieldValue(index)) { markReturnsExternalValues(method); } else if (producers.isNewinstance(index) || producers.isExceptionHandler(index)) { markReturnsNewInstances(method); } } }
/** * Marks the method and the producing parameters of the given reference * value. */ private void markReturnedParameters(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 returned. markParameterReturned(method, producers.methodParameter(index)); } else if (producers.isFieldValue(index)) { markReturnsExternalValues(method); } else if (producers.isNewinstance(index) || producers.isExceptionHandler(index)) { markReturnsNewInstances(method); } } }
if (instructionOffsetValue.methodParameter(0) == 0 && initializationFinder.isInitializer() && offset <= initializationFinder.superInitializationOffset())
if (instructionOffsetValue.methodParameter(0) == 0 && initializationFinder.isInitializer() && offset <= initializationFinder.superInitializationOffset())
if (instructionOffsetValue.methodParameter(0) == 0 && initializationFinder.isInitializer() && offset <= initializationFinder.superInitializationOffset())