< prev index next >

src/hotspot/share/code/dependencies.cpp

Print this page

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

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) {

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