hotspot/src/share/vm/libadt/vectset.cpp
changeset 7408 c04a5c989f26
parent 7397 5b173b4ca846
child 8319 aedb3bd871bc
equal deleted inserted replaced
7407:47339ceb8cb0 7408:c04a5c989f26
   247 {
   247 {
   248   // The cast is a virtual function that checks that "set" is a VectorSet.
   248   // The cast is a virtual function that checks that "set" is a VectorSet.
   249   const VectorSet &s = *(set.asVectorSet());
   249   const VectorSet &s = *(set.asVectorSet());
   250 
   250 
   251   // NOTE: The intersection is never any larger than the smallest set.
   251   // NOTE: The intersection is never any larger than the smallest set.
   252   register uint small = ((size<s.size)?size:s.size);
   252   register uint small_size = ((size<s.size)?size:s.size);
   253   register uint32 *u1 = data;   // Pointer to the destination data
   253   register uint32 *u1 = data;        // Pointer to the destination data
   254   register uint32 *u2 = s.data; // Pointer to the source data
   254   register uint32 *u2 = s.data;      // Pointer to the source data
   255   for( uint i=0; i<small; i++)  // For data in set
   255   for( uint i=0; i<small_size; i++)  // For data in set
   256     if( *u1++ & *u2++ )         // If any elements in common
   256     if( *u1++ & *u2++ )              // If any elements in common
   257       return 0;                 // Then not disjoint
   257       return 0;                      // Then not disjoint
   258   return 1;                     // Else disjoint
   258   return 1;                          // Else disjoint
   259 }
   259 }
   260 
   260 
   261 //------------------------------operator<--------------------------------------
   261 //------------------------------operator<--------------------------------------
   262 // Test for strict subset
   262 // Test for strict subset
   263 int VectorSet::operator < (const VectorSet &s) const
   263 int VectorSet::operator < (const VectorSet &s) const