Changeset 160492 in webkit


Ignore:
Timestamp:
Dec 12, 2013 10:31:47 AM (10 years ago)
Author:
weinig@apple.com
Message:

Replace uses of WTF::BitArray with std::bitset
https://bugs.webkit.org/show_bug.cgi?id=125642

Reviewed by Anders Carlsson.

../WebCore:

  • css/CSSParser.cpp:

(WebCore::filterProperties):
(WebCore::CSSParser::createStyleProperties):

  • css/StyleProperties.cpp:

(WebCore::StyleProperties::asText):

../WTF:

  • GNUmakefile.list.am:
  • WTF.vcxproj/WTF.vcxproj:
  • WTF.vcxproj/WTF.vcxproj.filters:
  • WTF.xcodeproj/project.pbxproj:
  • wtf/BitArray.h: Removed.
  • wtf/CMakeLists.txt:
Location:
trunk/Source
Files:
1 deleted
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WTF/ChangeLog

    r160462 r160492  
     12013-12-12  Sam Weinig  <sam@webkit.org>
     2
     3        Replace uses of WTF::BitArray with std::bitset
     4        https://bugs.webkit.org/show_bug.cgi?id=125642
     5
     6        Reviewed by Anders Carlsson.
     7
     8        * GNUmakefile.list.am:
     9        * WTF.vcxproj/WTF.vcxproj:
     10        * WTF.vcxproj/WTF.vcxproj.filters:
     11        * WTF.xcodeproj/project.pbxproj:
     12        * wtf/BitArray.h: Removed.
     13        * wtf/CMakeLists.txt:
     14
    1152013-12-11  David Kilzer  <ddkilzer@apple.com>
    216
  • trunk/Source/WTF/GNUmakefile.list.am

    r160346 r160492  
    1111    Source/WTF/wtf/Bag.h \
    1212    Source/WTF/wtf/BagToHashMap.h \
    13     Source/WTF/wtf/BitArray.h \
    1413    Source/WTF/wtf/BitVector.cpp \
    1514    Source/WTF/wtf/BitVector.h \
  • trunk/Source/WTF/WTF.vcxproj/WTF.vcxproj

    r160346 r160492  
    161161    <ClInclude Include="..\wtf\Bag.h" />
    162162    <ClInclude Include="..\wtf\BagToHashMap.h" />
    163     <ClInclude Include="..\wtf\BitArray.h" />
    164163    <ClInclude Include="..\wtf\Bitmap.h" />
    165164    <ClInclude Include="..\wtf\BitVector.h" />
  • trunk/Source/WTF/WTF.vcxproj/WTF.vcxproj.filters

    r160346 r160492  
    361361    </ClInclude>
    362362    <ClInclude Include="..\wtf\AVLTree.h">
    363       <Filter>wtf</Filter>
    364     </ClInclude>
    365     <ClInclude Include="..\wtf\BitArray.h">
    366363      <Filter>wtf</Filter>
    367364    </ClInclude>
  • trunk/Source/WTF/WTF.xcodeproj/project.pbxproj

    r160346 r160492  
    6666                2CDED0F418115C85004DBA70 /* RunLoop.h in Headers */ = {isa = PBXBuildFile; fileRef = 2CDED0F218115C85004DBA70 /* RunLoop.h */; };
    6767                44F66008171AFAE600E4AD19 /* EnumClass.h in Headers */ = {isa = PBXBuildFile; fileRef = 44F66007171AFAA900E4AD19 /* EnumClass.h */; };
    68                 4F0321BC156AA8D1006EBAF6 /* BitArray.h in Headers */ = {isa = PBXBuildFile; fileRef = 4F0321BB156AA8D1006EBAF6 /* BitArray.h */; };
    6968                7E29C33E15FFD79B00516D61 /* ObjcRuntimeExtras.h in Headers */ = {isa = PBXBuildFile; fileRef = 7E29C33D15FFD79B00516D61 /* ObjcRuntimeExtras.h */; };
    7069                8134013815B092FD001FF0B8 /* Base64.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8134013615B092FD001FF0B8 /* Base64.cpp */; };
     
    334333                44DEE74A152274BB00C6EC37 /* iOS.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = iOS.xcconfig; sourceTree = "<group>"; };
    335334                44F66007171AFAA900E4AD19 /* EnumClass.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = EnumClass.h; sourceTree = "<group>"; };
    336                 4F0321BB156AA8D1006EBAF6 /* BitArray.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BitArray.h; sourceTree = "<group>"; };
    337335                5D247B6214689B8600E78B76 /* libWTF.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libWTF.a; sourceTree = BUILT_PRODUCTS_DIR; };
    338336                5D247B6E14689C4700E78B76 /* Base.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Base.xcconfig; sourceTree = "<group>"; };
     
    656654                                0FB14E18180FA218009B6B4D /* Bag.h */,
    657655                                0FB14E1A1810E1DA009B6B4D /* BagToHashMap.h */,
    658                                 4F0321BB156AA8D1006EBAF6 /* BitArray.h */,
    659656                                A8A4725F151A825A004123FF /* Bitmap.h */,
    660657                                A8A47260151A825A004123FF /* BitVector.cpp */,
     
    965962                                A8A473AB151A825B004123FF /* bignum.h in Headers */,
    966963                                A8A47452151A825B004123FF /* BinarySemaphore.h in Headers */,
    967                                 4F0321BC156AA8D1006EBAF6 /* BitArray.h in Headers */,
    968964                                A8A4738A151A825B004123FF /* Bitmap.h in Headers */,
    969965                                A8A4738C151A825B004123FF /* BitVector.h in Headers */,
  • trunk/Source/WTF/wtf/CMakeLists.txt

    r160346 r160492  
    66    Bag.h
    77    BagToHashMap.h
    8     BitArray.h
    98    BitVector.h
    109    Bitmap.h
  • trunk/Source/WebCore/ChangeLog

    r160491 r160492  
     12013-12-12  Sam Weinig  <sam@webkit.org>
     2
     3        Replace uses of WTF::BitArray with std::bitset
     4        https://bugs.webkit.org/show_bug.cgi?id=125642
     5
     6        Reviewed by Anders Carlsson.
     7
     8        * css/CSSParser.cpp:
     9        (WebCore::filterProperties):
     10        (WebCore::CSSParser::createStyleProperties):
     11        * css/StyleProperties.cpp:
     12        (WebCore::StyleProperties::asText):
     13
    1142013-12-12  Alexey Proskuryakov  <ap@apple.com>
    215
  • trunk/Source/WebCore/css/CSSParser.cpp

    r159979 r160492  
    8585#include "WebKitCSSRegionRule.h"
    8686#include "WebKitCSSTransformValue.h"
     87#include <bitset>
    8788#include <limits.h>
    88 #include <wtf/BitArray.h>
    8989#include <wtf/HexNumber.h>
    9090#include <wtf/StdLibExtras.h>
     
    14801480}
    14811481
    1482 static inline void filterProperties(bool important, const CSSParser::ParsedPropertyVector& input, Vector<CSSProperty, 256>& output, size_t& unusedEntries, BitArray<numCSSProperties>& seenProperties)
     1482static inline void filterProperties(bool important, const CSSParser::ParsedPropertyVector& input, Vector<CSSProperty, 256>& output, size_t& unusedEntries, std::bitset<numCSSProperties>& seenProperties)
    14831483{
    14841484    // Add properties in reverse order so that highest priority definitions are reached first. Duplicate definitions can then be ignored when found.
     
    14881488            continue;
    14891489        const unsigned propertyIDIndex = property.id() - firstCSSProperty;
    1490         if (seenProperties.get(propertyIDIndex))
     1490        if (seenProperties.test(propertyIDIndex))
    14911491            continue;
    14921492        seenProperties.set(propertyIDIndex);
     
    14971497PassRef<ImmutableStyleProperties> CSSParser::createStyleProperties()
    14981498{
    1499     BitArray<numCSSProperties> seenProperties;
     1499    std::bitset<numCSSProperties> seenProperties;
    15001500    size_t unusedEntries = m_parsedProperties.size();
    15011501    Vector<CSSProperty, 256> results(unusedEntries);
  • trunk/Source/WebCore/css/StyleProperties.cpp

    r160010 r160492  
    3333#include "StylePropertyShorthand.h"
    3434#include "StyleSheetContents.h"
    35 #include <wtf/BitArray.h>
     35#include <bitset>
    3636#include <wtf/text/StringBuilder.h>
    3737
     
    780780    int repeatYPropertyIndex = -1;
    781781
    782     BitArray<numCSSProperties> shorthandPropertyUsed;
    783     BitArray<numCSSProperties> shorthandPropertyAppeared;
     782    std::bitset<numCSSProperties> shorthandPropertyUsed;
     783    std::bitset<numCSSProperties> shorthandPropertyAppeared;
    784784
    785785    unsigned size = propertyCount();
     
    825825
    826826            // FIXME: Deal with cases where only some of border-(top|right|bottom|left) are specified.
    827             if (!shorthandPropertyAppeared.get(CSSPropertyBorder - firstCSSProperty)) {
     827            if (!shorthandPropertyAppeared.test(CSSPropertyBorder - firstCSSProperty)) {
    828828                value = borderPropertyValue(ReturnNullOnUncommonValues);
    829829                if (value.isNull())
     
    831831                else
    832832                    shorthandPropertyID = CSSPropertyBorder;
    833             } else if (shorthandPropertyUsed.get(CSSPropertyBorder - firstCSSProperty))
     833            } else if (shorthandPropertyUsed.test(CSSPropertyBorder - firstCSSProperty))
    834834                shorthandPropertyID = CSSPropertyBorder;
    835835            if (!shorthandPropertyID)
     
    926926        unsigned shortPropertyIndex = shorthandPropertyID - firstCSSProperty;
    927927        if (shorthandPropertyID) {
    928             if (shorthandPropertyUsed.get(shortPropertyIndex))
     928            if (shorthandPropertyUsed.test(shortPropertyIndex))
    929929                continue;
    930             if (!shorthandPropertyAppeared.get(shortPropertyIndex) && value.isNull())
     930            if (!shorthandPropertyAppeared.test(shortPropertyIndex) && value.isNull())
    931931                value = getPropertyValue(shorthandPropertyID);
    932932            shorthandPropertyAppeared.set(shortPropertyIndex);
Note: See TracChangeset for help on using the changeset viewer.