< prev index next >

src/hotspot/share/opto/memnode.cpp

Print this page
@@ -261,11 +261,11 @@
      // Sometimes dead array references collapse to a[-1], a[-2], or a[-3]
      if( !consistent && adr_check != nullptr && !adr_check->empty() &&
                 tp->isa_aryptr() &&        tp->offset() == Type::OffsetBot &&
          adr_check->isa_aryptr() && adr_check->offset() != Type::OffsetBot &&
          ( adr_check->offset() == arrayOopDesc::length_offset_in_bytes() ||
-           adr_check->offset() == oopDesc::klass_offset_in_bytes() ||
+           adr_check->offset() == Type::klass_offset() ||
            adr_check->offset() == oopDesc::mark_offset_in_bytes() ) ) {
        // don't assert if it is dead code.
        consistent = true;
      }
      if( !consistent ) {

@@ -942,11 +942,11 @@
                       ControlDependency control_dependency, bool require_atomic_access, bool unaligned, bool mismatched, bool unsafe, uint8_t barrier_data) {
    Compile* C = gvn.C;
  
    // sanity check the alias category against the created node type
    assert(!(adr_type->isa_oopptr() &&
-            adr_type->offset() == oopDesc::klass_offset_in_bytes()),
+            adr_type->offset() == Type::klass_offset()),
           "use LoadKlassNode instead");
    assert(!(adr_type->isa_aryptr() &&
             adr_type->offset() == arrayOopDesc::length_offset_in_bytes()),
           "use LoadRangeNode instead");
    // Check control edge of raw loads

@@ -2470,19 +2470,19 @@
        }
        // non-constant mirror, so we can't tell what's going on
      }
      if (!tinst->is_loaded())
        return _type;             // Bail out if not loaded
-     if (offset == oopDesc::klass_offset_in_bytes()) {
+     if (offset == Type::klass_offset()) {
        return tinst->as_klass_type(true);
      }
    }
  
    // Check for loading klass from an array
    const TypeAryPtr *tary = tp->isa_aryptr();
    if (tary != nullptr &&
-       tary->offset() == oopDesc::klass_offset_in_bytes()) {
+       tary->offset() == Type::klass_offset()) {
      return tary->as_klass_type(true);
    }
  
    // Check for loading klass from an array klass
    const TypeKlassPtr *tkls = tp->isa_klassptr();

@@ -2544,11 +2544,11 @@
      base = bs->step_over_gc_barrier(base);
    }
  
    // We can fetch the klass directly through an AllocateNode.
    // This works even if the klass is not constant (clone or newArray).
-   if (offset == oopDesc::klass_offset_in_bytes()) {
+   if (offset == Type::klass_offset()) {
      Node* allocated_klass = AllocateNode::Ideal_klass(base, phase);
      if (allocated_klass != nullptr) {
        return allocated_klass;
      }
    }
< prev index next >