/** * Pops the top ReferenceValue from the stack. */ public ReferenceValue apop() { return pop().referenceValue(); }
/** * Loads the ReferenceValue from the variable with the given index. */ public ReferenceValue aload(int index) { return load(index).referenceValue(); }
/** * Loads the ReferenceValue from the variable with the given index. */ public ReferenceValue aload(int index) { return load(index).referenceValue(); }
public ReferenceValue referenceArrayLoad(IntegerValue indexValue, ValueFactory valueFactory) { return type == null ? TypedReferenceValueFactory.REFERENCE_VALUE_NULL : !ClassUtil.isInternalArrayType(type) ? TypedReferenceValueFactory.REFERENCE_VALUE_JAVA_LANG_OBJECT_MAYBE_NULL : valueFactory.createValue(type.substring(1), referencedClass, true, true).referenceValue(); }
public ReferenceValue referenceArrayLoad(IntegerValue indexValue, ValueFactory valueFactory) { return type == null ? TypedReferenceValueFactory.REFERENCE_VALUE_NULL : !ClassUtil.isInternalArrayType(type) ? TypedReferenceValueFactory.REFERENCE_VALUE_JAVA_LANG_OBJECT_MAYBE_NULL : valueFactory.createValue(type.substring(1), referencedClass, true, true).referenceValue(); }
/** * Attaches the current trace value to given value, if it is a reference * value. */ public Value trace(Value value) { return value.computationalType() == Value.TYPE_REFERENCE ? trace(value.referenceValue()) : value; }
/** * Attaches the current trace value to given value, if it is a reference * value. */ public Value trace(Value value) { return value.computationalType() == Value.TYPE_REFERENCE ? trace(value.referenceValue()) : value; }
/** * Sets or replaces the trace value on a given value, returning the result. */ protected Value trace(Value value, InstructionOffsetValue traceValue) { return new TracedReferenceValue(untrace(value).referenceValue(), traceValue); }
/** * Attaches the current trace value to given value, if it is a reference * value. */ public Value trace(Value value) { return value.computationalType() == Value.TYPE_REFERENCE ? trace(value.referenceValue()) : value; }
public ReferenceValue referenceArrayLoad(IntegerValue indexValue, ValueFactory valueFactory) { Value value = arrayLoad(indexValue, valueFactory); return value != null ? value.referenceValue() : super.referenceArrayLoad(indexValue, valueFactory); }
/** * Returns whether the instruction at the given offset is popping a type * with a simple enum class. This includes simple enum arrays. */ private boolean isPoppingSimpleEnumType(int offset, int stackEntryIndex) { ReferenceValue referenceValue = partialEvaluator.getStackBefore(offset).getTop(stackEntryIndex).referenceValue(); return isSimpleEnumType(referenceValue); }
/** * Marks the enum class of the specified popped type as complex. */ private void markPoppedComplexEnumType(int offset, int stackEntryIndex) { ReferenceValue referenceValue = partialEvaluator.getStackBefore(offset).getTop(stackEntryIndex).referenceValue(); markComplexEnumType(referenceValue); }
/** * Marks the enum class of the specified stored type as complex. */ private void markStoredComplexEnumType(int offset, int variableIndex) { ReferenceValue referenceValue = partialEvaluator.getVariablesAfter(offset).getValue(variableIndex).referenceValue(); markComplexEnumType(referenceValue); }
/** * Returns whether the instruction at the given offset is popping a simple * enum type. This includes simple enum arrays. */ private boolean isPoppingSimpleEnumType(int offset, int stackEntryIndex) { ReferenceValue referenceValue = partialEvaluator.getStackBefore(offset).getTop(stackEntryIndex).referenceValue(); return isSimpleEnum(referenceValue.getReferencedClass()); }
/** * Checks whether the value at the given stack entry index is always a null reference. */ private boolean isNullReference(int offset, int popStackEntryIndex) { TracedStack tracedStack = partialEvaluator.getStackBefore(offset); Value objectRef = tracedStack.getTop(popStackEntryIndex); return objectRef.computationalType() == Value.TYPE_REFERENCE && objectRef.isParticular() && objectRef.referenceValue().isNull() == Value.ALWAYS; }
/** * Returns whether the instruction at the given offset is pushing a simple * enum class. */ private boolean isPushingSimpleEnum(int offset) { ReferenceValue referenceValue = partialEvaluator.getStackAfter(offset).getTop(0).referenceValue(); Clazz referencedClass = referenceValue.getReferencedClass(); return isSimpleEnum(referencedClass) && !ClassUtil.isInternalArrayType(referenceValue.getType()); }
/** * Returns whether the instruction at the given offset is popping a simple * enum class. */ private boolean isPoppingSimpleEnum(int offset, int stackEntryIndex) { ReferenceValue referenceValue = partialEvaluator.getStackBefore(offset).getTop(stackEntryIndex).referenceValue(); return isSimpleEnum(referenceValue.getReferencedClass()) && !ClassUtil.isInternalArrayType(referenceValue.getType()); }
/** * Returns whether the instruction at the given offset is pushing a simple * enum class. */ private boolean isPushingSimpleEnum(int offset) { ReferenceValue referenceValue = partialEvaluator.getStackAfter(offset).getTop(0).referenceValue(); Clazz referencedClass = referenceValue.getReferencedClass(); return isSimpleEnum(referencedClass) && !ClassUtil.isInternalArrayType(referenceValue.getType()); }
/** * Returns whether the instruction at the given offset is popping a simple * enum class. */ private boolean isPoppingSimpleEnum(int offset, int stackEntryIndex) { ReferenceValue referenceValue = partialEvaluator.getStackBefore(offset).getTop(stackEntryIndex).referenceValue(); return isSimpleEnum(referenceValue.getReferencedClass()) && !ClassUtil.isInternalArrayType(referenceValue.getType()); }
/** * Returns whether the instruction at the given offset is popping a * one-dimensional simple enum array. */ private boolean isPoppingSimpleEnumArray(int offset, int stackEntryIndex) { ReferenceValue referenceValue = partialEvaluator.getStackBefore(offset).getTop(stackEntryIndex).referenceValue(); return isSimpleEnum(referenceValue.getReferencedClass()) && ClassUtil.internalArrayTypeDimensionCount(referenceValue.getType()) == 1; }