if (getNumSlots() != other.getNumSlots()) { return false; for (int i = 0; i < getNumSlots(); ++i) { if (!getValue(i).equals(other.getValue(i))) { return false;
@Override public void copyFrom(Frame<ValueNumber> other) { if (!(other instanceof ValueNumberFrame)) { throw new IllegalArgumentException(); } // If merged value list hasn't been created yet, create it. if (mergedValueList == null && other.isValid()) { // This is where this frame gets its size. // It will have the same size as long as it remains valid. mergedValueList = new ArrayList<>(other.getNumSlots()); int numSlots = other.getNumSlots(); for (int i = 0; i < numSlots; ++i) { mergedValueList.add(null); } } if (REDUNDANT_LOAD_ELIMINATION) { assignAvailableLoadMap((ValueNumberFrame) other); assignPreviouslyKnownAs((ValueNumberFrame) other); } super.copyFrom(other); }
int numSlots = getNumSlots(); int start = STACK_ONLY ? getNumLocals() : 0; for (int i = start; i < numSlots; ++i) {
if (result.getNumSlots() != other.getNumSlots()) { result.setBottom(); return; for (int i = 0; i < result.getNumSlots(); ++i) { mergeValues(other, result, i);
/** * Get the slot the object instance referred to by given instruction is * located in. * * @param ins * the Instruction * @param cpg * the ConstantPoolGen for the method * @return stack slot the object instance is in * @throws DataflowAnalysisException */ public int getInstanceSlot(Instruction ins, ConstantPoolGen cpg) throws DataflowAnalysisException { if (!isValid()) { throw new DataflowAnalysisException("Accessing invalid frame at " + ins); } int numConsumed = ins.consumeStack(cpg); if (numConsumed == Const.UNPREDICTABLE) { throw new DataflowAnalysisException("Unpredictable stack consumption in " + ins); } if (numConsumed > getStackDepth()) { throw new DataflowAnalysisException("Stack underflow " + ins); } return getNumSlots() - numConsumed; }
if (getNumSlots() != other.getNumSlots()) { return false; for (int i = 0; i < getNumSlots(); ++i) { if (!getValue(i).equals(other.getValue(i))) { return false;
@Override public void copyFrom(Frame<ValueNumber> other) { if (!(other instanceof ValueNumberFrame)) { throw new IllegalArgumentException(); } // If merged value list hasn't been created yet, create it. if (mergedValueList == null && other.isValid()) { // This is where this frame gets its size. // It will have the same size as long as it remains valid. mergedValueList = new ArrayList<ValueNumber>(other.getNumSlots()); int numSlots = other.getNumSlots(); for (int i = 0; i < numSlots; ++i) { mergedValueList.add(null); } } if (REDUNDANT_LOAD_ELIMINATION) { assignAvailableLoadMap((ValueNumberFrame) other); assignPreviouslyKnownAs((ValueNumberFrame) other); } super.copyFrom(other); }
int numSlots = getNumSlots(); int start = STACK_ONLY ? getNumLocals() : 0; for (int i = start; i < numSlots; ++i) {
if (result.getNumSlots() != other.getNumSlots()) { result.setBottom(); return; for (int i = 0; i < result.getNumSlots(); ++i) { mergeValues(other, result, i);
/** * Get the slot the object instance referred to by given instruction is * located in. * * @param ins * the Instruction * @param cpg * the ConstantPoolGen for the method * @return stack slot the object instance is in * @throws DataflowAnalysisException */ public int getInstanceSlot(Instruction ins, ConstantPoolGen cpg) throws DataflowAnalysisException { if (!isValid()) { throw new DataflowAnalysisException("Accessing invalid frame at " + ins); } int numConsumed = ins.consumeStack(cpg); if (numConsumed == Constants.UNPREDICTABLE) { throw new DataflowAnalysisException("Unpredictable stack consumption in " + ins); } if (numConsumed > getStackDepth()) { throw new DataflowAnalysisException("Stack underflow " + ins); } return getNumSlots() - numConsumed; }