Code with Finding: |
class InstConstraintVisitor { /** * Ensures the specific preconditions of the said instruction. */ @Override public void visitDASTORE(DASTORE o){ if (stack().peek() != Type.DOUBLE){ constraintViolated(o, "The value at the stack top is not of type 'double', but of type '"+stack().peek()+"'."); } indexOfInt(o, stack().peek(1)); if (stack().peek(2) == Type.NULL){ return; } if (! (stack().peek(2) instanceof ArrayType)){ constraintViolated(o, "Stack next-to-next-to-top must be of type double[] but is '"+stack().peek(2)+"'."); } Type t = ((ArrayType) (stack().peek(2))).getBasicType(); if (t != Type.DOUBLE){ constraintViolated(o, "Stack next-to-next-to-top must be of type double[] but is '"+stack().peek(2)+"'."); } }
}
|