2910 // If JVMTI original method ordering or sharing is enabled we have to
2911 // remember the original class file ordering.
2912 // We temporarily use the vtable_index field in the Method* to store the
2913 // class file index, so we can read in after calling qsort.
2914 // Put the method ordering in the shared archive.
2915 if (JvmtiExport::can_maintain_original_method_order() || DumpSharedSpaces) {
2916 for (int index = 0; index < length; index++) {
2917 Method* const m = methods->at(index);
2918 assert(!m->valid_vtable_index(), "vtable index should not be set");
2919 m->set_vtable_index(index);
2920 }
2921 }
2922 // Sort method array by ascending method name (for faster lookups & vtable construction)
2923 // Note that the ordering is not alphabetical, see Symbol::fast_compare
2924 Method::sort_methods(methods);
2925
2926 intArray* method_ordering = NULL;
2927 // If JVMTI original method ordering or sharing is enabled construct int
2928 // array remembering the original ordering
2929 if (JvmtiExport::can_maintain_original_method_order() || DumpSharedSpaces) {
2930 method_ordering = new intArray(length);
2931 for (int index = 0; index < length; index++) {
2932 Method* const m = methods->at(index);
2933 const int old_index = m->vtable_index();
2934 assert(old_index >= 0 && old_index < length, "invalid method index");
2935 method_ordering->at_put(index, old_index);
2936 m->set_vtable_index(Method::invalid_vtable_index);
2937 }
2938 }
2939 return method_ordering;
2940 }
2941
2942 // Parse generic_signature attribute for methods and fields
2943 u2 ClassFileParser::parse_generic_signature_attribute(const ClassFileStream* const cfs,
2944 TRAPS) {
2945 assert(cfs != NULL, "invariant");
2946
2947 cfs->guarantee_more(2, CHECK_0); // generic_signature_index
2948 const u2 generic_signature_index = cfs->get_u2_fast();
2949 check_property(
2950 valid_symbol_at(generic_signature_index),
|
2910 // If JVMTI original method ordering or sharing is enabled we have to
2911 // remember the original class file ordering.
2912 // We temporarily use the vtable_index field in the Method* to store the
2913 // class file index, so we can read in after calling qsort.
2914 // Put the method ordering in the shared archive.
2915 if (JvmtiExport::can_maintain_original_method_order() || DumpSharedSpaces) {
2916 for (int index = 0; index < length; index++) {
2917 Method* const m = methods->at(index);
2918 assert(!m->valid_vtable_index(), "vtable index should not be set");
2919 m->set_vtable_index(index);
2920 }
2921 }
2922 // Sort method array by ascending method name (for faster lookups & vtable construction)
2923 // Note that the ordering is not alphabetical, see Symbol::fast_compare
2924 Method::sort_methods(methods);
2925
2926 intArray* method_ordering = NULL;
2927 // If JVMTI original method ordering or sharing is enabled construct int
2928 // array remembering the original ordering
2929 if (JvmtiExport::can_maintain_original_method_order() || DumpSharedSpaces) {
2930 method_ordering = new intArray(length, length, -1);
2931 for (int index = 0; index < length; index++) {
2932 Method* const m = methods->at(index);
2933 const int old_index = m->vtable_index();
2934 assert(old_index >= 0 && old_index < length, "invalid method index");
2935 method_ordering->at_put(index, old_index);
2936 m->set_vtable_index(Method::invalid_vtable_index);
2937 }
2938 }
2939 return method_ordering;
2940 }
2941
2942 // Parse generic_signature attribute for methods and fields
2943 u2 ClassFileParser::parse_generic_signature_attribute(const ClassFileStream* const cfs,
2944 TRAPS) {
2945 assert(cfs != NULL, "invariant");
2946
2947 cfs->guarantee_more(2, CHECK_0); // generic_signature_index
2948 const u2 generic_signature_index = cfs->get_u2_fast();
2949 check_property(
2950 valid_symbol_at(generic_signature_index),
|