41 #define CM_FLAGS_DO(flag) \
42 flag(has_linenumber_table , 1 << 0) \
43 flag(has_checked_exceptions , 1 << 1) \
44 flag(has_localvariable_table , 1 << 2) \
45 flag(has_exception_table , 1 << 3) \
46 flag(has_generic_signature , 1 << 4) \
47 flag(has_method_parameters , 1 << 5) \
48 flag(is_overpass , 1 << 6) \
49 flag(has_method_annotations , 1 << 7) \
50 flag(has_parameter_annotations , 1 << 8) \
51 flag(has_type_annotations , 1 << 9) \
52 flag(has_default_annotations , 1 << 10) \
53 flag(caller_sensitive , 1 << 11) \
54 flag(is_hidden , 1 << 12) \
55 flag(has_injected_profile , 1 << 13) \
56 flag(intrinsic_candidate , 1 << 14) \
57 flag(reserved_stack_access , 1 << 15) \
58 flag(is_scoped , 1 << 16) \
59 flag(changes_current_thread , 1 << 17) \
60 flag(jvmti_mount_transition , 1 << 18) \
61 /* end of list */
62
63 #define CM_FLAGS_ENUM_NAME(name, value) _misc_##name = value,
64 enum {
65 CM_FLAGS_DO(CM_FLAGS_ENUM_NAME)
66 };
67 #undef CM_FLAGS_ENUM_NAME
68
69 // These flags are write-once before the class is published and then read-only so don't require atomic updates.
70 u4 _flags;
71
72 public:
73
74 ConstMethodFlags() : _flags(0) {}
75
76 // Create getters and setters for the flag values.
77 #define CM_FLAGS_GET_SET(name, ignore) \
78 bool name() const { return (_flags & _misc_##name) != 0; } \
79 void set_##name() { \
80 _flags |= _misc_##name; \
81 }
82 CM_FLAGS_DO(CM_FLAGS_GET_SET)
83 #undef CM_FLAGS_GET_SET
84
85 int as_int() const { return _flags; }
86 void print_on(outputStream* st) const;
87 };
88
89 #endif // SHARE_OOPS_CONSTMETHODFLAGS_HPP
|
41 #define CM_FLAGS_DO(flag) \
42 flag(has_linenumber_table , 1 << 0) \
43 flag(has_checked_exceptions , 1 << 1) \
44 flag(has_localvariable_table , 1 << 2) \
45 flag(has_exception_table , 1 << 3) \
46 flag(has_generic_signature , 1 << 4) \
47 flag(has_method_parameters , 1 << 5) \
48 flag(is_overpass , 1 << 6) \
49 flag(has_method_annotations , 1 << 7) \
50 flag(has_parameter_annotations , 1 << 8) \
51 flag(has_type_annotations , 1 << 9) \
52 flag(has_default_annotations , 1 << 10) \
53 flag(caller_sensitive , 1 << 11) \
54 flag(is_hidden , 1 << 12) \
55 flag(has_injected_profile , 1 << 13) \
56 flag(intrinsic_candidate , 1 << 14) \
57 flag(reserved_stack_access , 1 << 15) \
58 flag(is_scoped , 1 << 16) \
59 flag(changes_current_thread , 1 << 17) \
60 flag(jvmti_mount_transition , 1 << 18) \
61 flag(has_scalarized_args , 1 << 19) \
62 flag(has_scalarized_return , 1 << 20) \
63 flag(c1_needs_stack_repair , 1 << 21) \
64 flag(c2_needs_stack_repair , 1 << 22) \
65 flag(mismatch , 1 << 23) \
66 /* end of list */
67
68 #define CM_FLAGS_ENUM_NAME(name, value) _misc_##name = value,
69 enum {
70 CM_FLAGS_DO(CM_FLAGS_ENUM_NAME)
71 };
72 #undef CM_FLAGS_ENUM_NAME
73
74 // These flags are write-once before the class is published and then read-only so don't require atomic updates.
75 u4 _flags;
76
77 public:
78
79 ConstMethodFlags() : _flags(0) {}
80
81 // Create getters and setters for the flag values.
82 #define CM_FLAGS_GET_SET(name, ignore) \
83 bool name() const { return (_flags & _misc_##name) != 0; } \
84 void set_##name() { \
85 _flags |= _misc_##name; \
86 }
87 CM_FLAGS_DO(CM_FLAGS_GET_SET)
88 #undef CM_FLAGS_GET_SET
89
90 static u4 has_scalarized_return_flag() {
91 return _misc_has_scalarized_return;
92 }
93
94 int as_int() const { return _flags; }
95 void print_on(outputStream* st) const;
96 };
97
98 #endif // SHARE_OOPS_CONSTMETHODFLAGS_HPP
|