Ignore:
Timestamp:
Dec 19, 2018, 8:41:11 PM (6 years ago)
Author:
Chris Dumez
Message:

wtf/Optional.h: move-constructor and move-assignment operator should disengage the value being moved from
https://bugs.webkit.org/show_bug.cgi?id=192728
<rdar://problem/46746779>

Reviewed by Geoff Garen.

Source/JavaScriptCore:

  • API/*:
  • Scripts/*:
  • assembler/*:
  • b3/*:
  • bytecode/*:
  • bytecompiler/*:
  • debugger/*:
  • dfg/*:
  • ftl/*:
  • heap/*:
  • inspector/*:
  • jit/*:
  • llint/*:
  • parser/*:
  • runtime/*:
  • tools/*:
  • wasm/*:
  • yarr/*:

Source/WebCore:

  • Modules/*:
  • animation/*:
  • bindings/*:
  • crypto/*:
  • css/*:
  • dom/*:
  • editing/*:
  • fileapi/*:
  • html/*:
  • inspector/*:
  • layout/*:
  • loader/*:
  • mathml/*:
  • page/*:
  • platform/*:
  • plugins/*:
  • rendering/*:
  • testing/*:
  • workers/*:
  • xml/*:

Source/WebCore/PAL:

  • pal/*:

Source/WebDriver:

  • :

Source/WebKit:

  • NetworkProcess/*:
  • Platform/*:
  • Scripts/*:
  • Shared/*:
  • UIProcess/*:
  • WebProcess/*:

Source/WebKitLegacy/mac:

  • DOM/*:
  • Plugins/*:
  • WebCoreSupport/*:
  • WebView/*:

Source/WebKitLegacy/win:

  • Plugins/*:
  • WebCoreSupport/*:

Source/WTF:

Update optional's move-constructor and move-assignment operator to disengage the value being moved from.
Rename to optional to Optional, make_optional() to makeOptional(), and move class from std to WTF namespace.

Based on patch by David Kilzer.

  • wtf/*:

Tools:

  • DumpRenderTree/*:
  • MiniBrowser/*:
  • TestRunnerShared/*:
  • TestWebKitAPI/*:
  • WebGPUAPIStructure/*:
  • WebKitTestRunner/*:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp

    r238543 r239427  
    695695    }
    696696    if (const auto* identifier = node.name()) {
    697         std::optional<uint32_t> optionalIndex = parseIndex(*identifier);
     697        Optional<uint32_t> optionalIndex = parseIndex(*identifier);
    698698        if (!optionalIndex) {
    699699            generator.emitDirectPutById(newObj, *identifier, value.get(), node.putType());
     
    20902090
    20912091    if (opcodeID == op_less || opcodeID == op_lesseq || opcodeID == op_greater || opcodeID == op_greatereq) {
    2092         auto isUInt32 = [&] (ExpressionNode* node) -> std::optional<UInt32Result> {
     2092        auto isUInt32 = [&] (ExpressionNode* node) -> Optional<UInt32Result> {
    20932093            if (node->isBinaryOpNode() && static_cast<BinaryOpNode*>(node)->opcodeID() == op_urshift)
    20942094                return UInt32Result::UInt32;
     
    20982098                    return UInt32Result::Constant;
    20992099            }
    2100             return std::nullopt;
     2100            return WTF::nullopt;
    21012101        };
    21022102        auto leftResult = isUInt32(m_expr1);
     
    43054305            RefPtr<RegisterID> propertyName;
    43064306            if (!target.propertyExpression) {
    4307                 std::optional<uint32_t> optionalIndex = parseIndex(target.propertyName);
     4307                Optional<uint32_t> optionalIndex = parseIndex(target.propertyName);
    43084308                if (!optionalIndex)
    43094309                    generator.emitGetById(temp.get(), rhs, target.propertyName);
Note: See TracChangeset for help on using the changeset viewer.