73 // note: can have vtables with >2**16 elements (because of inheritance) |
73 // note: can have vtables with >2**16 elements (because of inheritance) |
74 u2 _intrinsic_id; // vmSymbols::intrinsic_id (0 == _none) |
74 u2 _intrinsic_id; // vmSymbols::intrinsic_id (0 == _none) |
75 |
75 |
76 // Flags |
76 // Flags |
77 enum Flags { |
77 enum Flags { |
78 _jfr_towrite = 1 << 0, |
78 _caller_sensitive = 1 << 0, |
79 _caller_sensitive = 1 << 1, |
79 _force_inline = 1 << 1, |
80 _force_inline = 1 << 2, |
80 _dont_inline = 1 << 2, |
81 _dont_inline = 1 << 3, |
81 _hidden = 1 << 3, |
82 _hidden = 1 << 4, |
82 _has_injected_profile = 1 << 4, |
83 _has_injected_profile = 1 << 5, |
83 _running_emcp = 1 << 5, |
84 _running_emcp = 1 << 6, |
84 _intrinsic_candidate = 1 << 6, |
85 _intrinsic_candidate = 1 << 7, |
85 _reserved_stack_access = 1 << 7 |
86 _reserved_stack_access = 1 << 8 |
|
87 }; |
86 }; |
88 mutable u2 _flags; |
87 mutable u2 _flags; |
|
88 |
|
89 TRACE_DEFINE_FLAG; |
89 |
90 |
90 #ifndef PRODUCT |
91 #ifndef PRODUCT |
91 int _compiled_invocation_count; // Number of nmethod invocations so far (for perf. debugging) |
92 int _compiled_invocation_count; // Number of nmethod invocations so far (for perf. debugging) |
92 #endif |
93 #endif |
93 // Entry point for calling both from and to the interpreter. |
94 // Entry point for calling both from and to the interpreter. |
831 |
832 |
832 // Helper routines for intrinsic_id() and vmIntrinsics::method(). |
833 // Helper routines for intrinsic_id() and vmIntrinsics::method(). |
833 void init_intrinsic_id(); // updates from _none if a match |
834 void init_intrinsic_id(); // updates from _none if a match |
834 static vmSymbols::SID klass_id_for_intrinsics(const Klass* holder); |
835 static vmSymbols::SID klass_id_for_intrinsics(const Klass* holder); |
835 |
836 |
836 bool jfr_towrite() const { |
|
837 return (_flags & _jfr_towrite) != 0; |
|
838 } |
|
839 void set_jfr_towrite(bool x) const { |
|
840 _flags = x ? (_flags | _jfr_towrite) : (_flags & ~_jfr_towrite); |
|
841 } |
|
842 |
|
843 bool caller_sensitive() { |
837 bool caller_sensitive() { |
844 return (_flags & _caller_sensitive) != 0; |
838 return (_flags & _caller_sensitive) != 0; |
845 } |
839 } |
846 void set_caller_sensitive(bool x) { |
840 void set_caller_sensitive(bool x) { |
847 _flags = x ? (_flags | _caller_sensitive) : (_flags & ~_caller_sensitive); |
841 _flags = x ? (_flags | _caller_sensitive) : (_flags & ~_caller_sensitive); |
887 } |
881 } |
888 |
882 |
889 void set_has_reserved_stack_access(bool x) { |
883 void set_has_reserved_stack_access(bool x) { |
890 _flags = x ? (_flags | _reserved_stack_access) : (_flags & ~_reserved_stack_access); |
884 _flags = x ? (_flags | _reserved_stack_access) : (_flags & ~_reserved_stack_access); |
891 } |
885 } |
|
886 |
|
887 TRACE_DEFINE_FLAG_ACCESSOR; |
892 |
888 |
893 ConstMethod::MethodType method_type() const { |
889 ConstMethod::MethodType method_type() const { |
894 return _constMethod->method_type(); |
890 return _constMethod->method_type(); |
895 } |
891 } |
896 bool is_overpass() const { return method_type() == ConstMethod::OVERPASS; } |
892 bool is_overpass() const { return method_type() == ConstMethod::OVERPASS; } |