78 MethodData* _method_data;
79 MethodCounters* _method_counters;
80 AdapterHandlerEntry* _adapter;
81 AccessFlags _access_flags; // Access flags
82 int _vtable_index; // vtable index of this method (see VtableIndexFlag)
83 MethodFlags _flags;
84
85 u2 _intrinsic_id; // vmSymbols::intrinsic_id (0 == _none)
86
87 JFR_ONLY(DEFINE_TRACE_FLAG;)
88
89 #ifndef PRODUCT
90 int64_t _compiled_invocation_count;
91
92 Symbol* _name;
93 #endif
94 // Entry point for calling both from and to the interpreter.
95 address _i2i_entry; // All-args-on-stack calling convention
96 // Entry point for calling from compiled code, to compiled code if it exists
97 // or else the interpreter.
98 volatile address _from_compiled_entry; // Cache of: _code ? _code->entry_point() : _adapter->c2i_entry()
99 // The entry point for calling both from and to compiled code is
100 // "_code->entry_point()". Because of tiered compilation and de-opt, this
101 // field can come and go. It can transition from null to not-null at any
102 // time (whenever a compile completes). It can transition from not-null to
103 // null only at safepoints (because of a de-opt).
104 CompiledMethod* volatile _code; // Points to the corresponding piece of native code
105 volatile address _from_interpreted_entry; // Cache of _code ? _adapter->i2c_entry() : _i2i_entry
106
107 // Constructor
108 Method(ConstMethod* xconst, AccessFlags access_flags, Symbol* name);
109 public:
110
111 static Method* allocate(ClassLoaderData* loader_data,
112 int byte_code_size,
113 AccessFlags access_flags,
114 InlineTableSizes* sizes,
115 ConstMethod::MethodType method_type,
116 Symbol* name,
117 TRAPS);
118
119 // CDS and vtbl checking can create an empty Method to get vtbl pointer.
120 Method(){}
121
122 virtual bool is_method() const { return true; }
123
124 #if INCLUDE_CDS
125 void remove_unshareable_info();
126 void restore_unshareable_info(TRAPS);
127 #endif
128
129 // accessors for instance variables
130
131 ConstMethod* constMethod() const { return _constMethod; }
132 void set_constMethod(ConstMethod* xconst) { _constMethod = xconst; }
133
134
135 static address make_adapters(const methodHandle& mh, TRAPS);
136 address from_compiled_entry() const;
137 address from_interpreted_entry() const;
138
139 // access flag
140 AccessFlags access_flags() const { return _access_flags; }
141 void set_access_flags(AccessFlags flags) { _access_flags = flags; }
142
143 // name
144 Symbol* name() const { return constants()->symbol_at(name_index()); }
145 u2 name_index() const { return constMethod()->name_index(); }
146 void set_name_index(int index) { constMethod()->set_name_index(index); }
147
148 // signature
149 Symbol* signature() const { return constants()->symbol_at(signature_index()); }
150 u2 signature_index() const { return constMethod()->signature_index(); }
151 void set_signature_index(int index) { constMethod()->set_signature_index(index); }
152
153 // generics support
154 Symbol* generic_signature() const { int idx = generic_signature_index(); return ((idx != 0) ? constants()->symbol_at(idx) : nullptr); }
155 u2 generic_signature_index() const { return constMethod()->generic_signature_index(); }
156
392
393 bool was_executed_more_than(int n);
394 bool was_never_executed() { return !was_executed_more_than(0); }
395
396 static void build_profiling_method_data(const methodHandle& method, TRAPS);
397
398 static MethodCounters* build_method_counters(Thread* current, Method* m);
399
400 int interpreter_invocation_count() { return invocation_count(); }
401
402 #ifndef PRODUCT
403 int64_t compiled_invocation_count() const { return _compiled_invocation_count;}
404 void set_compiled_invocation_count(int count) { _compiled_invocation_count = (int64_t)count; }
405 #else
406 // for PrintMethodData in a product build
407 int64_t compiled_invocation_count() const { return 0; }
408 #endif // not PRODUCT
409
410 // nmethod/verified compiler entry
411 address verified_code_entry();
412 bool check_code() const; // Not inline to avoid circular ref
413 CompiledMethod* code() const;
414
415 // Locks CompiledMethod_lock if not held.
416 void unlink_code(CompiledMethod *compare);
417 // Locks CompiledMethod_lock if not held.
418 void unlink_code();
419
420 private:
421 // Either called with CompiledMethod_lock held or from constructor.
422 void clear_code();
423
424 public:
425 static void set_code(const methodHandle& mh, CompiledMethod* code);
426 void set_adapter_entry(AdapterHandlerEntry* adapter) {
427 _adapter = adapter;
428 }
429 void set_from_compiled_entry(address entry) {
430 _from_compiled_entry = entry;
431 }
432
433 address get_i2c_entry();
434 address get_c2i_entry();
435 address get_c2i_unverified_entry();
436 address get_c2i_no_clinit_check_entry();
437 AdapterHandlerEntry* adapter() const {
438 return _adapter;
439 }
440 // setup entry points
441 void link_method(const methodHandle& method, TRAPS);
442 // clear entry points. Used by sharing code during dump time
443 void unlink_method() NOT_CDS_RETURN;
444 void remove_unshareable_flags() NOT_CDS_RETURN;
445
446 // the number of argument reg slots that the compiled method uses on the stack.
447 int num_stack_arg_slots() const { return constMethod()->num_stack_arg_slots(); }
448
449 virtual void metaspace_pointers_do(MetaspaceClosure* iter);
450 virtual MetaspaceObj::Type type() const { return MethodType; }
451
452 // vtable index
453 enum VtableIndexFlag {
454 // Valid vtable indexes are non-negative (>= 0).
455 // These few negative values are used as sentinels.
530
531 // localvariable table
532 bool has_localvariable_table() const
533 { return constMethod()->has_localvariable_table(); }
534 u2 localvariable_table_length() const
535 { return constMethod()->localvariable_table_length(); }
536 LocalVariableTableElement* localvariable_table_start() const
537 { return constMethod()->localvariable_table_start(); }
538
539 bool has_linenumber_table() const
540 { return constMethod()->has_linenumber_table(); }
541 u_char* compressed_linenumber_table() const
542 { return constMethod()->compressed_linenumber_table(); }
543
544 // method holder (the Klass* holding this method)
545 InstanceKlass* method_holder() const { return constants()->pool_holder(); }
546
547 Symbol* klass_name() const; // returns the name of the method holder
548 BasicType result_type() const { return constMethod()->result_type(); }
549 bool is_returning_oop() const { BasicType r = result_type(); return is_reference_type(r); }
550 bool is_returning_fp() const { BasicType r = result_type(); return (r == T_FLOAT || r == T_DOUBLE); }
551
552 // Checked exceptions thrown by this method (resolved to mirrors)
553 objArrayHandle resolved_checked_exceptions(TRAPS) { return resolved_checked_exceptions_impl(this, THREAD); }
554
555 // Access flags
556 bool is_public() const { return access_flags().is_public(); }
557 bool is_private() const { return access_flags().is_private(); }
558 bool is_protected() const { return access_flags().is_protected(); }
559 bool is_package_private() const { return !is_public() && !is_private() && !is_protected(); }
560 bool is_static() const { return access_flags().is_static(); }
561 bool is_final() const { return access_flags().is_final(); }
562 bool is_synchronized() const { return access_flags().is_synchronized();}
563 bool is_native() const { return access_flags().is_native(); }
564 bool is_abstract() const { return access_flags().is_abstract(); }
565 bool is_synthetic() const { return access_flags().is_synthetic(); }
566
567 // returns true if contains only return operation
568 bool is_empty_method() const;
569
570 // returns true if this is a vanilla constructor
609 bool has_monitors() const { return is_synchronized() || has_monitor_bytecodes(); }
610
611 // monitor matching. This returns a conservative estimate of whether the monitorenter/monitorexit bytecodes
612 // properly nest in the method. It might return false, even though they actually nest properly, since the info.
613 // has not been computed yet.
614 bool guaranteed_monitor_matching() const { return monitor_matching(); }
615 void set_guaranteed_monitor_matching() { set_monitor_matching(); }
616
617 // returns true if the method is an accessor function (setter/getter).
618 bool is_accessor() const;
619
620 // returns true if the method is a getter
621 bool is_getter() const;
622
623 // returns true if the method is a setter
624 bool is_setter() const;
625
626 // returns true if the method does nothing but return a constant of primitive type
627 bool is_constant_getter() const;
628
629 // returns true if the method is an initializer (<init> or <clinit>).
630 bool is_initializer() const;
631
632 // returns true if the method is static OR if the classfile version < 51
633 bool has_valid_initializer_flags() const;
634
635 // returns true if the method name is <clinit> and the method has
636 // valid static initializer flags.
637 bool is_static_initializer() const;
638
639 // returns true if the method name is <init>
640 bool is_object_initializer() const;
641
642 // compiled code support
643 // NOTE: code() is inherently racy as deopt can be clearing code
644 // simultaneously. Use with caution.
645 bool has_compiled_code() const;
646
647 bool needs_clinit_barrier() const;
648
649 // sizing
650 static int header_size() {
651 return align_up((int)sizeof(Method), wordSize) / wordSize;
652 }
653 static int size(bool is_native);
654 int size() const { return method_size(); }
655 void log_touched(Thread* current);
656 static void print_touched_methods(outputStream* out);
657
658 // interpreter support
659 static ByteSize const_offset() { return byte_offset_of(Method, _constMethod ); }
660 static ByteSize access_flags_offset() { return byte_offset_of(Method, _access_flags ); }
661 static ByteSize from_compiled_offset() { return byte_offset_of(Method, _from_compiled_entry); }
662 static ByteSize code_offset() { return byte_offset_of(Method, _code); }
663
664 static ByteSize method_counters_offset() {
665 return byte_offset_of(Method, _method_counters);
666 }
667 #ifndef PRODUCT
668 static ByteSize compiled_invocation_counter_offset() { return byte_offset_of(Method, _compiled_invocation_count); }
669 #endif // not PRODUCT
670 static ByteSize native_function_offset() { return in_ByteSize(sizeof(Method)); }
671 static ByteSize from_interpreted_offset() { return byte_offset_of(Method, _from_interpreted_entry ); }
672 static ByteSize interpreter_entry_offset() { return byte_offset_of(Method, _i2i_entry ); }
673 static ByteSize signature_handler_offset() { return in_ByteSize(sizeof(Method) + wordSize); }
674 static ByteSize itable_index_offset() { return byte_offset_of(Method, _vtable_index ); }
675
676 // for code generation
677 static ByteSize method_data_offset() { return byte_offset_of(Method, _method_data); }
678 static ByteSize intrinsic_id_offset() { return byte_offset_of(Method, _intrinsic_id); }
679 static int intrinsic_id_size_in_bytes() { return sizeof(u2); }
680
681 // Static methods that are used to implement member methods where an exposed this pointer
682 // is needed due to possible GCs
800 void set_changes_current_thread() { constMethod()->set_changes_current_thread(); }
801
802 bool jvmti_mount_transition() const { return constMethod()->jvmti_mount_transition(); }
803 void set_jvmti_mount_transition() { constMethod()->set_jvmti_mount_transition(); }
804
805 bool is_hidden() const { return constMethod()->is_hidden(); }
806 void set_is_hidden() { constMethod()->set_is_hidden(); }
807
808 bool is_scoped() const { return constMethod()->is_scoped(); }
809 void set_scoped() { constMethod()->set_is_scoped(); }
810
811 bool intrinsic_candidate() const { return constMethod()->intrinsic_candidate(); }
812 void set_intrinsic_candidate() { constMethod()->set_intrinsic_candidate(); }
813
814 bool has_injected_profile() const { return constMethod()->has_injected_profile(); }
815 void set_has_injected_profile() { constMethod()->set_has_injected_profile(); }
816
817 bool has_reserved_stack_access() const { return constMethod()->reserved_stack_access(); }
818 void set_has_reserved_stack_access() { constMethod()->set_reserved_stack_access(); }
819
820 JFR_ONLY(DEFINE_TRACE_FLAG_ACCESSOR;)
821
822 ConstMethod::MethodType method_type() const {
823 return _constMethod->method_type();
824 }
825 bool is_overpass() const { return method_type() == ConstMethod::OVERPASS; }
826
827 // On-stack replacement support
828 bool has_osr_nmethod(int level, bool match_level) {
829 return method_holder()->lookup_osr_nmethod(this, InvocationEntryBci, level, match_level) != nullptr;
830 }
831
832 nmethod* lookup_osr_nmethod_for(int bci, int level, bool match_level) {
833 return method_holder()->lookup_osr_nmethod(this, bci, level, match_level);
834 }
835
836 // Find if klass for method is loaded
837 bool is_klass_loaded_by_klass_index(int klass_index) const;
838 bool is_klass_loaded(int refinfo_index, Bytecodes::Code bc, bool must_be_resolved = false) const;
839
|
78 MethodData* _method_data;
79 MethodCounters* _method_counters;
80 AdapterHandlerEntry* _adapter;
81 AccessFlags _access_flags; // Access flags
82 int _vtable_index; // vtable index of this method (see VtableIndexFlag)
83 MethodFlags _flags;
84
85 u2 _intrinsic_id; // vmSymbols::intrinsic_id (0 == _none)
86
87 JFR_ONLY(DEFINE_TRACE_FLAG;)
88
89 #ifndef PRODUCT
90 int64_t _compiled_invocation_count;
91
92 Symbol* _name;
93 #endif
94 // Entry point for calling both from and to the interpreter.
95 address _i2i_entry; // All-args-on-stack calling convention
96 // Entry point for calling from compiled code, to compiled code if it exists
97 // or else the interpreter.
98 volatile address _from_compiled_entry; // Cache of: _code ? _code->verified_entry_point() : _adapter->c2i_entry()
99 volatile address _from_compiled_inline_ro_entry; // Cache of: _code ? _code->verified_inline_ro_entry_point() : _adapter->c2i_inline_ro_entry()
100 volatile address _from_compiled_inline_entry; // Cache of: _code ? _code->verified_inline_entry_point() : _adapter->c2i_inline_entry()
101 // The entry point for calling both from and to compiled code is
102 // "_code->entry_point()". Because of tiered compilation and de-opt, this
103 // field can come and go. It can transition from null to not-null at any
104 // time (whenever a compile completes). It can transition from not-null to
105 // null only at safepoints (because of a de-opt).
106 CompiledMethod* volatile _code; // Points to the corresponding piece of native code
107 volatile address _from_interpreted_entry; // Cache of _code ? _adapter->i2c_entry() : _i2i_entry
108
109 // Constructor
110 Method(ConstMethod* xconst, AccessFlags access_flags, Symbol* name);
111 public:
112
113 static Method* allocate(ClassLoaderData* loader_data,
114 int byte_code_size,
115 AccessFlags access_flags,
116 InlineTableSizes* sizes,
117 ConstMethod::MethodType method_type,
118 Symbol* name,
119 TRAPS);
120
121 // CDS and vtbl checking can create an empty Method to get vtbl pointer.
122 Method(){}
123
124 virtual bool is_method() const { return true; }
125
126 #if INCLUDE_CDS
127 void remove_unshareable_info();
128 void restore_unshareable_info(TRAPS);
129 #endif
130
131 // accessors for instance variables
132
133 ConstMethod* constMethod() const { return _constMethod; }
134 void set_constMethod(ConstMethod* xconst) { _constMethod = xconst; }
135
136
137 static address make_adapters(const methodHandle& mh, TRAPS);
138 address from_compiled_entry() const;
139 address from_compiled_inline_ro_entry() const;
140 address from_compiled_inline_entry() const;
141 address from_interpreted_entry() const;
142
143 // access flag
144 AccessFlags access_flags() const { return _access_flags; }
145 void set_access_flags(AccessFlags flags) { _access_flags = flags; }
146
147 // name
148 Symbol* name() const { return constants()->symbol_at(name_index()); }
149 u2 name_index() const { return constMethod()->name_index(); }
150 void set_name_index(int index) { constMethod()->set_name_index(index); }
151
152 // signature
153 Symbol* signature() const { return constants()->symbol_at(signature_index()); }
154 u2 signature_index() const { return constMethod()->signature_index(); }
155 void set_signature_index(int index) { constMethod()->set_signature_index(index); }
156
157 // generics support
158 Symbol* generic_signature() const { int idx = generic_signature_index(); return ((idx != 0) ? constants()->symbol_at(idx) : nullptr); }
159 u2 generic_signature_index() const { return constMethod()->generic_signature_index(); }
160
396
397 bool was_executed_more_than(int n);
398 bool was_never_executed() { return !was_executed_more_than(0); }
399
400 static void build_profiling_method_data(const methodHandle& method, TRAPS);
401
402 static MethodCounters* build_method_counters(Thread* current, Method* m);
403
404 int interpreter_invocation_count() { return invocation_count(); }
405
406 #ifndef PRODUCT
407 int64_t compiled_invocation_count() const { return _compiled_invocation_count;}
408 void set_compiled_invocation_count(int count) { _compiled_invocation_count = (int64_t)count; }
409 #else
410 // for PrintMethodData in a product build
411 int64_t compiled_invocation_count() const { return 0; }
412 #endif // not PRODUCT
413
414 // nmethod/verified compiler entry
415 address verified_code_entry();
416 address verified_inline_code_entry();
417 address verified_inline_ro_code_entry();
418 bool check_code() const; // Not inline to avoid circular ref
419 CompiledMethod* code() const;
420
421 // Locks CompiledMethod_lock if not held.
422 void unlink_code(CompiledMethod *compare);
423 // Locks CompiledMethod_lock if not held.
424 void unlink_code();
425
426 private:
427 // Either called with CompiledMethod_lock held or from constructor.
428 void clear_code();
429
430 public:
431 static void set_code(const methodHandle& mh, CompiledMethod* code);
432 void set_adapter_entry(AdapterHandlerEntry* adapter) {
433 _adapter = adapter;
434 }
435 void set_from_compiled_entry(address entry) {
436 _from_compiled_entry = entry;
437 }
438 void set_from_compiled_inline_ro_entry(address entry) {
439 _from_compiled_inline_ro_entry = entry;
440 }
441 void set_from_compiled_inline_entry(address entry) {
442 _from_compiled_inline_entry = entry;
443 }
444
445 address get_i2c_entry();
446 address get_c2i_entry();
447 address get_c2i_inline_entry();
448 address get_c2i_unverified_entry();
449 address get_c2i_unverified_inline_entry();
450 address get_c2i_no_clinit_check_entry();
451 AdapterHandlerEntry* adapter() const {
452 return _adapter;
453 }
454 // setup entry points
455 void link_method(const methodHandle& method, TRAPS);
456 // clear entry points. Used by sharing code during dump time
457 void unlink_method() NOT_CDS_RETURN;
458 void remove_unshareable_flags() NOT_CDS_RETURN;
459
460 // the number of argument reg slots that the compiled method uses on the stack.
461 int num_stack_arg_slots() const { return constMethod()->num_stack_arg_slots(); }
462
463 virtual void metaspace_pointers_do(MetaspaceClosure* iter);
464 virtual MetaspaceObj::Type type() const { return MethodType; }
465
466 // vtable index
467 enum VtableIndexFlag {
468 // Valid vtable indexes are non-negative (>= 0).
469 // These few negative values are used as sentinels.
544
545 // localvariable table
546 bool has_localvariable_table() const
547 { return constMethod()->has_localvariable_table(); }
548 u2 localvariable_table_length() const
549 { return constMethod()->localvariable_table_length(); }
550 LocalVariableTableElement* localvariable_table_start() const
551 { return constMethod()->localvariable_table_start(); }
552
553 bool has_linenumber_table() const
554 { return constMethod()->has_linenumber_table(); }
555 u_char* compressed_linenumber_table() const
556 { return constMethod()->compressed_linenumber_table(); }
557
558 // method holder (the Klass* holding this method)
559 InstanceKlass* method_holder() const { return constants()->pool_holder(); }
560
561 Symbol* klass_name() const; // returns the name of the method holder
562 BasicType result_type() const { return constMethod()->result_type(); }
563 bool is_returning_oop() const { BasicType r = result_type(); return is_reference_type(r); }
564 InlineKlass* returns_inline_type(Thread* thread) const;
565
566 // Checked exceptions thrown by this method (resolved to mirrors)
567 objArrayHandle resolved_checked_exceptions(TRAPS) { return resolved_checked_exceptions_impl(this, THREAD); }
568
569 // Access flags
570 bool is_public() const { return access_flags().is_public(); }
571 bool is_private() const { return access_flags().is_private(); }
572 bool is_protected() const { return access_flags().is_protected(); }
573 bool is_package_private() const { return !is_public() && !is_private() && !is_protected(); }
574 bool is_static() const { return access_flags().is_static(); }
575 bool is_final() const { return access_flags().is_final(); }
576 bool is_synchronized() const { return access_flags().is_synchronized();}
577 bool is_native() const { return access_flags().is_native(); }
578 bool is_abstract() const { return access_flags().is_abstract(); }
579 bool is_synthetic() const { return access_flags().is_synthetic(); }
580
581 // returns true if contains only return operation
582 bool is_empty_method() const;
583
584 // returns true if this is a vanilla constructor
623 bool has_monitors() const { return is_synchronized() || has_monitor_bytecodes(); }
624
625 // monitor matching. This returns a conservative estimate of whether the monitorenter/monitorexit bytecodes
626 // properly nest in the method. It might return false, even though they actually nest properly, since the info.
627 // has not been computed yet.
628 bool guaranteed_monitor_matching() const { return monitor_matching(); }
629 void set_guaranteed_monitor_matching() { set_monitor_matching(); }
630
631 // returns true if the method is an accessor function (setter/getter).
632 bool is_accessor() const;
633
634 // returns true if the method is a getter
635 bool is_getter() const;
636
637 // returns true if the method is a setter
638 bool is_setter() const;
639
640 // returns true if the method does nothing but return a constant of primitive type
641 bool is_constant_getter() const;
642
643 // returns true if the method name is <clinit> and the method has
644 // valid static initializer flags.
645 bool is_class_initializer() const;
646
647 // returns true if the method name is <init> and the method is not a static factory
648 bool is_object_constructor() const;
649
650 // returns true if the method is an object constructor or class initializer
651 // (non-static <init> or <clinit>), but false for factories (static <vnew>).
652 bool is_object_constructor_or_class_initializer() const;
653
654 // returns true if the method name is <vnew> and the method is static
655 bool is_static_vnew_factory() const;
656
657 // compiled code support
658 // NOTE: code() is inherently racy as deopt can be clearing code
659 // simultaneously. Use with caution.
660 bool has_compiled_code() const;
661
662 bool needs_clinit_barrier() const;
663
664 // sizing
665 static int header_size() {
666 return align_up((int)sizeof(Method), wordSize) / wordSize;
667 }
668 static int size(bool is_native);
669 int size() const { return method_size(); }
670 void log_touched(Thread* current);
671 static void print_touched_methods(outputStream* out);
672
673 // interpreter support
674 static ByteSize const_offset() { return byte_offset_of(Method, _constMethod ); }
675 static ByteSize access_flags_offset() { return byte_offset_of(Method, _access_flags ); }
676 static ByteSize from_compiled_offset() { return byte_offset_of(Method, _from_compiled_entry); }
677 static ByteSize from_compiled_inline_offset() { return byte_offset_of(Method, _from_compiled_inline_entry); }
678 static ByteSize from_compiled_inline_ro_offset(){ return byte_offset_of(Method, _from_compiled_inline_ro_entry); }
679 static ByteSize code_offset() { return byte_offset_of(Method, _code); }
680 static ByteSize flags_offset() { return byte_offset_of(Method, _flags); }
681
682 static ByteSize method_counters_offset() {
683 return byte_offset_of(Method, _method_counters);
684 }
685 #ifndef PRODUCT
686 static ByteSize compiled_invocation_counter_offset() { return byte_offset_of(Method, _compiled_invocation_count); }
687 #endif // not PRODUCT
688 static ByteSize native_function_offset() { return in_ByteSize(sizeof(Method)); }
689 static ByteSize from_interpreted_offset() { return byte_offset_of(Method, _from_interpreted_entry ); }
690 static ByteSize interpreter_entry_offset() { return byte_offset_of(Method, _i2i_entry ); }
691 static ByteSize signature_handler_offset() { return in_ByteSize(sizeof(Method) + wordSize); }
692 static ByteSize itable_index_offset() { return byte_offset_of(Method, _vtable_index ); }
693
694 // for code generation
695 static ByteSize method_data_offset() { return byte_offset_of(Method, _method_data); }
696 static ByteSize intrinsic_id_offset() { return byte_offset_of(Method, _intrinsic_id); }
697 static int intrinsic_id_size_in_bytes() { return sizeof(u2); }
698
699 // Static methods that are used to implement member methods where an exposed this pointer
700 // is needed due to possible GCs
818 void set_changes_current_thread() { constMethod()->set_changes_current_thread(); }
819
820 bool jvmti_mount_transition() const { return constMethod()->jvmti_mount_transition(); }
821 void set_jvmti_mount_transition() { constMethod()->set_jvmti_mount_transition(); }
822
823 bool is_hidden() const { return constMethod()->is_hidden(); }
824 void set_is_hidden() { constMethod()->set_is_hidden(); }
825
826 bool is_scoped() const { return constMethod()->is_scoped(); }
827 void set_scoped() { constMethod()->set_is_scoped(); }
828
829 bool intrinsic_candidate() const { return constMethod()->intrinsic_candidate(); }
830 void set_intrinsic_candidate() { constMethod()->set_intrinsic_candidate(); }
831
832 bool has_injected_profile() const { return constMethod()->has_injected_profile(); }
833 void set_has_injected_profile() { constMethod()->set_has_injected_profile(); }
834
835 bool has_reserved_stack_access() const { return constMethod()->reserved_stack_access(); }
836 void set_has_reserved_stack_access() { constMethod()->set_reserved_stack_access(); }
837
838 bool has_scalarized_args() const { return constMethod()->has_scalarized_args(); }
839 void set_has_scalarized_args() { constMethod()->set_has_scalarized_args(); }
840
841 bool has_scalarized_return() const { return constMethod()->has_scalarized_return(); }
842 void set_has_scalarized_return() { constMethod()->set_has_scalarized_return(); }
843
844 bool is_scalarized_arg(int idx) const;
845
846 bool c1_needs_stack_repair() const { return constMethod()->c1_needs_stack_repair(); }
847 void set_c1_needs_stack_repair() { constMethod()->set_c1_needs_stack_repair(); }
848
849 bool c2_needs_stack_repair() const { return constMethod()->c2_needs_stack_repair(); }
850 void set_c2_needs_stack_repair() { constMethod()->set_c2_needs_stack_repair(); }
851
852 bool mismatch() const { return constMethod()->mismatch(); }
853 void set_mismatch() { constMethod()->set_mismatch(); }
854
855 JFR_ONLY(DEFINE_TRACE_FLAG_ACCESSOR;)
856
857 ConstMethod::MethodType method_type() const {
858 return _constMethod->method_type();
859 }
860 bool is_overpass() const { return method_type() == ConstMethod::OVERPASS; }
861
862 // On-stack replacement support
863 bool has_osr_nmethod(int level, bool match_level) {
864 return method_holder()->lookup_osr_nmethod(this, InvocationEntryBci, level, match_level) != nullptr;
865 }
866
867 nmethod* lookup_osr_nmethod_for(int bci, int level, bool match_level) {
868 return method_holder()->lookup_osr_nmethod(this, bci, level, match_level);
869 }
870
871 // Find if klass for method is loaded
872 bool is_klass_loaded_by_klass_index(int klass_index) const;
873 bool is_klass_loaded(int refinfo_index, Bytecodes::Code bc, bool must_be_resolved = false) const;
874
|