src/hotspot/share/classfile/classFileParser.cpp
changeset 58447 319173c62caa
parent 58221 b73753eff8b7
child 58679 9c3209ff7550
child 58722 cba8afa5cfed
equal deleted inserted replaced
58446:5c83830390ba 58447:319173c62caa
  3002   // If JVMTI original method ordering or sharing is enabled we have to
  3002   // If JVMTI original method ordering or sharing is enabled we have to
  3003   // remember the original class file ordering.
  3003   // remember the original class file ordering.
  3004   // We temporarily use the vtable_index field in the Method* to store the
  3004   // We temporarily use the vtable_index field in the Method* to store the
  3005   // class file index, so we can read in after calling qsort.
  3005   // class file index, so we can read in after calling qsort.
  3006   // Put the method ordering in the shared archive.
  3006   // Put the method ordering in the shared archive.
  3007   if (JvmtiExport::can_maintain_original_method_order() || DumpSharedSpaces) {
  3007   if (JvmtiExport::can_maintain_original_method_order() || Arguments::is_dumping_archive()) {
  3008     for (int index = 0; index < length; index++) {
  3008     for (int index = 0; index < length; index++) {
  3009       Method* const m = methods->at(index);
  3009       Method* const m = methods->at(index);
  3010       assert(!m->valid_vtable_index(), "vtable index should not be set");
  3010       assert(!m->valid_vtable_index(), "vtable index should not be set");
  3011       m->set_vtable_index(index);
  3011       m->set_vtable_index(index);
  3012     }
  3012     }
  3016   Method::sort_methods(methods);
  3016   Method::sort_methods(methods);
  3017 
  3017 
  3018   intArray* method_ordering = NULL;
  3018   intArray* method_ordering = NULL;
  3019   // If JVMTI original method ordering or sharing is enabled construct int
  3019   // If JVMTI original method ordering or sharing is enabled construct int
  3020   // array remembering the original ordering
  3020   // array remembering the original ordering
  3021   if (JvmtiExport::can_maintain_original_method_order() || DumpSharedSpaces) {
  3021   if (JvmtiExport::can_maintain_original_method_order() || Arguments::is_dumping_archive()) {
  3022     method_ordering = new intArray(length, length, -1);
  3022     method_ordering = new intArray(length, length, -1);
  3023     for (int index = 0; index < length; index++) {
  3023     for (int index = 0; index < length; index++) {
  3024       Method* const m = methods->at(index);
  3024       Method* const m = methods->at(index);
  3025       const int old_index = m->vtable_index();
  3025       const int old_index = m->vtable_index();
  3026       assert(old_index >= 0 && old_index < length, "invalid method index");
  3026       assert(old_index >= 0 && old_index < length, "invalid method index");