75 MethodData* _method_data;
76 MethodCounters* _method_counters;
77 AdapterHandlerEntry* _adapter;
78 int _vtable_index; // vtable index of this method (see VtableIndexFlag)
79 AccessFlags _access_flags; // Access flags
80 MethodFlags _flags;
81
82 u2 _intrinsic_id; // vmSymbols::intrinsic_id (0 == _none)
83
84 JFR_ONLY(DEFINE_TRACE_FLAG;)
85
86 #ifndef PRODUCT
87 int64_t _compiled_invocation_count;
88
89 Symbol* _name;
90 #endif
91 // Entry point for calling both from and to the interpreter.
92 address _i2i_entry; // All-args-on-stack calling convention
93 // Entry point for calling from compiled code, to compiled code if it exists
94 // or else the interpreter.
95 volatile address _from_compiled_entry; // Cache of: _code ? _code->entry_point() : _adapter->c2i_entry()
96 // The entry point for calling both from and to compiled code is
97 // "_code->entry_point()". Because of tiered compilation and de-opt, this
98 // field can come and go. It can transition from null to not-null at any
99 // time (whenever a compile completes). It can transition from not-null to
100 // null only at safepoints (because of a de-opt).
101 nmethod* volatile _code; // Points to the corresponding piece of native code
102 volatile address _from_interpreted_entry; // Cache of _code ? _adapter->i2c_entry() : _i2i_entry
103
104 // Constructor
105 Method(ConstMethod* xconst, AccessFlags access_flags, Symbol* name);
106 public:
107
108 static Method* allocate(ClassLoaderData* loader_data,
109 int byte_code_size,
110 AccessFlags access_flags,
111 InlineTableSizes* sizes,
112 ConstMethod::MethodType method_type,
113 Symbol* name,
114 TRAPS);
115
116 // CDS and vtbl checking can create an empty Method to get vtbl pointer.
117 Method(){}
118
119 virtual bool is_method() const { return true; }
120
121 #if INCLUDE_CDS
122 void remove_unshareable_info();
123 void restore_unshareable_info(TRAPS);
124 static void restore_archived_method_handle_intrinsic(methodHandle m, TRAPS);
125 #endif
126
127 // accessors for instance variables
128
129 ConstMethod* constMethod() const { return _constMethod; }
130 void set_constMethod(ConstMethod* xconst) { _constMethod = xconst; }
131
132
133 static address make_adapters(const methodHandle& mh, TRAPS);
134 address from_compiled_entry() const;
135 address from_interpreted_entry() const;
136
137 // access flag
138 AccessFlags access_flags() const { return _access_flags; }
139 void set_access_flags(AccessFlags flags) { _access_flags = flags; }
140
141 // name
142 Symbol* name() const { return constants()->symbol_at(name_index()); }
143 u2 name_index() const { return constMethod()->name_index(); }
144 void set_name_index(int index) { constMethod()->set_name_index(index); }
145
146 // signature
147 Symbol* signature() const { return constants()->symbol_at(signature_index()); }
148 u2 signature_index() const { return constMethod()->signature_index(); }
149 void set_signature_index(int index) { constMethod()->set_signature_index(index); }
150
151 // generics support
152 Symbol* generic_signature() const { int idx = generic_signature_index(); return ((idx != 0) ? constants()->symbol_at(idx) : nullptr); }
153 u2 generic_signature_index() const { return constMethod()->generic_signature_index(); }
154
343
344 bool was_executed_more_than(int n);
345 bool was_never_executed() { return !was_executed_more_than(0); }
346
347 static void build_profiling_method_data(const methodHandle& method, TRAPS);
348 static bool install_training_method_data(const methodHandle& method);
349 static MethodCounters* build_method_counters(Thread* current, Method* m);
350
351 inline int interpreter_invocation_count() const;
352
353 #ifndef PRODUCT
354 int64_t compiled_invocation_count() const { return _compiled_invocation_count;}
355 void set_compiled_invocation_count(int count) { _compiled_invocation_count = (int64_t)count; }
356 #else
357 // for PrintMethodData in a product build
358 int64_t compiled_invocation_count() const { return 0; }
359 #endif // not PRODUCT
360
361 // nmethod/verified compiler entry
362 address verified_code_entry();
363 bool check_code() const; // Not inline to avoid circular ref
364 nmethod* code() const;
365
366 // Locks NMethodState_lock if not held.
367 void unlink_code(nmethod *compare);
368 // Locks NMethodState_lock if not held.
369 void unlink_code();
370
371 private:
372 // Either called with NMethodState_lock held or from constructor.
373 void clear_code();
374
375 void clear_method_data() {
376 _method_data = nullptr;
377 }
378
379 public:
380 static void set_code(const methodHandle& mh, nmethod* code);
381 void set_adapter_entry(AdapterHandlerEntry* adapter) {
382 _adapter = adapter;
383 }
384 void set_from_compiled_entry(address entry) {
385 _from_compiled_entry = entry;
386 }
387
388 address get_i2c_entry();
389 address get_c2i_entry();
390 address get_c2i_unverified_entry();
391 address get_c2i_no_clinit_check_entry();
392 AdapterHandlerEntry* adapter() const {
393 return _adapter;
394 }
395 // setup entry points
396 void link_method(const methodHandle& method, TRAPS);
397 // clear entry points. Used by sharing code during dump time
398 void unlink_method() NOT_CDS_RETURN;
399 void remove_unshareable_flags() NOT_CDS_RETURN;
400
401 virtual void metaspace_pointers_do(MetaspaceClosure* iter);
402 virtual MetaspaceObj::Type type() const { return MethodType; }
403
404 // vtable index
405 enum VtableIndexFlag {
406 // Valid vtable indexes are non-negative (>= 0).
407 // These few negative values are used as sentinels.
408 itable_index_max = -10, // first itable index, growing downward
409 pending_itable_index = -9, // itable index will be assigned
410 invalid_vtable_index = -4, // distinct from any valid vtable index
484
485 // localvariable table
486 bool has_localvariable_table() const
487 { return constMethod()->has_localvariable_table(); }
488 u2 localvariable_table_length() const
489 { return constMethod()->localvariable_table_length(); }
490 LocalVariableTableElement* localvariable_table_start() const
491 { return constMethod()->localvariable_table_start(); }
492
493 bool has_linenumber_table() const
494 { return constMethod()->has_linenumber_table(); }
495 u_char* compressed_linenumber_table() const
496 { return constMethod()->compressed_linenumber_table(); }
497
498 // method holder (the Klass* holding this method)
499 InstanceKlass* method_holder() const { return constants()->pool_holder(); }
500
501 Symbol* klass_name() const; // returns the name of the method holder
502 BasicType result_type() const { return constMethod()->result_type(); }
503 bool is_returning_oop() const { BasicType r = result_type(); return is_reference_type(r); }
504 bool is_returning_fp() const { BasicType r = result_type(); return (r == T_FLOAT || r == T_DOUBLE); }
505
506 // Checked exceptions thrown by this method (resolved to mirrors)
507 objArrayHandle resolved_checked_exceptions(TRAPS) { return resolved_checked_exceptions_impl(this, THREAD); }
508
509 // Access flags
510 bool is_public() const { return access_flags().is_public(); }
511 bool is_private() const { return access_flags().is_private(); }
512 bool is_protected() const { return access_flags().is_protected(); }
513 bool is_package_private() const { return !is_public() && !is_private() && !is_protected(); }
514 bool is_static() const { return access_flags().is_static(); }
515 bool is_final() const { return access_flags().is_final(); }
516 bool is_synchronized() const { return access_flags().is_synchronized();}
517 bool is_native() const { return access_flags().is_native(); }
518 bool is_abstract() const { return access_flags().is_abstract(); }
519 bool is_synthetic() const { return access_flags().is_synthetic(); }
520
521 // returns true if contains only return operation
522 bool is_empty_method() const;
523
524 // returns true if this is a vanilla constructor
563 bool has_monitors() const { return is_synchronized() || has_monitor_bytecodes(); }
564
565 // monitor matching. This returns a conservative estimate of whether the monitorenter/monitorexit bytecodes
566 // properly nest in the method. It might return false, even though they actually nest properly, since the info.
567 // has not been computed yet.
568 bool guaranteed_monitor_matching() const { return monitor_matching(); }
569 void set_guaranteed_monitor_matching() { set_monitor_matching(); }
570
571 // returns true if the method is an accessor function (setter/getter).
572 bool is_accessor() const;
573
574 // returns true if the method is a getter
575 bool is_getter() const;
576
577 // returns true if the method is a setter
578 bool is_setter() const;
579
580 // returns true if the method does nothing but return a constant of primitive type
581 bool is_constant_getter() const;
582
583 // returns true if the method is static OR if the classfile version < 51
584 bool has_valid_initializer_flags() const;
585
586 // returns true if the method name is <clinit> and the method has
587 // valid static initializer flags.
588 bool is_static_initializer() const;
589
590 // returns true if the method name is <init>
591 bool is_object_initializer() const;
592
593 // returns true if the method name is wait0
594 bool is_object_wait0() const;
595
596 // compiled code support
597 // NOTE: code() is inherently racy as deopt can be clearing code
598 // simultaneously. Use with caution.
599 bool has_compiled_code() const;
600
601 bool needs_clinit_barrier() const;
602
603 // sizing
604 static int header_size() {
605 return align_up((int)sizeof(Method), wordSize) / wordSize;
606 }
607 static int size(bool is_native);
608 int size() const { return method_size(); }
609 void log_touched(Thread* current);
610 static void print_touched_methods(outputStream* out);
611
612 // interpreter support
613 static ByteSize const_offset() { return byte_offset_of(Method, _constMethod ); }
614 static ByteSize access_flags_offset() { return byte_offset_of(Method, _access_flags ); }
615 static ByteSize from_compiled_offset() { return byte_offset_of(Method, _from_compiled_entry); }
616 static ByteSize code_offset() { return byte_offset_of(Method, _code); }
617
618 static ByteSize method_counters_offset() {
619 return byte_offset_of(Method, _method_counters);
620 }
621 #ifndef PRODUCT
622 static ByteSize compiled_invocation_counter_offset() { return byte_offset_of(Method, _compiled_invocation_count); }
623 #endif // not PRODUCT
624 static ByteSize native_function_offset() { return in_ByteSize(sizeof(Method)); }
625 static ByteSize from_interpreted_offset() { return byte_offset_of(Method, _from_interpreted_entry ); }
626 static ByteSize interpreter_entry_offset() { return byte_offset_of(Method, _i2i_entry ); }
627 static ByteSize signature_handler_offset() { return in_ByteSize(sizeof(Method) + wordSize); }
628 static ByteSize itable_index_offset() { return byte_offset_of(Method, _vtable_index ); }
629
630 // for code generation
631 static ByteSize method_data_offset() { return byte_offset_of(Method, _method_data); }
632 static ByteSize intrinsic_id_offset() { return byte_offset_of(Method, _intrinsic_id); }
633 static int intrinsic_id_size_in_bytes() { return sizeof(u2); }
634
635 // Static methods that are used to implement member methods where an exposed this pointer
636 // is needed due to possible GCs
748 void set_jvmti_hide_events() { constMethod()->set_jvmti_hide_events(); }
749
750 bool jvmti_mount_transition() const { return constMethod()->jvmti_mount_transition(); }
751 void set_jvmti_mount_transition() { constMethod()->set_jvmti_mount_transition(); }
752
753 bool is_hidden() const { return constMethod()->is_hidden(); }
754 void set_is_hidden() { constMethod()->set_is_hidden(); }
755
756 bool is_scoped() const { return constMethod()->is_scoped(); }
757 void set_scoped() { constMethod()->set_is_scoped(); }
758
759 bool intrinsic_candidate() const { return constMethod()->intrinsic_candidate(); }
760 void set_intrinsic_candidate() { constMethod()->set_intrinsic_candidate(); }
761
762 bool has_injected_profile() const { return constMethod()->has_injected_profile(); }
763 void set_has_injected_profile() { constMethod()->set_has_injected_profile(); }
764
765 bool has_reserved_stack_access() const { return constMethod()->reserved_stack_access(); }
766 void set_has_reserved_stack_access() { constMethod()->set_reserved_stack_access(); }
767
768 JFR_ONLY(DEFINE_TRACE_FLAG_ACCESSOR;)
769
770 ConstMethod::MethodType method_type() const {
771 return _constMethod->method_type();
772 }
773 bool is_overpass() const { return method_type() == ConstMethod::OVERPASS; }
774
775 // On-stack replacement support
776 bool has_osr_nmethod(int level, bool match_level) {
777 return method_holder()->lookup_osr_nmethod(this, InvocationEntryBci, level, match_level) != nullptr;
778 }
779
780 nmethod* lookup_osr_nmethod_for(int bci, int level, bool match_level) {
781 return method_holder()->lookup_osr_nmethod(this, bci, level, match_level);
782 }
783
784 // Find if klass for method is loaded
785 bool is_klass_loaded_by_klass_index(int klass_index) const;
786 bool is_klass_loaded(int refinfo_index, Bytecodes::Code bc, bool must_be_resolved = false) const;
787
|
75 MethodData* _method_data;
76 MethodCounters* _method_counters;
77 AdapterHandlerEntry* _adapter;
78 int _vtable_index; // vtable index of this method (see VtableIndexFlag)
79 AccessFlags _access_flags; // Access flags
80 MethodFlags _flags;
81
82 u2 _intrinsic_id; // vmSymbols::intrinsic_id (0 == _none)
83
84 JFR_ONLY(DEFINE_TRACE_FLAG;)
85
86 #ifndef PRODUCT
87 int64_t _compiled_invocation_count;
88
89 Symbol* _name;
90 #endif
91 // Entry point for calling both from and to the interpreter.
92 address _i2i_entry; // All-args-on-stack calling convention
93 // Entry point for calling from compiled code, to compiled code if it exists
94 // or else the interpreter.
95 volatile address _from_compiled_entry; // Cache of: _code ? _code->entry_point() : _adapter->c2i_entry()
96 volatile address _from_compiled_inline_ro_entry; // Cache of: _code ? _code->verified_inline_ro_entry_point() : _adapter->c2i_inline_ro_entry()
97 volatile address _from_compiled_inline_entry; // Cache of: _code ? _code->verified_inline_entry_point() : _adapter->c2i_inline_entry()
98 // The entry point for calling both from and to compiled code is
99 // "_code->entry_point()". Because of tiered compilation and de-opt, this
100 // field can come and go. It can transition from null to not-null at any
101 // time (whenever a compile completes). It can transition from not-null to
102 // null only at safepoints (because of a de-opt).
103 nmethod* volatile _code; // Points to the corresponding piece of native code
104 volatile address _from_interpreted_entry; // Cache of _code ? _adapter->i2c_entry() : _i2i_entry
105
106 // Constructor
107 Method(ConstMethod* xconst, AccessFlags access_flags, Symbol* name);
108 public:
109
110 static Method* allocate(ClassLoaderData* loader_data,
111 int byte_code_size,
112 AccessFlags access_flags,
113 InlineTableSizes* sizes,
114 ConstMethod::MethodType method_type,
115 Symbol* name,
116 TRAPS);
117
118 // CDS and vtbl checking can create an empty Method to get vtbl pointer.
119 Method(){}
120
121 virtual bool is_method() const { return true; }
122
123 #if INCLUDE_CDS
124 void remove_unshareable_info();
125 void restore_unshareable_info(TRAPS);
126 static void restore_archived_method_handle_intrinsic(methodHandle m, 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 void make_adapters(const methodHandle& mh, TRAPS);
136 address from_compiled_entry() const;
137 address from_compiled_inline_ro_entry() const;
138 address from_compiled_inline_entry() const;
139 address from_interpreted_entry() const;
140
141 // access flag
142 AccessFlags access_flags() const { return _access_flags; }
143 void set_access_flags(AccessFlags flags) { _access_flags = flags; }
144
145 // name
146 Symbol* name() const { return constants()->symbol_at(name_index()); }
147 u2 name_index() const { return constMethod()->name_index(); }
148 void set_name_index(int index) { constMethod()->set_name_index(index); }
149
150 // signature
151 Symbol* signature() const { return constants()->symbol_at(signature_index()); }
152 u2 signature_index() const { return constMethod()->signature_index(); }
153 void set_signature_index(int index) { constMethod()->set_signature_index(index); }
154
155 // generics support
156 Symbol* generic_signature() const { int idx = generic_signature_index(); return ((idx != 0) ? constants()->symbol_at(idx) : nullptr); }
157 u2 generic_signature_index() const { return constMethod()->generic_signature_index(); }
158
347
348 bool was_executed_more_than(int n);
349 bool was_never_executed() { return !was_executed_more_than(0); }
350
351 static void build_profiling_method_data(const methodHandle& method, TRAPS);
352 static bool install_training_method_data(const methodHandle& method);
353 static MethodCounters* build_method_counters(Thread* current, Method* m);
354
355 inline int interpreter_invocation_count() const;
356
357 #ifndef PRODUCT
358 int64_t compiled_invocation_count() const { return _compiled_invocation_count;}
359 void set_compiled_invocation_count(int count) { _compiled_invocation_count = (int64_t)count; }
360 #else
361 // for PrintMethodData in a product build
362 int64_t compiled_invocation_count() const { return 0; }
363 #endif // not PRODUCT
364
365 // nmethod/verified compiler entry
366 address verified_code_entry();
367 address verified_inline_code_entry();
368 address verified_inline_ro_code_entry();
369 bool check_code() const; // Not inline to avoid circular ref
370 nmethod* code() const;
371
372 // Locks NMethodState_lock if not held.
373 void unlink_code(nmethod *compare);
374 // Locks NMethodState_lock if not held.
375 void unlink_code();
376
377 private:
378 // Either called with NMethodState_lock held or from constructor.
379 void clear_code();
380
381 void clear_method_data() {
382 _method_data = nullptr;
383 }
384
385 public:
386 static void set_code(const methodHandle& mh, nmethod* code);
387 void set_adapter_entry(AdapterHandlerEntry* adapter) {
388 _adapter = adapter;
389 }
390 void set_from_compiled_entry(address entry) {
391 _from_compiled_entry = entry;
392 }
393 void set_from_compiled_inline_ro_entry(address entry) {
394 _from_compiled_inline_ro_entry = entry;
395 }
396 void set_from_compiled_inline_entry(address entry) {
397 _from_compiled_inline_entry = entry;
398 }
399
400 address get_i2c_entry();
401 address get_c2i_entry();
402 address get_c2i_inline_entry();
403 address get_c2i_inline_ro_entry();
404 address get_c2i_unverified_entry();
405 address get_c2i_unverified_inline_entry();
406 address get_c2i_no_clinit_check_entry();
407 AdapterHandlerEntry* adapter() const {
408 return _adapter;
409 }
410 // setup entry points
411 void link_method(const methodHandle& method, TRAPS);
412 // clear entry points. Used by sharing code during dump time
413 void unlink_method() NOT_CDS_RETURN;
414 void remove_unshareable_flags() NOT_CDS_RETURN;
415
416 virtual void metaspace_pointers_do(MetaspaceClosure* iter);
417 virtual MetaspaceObj::Type type() const { return MethodType; }
418
419 // vtable index
420 enum VtableIndexFlag {
421 // Valid vtable indexes are non-negative (>= 0).
422 // These few negative values are used as sentinels.
423 itable_index_max = -10, // first itable index, growing downward
424 pending_itable_index = -9, // itable index will be assigned
425 invalid_vtable_index = -4, // distinct from any valid vtable index
499
500 // localvariable table
501 bool has_localvariable_table() const
502 { return constMethod()->has_localvariable_table(); }
503 u2 localvariable_table_length() const
504 { return constMethod()->localvariable_table_length(); }
505 LocalVariableTableElement* localvariable_table_start() const
506 { return constMethod()->localvariable_table_start(); }
507
508 bool has_linenumber_table() const
509 { return constMethod()->has_linenumber_table(); }
510 u_char* compressed_linenumber_table() const
511 { return constMethod()->compressed_linenumber_table(); }
512
513 // method holder (the Klass* holding this method)
514 InstanceKlass* method_holder() const { return constants()->pool_holder(); }
515
516 Symbol* klass_name() const; // returns the name of the method holder
517 BasicType result_type() const { return constMethod()->result_type(); }
518 bool is_returning_oop() const { BasicType r = result_type(); return is_reference_type(r); }
519 InlineKlass* returns_inline_type() const;
520
521 // Checked exceptions thrown by this method (resolved to mirrors)
522 objArrayHandle resolved_checked_exceptions(TRAPS) { return resolved_checked_exceptions_impl(this, THREAD); }
523
524 // Access flags
525 bool is_public() const { return access_flags().is_public(); }
526 bool is_private() const { return access_flags().is_private(); }
527 bool is_protected() const { return access_flags().is_protected(); }
528 bool is_package_private() const { return !is_public() && !is_private() && !is_protected(); }
529 bool is_static() const { return access_flags().is_static(); }
530 bool is_final() const { return access_flags().is_final(); }
531 bool is_synchronized() const { return access_flags().is_synchronized();}
532 bool is_native() const { return access_flags().is_native(); }
533 bool is_abstract() const { return access_flags().is_abstract(); }
534 bool is_synthetic() const { return access_flags().is_synthetic(); }
535
536 // returns true if contains only return operation
537 bool is_empty_method() const;
538
539 // returns true if this is a vanilla constructor
578 bool has_monitors() const { return is_synchronized() || has_monitor_bytecodes(); }
579
580 // monitor matching. This returns a conservative estimate of whether the monitorenter/monitorexit bytecodes
581 // properly nest in the method. It might return false, even though they actually nest properly, since the info.
582 // has not been computed yet.
583 bool guaranteed_monitor_matching() const { return monitor_matching(); }
584 void set_guaranteed_monitor_matching() { set_monitor_matching(); }
585
586 // returns true if the method is an accessor function (setter/getter).
587 bool is_accessor() const;
588
589 // returns true if the method is a getter
590 bool is_getter() const;
591
592 // returns true if the method is a setter
593 bool is_setter() const;
594
595 // returns true if the method does nothing but return a constant of primitive type
596 bool is_constant_getter() const;
597
598 // returns true if the method name is <clinit> and the method has
599 // valid static initializer flags.
600 bool is_class_initializer() const;
601
602 // returns true if the method name is <init>
603 bool is_object_constructor() const;
604
605 // returns true if the method name is wait0
606 bool is_object_wait0() const;
607
608 // compiled code support
609 // NOTE: code() is inherently racy as deopt can be clearing code
610 // simultaneously. Use with caution.
611 bool has_compiled_code() const;
612
613 bool needs_clinit_barrier() const;
614
615 // sizing
616 static int header_size() {
617 return align_up((int)sizeof(Method), wordSize) / wordSize;
618 }
619 static int size(bool is_native);
620 int size() const { return method_size(); }
621 void log_touched(Thread* current);
622 static void print_touched_methods(outputStream* out);
623
624 // interpreter support
625 static ByteSize const_offset() { return byte_offset_of(Method, _constMethod ); }
626 static ByteSize access_flags_offset() { return byte_offset_of(Method, _access_flags ); }
627 static ByteSize from_compiled_offset() { return byte_offset_of(Method, _from_compiled_entry); }
628 static ByteSize from_compiled_inline_offset() { return byte_offset_of(Method, _from_compiled_inline_entry); }
629 static ByteSize from_compiled_inline_ro_offset(){ return byte_offset_of(Method, _from_compiled_inline_ro_entry); }
630 static ByteSize code_offset() { return byte_offset_of(Method, _code); }
631 static ByteSize flags_offset() { return byte_offset_of(Method, _flags); }
632
633 static ByteSize method_counters_offset() {
634 return byte_offset_of(Method, _method_counters);
635 }
636 #ifndef PRODUCT
637 static ByteSize compiled_invocation_counter_offset() { return byte_offset_of(Method, _compiled_invocation_count); }
638 #endif // not PRODUCT
639 static ByteSize native_function_offset() { return in_ByteSize(sizeof(Method)); }
640 static ByteSize from_interpreted_offset() { return byte_offset_of(Method, _from_interpreted_entry ); }
641 static ByteSize interpreter_entry_offset() { return byte_offset_of(Method, _i2i_entry ); }
642 static ByteSize signature_handler_offset() { return in_ByteSize(sizeof(Method) + wordSize); }
643 static ByteSize itable_index_offset() { return byte_offset_of(Method, _vtable_index ); }
644
645 // for code generation
646 static ByteSize method_data_offset() { return byte_offset_of(Method, _method_data); }
647 static ByteSize intrinsic_id_offset() { return byte_offset_of(Method, _intrinsic_id); }
648 static int intrinsic_id_size_in_bytes() { return sizeof(u2); }
649
650 // Static methods that are used to implement member methods where an exposed this pointer
651 // is needed due to possible GCs
763 void set_jvmti_hide_events() { constMethod()->set_jvmti_hide_events(); }
764
765 bool jvmti_mount_transition() const { return constMethod()->jvmti_mount_transition(); }
766 void set_jvmti_mount_transition() { constMethod()->set_jvmti_mount_transition(); }
767
768 bool is_hidden() const { return constMethod()->is_hidden(); }
769 void set_is_hidden() { constMethod()->set_is_hidden(); }
770
771 bool is_scoped() const { return constMethod()->is_scoped(); }
772 void set_scoped() { constMethod()->set_is_scoped(); }
773
774 bool intrinsic_candidate() const { return constMethod()->intrinsic_candidate(); }
775 void set_intrinsic_candidate() { constMethod()->set_intrinsic_candidate(); }
776
777 bool has_injected_profile() const { return constMethod()->has_injected_profile(); }
778 void set_has_injected_profile() { constMethod()->set_has_injected_profile(); }
779
780 bool has_reserved_stack_access() const { return constMethod()->reserved_stack_access(); }
781 void set_has_reserved_stack_access() { constMethod()->set_reserved_stack_access(); }
782
783 bool is_scalarized_arg(int idx) const;
784 bool is_scalarized_buffer_arg(int idx) const;
785
786 bool c1_needs_stack_repair() const { return constMethod()->c1_needs_stack_repair(); }
787 void set_c1_needs_stack_repair() { constMethod()->set_c1_needs_stack_repair(); }
788
789 bool c2_needs_stack_repair() const { return constMethod()->c2_needs_stack_repair(); }
790 void set_c2_needs_stack_repair() { constMethod()->set_c2_needs_stack_repair(); }
791
792 bool mismatch() const { return constMethod()->mismatch(); }
793 void set_mismatch() { constMethod()->set_mismatch(); }
794
795 JFR_ONLY(DEFINE_TRACE_FLAG_ACCESSOR;)
796
797 ConstMethod::MethodType method_type() const {
798 return _constMethod->method_type();
799 }
800 bool is_overpass() const { return method_type() == ConstMethod::OVERPASS; }
801
802 // On-stack replacement support
803 bool has_osr_nmethod(int level, bool match_level) {
804 return method_holder()->lookup_osr_nmethod(this, InvocationEntryBci, level, match_level) != nullptr;
805 }
806
807 nmethod* lookup_osr_nmethod_for(int bci, int level, bool match_level) {
808 return method_holder()->lookup_osr_nmethod(this, bci, level, match_level);
809 }
810
811 // Find if klass for method is loaded
812 bool is_klass_loaded_by_klass_index(int klass_index) const;
813 bool is_klass_loaded(int refinfo_index, Bytecodes::Code bc, bool must_be_resolved = false) const;
814
|