src/share/vm/opto/memnode.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File 7118863 Sdiff src/share/vm/opto

src/share/vm/opto/memnode.cpp

Print this page




1456   // Steps (a), (b):  Walk past independent stores to find an exact match.
1457   if (prev_mem != NULL && prev_mem != in(MemNode::Memory)) {
1458     // (c) See if we can fold up on the spot, but don't fold up here.
1459     // Fold-up might require truncation (for LoadB/LoadS/LoadUS) or
1460     // just return a prior value, which is done by Identity calls.
1461     if (can_see_stored_value(prev_mem, phase)) {
1462       // Make ready for step (d):
1463       set_req(MemNode::Memory, prev_mem);
1464       return this;
1465     }
1466   }
1467 
1468   return NULL;                  // No further progress
1469 }
1470 
1471 // Helper to recognize certain Klass fields which are invariant across
1472 // some group of array types (e.g., int[] or all T[] where T < Object).
1473 const Type*
1474 LoadNode::load_array_final_field(const TypeKlassPtr *tkls,
1475                                  ciKlass* klass) const {
1476   if (tkls->offset() == Klass::modifier_flags_offset_in_bytes() + (int)sizeof(oopDesc)) {
1477     // The field is Klass::_modifier_flags.  Return its (constant) value.
1478     // (Folds up the 2nd indirection in aClassConstant.getModifiers().)
1479     assert(this->Opcode() == Op_LoadI, "must load an int from _modifier_flags");
1480     return TypeInt::make(klass->modifier_flags());
1481   }
1482   if (tkls->offset() == Klass::access_flags_offset_in_bytes() + (int)sizeof(oopDesc)) {
1483     // The field is Klass::_access_flags.  Return its (constant) value.
1484     // (Folds up the 2nd indirection in Reflection.getClassAccessFlags(aClassConstant).)
1485     assert(this->Opcode() == Op_LoadI, "must load an int from _access_flags");
1486     return TypeInt::make(klass->access_flags());
1487   }
1488   if (tkls->offset() == Klass::layout_helper_offset_in_bytes() + (int)sizeof(oopDesc)) {
1489     // The field is Klass::_layout_helper.  Return its constant value if known.
1490     assert(this->Opcode() == Op_LoadI, "must load an int from _layout_helper");
1491     return TypeInt::make(klass->layout_helper());
1492   }
1493 
1494   // No match.
1495   return NULL;
1496 }
1497 
1498 //------------------------------Value-----------------------------------------
1499 const Type *LoadNode::Value( PhaseTransform *phase ) const {
1500   // Either input is TOP ==> the result is TOP
1501   Node* mem = in(MemNode::Memory);
1502   const Type *t1 = phase->type(mem);
1503   if (t1 == Type::TOP)  return Type::TOP;
1504   Node* adr = in(MemNode::Address);
1505   const TypePtr* tp = phase->type(adr)->isa_ptr();
1506   if (tp == NULL || tp->empty())  return Type::TOP;
1507   int off = tp->offset();
1508   assert(off != Type::OffsetTop, "case covered by TypePtr::empty");


1619       }
1620     }
1621   } else if (tp->base() == Type::KlassPtr) {
1622     assert( off != Type::OffsetBot ||
1623             // arrays can be cast to Objects
1624             tp->is_klassptr()->klass()->is_java_lang_Object() ||
1625             // also allow array-loading from the primary supertype
1626             // array during subtype checks
1627             Opcode() == Op_LoadKlass,
1628             "Field accesses must be precise" );
1629     // For klass/static loads, we expect the _type to be precise
1630   }
1631 
1632   const TypeKlassPtr *tkls = tp->isa_klassptr();
1633   if (tkls != NULL && !StressReflectiveCode) {
1634     ciKlass* klass = tkls->klass();
1635     if (klass->is_loaded() && tkls->klass_is_exact()) {
1636       // We are loading a field from a Klass metaobject whose identity
1637       // is known at compile time (the type is "exact" or "precise").
1638       // Check for fields we know are maintained as constants by the VM.
1639       if (tkls->offset() == Klass::super_check_offset_offset_in_bytes() + (int)sizeof(oopDesc)) {
1640         // The field is Klass::_super_check_offset.  Return its (constant) value.
1641         // (Folds up type checking code.)
1642         assert(Opcode() == Op_LoadI, "must load an int from _super_check_offset");
1643         return TypeInt::make(klass->super_check_offset());
1644       }
1645       // Compute index into primary_supers array
1646       juint depth = (tkls->offset() - (Klass::primary_supers_offset_in_bytes() + (int)sizeof(oopDesc))) / sizeof(klassOop);
1647       // Check for overflowing; use unsigned compare to handle the negative case.
1648       if( depth < ciKlass::primary_super_limit() ) {
1649         // The field is an element of Klass::_primary_supers.  Return its (constant) value.
1650         // (Folds up type checking code.)
1651         assert(Opcode() == Op_LoadKlass, "must load a klass from _primary_supers");
1652         ciKlass *ss = klass->super_of_depth(depth);
1653         return ss ? TypeKlassPtr::make(ss) : TypePtr::NULL_PTR;
1654       }
1655       const Type* aift = load_array_final_field(tkls, klass);
1656       if (aift != NULL)  return aift;
1657       if (tkls->offset() == in_bytes(arrayKlass::component_mirror_offset()) + (int)sizeof(oopDesc)
1658           && klass->is_array_klass()) {
1659         // The field is arrayKlass::_component_mirror.  Return its (constant) value.
1660         // (Folds up aClassConstant.getComponentType, common in Arrays.copyOf.)
1661         assert(Opcode() == Op_LoadP, "must load an oop from _component_mirror");
1662         return TypeInstPtr::make(klass->as_array_klass()->component_mirror());
1663       }
1664       if (tkls->offset() == Klass::java_mirror_offset_in_bytes() + (int)sizeof(oopDesc)) {
1665         // The field is Klass::_java_mirror.  Return its (constant) value.
1666         // (Folds up the 2nd indirection in anObjConstant.getClass().)
1667         assert(Opcode() == Op_LoadP, "must load an oop from _java_mirror");
1668         return TypeInstPtr::make(klass->java_mirror());
1669       }
1670     }
1671 
1672     // We can still check if we are loading from the primary_supers array at a
1673     // shallow enough depth.  Even though the klass is not exact, entries less
1674     // than or equal to its super depth are correct.
1675     if (klass->is_loaded() ) {
1676       ciType *inner = klass->klass();
1677       while( inner->is_obj_array_klass() )
1678         inner = inner->as_obj_array_klass()->base_element_type();
1679       if( inner->is_instance_klass() &&
1680           !inner->as_instance_klass()->flags().is_interface() ) {
1681         // Compute index into primary_supers array
1682         juint depth = (tkls->offset() - (Klass::primary_supers_offset_in_bytes() + (int)sizeof(oopDesc))) / sizeof(klassOop);
1683         // Check for overflowing; use unsigned compare to handle the negative case.
1684         if( depth < ciKlass::primary_super_limit() &&
1685             depth <= klass->super_depth() ) { // allow self-depth checks to handle self-check case
1686           // The field is an element of Klass::_primary_supers.  Return its (constant) value.
1687           // (Folds up type checking code.)
1688           assert(Opcode() == Op_LoadKlass, "must load a klass from _primary_supers");
1689           ciKlass *ss = klass->super_of_depth(depth);
1690           return ss ? TypeKlassPtr::make(ss) : TypePtr::NULL_PTR;
1691         }
1692       }
1693     }
1694 
1695     // If the type is enough to determine that the thing is not an array,
1696     // we can give the layout_helper a positive interval type.
1697     // This will help short-circuit some reflective code.
1698     if (tkls->offset() == Klass::layout_helper_offset_in_bytes() + (int)sizeof(oopDesc)
1699         && !klass->is_array_klass() // not directly typed as an array
1700         && !klass->is_interface()  // specifically not Serializable & Cloneable
1701         && !klass->is_java_lang_Object()   // not the supertype of all T[]
1702         ) {
1703       // Note:  When interfaces are reliable, we can narrow the interface
1704       // test to (klass != Serializable && klass != Cloneable).
1705       assert(Opcode() == Op_LoadI, "must load an int from _layout_helper");
1706       jint min_size = Klass::instance_layout_helper(oopDesc::header_size(), false);
1707       // The key property of this type is that it folds up tests
1708       // for array-ness, since it proves that the layout_helper is positive.
1709       // Thus, a generic value like the basic object layout helper works fine.
1710       return TypeInt::make(min_size, max_jint, Type::WidenMin);
1711     }
1712   }
1713 
1714   // If we are loading from a freshly-allocated object, produce a zero,
1715   // if the load is provably beyond the header of the object.
1716   // (Also allow a variable load from a fresh array to produce zero.)
1717   const TypeOopPtr *tinst = tp->isa_oopptr();
1718   bool is_instance = (tinst != NULL) && tinst->is_known_instance_field();


