diff -r cd16d587b0fa -r edb5ab0f3fe5 src/share/vm/ci/ciConstant.hpp --- a/src/share/vm/ci/ciConstant.hpp Mon Sep 09 19:53:28 2013 +0200 +++ b/src/share/vm/ci/ciConstant.hpp Tue Sep 10 14:51:48 2013 -0700 @@ -41,7 +41,6 @@ union { jint _int; jlong _long; - jint _long_half[2]; jfloat _float; jdouble _double; ciObject* _object; @@ -111,6 +110,20 @@ return _value._object; } + bool is_null_or_zero() const { + if (!is_java_primitive(basic_type())) { + return as_object()->is_null_object(); + } else if (type2size[basic_type()] == 1) { + // treat float bits as int, to avoid comparison with -0 and NaN + return (_value._int == 0); + } else if (type2size[basic_type()] == 2) { + // treat double bits as long, to avoid comparison with -0 and NaN + return (_value._long == 0); + } else { + return false; + } + } + // Debugging output void print(); };