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