1.1 --- a/src/share/vm/oops/method.hpp Thu Oct 04 14:55:57 2012 +0200 1.2 +++ b/src/share/vm/oops/method.hpp Tue Nov 06 15:09:37 2012 -0500 1.3 @@ -209,21 +209,21 @@ 1.4 1.5 // annotations support 1.6 AnnotationArray* annotations() const { 1.7 - InstanceKlass* ik = InstanceKlass::cast(method_holder()); 1.8 + InstanceKlass* ik = method_holder(); 1.9 if (ik->annotations() == NULL) { 1.10 return NULL; 1.11 } 1.12 return ik->annotations()->get_method_annotations_of(method_idnum()); 1.13 } 1.14 AnnotationArray* parameter_annotations() const { 1.15 - InstanceKlass* ik = InstanceKlass::cast(method_holder()); 1.16 + InstanceKlass* ik = method_holder(); 1.17 if (ik->annotations() == NULL) { 1.18 return NULL; 1.19 } 1.20 return ik->annotations()->get_method_parameter_annotations_of(method_idnum()); 1.21 } 1.22 AnnotationArray* annotation_default() const { 1.23 - InstanceKlass* ik = InstanceKlass::cast(method_holder()); 1.24 + InstanceKlass* ik = method_holder(); 1.25 if (ik->annotations() == NULL) { 1.26 return NULL; 1.27 } 1.28 @@ -496,7 +496,7 @@ 1.29 { return constMethod()->compressed_linenumber_table(); } 1.30 1.31 // method holder (the Klass* holding this method) 1.32 - Klass* method_holder() const { return constants()->pool_holder(); } 1.33 + InstanceKlass* method_holder() const { return constants()->pool_holder(); } 1.34 1.35 void compute_size_of_parameters(Thread *thread); // word size of parameters (receiver if any + arguments) 1.36 Symbol* klass_name() const; // returns the name of the method holder 1.37 @@ -697,18 +697,18 @@ 1.38 1.39 // Get this method's jmethodID -- allocate if it doesn't exist 1.40 jmethodID jmethod_id() { methodHandle this_h(this); 1.41 - return InstanceKlass::get_jmethod_id(InstanceKlass::cast(method_holder()), this_h); } 1.42 + return InstanceKlass::get_jmethod_id(method_holder(), this_h); } 1.43 1.44 // Lookup the jmethodID for this method. Return NULL if not found. 1.45 // NOTE that this function can be called from a signal handler 1.46 // (see AsyncGetCallTrace support for Forte Analyzer) and this 1.47 // needs to be async-safe. No allocation should be done and 1.48 // so handles are not used to avoid deadlock. 1.49 - jmethodID find_jmethod_id_or_null() { return InstanceKlass::cast(method_holder())->jmethod_id_or_null(this); } 1.50 + jmethodID find_jmethod_id_or_null() { return method_holder()->jmethod_id_or_null(this); } 1.51 1.52 // JNI static invoke cached itable index accessors 1.53 - int cached_itable_index() { return InstanceKlass::cast(method_holder())->cached_itable_index(method_idnum()); } 1.54 - void set_cached_itable_index(int index) { InstanceKlass::cast(method_holder())->set_cached_itable_index(method_idnum(), index); } 1.55 + int cached_itable_index() { return method_holder()->cached_itable_index(method_idnum()); } 1.56 + void set_cached_itable_index(int index) { method_holder()->set_cached_itable_index(method_idnum(), index); } 1.57 1.58 // Support for inlining of intrinsic methods 1.59 vmIntrinsics::ID intrinsic_id() const { return (vmIntrinsics::ID) _intrinsic_id; } 1.60 @@ -734,11 +734,11 @@ 1.61 1.62 // On-stack replacement support 1.63 bool has_osr_nmethod(int level, bool match_level) { 1.64 - return InstanceKlass::cast(method_holder())->lookup_osr_nmethod(this, InvocationEntryBci, level, match_level) != NULL; 1.65 + return method_holder()->lookup_osr_nmethod(this, InvocationEntryBci, level, match_level) != NULL; 1.66 } 1.67 1.68 nmethod* lookup_osr_nmethod_for(int bci, int level, bool match_level) { 1.69 - return InstanceKlass::cast(method_holder())->lookup_osr_nmethod(this, bci, level, match_level); 1.70 + return method_holder()->lookup_osr_nmethod(this, bci, level, match_level); 1.71 } 1.72 1.73 // Inline cache support