private void arrayStore(int newArrayType, Object array, int index, Value value) { switch (newArrayType) { case InstructionConstants.ARRAY_T_BOOLEAN: ((boolean[])array)[index] = 0 != value.integerValue().value(); break; case InstructionConstants.ARRAY_T_BYTE: ((byte [])array)[index] = (byte) value.integerValue().value(); break; case InstructionConstants.ARRAY_T_CHAR: ((char [])array)[index] = (char) value.integerValue().value(); break; case InstructionConstants.ARRAY_T_SHORT: ((short [])array)[index] = (short)value.integerValue().value(); break; case InstructionConstants.ARRAY_T_INT: ((int [])array)[index] = value.integerValue().value(); break; case InstructionConstants.ARRAY_T_LONG: ((long [])array)[index] = value.longValue().value(); break; case InstructionConstants.ARRAY_T_FLOAT: ((float [])array)[index] = value.floatValue().value(); break; case InstructionConstants.ARRAY_T_DOUBLE: ((double [])array)[index] = value.doubleValue().value(); break; default: throw new IllegalArgumentException("Unexpected new array type ["+newArrayType+"]"); } } }
float value = pushedValue.floatValue().value(); if (value == 0.0f && Float.floatToIntBits(value) == POS_ZERO_FLOAT_BITS || value == 1.0f ||
private void arrayStore(int newArrayType, Object array, int index, Value value) { switch (newArrayType) { case InstructionConstants.ARRAY_T_BOOLEAN: ((boolean[])array)[index] = 0 != value.integerValue().value(); break; case InstructionConstants.ARRAY_T_BYTE: ((byte [])array)[index] = (byte) value.integerValue().value(); break; case InstructionConstants.ARRAY_T_CHAR: ((char [])array)[index] = (char) value.integerValue().value(); break; case InstructionConstants.ARRAY_T_SHORT: ((short [])array)[index] = (short)value.integerValue().value(); break; case InstructionConstants.ARRAY_T_INT: ((int [])array)[index] = value.integerValue().value(); break; case InstructionConstants.ARRAY_T_LONG: ((long [])array)[index] = value.longValue().value(); break; case InstructionConstants.ARRAY_T_FLOAT: ((float [])array)[index] = value.floatValue().value(); break; case InstructionConstants.ARRAY_T_DOUBLE: ((double [])array)[index] = value.doubleValue().value(); break; default: throw new IllegalArgumentException("Unexpected new array type ["+newArrayType+"]"); } } }
private void arrayStore(int newArrayType, Object array, int index, Value value) { switch (newArrayType) { case InstructionConstants.ARRAY_T_BOOLEAN: ((boolean[])array)[index] = 0 != value.integerValue().value(); break; case InstructionConstants.ARRAY_T_BYTE: ((byte [])array)[index] = (byte) value.integerValue().value(); break; case InstructionConstants.ARRAY_T_CHAR: ((char [])array)[index] = (char) value.integerValue().value(); break; case InstructionConstants.ARRAY_T_SHORT: ((short [])array)[index] = (short)value.integerValue().value(); break; case InstructionConstants.ARRAY_T_INT: ((int [])array)[index] = value.integerValue().value(); break; case InstructionConstants.ARRAY_T_LONG: ((long [])array)[index] = value.longValue().value(); break; case InstructionConstants.ARRAY_T_FLOAT: ((float [])array)[index] = value.floatValue().value(); break; case InstructionConstants.ARRAY_T_DOUBLE: ((double [])array)[index] = value.doubleValue().value(); break; default: throw new IllegalArgumentException("Unexpected new array type ["+newArrayType+"]"); } } }
float value = pushedValue.floatValue().value(); if (value == 0.0f && Float.floatToIntBits(value) == POS_ZERO_FLOAT_BITS || value == 1.0f ||
float value = pushedValue.floatValue().value(); if (value == 0.0f && Float.floatToIntBits(value) == POS_ZERO_FLOAT_BITS || value == 1.0f ||
if (pushedValue.isParticular()) float value = pushedValue.floatValue().value(); if (value == 0f || value == 1f ||
/** * Checks whether if the current top value on the stack is a divisor * leading to a certain division by zero for the given computation type. */ private boolean isDivisionByZero(int offset, int computationType) { TracedStack tracedStack = partialEvaluator.getStackBefore(offset); Value divisor = tracedStack.getTop(0); switch (computationType) { case Value.TYPE_INTEGER: return divisor.computationalType() == Value.TYPE_INTEGER && divisor.isParticular() && divisor.integerValue().value() == 0; case Value.TYPE_LONG: return divisor.computationalType() == Value.TYPE_LONG && divisor.isParticular() && divisor.longValue().value() == 0L; case Value.TYPE_FLOAT: return divisor.computationalType() == Value.TYPE_FLOAT && divisor.isParticular() && divisor.floatValue().value() == 0f; case Value.TYPE_DOUBLE: return divisor.computationalType() == Value.TYPE_DOUBLE && divisor.isParticular() && divisor.doubleValue().value() == 0d; default: return false; } }
/** * Checks whether if the current top value on the stack is a divisor * leading to a certain division by zero for the given computation type. */ private boolean isDivisionByZero(int offset, int computationType) { TracedStack tracedStack = partialEvaluator.getStackBefore(offset); Value divisor = tracedStack.getTop(0); switch (computationType) { case Value.TYPE_INTEGER: return divisor.computationalType() == Value.TYPE_INTEGER && divisor.isParticular() && divisor.integerValue().value() == 0; case Value.TYPE_LONG: return divisor.computationalType() == Value.TYPE_LONG && divisor.isParticular() && divisor.longValue().value() == 0L; case Value.TYPE_FLOAT: return divisor.computationalType() == Value.TYPE_FLOAT && divisor.isParticular() && divisor.floatValue().value() == 0f; case Value.TYPE_DOUBLE: return divisor.computationalType() == Value.TYPE_DOUBLE && divisor.isParticular() && divisor.doubleValue().value() == 0d; default: return false; } }
/** * Checks whether if the current top value on the stack is a divisor * leading to a certain division by zero for the given computation type. */ private boolean isDivisionByZero(int offset, int computationType) { TracedStack tracedStack = partialEvaluator.getStackBefore(offset); Value divisor = tracedStack.getTop(0); switch (computationType) { case Value.TYPE_INTEGER: return divisor.computationalType() == Value.TYPE_INTEGER && divisor.isParticular() && divisor.integerValue().value() == 0; case Value.TYPE_LONG: return divisor.computationalType() == Value.TYPE_LONG && divisor.isParticular() && divisor.longValue().value() == 0L; case Value.TYPE_FLOAT: return divisor.computationalType() == Value.TYPE_FLOAT && divisor.isParticular() && divisor.floatValue().value() == 0f; case Value.TYPE_DOUBLE: return divisor.computationalType() == Value.TYPE_DOUBLE && divisor.isParticular() && divisor.doubleValue().value() == 0d; default: return false; } }