< prev index next >

src/hotspot/share/oops/constantPool.cpp

Print this page
rev 49250 : [mq]: JDK-8199781.patch

*** 838,848 **** assert(index == _no_index_sentinel || index >= 0, ""); if (cache_index >= 0) { result_oop = this_cp->resolved_references()->obj_at(cache_index); if (result_oop != NULL) { ! if (result_oop == Universe::the_null_sentinel()) { DEBUG_ONLY(int temp_index = (index >= 0 ? index : this_cp->object_to_cp_index(cache_index))); assert(this_cp->tag_at(temp_index).is_dynamic_constant(), "only condy uses the null sentinel"); result_oop = NULL; } if (status_return != NULL) (*status_return) = true; --- 838,848 ---- assert(index == _no_index_sentinel || index >= 0, ""); if (cache_index >= 0) { result_oop = this_cp->resolved_references()->obj_at(cache_index); if (result_oop != NULL) { ! if (oopDesc::equals(result_oop, Universe::the_null_sentinel())) { DEBUG_ONLY(int temp_index = (index >= 0 ? index : this_cp->object_to_cp_index(cache_index))); assert(this_cp->tag_at(temp_index).is_dynamic_constant(), "only condy uses the null sentinel"); result_oop = NULL; } if (status_return != NULL) (*status_return) = true;
*** 1071,1086 **** if (old_result == NULL) { return result_oop; // was installed } else { // Return the winning thread's result. This can be different than // the result here for MethodHandles. ! if (old_result == Universe::the_null_sentinel()) old_result = NULL; return old_result; } } else { ! assert(result_oop != Universe::the_null_sentinel(), ""); return result_oop; } } oop ConstantPool::uncached_string_at(int which, TRAPS) { --- 1071,1086 ---- if (old_result == NULL) { return result_oop; // was installed } else { // Return the winning thread's result. This can be different than // the result here for MethodHandles. ! if (oopDesc::equals(old_result, Universe::the_null_sentinel())) old_result = NULL; return old_result; } } else { ! assert(!oopDesc::equals(result_oop, Universe::the_null_sentinel()), ""); return result_oop; } } oop ConstantPool::uncached_string_at(int which, TRAPS) {
*** 1242,1252 **** } oop ConstantPool::string_at_impl(const constantPoolHandle& this_cp, int which, int obj_index, TRAPS) { // If the string has already been interned, this entry will be non-null oop str = this_cp->resolved_references()->obj_at(obj_index); ! assert(str != Universe::the_null_sentinel(), ""); if (str != NULL) return str; Symbol* sym = this_cp->unresolved_string_at(which); str = StringTable::intern(sym, CHECK_(NULL)); this_cp->string_at_put(which, obj_index, str); assert(java_lang_String::is_instance(str), "must be string"); --- 1242,1252 ---- } oop ConstantPool::string_at_impl(const constantPoolHandle& this_cp, int which, int obj_index, TRAPS) { // If the string has already been interned, this entry will be non-null oop str = this_cp->resolved_references()->obj_at(obj_index); ! assert(!oopDesc::equals(str, Universe::the_null_sentinel()), ""); if (str != NULL) return str; Symbol* sym = this_cp->unresolved_string_at(which); str = StringTable::intern(sym, CHECK_(NULL)); this_cp->string_at_put(which, obj_index, str); assert(java_lang_String::is_instance(str), "must be string");
< prev index next >