changeset 48127:9fafc3cd887e mvt

8193123: [MVT] ciReplay does not support non-flattened value type fields Reviewed-by: roland
author thartmann
date Wed, 06 Dec 2017 14:25:49 +0100
parents 754222a63388
children 3d7b93d49079
files src/hotspot/share/ci/ciReplay.cpp
diffstat 1 files changed, 10 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/src/hotspot/share/ci/ciReplay.cpp	Wed Dec 06 11:19:21 2017 +0100
+++ b/src/hotspot/share/ci/ciReplay.cpp	Wed Dec 06 14:25:49 2017 +0100
@@ -842,10 +842,15 @@
                                SignatureStream::ReturnNull, THREAD);
         assert(k != NULL && !HAS_PENDING_EXCEPTION, "can resolve klass?");
         ValueKlass* vk = ValueKlass::cast(k);
-        int field_offset = fd->offset() - vk->first_field_offset();
-        oop obj = (oop)((address)_vt + field_offset);
-        ValueTypeFieldInitializer init_fields(obj, _replay);
-        vk->do_nonstatic_fields(&init_fields);
+        if (fd->is_flatten()) {
+          int field_offset = fd->offset() - vk->first_field_offset();
+          oop obj = (oop)((address)_vt + field_offset);
+          ValueTypeFieldInitializer init_fields(obj, _replay);
+          vk->do_nonstatic_fields(&init_fields);
+        } else {
+          oop value = vk->allocate_instance(THREAD);
+          _vt->obj_field_put(fd->offset(), value);
+        }
         break;
       }
       default: {
@@ -917,7 +922,7 @@
   // Initialize a class and fill in the value for a static field.
   // This is useful when the compile was dependent on the value of
   // static fields but it's impossible to properly rerun the static
-  // initiailizer.
+  // initializer.
   void process_staticfield(TRAPS) {
     InstanceKlass* k = (InstanceKlass *)parse_klass(CHECK);
 
@@ -978,15 +983,11 @@
       double value = atof(string_value);
       java_mirror->double_field_put(fd.offset(), value);
     } else if (field_signature[0] == 'Q') {
-      Symbol* klass_name = SymbolTable::lookup(field_signature, (int)strlen(field_signature), CHECK);
       Klass* kelem = resolve_klass(field_signature, CHECK);
       ValueKlass* vk = ValueKlass::cast(kelem);
       oop value = vk->allocate_instance(CHECK);
       ValueTypeFieldInitializer init_fields(value, this);
       vk->do_nonstatic_fields(&init_fields);
-      if (HAS_PENDING_EXCEPTION) {
-        return;
-      }
       java_mirror->obj_field_put(fd.offset(), value);
     } else {
       bool res = process_staticfield_reference(field_signature, java_mirror, &fd, CHECK);