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