/** * Swaps the top two Category 1 values. */ public void swap() { Value value1 = values[currentSize - 1].category1Value(); Value value2 = values[currentSize - 2].category1Value(); values[currentSize - 1] = value2; values[currentSize - 2] = value1; }
/** * 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 void generalizeValue(Value value) { this.value = this.value != null ? this.value.generalize(value) : value; }
if (pushedValue.isParticular()) double value = pushedValue.doubleValue().value(); if (value == 0.0 && Double.doubleToLongBits(value) == POS_ZERO_DOUBLE_BITS || value == 1.0) else if (pushedValue.isSpecific()) variables.load(variableIndex + 1).computationalType() == Value.TYPE_TOP)
/** * 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; }
if (pushedValue.isParticular()) int value = pushedValue.integerValue().value(); if ((short)value == value) else if (pushedValue.isSpecific())
if (pushedValue.isParticular()) float value = pushedValue.floatValue().value(); if (value == 0f || value == 1f || else if (pushedValue.isSpecific())
if (pushedValue.isParticular()) double value = pushedValue.doubleValue().value(); if (value == 0.0 || value == 1.0) else if (pushedValue.isSpecific())
if (pushedValue.isParticular()) long value = pushedValue.longValue().value(); if (value == 0L || value == 1L) else if (pushedValue.isSpecific())
/** * Pops the top DoubleValue from the stack. */ public DoubleValue dpop() { return pop().doubleValue(); }
public void push(Value value) { super.push(value); producerPush(); // Account for the extra space required by Category 2 values. if (value.isCategory2()) { producerPush(); } }
/** * Loads the InstructionOffsetValue from the variable with the given index. */ public InstructionOffsetValue oload(int index) { return load(index).instructionOffsetValue(); }
/** * Pops the top FloatValue from the stack. */ public FloatValue fpop() { return pop().floatValue(); }
/** * Loads the IntegerValue from the variable with the given index. */ public IntegerValue iload(int index) { return load(index).integerValue(); }
public void visitProgramMethod(ProgramClass programClass, ProgramMethod programMethod) { Value value = StoringInvocationUnit.getMethodReturnValue(programMethod); if (value != null && value.isParticular()) { constantMemberVisitor.visitProgramMethod(programClass, programMethod); } } }
public final int computationalType() { return value.computationalType(); }
public boolean isSpecific() { return value.isSpecific(); }
/** * 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; }
if (pushedValue.isParticular()) int value = pushedValue.integerValue().value(); if ((short)value == value) else if (pushedValue.isSpecific())
/** * Loads the DoubleValue from the variable with the given index. */ public DoubleValue dload(int index) { return load(index).doubleValue(); }