< prev index next >

src/hotspot/share/oops/methodFlags.hpp

Print this page

 42    /* end of list */
 43 
 44 #define M_STATUS_DO(status)  \
 45    status(has_monitor_bytecodes       , 1 << 0)  /* Method contains monitorenter/monitorexit bytecodes */ \
 46    status(has_jsrs                    , 1 << 1) \
 47    status(is_old                      , 1 << 2) /* RedefineClasses() has replaced this method */ \
 48    status(is_obsolete                 , 1 << 3) /* RedefineClasses() has made method obsolete */ \
 49    status(is_deleted                  , 1 << 4) /* RedefineClasses() has deleted this method */  \
 50    status(is_prefixed_native          , 1 << 5) /* JVMTI has prefixed this native method */ \
 51    status(monitor_matching            , 1 << 6) /* True if we know that monitorenter/monitorexit bytecodes match */ \
 52    status(queued_for_compilation      , 1 << 7) \
 53    status(is_not_c2_compilable        , 1 << 8) \
 54    status(is_not_c1_compilable        , 1 << 9) \
 55    status(is_not_c2_osr_compilable    , 1 << 10) \
 56    status(force_inline                , 1 << 11) /* Annotations but also set/reset at runtime */ \
 57    status(dont_inline                 , 1 << 12) \
 58    status(has_loops_flag              , 1 << 13) /* Method has loops */ \
 59    status(has_loops_flag_init         , 1 << 14) /* The loop flag has been initialized */ \
 60    status(on_stack_flag               , 1 << 15) /* RedefineClasses support to keep Metadata from being cleaned */ \
 61    status(has_matching_directives     , 1 << 16) /* Temporary mark, used only when methods are to be refreshed to reflect a compiler directives update */ \


 62    /* end of list */
 63 
 64 #define M_STATUS_ENUM_NAME(name, value)    _misc_##name = value,
 65   enum {
 66     M_STATUS_DO(M_STATUS_ENUM_NAME)
 67   };
 68 #undef M_STATUS_ENUM_NAME
 69 
 70   // These flags are written during execution so require atomic stores
 71   u4 _status;
 72 
 73  public:
 74 
 75   MethodFlags() : _status(0) {}
 76 
 77   // Create getters and setters for the status values.
 78 #define M_STATUS_GET_SET(name, ignore)          \
 79   bool name() const { return (_status & _misc_##name) != 0; } \
 80   void set_##name(bool b) {         \
 81     if (b) { \
 82       atomic_set_bits(_misc_##name); \
 83     } else { \
 84       atomic_clear_bits(_misc_##name); \
 85     } \
 86   }
 87   M_STATUS_DO(M_STATUS_GET_SET)
 88 #undef M_STATUS_GET_SET
 89 


 90   int as_int() const { return _status; }
 91   void atomic_set_bits(u4 bits)   { Atomic::fetch_then_or(&_status, bits); }
 92   void atomic_clear_bits(u4 bits) { Atomic::fetch_then_and(&_status, ~bits); }
 93   void print_on(outputStream* st) const;
 94 };
 95 
 96 #endif // SHARE_OOPS_METHODFLAGS_HPP

 42    /* end of list */
 43 
 44 #define M_STATUS_DO(status)  \
 45    status(has_monitor_bytecodes       , 1 << 0)  /* Method contains monitorenter/monitorexit bytecodes */ \
 46    status(has_jsrs                    , 1 << 1) \
 47    status(is_old                      , 1 << 2) /* RedefineClasses() has replaced this method */ \
 48    status(is_obsolete                 , 1 << 3) /* RedefineClasses() has made method obsolete */ \
 49    status(is_deleted                  , 1 << 4) /* RedefineClasses() has deleted this method */  \
 50    status(is_prefixed_native          , 1 << 5) /* JVMTI has prefixed this native method */ \
 51    status(monitor_matching            , 1 << 6) /* True if we know that monitorenter/monitorexit bytecodes match */ \
 52    status(queued_for_compilation      , 1 << 7) \
 53    status(is_not_c2_compilable        , 1 << 8) \
 54    status(is_not_c1_compilable        , 1 << 9) \
 55    status(is_not_c2_osr_compilable    , 1 << 10) \
 56    status(force_inline                , 1 << 11) /* Annotations but also set/reset at runtime */ \
 57    status(dont_inline                 , 1 << 12) \
 58    status(has_loops_flag              , 1 << 13) /* Method has loops */ \
 59    status(has_loops_flag_init         , 1 << 14) /* The loop flag has been initialized */ \
 60    status(on_stack_flag               , 1 << 15) /* RedefineClasses support to keep Metadata from being cleaned */ \
 61    status(has_matching_directives     , 1 << 16) /* Temporary mark, used only when methods are to be refreshed to reflect a compiler directives update */ \
 62    status(has_scalarized_args         , 1 << 17) \
 63    status(has_scalarized_return       , 1 << 18) \
 64    /* end of list */
 65 
 66 #define M_STATUS_ENUM_NAME(name, value)    _misc_##name = value,
 67   enum {
 68     M_STATUS_DO(M_STATUS_ENUM_NAME)
 69   };
 70 #undef M_STATUS_ENUM_NAME
 71 
 72   // These flags are written during execution so require atomic stores
 73   u4 _status;
 74 
 75  public:
 76 
 77   MethodFlags() : _status(0) {}
 78 
 79   // Create getters and setters for the status values.
 80 #define M_STATUS_GET_SET(name, ignore)          \
 81   bool name() const { return (_status & _misc_##name) != 0; } \
 82   void set_##name(bool b) {         \
 83     if (b) { \
 84       atomic_set_bits(_misc_##name); \
 85     } else { \
 86       atomic_clear_bits(_misc_##name); \
 87     } \
 88   }
 89   M_STATUS_DO(M_STATUS_GET_SET)
 90 #undef M_STATUS_GET_SET
 91 
 92   static u4 has_scalarized_return_flag() { return _misc_has_scalarized_return; }
 93 
 94   int as_int() const { return _status; }
 95   void atomic_set_bits(u4 bits)   { Atomic::fetch_then_or(&_status, bits); }
 96   void atomic_clear_bits(u4 bits) { Atomic::fetch_then_and(&_status, ~bits); }
 97   void print_on(outputStream* st) const;
 98 };
 99 
100 #endif // SHARE_OOPS_METHODFLAGS_HPP
< prev index next >