864 assert(index == _no_index_sentinel || index >= 0, ""); |
864 assert(index == _no_index_sentinel || index >= 0, ""); |
865 |
865 |
866 if (cache_index >= 0) { |
866 if (cache_index >= 0) { |
867 result_oop = this_cp->resolved_references()->obj_at(cache_index); |
867 result_oop = this_cp->resolved_references()->obj_at(cache_index); |
868 if (result_oop != NULL) { |
868 if (result_oop != NULL) { |
869 if (oopDesc::equals(result_oop, Universe::the_null_sentinel())) { |
869 if (result_oop == Universe::the_null_sentinel()) { |
870 DEBUG_ONLY(int temp_index = (index >= 0 ? index : this_cp->object_to_cp_index(cache_index))); |
870 DEBUG_ONLY(int temp_index = (index >= 0 ? index : this_cp->object_to_cp_index(cache_index))); |
871 assert(this_cp->tag_at(temp_index).is_dynamic_constant(), "only condy uses the null sentinel"); |
871 assert(this_cp->tag_at(temp_index).is_dynamic_constant(), "only condy uses the null sentinel"); |
872 result_oop = NULL; |
872 result_oop = NULL; |
873 } |
873 } |
874 if (status_return != NULL) (*status_return) = true; |
874 if (status_return != NULL) (*status_return) = true; |
1094 if (old_result == NULL) { |
1094 if (old_result == NULL) { |
1095 return result_oop; // was installed |
1095 return result_oop; // was installed |
1096 } else { |
1096 } else { |
1097 // Return the winning thread's result. This can be different than |
1097 // Return the winning thread's result. This can be different than |
1098 // the result here for MethodHandles. |
1098 // the result here for MethodHandles. |
1099 if (oopDesc::equals(old_result, Universe::the_null_sentinel())) |
1099 if (old_result == Universe::the_null_sentinel()) |
1100 old_result = NULL; |
1100 old_result = NULL; |
1101 return old_result; |
1101 return old_result; |
1102 } |
1102 } |
1103 } else { |
1103 } else { |
1104 assert(!oopDesc::equals(result_oop, Universe::the_null_sentinel()), ""); |
1104 assert(result_oop != Universe::the_null_sentinel(), ""); |
1105 return result_oop; |
1105 return result_oop; |
1106 } |
1106 } |
1107 } |
1107 } |
1108 |
1108 |
1109 oop ConstantPool::uncached_string_at(int which, TRAPS) { |
1109 oop ConstantPool::uncached_string_at(int which, TRAPS) { |
1152 } |
1152 } |
1153 |
1153 |
1154 oop ConstantPool::string_at_impl(const constantPoolHandle& this_cp, int which, int obj_index, TRAPS) { |
1154 oop ConstantPool::string_at_impl(const constantPoolHandle& this_cp, int which, int obj_index, TRAPS) { |
1155 // If the string has already been interned, this entry will be non-null |
1155 // If the string has already been interned, this entry will be non-null |
1156 oop str = this_cp->resolved_references()->obj_at(obj_index); |
1156 oop str = this_cp->resolved_references()->obj_at(obj_index); |
1157 assert(!oopDesc::equals(str, Universe::the_null_sentinel()), ""); |
1157 assert(str != Universe::the_null_sentinel(), ""); |
1158 if (str != NULL) return str; |
1158 if (str != NULL) return str; |
1159 Symbol* sym = this_cp->unresolved_string_at(which); |
1159 Symbol* sym = this_cp->unresolved_string_at(which); |
1160 str = StringTable::intern(sym, CHECK_(NULL)); |
1160 str = StringTable::intern(sym, CHECK_(NULL)); |
1161 this_cp->string_at_put(which, obj_index, str); |
1161 this_cp->string_at_put(which, obj_index, str); |
1162 assert(java_lang_String::is_instance(str), "must be string"); |
1162 assert(java_lang_String::is_instance(str), "must be string"); |