< prev index next >

src/hotspot/share/opto/graphKit.cpp

Print this page
@@ -1198,11 +1198,11 @@
  //-------------------------load_object_klass-----------------------------------
  Node* GraphKit::load_object_klass(Node* obj) {
    // Special-case a fresh allocation to avoid building nodes:
    Node* akls = AllocateNode::Ideal_klass(obj, &_gvn);
    if (akls != nullptr)  return akls;
-   Node* k_adr = basic_plus_adr(obj, oopDesc::klass_offset_in_bytes());
+   Node* k_adr = basic_plus_adr(obj, Type::klass_offset());
    return _gvn.transform(LoadKlassNode::make(_gvn, nullptr, immutable_memory(), k_adr, TypeInstPtr::KLASS));
  }
  
  //-------------------------load_array_length-----------------------------------
  Node* GraphKit::load_array_length(Node* array) {

@@ -3662,11 +3662,11 @@
      Node* minit_out = memory(rawidx);
      assert(minit_out->is_Proj() && minit_out->in(0) == init, "");
      // Add an edge in the MergeMem for the header fields so an access
      // to one of those has correct memory state
      set_memory(minit_out, C->get_alias_index(oop_type->add_offset(oopDesc::mark_offset_in_bytes())));
-     set_memory(minit_out, C->get_alias_index(oop_type->add_offset(oopDesc::klass_offset_in_bytes())));
+     set_memory(minit_out, C->get_alias_index(oop_type->add_offset(Type::klass_offset())));
      if (oop_type->isa_aryptr()) {
        const TypePtr* telemref = oop_type->add_offset(Type::OffsetBot);
        int            elemidx  = C->get_alias_index(telemref);
        hook_memory_on_init(*this, elemidx, minit_in, minit_out);
      } else if (oop_type->isa_instptr()) {
< prev index next >