< prev index next >

src/hotspot/share/code/dependencies.cpp

Print this page

1679   if (k->is_abstract())  return false;
1680   // We could also return false if k does not yet appear to be
1681   // instantiated, if the VM version supports this distinction also.
1682   //if (k->is_not_instantiated())  return false;
1683   return true;
1684 }
1685 
1686 bool Dependencies::has_finalizable_subclass(ciInstanceKlass* k) {
1687   return k->has_finalizable_subclass();
1688 }
1689 
1690 // Any use of the contents (bytecodes) of a method must be
1691 // marked by an "evol_method" dependency, if those contents
1692 // can change.  (Note: A method is always dependent on itself.)
1693 Klass* Dependencies::check_evol_method(Method* m) {
1694   assert(must_be_in_vm(), "raw oops here");
1695   // Did somebody do a JVMTI RedefineClasses while our backs were turned?
1696   // Or is there a now a breakpoint?
1697   // (Assumes compiled code cannot handle bkpts; change if UseFastBreakpoints.)
1698   if (m->is_old()
1699       || m->number_of_breakpoints() > 0) {

1700     return m->method_holder();
1701   } else {
1702     return nullptr;
1703   }
1704 }
1705 
1706 // This is a strong assertion:  It is that the given type
1707 // has no subtypes whatever.  It is most useful for
1708 // optimizing checks on reflected types or on array types.
1709 // (Checks on types which are derived from real instances
1710 // can be optimized more strongly than this, because we
1711 // know that the checked type comes from a concrete type,
1712 // and therefore we can disregard abstract types.)
1713 Klass* Dependencies::check_leaf_type(InstanceKlass* ctxk) {
1714   assert(must_be_in_vm(), "raw oops here");
1715   assert_locked_or_safepoint(Compile_lock);
1716   Klass* sub = ctxk->subklass();
1717   if (sub != nullptr) {
1718     return sub;
1719   } else if (ctxk->nof_implementors() != 0) {

1679   if (k->is_abstract())  return false;
1680   // We could also return false if k does not yet appear to be
1681   // instantiated, if the VM version supports this distinction also.
1682   //if (k->is_not_instantiated())  return false;
1683   return true;
1684 }
1685 
1686 bool Dependencies::has_finalizable_subclass(ciInstanceKlass* k) {
1687   return k->has_finalizable_subclass();
1688 }
1689 
1690 // Any use of the contents (bytecodes) of a method must be
1691 // marked by an "evol_method" dependency, if those contents
1692 // can change.  (Note: A method is always dependent on itself.)
1693 Klass* Dependencies::check_evol_method(Method* m) {
1694   assert(must_be_in_vm(), "raw oops here");
1695   // Did somebody do a JVMTI RedefineClasses while our backs were turned?
1696   // Or is there a now a breakpoint?
1697   // (Assumes compiled code cannot handle bkpts; change if UseFastBreakpoints.)
1698   if (m->is_old()
1699       || m->number_of_breakpoints() > 0
1700       || m->mismatch()) {
1701     return m->method_holder();
1702   } else {
1703     return nullptr;
1704   }
1705 }
1706 
1707 // This is a strong assertion:  It is that the given type
1708 // has no subtypes whatever.  It is most useful for
1709 // optimizing checks on reflected types or on array types.
1710 // (Checks on types which are derived from real instances
1711 // can be optimized more strongly than this, because we
1712 // know that the checked type comes from a concrete type,
1713 // and therefore we can disregard abstract types.)
1714 Klass* Dependencies::check_leaf_type(InstanceKlass* ctxk) {
1715   assert(must_be_in_vm(), "raw oops here");
1716   assert_locked_or_safepoint(Compile_lock);
1717   Klass* sub = ctxk->subklass();
1718   if (sub != nullptr) {
1719     return sub;
1720   } else if (ctxk->nof_implementors() != 0) {
< prev index next >