< prev index next >

src/hotspot/share/code/dependencies.cpp

Print this page

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

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

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