comparison src/share/vm/code/dependencies.cpp @ 30:65a06b4a51b8

6610906: inexplicable IncompatibleClassChangeError Summary: dependency check must treat polymorphic interfaces consistently Reviewed-by: kvn, never, sgoldman
author jrose
date Wed, 27 Feb 2008 00:23:37 -0800
parents a61af66fc99e
children cd0742ba123c
comparison
equal deleted inserted replaced
29:d5fc211aea19 30:65a06b4a51b8
879 879
880 // Current thread must be in VM (not native mode, as in CI): 880 // Current thread must be in VM (not native mode, as in CI):
881 assert(must_be_in_vm(), "raw oops here"); 881 assert(must_be_in_vm(), "raw oops here");
882 // Must not move the class hierarchy during this check: 882 // Must not move the class hierarchy during this check:
883 assert_locked_or_safepoint(Compile_lock); 883 assert_locked_or_safepoint(Compile_lock);
884
885 int nof_impls = instanceKlass::cast(context_type)->nof_implementors();
886 if (nof_impls > 1) {
887 // Avoid this case: *I.m > { A.m, C }; B.m > C
888 // %%% Until this is fixed more systematically, bail out.
889 // See corresponding comment in find_witness_anywhere.
890 return context_type;
891 }
884 892
885 assert(!is_participant(new_type), "only old classes are participants"); 893 assert(!is_participant(new_type), "only old classes are participants");
886 if (participants_hide_witnesses) { 894 if (participants_hide_witnesses) {
887 // If the new type is a subtype of a participant, we are done. 895 // If the new type is a subtype of a participant, we are done.
888 for (int i = 0; i < num_participants(); i++) { 896 for (int i = 0; i < num_participants(); i++) {