8175269: [s390] cleanup calls to vtable_start_offset() and vtable_length_offset()
authorlucy
Fri, 20 Jan 2017 16:53:50 +0100
changeset 46280 6eef3d367beb
parent 46279 9b0c98f422e9
child 46283 09e328af295a
8175269: [s390] cleanup calls to vtable_start_offset() and vtable_length_offset() Reviewed-by: dholmes, mdoerr
hotspot/src/cpu/s390/vm/macroAssembler_s390.cpp
hotspot/src/cpu/s390/vm/templateTable_s390.cpp
hotspot/src/cpu/s390/vm/vtableStubs_s390.cpp
--- a/hotspot/src/cpu/s390/vm/macroAssembler_s390.cpp	Fri Jan 20 15:17:46 2017 +0100
+++ b/hotspot/src/cpu/s390/vm/macroAssembler_s390.cpp	Fri Jan 20 16:53:50 2017 +0100
@@ -2726,11 +2726,11 @@
   BLOCK_COMMENT("lookup_interface_method {");
 
   // Load start of itable entries into itable_entry_addr.
-  z_llgf(vtable_len, Address(recv_klass, InstanceKlass::vtable_length_offset()));
+  z_llgf(vtable_len, Address(recv_klass, Klass::vtable_length_offset()));
   z_sllg(vtable_len, vtable_len, exact_log2(vtableEntry::size_in_bytes()));
 
   // Loop over all itable entries until desired interfaceOop(Rinterface) found.
-  const int vtable_base_offset = in_bytes(InstanceKlass::vtable_start_offset());
+  const int vtable_base_offset = in_bytes(Klass::vtable_start_offset());
 
   add2reg_with_index(itable_entry_addr,
                      vtable_base_offset + itableOffsetEntry::interface_offset_in_bytes(),
--- a/hotspot/src/cpu/s390/vm/templateTable_s390.cpp	Fri Jan 20 15:17:46 2017 +0100
+++ b/hotspot/src/cpu/s390/vm/templateTable_s390.cpp	Fri Jan 20 16:53:50 2017 +0100
@@ -3466,7 +3466,7 @@
   __ z_sllg(index, index, exact_log2(vtableEntry::size_in_bytes()));
   __ mem2reg_opt(method,
                  Address(Z_tmp_2, index,
-                         InstanceKlass::vtable_start_offset() + in_ByteSize(vtableEntry::method_offset_in_bytes())));
+                         Klass::vtable_start_offset() + in_ByteSize(vtableEntry::method_offset_in_bytes())));
   __ profile_arguments_type(Z_ARG4, method, Z_ARG5, true);
   __ jump_from_interpreted(method, Z_ARG4);
   BLOCK_COMMENT("} invokevirtual_helper");
--- a/hotspot/src/cpu/s390/vm/vtableStubs_s390.cpp	Fri Jan 20 15:17:46 2017 +0100
+++ b/hotspot/src/cpu/s390/vm/vtableStubs_s390.cpp	Fri Jan 20 16:53:50 2017 +0100
@@ -83,7 +83,7 @@
   __ load_klass(rcvr_klass, Z_ARG1);
 
   // Set method (in case of interpreted method), and destination address.
-  int entry_offset = in_bytes(InstanceKlass::vtable_start_offset()) +
+  int entry_offset = in_bytes(Klass::vtable_start_offset()) +
                      vtable_index * vtableEntry::size_in_bytes();
 
 #ifndef PRODUCT
@@ -96,8 +96,8 @@
     //                  worst case             actual size
     padding_bytes += __ load_const_size() - __ load_const_optimized_rtn_len(vtable_idx, vtable_index*vtableEntry::size_in_bytes(), true);
 
-    assert(Immediate::is_uimm12(in_bytes(InstanceKlass::vtable_length_offset())), "disp to large");
-    __ z_cl(vtable_idx, in_bytes(InstanceKlass::vtable_length_offset()), rcvr_klass);
+    assert(Immediate::is_uimm12(in_bytes(Klass::vtable_length_offset())), "disp to large");
+    __ z_cl(vtable_idx, in_bytes(Klass::vtable_length_offset()), rcvr_klass);
     __ z_brl(L);
     __ z_lghi(Z_ARG3, vtable_index);  // Debug code, don't optimize.
     __ call_VM(noreg, CAST_FROM_FN_PTR(address, bad_compiled_vtable_index), Z_ARG1, Z_ARG3, false);
@@ -187,11 +187,11 @@
   __ load_klass(rcvr_klass, Z_ARG1);
 
   // Load start of itable entries into itable_entry.
-  __ z_llgf(vtable_len, Address(rcvr_klass, InstanceKlass::vtable_length_offset()));
+  __ z_llgf(vtable_len, Address(rcvr_klass, Klass::vtable_length_offset()));
   __ z_sllg(vtable_len, vtable_len, exact_log2(vtableEntry::size_in_bytes()));
 
   // Loop over all itable entries until desired interfaceOop(Rinterface) found.
-  const int vtable_base_offset = in_bytes(InstanceKlass::vtable_start_offset());
+  const int vtable_base_offset = in_bytes(Klass::vtable_start_offset());
   // Count unused bytes.
   start_pc = __ pc();
   __ add2reg_with_index(itable_entry_addr, vtable_base_offset + itableOffsetEntry::interface_offset_in_bytes(), rcvr_klass, vtable_len);