Ignore:
Timestamp:
May 27, 2021, 6:26:23 PM (4 years ago)
Author:
Darin Adler
Message:

Next step toward using std::optional directly instead of through WTF::Optional typedef
https://bugs.webkit.org/show_bug.cgi?id=226280

Reviewed by Chris Dumez.

Source/JavaScriptCore:

  • <many files>: Accept the renaming done by do-webcore-rename.
  • yarr/YarrSyntaxChecker.cpp: Since the style checker complained about this file,

tweaked style to make it happy after the renaming done by do-webcore-rename, and
also hand-updated Optional to std::optional as long as we were touching it.

Source/WebCore:

  • <many files>: Accept the renaming done by do-webcore-rename.
  • Modules/webauthn/fido/DeviceRequestConverter.h: Since style checker complained

about the names of some arguments, fixed them, and also hand-updated Optional to
std::optional as long as we were touching it.

  • loader/EmptyClients.cpp: Since style checker complained about the mix of

WEBCORE_EXPORT and inlined functions, moved them out of line, and
also hand-updated Optional to std::optional as long as we were touching it.
Also removed is<EmptyFrameLoaderClient>().

  • loader/EmptyFrameLoaderClient.h: Ditto.

Source/WebCore/PAL:

  • <many files>: Accept the renaming done by do-webcore-rename.

Source/WebDriver:

  • <many files>: Accept the renaming done by do-webcore-rename.

Source/WebKit:

  • <many files>: Accept the renaming done by do-webcore-rename.

Source/WebKitLegacy:

  • Storage/StorageTracker.cpp:

(WebKit::StorageTracker::diskUsageForOrigin): Accept the renaming done by do-webcore-rename.

Source/WebKitLegacy/mac:

  • <many files>: Accept the renaming done by do-webcore-rename.

Source/WebKitLegacy/win:

  • <many files>: Accept the renaming done by do-webcore-rename.

Source/WTF:

  • <many files>: Accept the renaming done by do-webcore-rename.
  • wtf/Optional.h: Remove WTF::nullopt_t and WTF::makeOptional.
  • wtf/URLHelpers.cpp:

(WTF::URLHelpers::mapHostName): Convert from nullopt to std::nullopt.

Tools:

  • Scripts/do-webcore-rename: Use script to rename valueOr, WTF::nullopt, WTF::nullopt_t,

WTF::Optional, WTF::makeOptional, and makeOptional. Other renamings can't necessarily
be done by the script and so will be done in later passes.

  • <many files>: Accept the renaming done by do-webcore-rename.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/parser/Lexer.cpp

    r272570 r278185  
    15401540        if (m_current == '_') {
    15411541            if (UNLIKELY(!isASCIIHexDigit(peek(1))))
    1542                 return WTF::nullopt;
     1542                return std::nullopt;
    15431543
    15441544            shift();
     
    15671567        if (m_current == '_') {
    15681568            if (UNLIKELY(!isASCIIHexDigit(peek(1))))
    1569                 return WTF::nullopt;
     1569                return std::nullopt;
    15701570
    15711571            shift();
     
    15981598        if (m_current == '_') {
    15991599            if (UNLIKELY(!isASCIIBinaryDigit(peek(1))))
    1600                 return WTF::nullopt;
     1600                return std::nullopt;
    16011601
    16021602            shift();
     
    16181618        if (m_current == '_') {
    16191619            if (UNLIKELY(!isASCIIBinaryDigit(peek(1))))
    1620                 return WTF::nullopt;
     1620                return std::nullopt;
    16211621
    16221622            shift();
     
    16311631
    16321632    if (isASCIIDigit(m_current))
    1633         return WTF::nullopt;
     1633        return std::nullopt;
    16341634
    16351635    return NumberParseResult { parseIntOverflow(m_buffer8.data(), m_buffer8.size(), 2) };
     
    16541654        if (m_current == '_') {
    16551655            if (UNLIKELY(!isASCIIOctalDigit(peek(1)) || isLegacyLiteral))
    1656                 return WTF::nullopt;
     1656                return std::nullopt;
    16571657
    16581658            shift();
     
    16741674        if (m_current == '_') {
    16751675            if (UNLIKELY(!isASCIIOctalDigit(peek(1)) || isLegacyLiteral))
    1676                 return WTF::nullopt;
     1676                return std::nullopt;
    16771677
    16781678            shift();
     
    16871687
    16881688    if (isASCIIDigit(m_current))
    1689         return WTF::nullopt;
     1689        return std::nullopt;
    16901690
    16911691    return NumberParseResult { parseIntOverflow(m_buffer8.data(), m_buffer8.size(), 8) };
     
    17131713            if (m_current == '_') {
    17141714                if (UNLIKELY(!isASCIIDigit(peek(1)) || isLegacyLiteral))
    1715                     return WTF::nullopt;
     1715                    return std::nullopt;
    17161716
    17171717                shift();
     
    17341734        if (m_current == '_') {
    17351735            if (UNLIKELY(!isASCIIDigit(peek(1)) || isLegacyLiteral))
    1736                 return WTF::nullopt;
     1736                return std::nullopt;
    17371737
    17381738            shift();
     
    17461746        return NumberParseResult { makeIdentifier(m_buffer8.data(), m_buffer8.size()) };
    17471747
    1748     return WTF::nullopt;
     1748    return std::nullopt;
    17491749}
    17501750
Note: See TracChangeset for help on using the changeset viewer.