1921             // Return precise array klass
1922             return TypeKlassPtr::make(ak);
1923           }
1924         }
1925         return TypeKlassPtr::make(TypePtr::NotNull, ak, 0/*offset*/);
1926       } else {                  // Found a type-array?
1927         //assert(!UseExactTypes, "this code should be useless with exact types");
1928         assert( ak->is_type_array_klass(), "" );
1929         return TypeKlassPtr::make(ak); // These are always precise
1930       }
1931     }
1932   }
1933 
1934   // Check for loading klass from an array klass
1935   const TypeKlassPtr *tkls = tp->isa_klassptr();
1936   if (tkls != NULL && !StressReflectiveCode) {
1937     ciKlass* klass = tkls->klass();
1938     if( !klass->is_loaded() )
1939       return _type;             // Bail out if not loaded
1940     if( klass->is_obj_array_klass() &&
1941         (uint)tkls->offset() == objArrayKlass::element_klass_offset_in_bytes() + sizeof(oopDesc)) {
1942       ciKlass* elem = klass->as_obj_array_klass()->element_klass();
1943       // // Always returning precise element type is incorrect,
1944       // // e.g., element type could be object and array may contain strings
1945       // return TypeKlassPtr::make(TypePtr::Constant, elem, 0);
1946 
1947       // The array's TypeKlassPtr was declared 'precise' or 'not precise'
1948       // according to the element type's subclassing.
1949       return TypeKlassPtr::make(tkls->ptr(), elem, 0/*offset*/);
1950     }
1951     if( klass->is_instance_klass() && tkls->klass_is_exact() &&
1952         (uint)tkls->offset() == Klass::super_offset_in_bytes() + sizeof(oopDesc)) {
1953       ciKlass* sup = klass->as_instance_klass()->super();
1954       // The field is Klass::_super.  Return its (constant) value.
1955       // (Folds up the 2nd indirection in aClassConstant.getSuperClass().)
1956       return sup ? TypeKlassPtr::make(sup) : TypePtr::NULL_PTR;
1957     }
1958   }
1959 
1960   // Bailout case
1961   return LoadNode::Value(phase);
1962 }
1963 
1964 //------------------------------Identity---------------------------------------
1965 // To clean up reflective code, simplify k.java_mirror.as_klass to plain k.
1966 // Also feed through the klass in Allocate(...klass...)._klass.
1967 Node* LoadKlassNode::Identity( PhaseTransform *phase ) {
1968   return klass_identity_common(phase);
1969 }
1970 
1971 Node* LoadNode::klass_identity_common(PhaseTransform *phase ) {
1972   Node* x = LoadNode::Identity(phase);


2000   // mirror go completely dead.  (Current exception:  Class
2001   // mirrors may appear in debug info, but we could clean them out by
2002   // introducing a new debug info operator for klassOop.java_mirror).
2003   if (toop->isa_instptr() && toop->klass() == phase->C->env()->Class_klass()
2004       && (offset == java_lang_Class::klass_offset_in_bytes() ||
2005           offset == java_lang_Class::array_klass_offset_in_bytes())) {
2006     // We are loading a special hidden field from a Class mirror,
2007     // the field which points to its Klass or arrayKlass metaobject.
2008     if (base->is_Load()) {
2009       Node* adr2 = base->in(MemNode::Address);
2010       const TypeKlassPtr* tkls = phase->type(adr2)->isa_klassptr();
2011       if (tkls != NULL && !tkls->empty()
2012           && (tkls->klass()->is_instance_klass() ||
2013               tkls->klass()->is_array_klass())
2014           && adr2->is_AddP()
2015           ) {
2016         int mirror_field = Klass::java_mirror_offset_in_bytes();
2017         if (offset == java_lang_Class::array_klass_offset_in_bytes()) {
2018           mirror_field = in_bytes(arrayKlass::component_mirror_offset());
2019         }
2020         if (tkls->offset() == mirror_field + (int)sizeof(oopDesc)) {
2021           return adr2->in(AddPNode::Base);
2022         }
2023       }
2024     }
2025   }
2026 
2027   return this;
2028 }
2029 
2030 
2031 //------------------------------Value------------------------------------------
2032 const Type *LoadNKlassNode::Value( PhaseTransform *phase ) const {
2033   const Type *t = klass_value_common(phase);
2034   if (t == Type::TOP)
2035     return t;
2036 
2037   return t->make_narrowoop();
2038 }
2039 
2040 //------------------------------Identity---------------------------------------




