207 int generic_signature_index() const { return constMethod()->generic_signature_index(); } |
207 int generic_signature_index() const { return constMethod()->generic_signature_index(); } |
208 void set_generic_signature_index(int index) { constMethod()->set_generic_signature_index(index); } |
208 void set_generic_signature_index(int index) { constMethod()->set_generic_signature_index(index); } |
209 |
209 |
210 // annotations support |
210 // annotations support |
211 AnnotationArray* annotations() const { |
211 AnnotationArray* annotations() const { |
212 InstanceKlass* ik = InstanceKlass::cast(method_holder()); |
212 InstanceKlass* ik = method_holder(); |
213 if (ik->annotations() == NULL) { |
213 if (ik->annotations() == NULL) { |
214 return NULL; |
214 return NULL; |
215 } |
215 } |
216 return ik->annotations()->get_method_annotations_of(method_idnum()); |
216 return ik->annotations()->get_method_annotations_of(method_idnum()); |
217 } |
217 } |
218 AnnotationArray* parameter_annotations() const { |
218 AnnotationArray* parameter_annotations() const { |
219 InstanceKlass* ik = InstanceKlass::cast(method_holder()); |
219 InstanceKlass* ik = method_holder(); |
220 if (ik->annotations() == NULL) { |
220 if (ik->annotations() == NULL) { |
221 return NULL; |
221 return NULL; |
222 } |
222 } |
223 return ik->annotations()->get_method_parameter_annotations_of(method_idnum()); |
223 return ik->annotations()->get_method_parameter_annotations_of(method_idnum()); |
224 } |
224 } |
225 AnnotationArray* annotation_default() const { |
225 AnnotationArray* annotation_default() const { |
226 InstanceKlass* ik = InstanceKlass::cast(method_holder()); |
226 InstanceKlass* ik = method_holder(); |
227 if (ik->annotations() == NULL) { |
227 if (ik->annotations() == NULL) { |
228 return NULL; |
228 return NULL; |
229 } |
229 } |
230 return ik->annotations()->get_method_default_annotations_of(method_idnum()); |
230 return ik->annotations()->get_method_default_annotations_of(method_idnum()); |
231 } |
231 } |
494 { return constMethod()->has_linenumber_table(); } |
494 { return constMethod()->has_linenumber_table(); } |
495 u_char* compressed_linenumber_table() const |
495 u_char* compressed_linenumber_table() const |
496 { return constMethod()->compressed_linenumber_table(); } |
496 { return constMethod()->compressed_linenumber_table(); } |
497 |
497 |
498 // method holder (the Klass* holding this method) |
498 // method holder (the Klass* holding this method) |
499 Klass* method_holder() const { return constants()->pool_holder(); } |
499 InstanceKlass* method_holder() const { return constants()->pool_holder(); } |
500 |
500 |
501 void compute_size_of_parameters(Thread *thread); // word size of parameters (receiver if any + arguments) |
501 void compute_size_of_parameters(Thread *thread); // word size of parameters (receiver if any + arguments) |
502 Symbol* klass_name() const; // returns the name of the method holder |
502 Symbol* klass_name() const; // returns the name of the method holder |
503 BasicType result_type() const; // type of the method result |
503 BasicType result_type() const; // type of the method result |
504 int result_type_index() const; // type index of the method result |
504 int result_type_index() const; // type index of the method result |
695 static void clear_jmethod_ids(ClassLoaderData* loader_data); |
695 static void clear_jmethod_ids(ClassLoaderData* loader_data); |
696 static void print_jmethod_ids(ClassLoaderData* loader_data, outputStream* out) PRODUCT_RETURN; |
696 static void print_jmethod_ids(ClassLoaderData* loader_data, outputStream* out) PRODUCT_RETURN; |
697 |
697 |
698 // Get this method's jmethodID -- allocate if it doesn't exist |
698 // Get this method's jmethodID -- allocate if it doesn't exist |
699 jmethodID jmethod_id() { methodHandle this_h(this); |
699 jmethodID jmethod_id() { methodHandle this_h(this); |
700 return InstanceKlass::get_jmethod_id(InstanceKlass::cast(method_holder()), this_h); } |
700 return InstanceKlass::get_jmethod_id(method_holder(), this_h); } |
701 |
701 |
702 // Lookup the jmethodID for this method. Return NULL if not found. |
702 // Lookup the jmethodID for this method. Return NULL if not found. |
703 // NOTE that this function can be called from a signal handler |
703 // NOTE that this function can be called from a signal handler |
704 // (see AsyncGetCallTrace support for Forte Analyzer) and this |
704 // (see AsyncGetCallTrace support for Forte Analyzer) and this |
705 // needs to be async-safe. No allocation should be done and |
705 // needs to be async-safe. No allocation should be done and |
706 // so handles are not used to avoid deadlock. |
706 // so handles are not used to avoid deadlock. |
707 jmethodID find_jmethod_id_or_null() { return InstanceKlass::cast(method_holder())->jmethod_id_or_null(this); } |
707 jmethodID find_jmethod_id_or_null() { return method_holder()->jmethod_id_or_null(this); } |
708 |
708 |
709 // JNI static invoke cached itable index accessors |
709 // JNI static invoke cached itable index accessors |
710 int cached_itable_index() { return InstanceKlass::cast(method_holder())->cached_itable_index(method_idnum()); } |
710 int cached_itable_index() { return method_holder()->cached_itable_index(method_idnum()); } |
711 void set_cached_itable_index(int index) { InstanceKlass::cast(method_holder())->set_cached_itable_index(method_idnum(), index); } |
711 void set_cached_itable_index(int index) { method_holder()->set_cached_itable_index(method_idnum(), index); } |
712 |
712 |
713 // Support for inlining of intrinsic methods |
713 // Support for inlining of intrinsic methods |
714 vmIntrinsics::ID intrinsic_id() const { return (vmIntrinsics::ID) _intrinsic_id; } |
714 vmIntrinsics::ID intrinsic_id() const { return (vmIntrinsics::ID) _intrinsic_id; } |
715 void set_intrinsic_id(vmIntrinsics::ID id) { _intrinsic_id = (u1) id; } |
715 void set_intrinsic_id(vmIntrinsics::ID id) { _intrinsic_id = (u1) id; } |
716 |
716 |
732 } |
732 } |
733 bool is_overpass() const { return method_type() == ConstMethod::OVERPASS; } |
733 bool is_overpass() const { return method_type() == ConstMethod::OVERPASS; } |
734 |
734 |
735 // On-stack replacement support |
735 // On-stack replacement support |
736 bool has_osr_nmethod(int level, bool match_level) { |
736 bool has_osr_nmethod(int level, bool match_level) { |
737 return InstanceKlass::cast(method_holder())->lookup_osr_nmethod(this, InvocationEntryBci, level, match_level) != NULL; |
737 return method_holder()->lookup_osr_nmethod(this, InvocationEntryBci, level, match_level) != NULL; |
738 } |
738 } |
739 |
739 |
740 nmethod* lookup_osr_nmethod_for(int bci, int level, bool match_level) { |
740 nmethod* lookup_osr_nmethod_for(int bci, int level, bool match_level) { |
741 return InstanceKlass::cast(method_holder())->lookup_osr_nmethod(this, bci, level, match_level); |
741 return method_holder()->lookup_osr_nmethod(this, bci, level, match_level); |
742 } |
742 } |
743 |
743 |
744 // Inline cache support |
744 // Inline cache support |
745 void cleanup_inline_caches(); |
745 void cleanup_inline_caches(); |
746 |
746 |