changeset 47699:d20059c27430

8184206: Resolve all string constants in shared classes at CDS dump time Summary: Change ConstantPool::resolve_class_constants() to resolve all string constants. Reviewed-by: iklam, coleenp
author jiangli
date Mon, 06 Nov 2017 14:12:37 -0500
parents 47629b00daa9
children 9fe9292f5931
files src/hotspot/share/oops/constantPool.cpp
diffstat 1 files changed, 3 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/src/hotspot/share/oops/constantPool.cpp	Mon Nov 06 21:38:42 2017 +0100
+++ b/src/hotspot/share/oops/constantPool.cpp	Mon Nov 06 14:12:37 2017 -0500
@@ -305,14 +305,9 @@
 
   constantPoolHandle cp(THREAD, this);
   for (int index = 1; index < length(); index++) { // Index 0 is unused
-    if (tag_at(index).is_string()) {
-      Symbol* sym = cp->unresolved_string_at(index);
-      // Look up only. Only resolve references to already interned strings.
-      oop str = StringTable::lookup(sym);
-      if (str != NULL) {
-        int cache_index = cp->cp_to_object_index(index);
-        cp->string_at_put(index, cache_index, str);
-      }
+    if (tag_at(index).is_string() && !cp->is_pseudo_string_at(index)) {
+      int cache_index = cp->cp_to_object_index(index);
+      string_at_impl(cp, index, cache_index, CHECK);
     }
   }
 }