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