hotspot/src/share/vm/oops/instanceKlass.cpp
changeset 30107 e3d259b825a1
parent 30104 d2b6dea68cb6
child 30120 af79e35d33e1
equal deleted inserted replaced
30106:ab720069962d 30107:e3d259b825a1
  3706     return NULL;
  3706     return NULL;
  3707   }
  3707   }
  3708   return m;
  3708   return m;
  3709 }
  3709 }
  3710 
  3710 
       
  3711 
       
  3712 Method* InstanceKlass::method_with_orig_idnum(int idnum) {
       
  3713   if (idnum >= methods()->length()) {
       
  3714     return NULL;
       
  3715   }
       
  3716   Method* m = methods()->at(idnum);
       
  3717   if (m != NULL && m->orig_method_idnum() == idnum) {
       
  3718     return m;
       
  3719   }
       
  3720   // Obsolete method idnum does not match the original idnum
       
  3721   for (int index = 0; index < methods()->length(); ++index) {
       
  3722     m = methods()->at(index);
       
  3723     if (m->orig_method_idnum() == idnum) {
       
  3724       return m;
       
  3725     }
       
  3726   }
       
  3727   // None found, return null for the caller to handle.
       
  3728   return NULL;
       
  3729 }
       
  3730 
       
  3731 
       
  3732 Method* InstanceKlass::method_with_orig_idnum(int idnum, int version) {
       
  3733   InstanceKlass* holder = get_klass_version(version);
       
  3734   if (holder == NULL) {
       
  3735     return NULL; // The version of klass is gone, no method is found
       
  3736   }
       
  3737   Method* method = holder->method_with_orig_idnum(idnum);
       
  3738   return method;
       
  3739 }
       
  3740 
       
  3741 
  3711 jint InstanceKlass::get_cached_class_file_len() {
  3742 jint InstanceKlass::get_cached_class_file_len() {
  3712   return VM_RedefineClasses::get_cached_class_file_len(_cached_class_file);
  3743   return VM_RedefineClasses::get_cached_class_file_len(_cached_class_file);
  3713 }
  3744 }
  3714 
  3745 
  3715 unsigned char * InstanceKlass::get_cached_class_file_bytes() {
  3746 unsigned char * InstanceKlass::get_cached_class_file_bytes() {