Ignore:
Timestamp:
Feb 14, 2007, 3:42:44 PM (18 years ago)
Author:
andersca
Message:

Reviewed by Darin.

Add new canCompareWithMemcmp vector trait and use it to determine whether
operator== can use memcmp.


  • wtf/Vector.h: (WTF::): (WTF::VectorTypeOperations::compare): (WTF::operator==):
  • wtf/VectorTraits.h: (WTF::):
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/wtf/VectorTraits.h

    r17127 r19631  
    6161        static const bool canCopyWithMemcpy = false;
    6262        static const bool canFillWithMemset = false;
     63        static const bool canCompareWithMemcmp = false;
    6364    };
    6465
     
    7273        static const bool canCopyWithMemcpy = true;
    7374        static const bool canFillWithMemset = sizeof(T) == sizeof(char);
     75        static const bool canCompareWithMemcmp = true;
    7476    };
    7577
     
    8587        static const bool canCopyWithMemcpy = false;
    8688        static const bool canFillWithMemset = false;
     89        static const bool canCompareWithMemcmp = true;
    8790    };
    8891
     
    104107        static const bool canCopyWithMemcpy = FirstTraits::canCopyWithMemcpy && SecondTraits::canCopyWithMemcpy;
    105108        static const bool canFillWithMemset = false;
     109        static const bool canCompareWithMemcmp = FirstTraits::canCompareWithMemcmp && SecondTraits::canCompareWithMemcmp;
    106110    };
    107111
Note: See TracChangeset for help on using the changeset viewer.