src/hotspot/share/libadt/vectset.cpp
changeset 51050 96ea37459ca7
parent 49449 ef5d5d343e2a
child 53546 63eb7e38ce84
--- a/src/hotspot/share/libadt/vectset.cpp	Thu Jul 12 10:41:44 2018 -0400
+++ b/src/hotspot/share/libadt/vectset.cpp	Thu Jul 12 17:29:48 2018 -0700
@@ -101,8 +101,8 @@
 // Insert a member into an existing Set.
 Set &VectorSet::operator <<= (uint elem)
 {
-  register uint word = elem >> 5;            // Get the longword offset
-  register uint32_t mask = 1L << (elem & 31);  // Get bit mask
+  uint word = elem >> 5;            // Get the longword offset
+  uint32_t mask = 1L << (elem & 31);  // Get bit mask
 
   if( word >= size )            // Need to grow set?
     grow(elem+1);               // Then grow it
@@ -114,10 +114,10 @@
 // Delete a member from an existing Set.
 Set &VectorSet::operator >>= (uint elem)
 {
-  register uint word = elem >> 5; // Get the longword offset
+  uint word = elem >> 5;          // Get the longword offset
   if( word >= size )              // Beyond the last?
     return *this;                 // Then it's clear & return clear
-  register uint32_t mask = 1L << (elem & 31);     // Get bit mask
+  uint32_t mask = 1L << (elem & 31);     // Get bit mask
   data[word] &= ~mask;            // Clear bit
   return *this;
 }
@@ -128,8 +128,8 @@
 {
   // NOTE: The intersection is never any larger than the smallest set.
   if( s.size < size ) size = s.size; // Get smaller size
-  register uint32_t *u1 = data;   // Pointer to the destination data
-  register uint32_t *u2 = s.data; // Pointer to the source data
+  uint32_t *u1 = data;          // Pointer to the destination data
+  uint32_t *u2 = s.data;        // Pointer to the source data
   for( uint i=0; i<size; i++)   // For data in set
     *u1++ &= *u2++;             // Copy and AND longwords
   return *this;                 // Return set
@@ -147,9 +147,9 @@
 VectorSet &VectorSet::operator |= (const VectorSet &s)
 {
   // This many words must be unioned
-  register uint cnt = ((size<s.size)?size:s.size);
-  register uint32_t *u1 = data;   // Pointer to the destination data
-  register uint32_t *u2 = s.data; // Pointer to the source data
+  uint cnt = ((size<s.size)?size:s.size);
+  uint32_t *u1 = data;          // Pointer to the destination data
+  uint32_t *u2 = s.data;        // Pointer to the source data
   for( uint i=0; i<cnt; i++)    // Copy and OR the two sets
     *u1++ |= *u2++;
   if( size < s.size ) {         // Is set 2 larger than set 1?
@@ -172,9 +172,9 @@
 VectorSet &VectorSet::operator -= (const VectorSet &s)
 {
   // This many words must be unioned
-  register uint cnt = ((size<s.size)?size:s.size);
-  register uint32_t *u1 = data;   // Pointer to the destination data
-  register uint32_t *u2 = s.data; // Pointer to the source data
+  uint cnt = ((size<s.size)?size:s.size);
+  uint32_t *u1 = data;          // Pointer to the destination data
+  uint32_t *u2 = s.data;        // Pointer to the source data
   for( uint i=0; i<cnt; i++ )   // For data in set
     *u1++ &= ~(*u2++);          // A <-- A & ~B  with longwords
   return *this;                 // Return new set
@@ -195,17 +195,17 @@
 //        1X --  B is a subset of A
 int VectorSet::compare (const VectorSet &s) const
 {
-  register uint32_t *u1 = data;   // Pointer to the destination data
-  register uint32_t *u2 = s.data; // Pointer to the source data
-  register uint32_t AnotB = 0, BnotA = 0;
+  uint32_t *u1 = data;          // Pointer to the destination data
+  uint32_t *u2 = s.data;        // Pointer to the source data
+  uint32_t AnotB = 0, BnotA = 0;
   // This many words must be unioned
-  register uint cnt = ((size<s.size)?size:s.size);
+  uint cnt = ((size<s.size)?size:s.size);
 
   // Get bits for both sets
   uint i;                       // Exit value of loop
   for( i=0; i<cnt; i++ ) {      // For data in BOTH sets
-    register uint32_t A = *u1++;  // Data from one guy
-    register uint32_t B = *u2++;  // Data from other guy
+    uint32_t A = *u1++;         // Data from one guy
+    uint32_t B = *u2++;         // Data from other guy
     AnotB |= (A & ~B);          // Compute bits in A not B
     BnotA |= (B & ~A);          // Compute bits in B not A
   }
@@ -245,9 +245,9 @@
   const VectorSet &s = *(set.asVectorSet());
 
   // NOTE: The intersection is never any larger than the smallest set.
-  register uint small_size = ((size<s.size)?size:s.size);
-  register uint32_t *u1 = data;        // Pointer to the destination data
-  register uint32_t *u2 = s.data;      // Pointer to the source data
+  uint small_size = ((size<s.size)?size:s.size);
+  uint32_t *u1 = data;               // Pointer to the destination data
+  uint32_t *u2 = s.data;             // Pointer to the source data
   for( uint i=0; i<small_size; i++)  // For data in set
     if( *u1++ & *u2++ )              // If any elements in common
       return 0;                      // Then not disjoint
@@ -286,11 +286,11 @@
 // Test for membership.  A Zero/Non-Zero value is returned!
 int VectorSet::operator[](uint elem) const
 {
-  register uint word = elem >> 5; // Get the longword offset
-  if( word >= size )              // Beyond the last?
-    return 0;                     // Then it's clear
-  register uint32_t mask = 1L << (elem & 31);  // Get bit mask
-  return ((data[word] & mask))!=0;           // Return the sense of the bit
+  uint word = elem >> 5;              // Get the longword offset
+  if( word >= size )                  // Beyond the last?
+    return 0;                         // Then it's clear
+  uint32_t mask = 1L << (elem & 31);  // Get bit mask
+  return ((data[word] & mask))!=0;    // Return the sense of the bit
 }
 
 //------------------------------getelem----------------------------------------