1456   // Steps (a), (b):  Walk past independent stores to find an exact match.
1457   if (prev_mem != NULL && prev_mem != in(MemNode::Memory)) {
1458     // (c) See if we can fold up on the spot, but don't fold up here.
1459     // Fold-up might require truncation (for LoadB/LoadS/LoadUS) or
1460     // just return a prior value, which is done by Identity calls.
1461     if (can_see_stored_value(prev_mem, phase)) {
1462       // Make ready for step (d):
1463       set_req(MemNode::Memory, prev_mem);
1464       return this;
1465     }
1466   }
1467 
1468   return NULL;                  // No further progress
1469 }
1470 
1471 // Helper to recognize certain Klass fields which are invariant across
1472 // some group of array types (e.g., int[] or all T[] where T < Object).
1473 const Type*
1474 LoadNode::load_array_final_field(const TypeKlassPtr *tkls,
1475                                  ciKlass* klass) const {
1476   if (tkls->offset() == Klass::modifier_flags_offset_in_bytes()) {
1477     // The field is Klass::_modifier_flags.  Return its (constant) value.
1478     // (Folds up the 2nd indirection in aClassConstant.getModifiers().)
1479     assert(this->Opcode() == Op_LoadI, "must load an int from _modifier_flags");
1480     return TypeInt::make(klass->modifier_flags());
1481   }
1482   if (tkls->offset() == Klass::access_flags_offset_in_bytes()) {
1483     // The field is Klass::_access_flags.  Return its (constant) value.
1484     // (Folds up the 2nd indirection in Reflection.getClassAccessFlags(aClassConstant).)
1485     assert(this->Opcode() == Op_LoadI, "must load an int from _access_flags");
1486     return TypeInt::make(klass->access_flags());
1487   }
1488   if (tkls->offset() == Klass::layout_helper_offset_in_bytes()) {
1489     // The field is Klass::_layout_helper.  Return its constant value if known.
1490     assert(this->Opcode() == Op_LoadI, "must load an int from _layout_helper");
1491     return TypeInt::make(klass->layout_helper());
1492   }
1493 
1494   // No match.
1495   return NULL;
1496 }
1497 
1498 //------------------------------Value-----------------------------------------
1499 const Type *LoadNode::Value( PhaseTransform *phase ) const {
1500   // Either input is TOP ==> the result is TOP
1501   Node* mem = in(MemNode::Memory);
1502   const Type *t1 = phase->type(mem);
1503   if (t1 == Type::TOP)  return Type::TOP;
1504   Node* adr = in(MemNode::Address);
1505   const TypePtr* tp = phase->type(adr)->isa_ptr();
1506   if (tp == NULL || tp->empty())  return Type::TOP;
1507   int off = tp->offset();
1508   assert(off != Type::OffsetTop, "case covered by TypePtr::empty");


1619       }
1620     }
1621   } else if (tp->base() == Type::KlassPtr) {
1622     assert( off != Type::OffsetBot ||
1623             // arrays can be cast to Objects
1624             tp->is_klassptr()->klass()->is_java_lang_Object() ||
1625             // also allow array-loading from the primary supertype
1626             // array during subtype checks
1627             Opcode() == Op_LoadKlass,
1628             "Field accesses must be precise" );
1629     // For klass/static loads, we expect the _type to be precise
1630   }
1631 
1632   const TypeKlassPtr *tkls = tp->isa_klassptr();
1633   if (tkls != NULL && !StressReflectiveCode) {
1634     ciKlass* klass = tkls->klass();
1635     if (klass->is_loaded() && tkls->klass_is_exact()) {
1636       // We are loading a field from a Klass metaobject whose identity
1637       // is known at compile time (the type is "exact" or "precise").
1638       // Check for fields we know are maintained as constants by the VM.
1639       if (tkls->offset() == Klass::super_check_offset_offset_in_bytes()) {
1640         // The field is Klass::_super_check_offset.  Return its (constant) value.
1641         // (Folds up type checking code.)
1642         assert(Opcode() == Op_LoadI, "must load an int from _super_check_offset");
1643         return TypeInt::make(klass->super_check_offset());
1644       }
1645       // Compute index into primary_supers array
1646       juint depth = (tkls->offset() - Klass::primary_supers_offset_in_bytes()) / sizeof(klassOop);
1647       // Check for overflowing; use unsigned compare to handle the negative case.
1648       if( depth < ciKlass::primary_super_limit() ) {
1649         // The field is an element of Klass::_primary_supers.  Return its (constant) value.
1650         // (Folds up type checking code.)
1651         assert(Opcode() == Op_LoadKlass, "must load a klass from _primary_supers");
1652         ciKlass *ss = klass->super_of_depth(depth);
1653         return ss ? TypeKlassPtr::make(ss) : TypePtr::NULL_PTR;
1654       }
1655       const Type* aift = load_array_final_field(tkls, klass);
1656       if (aift != NULL)  return aift;
1657       if (tkls->offset() == in_bytes(arrayKlass::component_mirror_offset())
1658           && klass->is_array_klass()) {
1659         // The field is arrayKlass::_component_mirror.  Return its (constant) value.
1660         // (Folds up aClassConstant.getComponentType, common in Arrays.copyOf.)
1661         assert(Opcode() == Op_LoadP, "must load an oop from _component_mirror");
1662         return TypeInstPtr::make(klass->as_array_klass()->component_mirror());
1663       }
1664       if (tkls->offset() == Klass::java_mirror_offset_in_bytes()) {
1665         // The field is Klass::_java_mirror.  Return its (constant) value.
1666         // (Folds up the 2nd indirection in anObjConstant.getClass().)
1667         assert(Opcode() == Op_LoadP, "must load an oop from _java_mirror");
1668         return TypeInstPtr::make(klass->java_mirror());
1669       }
1670     }
1671 
1672     // We can still check if we are loading from the primary_supers array at a
1673     // shallow enough depth.  Even though the klass is not exact, entries less
1674     // than or equal to its super depth are correct.
1675     if (klass->is_loaded() ) {
1676       ciType *inner = klass->klass();
1677       while( inner->is_obj_array_klass() )
1678         inner = inner->as_obj_array_klass()->base_element_type();
1679       if( inner->is_instance_klass() &&
1680           !inner->as_instance_klass()->flags().is_interface() ) {
1681         // Compute index into primary_supers array
1682         juint depth = (tkls->offset() - Klass::primary_supers_offset_in_bytes()) / sizeof(klassOop);
1683         // Check for overflowing; use unsigned compare to handle the negative case.
1684         if( depth < ciKlass::primary_super_limit() &&
1685             depth <= klass->super_depth() ) { // allow self-depth checks to handle self-check case
1686           // The field is an element of Klass::_primary_supers.  Return its (constant) value.
1687           // (Folds up type checking code.)
1688           assert(Opcode() == Op_LoadKlass, "must load a klass from _primary_supers");
1689           ciKlass *ss = klass->super_of_depth(depth);
1690           return ss ? TypeKlassPtr::make(ss) : TypePtr::NULL_PTR;
1691         }
1692       }
1693     }
1694 
1695     // If the type is enough to determine that the thing is not an array,
1696     // we can give the layout_helper a positive interval type.
1697     // This will help short-circuit some reflective code.
1698     if (tkls->offset() == Klass::layout_helper_offset_in_bytes()
1699         && !klass->is_array_klass() // not directly typed as an array
1700         && !klass->is_interface()  // specifically not Serializable & Cloneable
1701         && !klass->is_java_lang_Object()   // not the supertype of all T[]
1702         ) {
1703       // Note:  When interfaces are reliable, we can narrow the interface
1704       // test to (klass != Serializable && klass != Cloneable).
1705       assert(Opcode() == Op_LoadI, "must load an int from _layout_helper");
1706       jint min_size = Klass::instance_layout_helper(oopDesc::header_size(), false);
1707       // The key property of this type is that it folds up tests
1708       // for array-ness, since it proves that the layout_helper is positive.
1709       // Thus, a generic value like the basic object layout helper works fine.
1710       return TypeInt::make(min_size, max_jint, Type::WidenMin);
1711     }
1712   }
1713 
1714   // If we are loading from a freshly-allocated object, produce a zero,
1715   // if the load is provably beyond the header of the object.
1716   // (Also allow a variable load from a fresh array to produce zero.)
1717   const TypeOopPtr *tinst = tp->isa_oopptr();
1718   bool is_instance = (tinst != NULL) && tinst->is_known_instance_field();


