hotspot/src/share/vm/ci/ciConstant.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hotspot-comp Cdiff hotspot/src/share/vm/ci/ciConstant.hpp

hotspot/src/share/vm/ci/ciConstant.hpp

Print this page
rev 5143 : imported patch webrev.01

*** 39,49 **** BasicType _type; union { jint _int; jlong _long; - jint _long_half[2]; jfloat _float; jdouble _double; ciObject* _object; } _value; --- 39,48 ----
*** 109,118 **** --- 108,131 ---- ciObject* as_object() const { assert(basic_type() == T_OBJECT || basic_type() == T_ARRAY, "wrong type"); 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(); }; #endif // SHARE_VM_CI_CICONSTANT_HPP
hotspot/src/share/vm/ci/ciConstant.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File