< prev index next >

src/hotspot/share/oops/methodData.hpp

Print this page

        

@@ -556,24 +556,30 @@
   virtual int cell_count() const {
     return static_cell_count();
   }
 
   // Direct accessor
-  uint count() const {
-    return uint_at(count_off);
+  int count() const {
+    intptr_t raw_data = intptr_at(count_off);
+    if (raw_data > max_jint) {
+      raw_data = max_jint;
+    } else if (raw_data < min_jint) {
+      raw_data = min_jint;
+    }
+    return int(raw_data);
   }
 
   // Code generation support
   static ByteSize count_offset() {
     return cell_offset(count_off);
   }
   static ByteSize counter_data_size() {
     return cell_offset(counter_cell_count);
   }
 
-  void set_count(uint count) {
-    set_uint_at(count_off, count);
+  void set_count(int count) {
+    set_int_at(count_off, count);
   }
 
   void print_data_on(outputStream* st, const char* extra = NULL) const;
 };
 
< prev index next >