/** * Returns whether the given creation offset is initialized before the given * offset. */ public boolean isInitializedBefore(int offset, InstructionOffsetValue creationOffsetValue) { return !uninitializedOffsets[offset].contains(creationOffsetValue.instructionOffset(0)); }
/** * Returns whether the given creation offset is initialized before the given * offset. */ public boolean isInitializedBefore(int offset, InstructionOffsetValue creationOffsetValue) { return !uninitializedOffsets[offset].contains(creationOffsetValue.instructionOffset(0)); }
/** * Returns whether the given creation offset is initialized before the given * offset. */ public boolean isInitializedBefore(int offset, InstructionOffsetValue creationOffsetValue) { return !uninitializedOffsets[offset].contains(creationOffsetValue.instructionOffset(0)); }
public boolean equals(Object object) { if (object == null || this.getClass() != object.getClass()) { return false; } InstructionOffsetValue other = (InstructionOffsetValue)object; if (this.values == other.values) { return true; } if (this.values == null || other.values == null || this.values.length != other.values.length) { return false; } for (int index = 0; index < other.values.length; index++) { if (!this.contains(other.values[index])) { return false; } } return true; }
public boolean equals(Object object) { if (object == null || this.getClass() != object.getClass()) { return false; } InstructionOffsetValue other = (InstructionOffsetValue)object; if (this.values == other.values) { return true; } if (this.values == null || other.values == null || this.values.length != other.values.length) { return false; } for (int index = 0; index < other.values.length; index++) { if (!this.contains(other.values[index])) { return false; } } return true; }
public boolean equals(Object object) { if (object == null || this.getClass() != object.getClass()) { return false; } InstructionOffsetValue other = (InstructionOffsetValue)object; if (this.values == other.values) { return true; } if (this.values == null || other.values == null || this.values.length != other.values.length) { return false; } for (int index = 0; index < other.values.length; index++) { if (!this.contains(other.values[index])) { return false; } } return true; }
public boolean equals(Object object) { if (object == null || this.getClass() != object.getClass()) { return false; } InstructionOffsetValue other = (InstructionOffsetValue)object; if (this.values == other.values) { return true; } if (this.values == null || other.values == null || this.values.length != other.values.length) { return false; } for (int index = 0; index < other.values.length; index++) { if (!this.contains(other.values[index])) { return false; } } return true; }
/** * Returns an InstructionOffsetValue that contains the instructions offsets * of this value and the given instruction offset. */ public InstructionOffsetValue add(int value) { if (contains(value)) { return this; } int[] newValues = new int[values.length+1]; System.arraycopy(values, 0, newValues, 0, values.length); newValues[values.length] = value; return new InstructionOffsetValue(newValues); }
/** * Returns an InstructionOffsetValue that contains the instructions offsets * of this value and the given instruction offset. */ public InstructionOffsetValue add(int value) { if (contains(value)) { return this; } int[] newValues = new int[values.length+1]; System.arraycopy(values, 0, newValues, 0, values.length); newValues[values.length] = value; return new InstructionOffsetValue(newValues); }
/** * Returns an InstructionOffsetValue that contains the instructions offsets * of this value and the given instruction offset. */ public InstructionOffsetValue add(int value) { if (contains(value)) { return this; } int[] newValues = new int[values.length+1]; System.arraycopy(values, 0, newValues, 0, values.length); newValues[values.length] = value; return new InstructionOffsetValue(newValues); }
public void visitVariableInstruction(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, VariableInstruction variableInstruction) { if (partialEvaluator.isTraced(offset) && variableInstruction.isLoad()) { int parameterIndex = variableInstruction.variableIndex; if (parameterIndex < codeAttribute.u2maxLocals) { Value producer = partialEvaluator.getVariablesBefore(offset).getProducerValue(parameterIndex); if (producer != null && producer.instructionOffsetValue().contains(PartialEvaluator.AT_METHOD_ENTRY)) { // Mark the variable. markParameterUsed(method, parameterIndex); // Account for Category 2 instructions, which take up two entries. if (variableInstruction.isCategory2()) { markParameterUsed(method, parameterIndex + 1); } } } } }
public void visitVariableInstruction(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, VariableInstruction variableInstruction) { if (partialEvaluator.isTraced(offset) && variableInstruction.isLoad()) { int variableIndex = variableInstruction.variableIndex; if (variableIndex < codeAttribute.u2maxLocals) { // The parameter indices stored in the producer values are // parameter offsets, taking into account Category 2 types, // and therefore compatible with variable indices. Value producer = partialEvaluator.getVariablesBefore(offset).getProducerValue(variableIndex); if (producer != null && producer.instructionOffsetValue().contains(variableIndex | InstructionOffsetValue.METHOD_PARAMETER)) { // Mark the variable. markParameterUsed(method, variableIndex); // Account for Category 2 instructions, which take up two entries. if (variableInstruction.stackPopCount(clazz) == 2 || variableInstruction.stackPushCount(clazz) == 2) { markParameterUsed(method, variableIndex + 1); } } } } }
public void visitVariableInstruction(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, VariableInstruction variableInstruction) { if (partialEvaluator.isTraced(offset) && variableInstruction.isLoad()) { int variableIndex = variableInstruction.variableIndex; if (variableIndex < codeAttribute.u2maxLocals) { // The parameter indices stored in the producer values are // parameter offsets, taking into account Category 2 types, // and therefore compatible with variable indices. Value producer = partialEvaluator.getVariablesBefore(offset).getProducerValue(variableIndex); if (producer != null && producer.instructionOffsetValue().contains(variableIndex | InstructionOffsetValue.METHOD_PARAMETER)) { // Mark the variable. markParameterUsed(method, variableIndex); // Account for Category 2 instructions, which take up two entries. if (variableInstruction.stackPopCount(clazz) == 2 || variableInstruction.stackPushCount(clazz) == 2) { markParameterUsed(method, variableIndex + 1); } } } } }
public void visitVariableInstruction(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, VariableInstruction variableInstruction) { if (partialEvaluator.isTraced(offset) && variableInstruction.isLoad()) { int variableIndex = variableInstruction.variableIndex; if (variableIndex < codeAttribute.u2maxLocals) { // The parameter indices stored in the producer values are // parameter offsets, taking into account Category 2 types, // and therefore compatible with variable indices. Value producer = partialEvaluator.getVariablesBefore(offset).getProducerValue(variableIndex); if (producer != null && producer.instructionOffsetValue().contains(variableIndex | InstructionOffsetValue.METHOD_PARAMETER)) { // Mark the variable. markParameterUsed(method, variableIndex); // Account for Category 2 instructions, which take up two entries. if (variableInstruction.stackPopCount(clazz) == 2 || variableInstruction.stackPushCount(clazz) == 2) { markParameterUsed(method, variableIndex + 1); } } } } }
visitedOffsets.contains(consumerOffset))
visitedOffsets.contains(consumerOffset))