1921             // Return precise array klass
1922             return TypeKlassPtr::make(ak);
1923           }
1924         }
1925         return TypeKlassPtr::make(TypePtr::NotNull, ak, 0/*offset*/);
1926       } else {                  // Found a type-array?
1927         //assert(!UseExactTypes, "this code should be useless with exact types");
1928         assert( ak->is_type_array_klass(), "" );
1929         return TypeKlassPtr::make(ak); // These are always precise
1930       }
1931     }
1932   }
1933 
1934   // Check for loading klass from an array klass
1935   const TypeKlassPtr *tkls = tp->isa_klassptr();
1936   if (tkls != NULL && !StressReflectiveCode) {
1937     ciKlass* klass = tkls->klass();
1938     if( !klass->is_loaded() )
1939       return _type;             // Bail out if not loaded
1940     if( klass->is_obj_array_klass() &&
1941         tkls->offset() == objArrayKlass::element_klass_offset_in_bytes()) {
1942       ciKlass* elem = klass->as_obj_array_klass()->element_klass();
1943       // // Always returning precise element type is incorrect,
1944       // // e.g., element type could be object and array may contain strings
1945       // return TypeKlassPtr::make(TypePtr::Constant, elem, 0);
1946 
1947       // The array's TypeKlassPtr was declared 'precise' or 'not precise'
1948       // according to the element type's subclassing.
1949       return TypeKlassPtr::make(tkls->ptr(), elem, 0/*offset*/);
1950     }
1951     if( klass->is_instance_klass() && tkls->klass_is_exact() &&
1952         tkls->offset() == Klass::super_offset_in_bytes()) {
1953       ciKlass* sup = klass->as_instance_klass()->super();
1954       // The field is Klass::_super.  Return its (constant) value.
1955       // (Folds up the 2nd indirection in aClassConstant.getSuperClass().)
1956       return sup ? TypeKlassPtr::make(sup) : TypePtr::NULL_PTR;
1957     }
1958   }
1959 
1960   // Bailout case
1961   return LoadNode::Value(phase);
1962 }
1963 
1964 //------------------------------Identity---------------------------------------
1965 // To clean up reflective code, simplify k.java_mirror.as_klass to plain k.
1966 // Also feed through the klass in Allocate(...klass...)._klass.
1967 Node* LoadKlassNode::Identity( PhaseTransform *phase ) {
1968   return klass_identity_common(phase);
1969 }
1970 
1971 Node* LoadNode::klass_identity_common(PhaseTransform *phase ) {
1972   Node* x = LoadNode::Identity(phase);


2000   // mirror go completely dead.  (Current exception:  Class
2001   // mirrors may appear in debug info, but we could clean them out by
2002   // introducing a new debug info operator for klassOop.java_mirror).
2003   if (toop->isa_instptr() && toop->klass() == phase->C->env()->Class_klass()
2004       && (offset == java_lang_Class::klass_offset_in_bytes() ||
2005           offset == java_lang_Class::array_klass_offset_in_bytes())) {
2006     // We are loading a special hidden field from a Class mirror,
2007     // the field which points to its Klass or arrayKlass metaobject.
2008     if (base->is_Load()) {
2009       Node* adr2 = base->in(MemNode::Address);
2010       const TypeKlassPtr* tkls = phase->type(adr2)->isa_klassptr();
2011       if (tkls != NULL && !tkls->empty()
2012           && (tkls->klass()->is_instance_klass() ||
2013               tkls->klass()->is_array_klass())
2014           && adr2->is_AddP()
2015           ) {
2016         int mirror_field = Klass::java_mirror_offset_in_bytes();
2017         if (offset == java_lang_Class::array_klass_offset_in_bytes()) {
2018           mirror_field = in_bytes(arrayKlass::component_mirror_offset());
2019         }
2020         if (tkls->offset() == mirror_field) {
2021           return adr2->in(AddPNode::Base);
2022         }
2023       }
2024     }
2025   }
2026 
2027   return this;
2028 }
2029 
2030 
2031 //------------------------------Value------------------------------------------
2032 const Type *LoadNKlassNode::Value( PhaseTransform *phase ) const {
2033   const Type *t = klass_value_common(phase);
2034   if (t == Type::TOP)
2035     return t;
2036 
2037   return t->make_narrowoop();
2038 }
2039 
2040 //------------------------------Identity---------------------------------------


src/share/vm/opto/memnode.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File