Print this page


Split Close
Expand all
Collapse all
          --- old/src/share/vm/runtime/java.hpp
          +++ new/src/share/vm/runtime/java.hpp
↓ open down ↓ 84 lines elided ↑ open up ↑
  85   85    uint8_t _micro;
  86   86    uint8_t _update;
  87   87    uint8_t _special;
  88   88    uint8_t _build;
  89   89  
  90   90    // If partially initialized, the above fields are invalid and we know
  91   91    // that we're less than major version 6.
  92   92    bool _partially_initialized;
  93   93  
  94   94    bool _thread_park_blocker;
       95 +  bool _pending_list_uses_discovered_field;
  95   96    bool _post_vm_init_hook_enabled;
  96   97  
  97   98    bool is_valid() const {
  98   99      return (_major != 0 || _partially_initialized);
  99  100    }
 100  101  
 101  102    // initializes or partially initializes the _current static field
 102  103    static void initialize();
 103  104  
 104  105    // Completes initialization for a pre-JDK6 version.
↓ open down ↓ 2 lines elided ↑ open up ↑
 107  108  
 108  109   public:
 109  110  
 110  111    // Returns true if the the current version has only been partially initialized
 111  112    static bool is_partially_initialized() {
 112  113      return _current._partially_initialized;
 113  114    }
 114  115  
 115  116    JDK_Version() : _major(0), _minor(0), _micro(0), _update(0),
 116  117                    _special(0), _build(0), _partially_initialized(false),
 117      -                  _thread_park_blocker(false), _post_vm_init_hook_enabled(false) {}
      118 +                  _thread_park_blocker(false), _post_vm_init_hook_enabled(false),
      119 +                  _pending_list_uses_discovered_field(false) {}
 118  120  
 119  121    JDK_Version(uint8_t major, uint8_t minor = 0, uint8_t micro = 0,
 120  122                uint8_t update = 0, uint8_t special = 0, uint8_t build = 0,
 121      -              bool thread_park_blocker = false, bool post_vm_init_hook_enabled = false) :
      123 +              bool thread_park_blocker = false, bool post_vm_init_hook_enabled = false,
      124 +              bool pending_list_uses_discovered_field = false) :
 122  125        _major(major), _minor(minor), _micro(micro), _update(update),
 123  126        _special(special), _build(build), _partially_initialized(false),
 124  127        _thread_park_blocker(thread_park_blocker),
 125      -      _post_vm_init_hook_enabled(post_vm_init_hook_enabled) {}
      128 +      _post_vm_init_hook_enabled(post_vm_init_hook_enabled),
      129 +      _pending_list_uses_discovered_field(pending_list_uses_discovered_field) {}
 126  130  
 127  131    // Returns the current running JDK version
 128  132    static JDK_Version current() { return _current; }
 129  133  
 130  134    // Factory methods for convenience
 131  135    static JDK_Version jdk(uint8_t m) {
 132  136      return JDK_Version(m);
 133  137    }
 134  138  
 135  139    static JDK_Version jdk_update(uint8_t major, uint8_t update_number) {
↓ open down ↓ 6 lines elided ↑ open up ↑
 142  146    uint8_t update_version() const         { return _update; }
 143  147    uint8_t special_update_version() const { return _special; }
 144  148    uint8_t build_number() const           { return _build; }
 145  149  
 146  150    bool supports_thread_park_blocker() const {
 147  151      return _thread_park_blocker;
 148  152    }
 149  153    bool post_vm_init_hook_enabled() const {
 150  154      return _post_vm_init_hook_enabled;
 151  155    }
      156 +  // For compatibility wrt pre-4965777 JDK's
      157 +  bool pending_list_uses_discovered_field() const {
      158 +    return _pending_list_uses_discovered_field;
      159 +  }
 152  160  
 153  161    // Performs a full ordering comparison using all fields (update, build, etc.)
 154  162    int compare(const JDK_Version& other) const;
 155  163  
 156  164    /**
 157  165     * Performs comparison using only the major version, returning negative
 158  166     * if the major version of 'this' is less than the parameter, 0 if it is
 159  167     * equal, and a positive value if it is greater.
 160  168     */
 161  169    int compare_major(int version) const {
↓ open down ↓ 61 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX