Ignore:
Timestamp:
Nov 3, 2021, 5:05:38 PM (4 years ago)
Author:
[email protected]
Message:

[JSC] Clean up StructureStubInfo initialization
https://bugs.webkit.org/show_bug.cgi?id=232652

Reviewed by Saam Barati.

Source/JavaScriptCore:

This patch enhances FixedVector to initialize it from the other containers.
So we can simplify baseline StructureStubInfo initialization.
Now, StructureStubInfo::initializeFromUnlinkedStructureStubInfo becomes
StructureStubInfo constructor taking const UnlinkedStructureStubInfo&.

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::setupWithUnlinkedBaselineCode):

  • bytecode/StructureStubInfo.cpp:

(JSC::StructureStubInfo::StructureStubInfo):
(JSC::StructureStubInfo::initializeFromUnlinkedStructureStubInfo): Deleted.

  • bytecode/StructureStubInfo.h:
  • jit/JIT.cpp:

(JSC::JIT::link):

Source/WebCore:

  • inspector/InspectorOverlay.cpp:

(WebCore::InspectorOverlay::fontForLayoutLabel):

Source/WTF:

  • wtf/FixedVector.h:

(WTF::FixedVector::FixedVector):
(WTF::FixedVector::operator=):

  • wtf/RefCountedArray.h:

(WTF::RefCountedArray::RefCountedArray):
(WTF::RefCountedArray::operator=):

  • wtf/SegmentedVector.h:
  • wtf/Vector.h:

(WTF::VectorTypeOperations::uninitializedCopy):

Tools:

  • TestWebKitAPI/Tests/WTF/FixedVector.cpp:

(TestWebKitAPI::TEST):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/jit/JIT.cpp

    r285078 r285246  
    10081008    m_jitCode = adoptRef(*new BaselineJITCode(result, withArityCheck));
    10091009
    1010     m_jitCode->m_unlinkedCalls = FixedVector<UnlinkedCallLinkInfo>(m_unlinkedCalls.size());
    1011     if (m_jitCode->m_unlinkedCalls.size())
    1012         std::move(m_unlinkedCalls.begin(), m_unlinkedCalls.end(), m_jitCode->m_unlinkedCalls.begin());
     1010    m_jitCode->m_unlinkedCalls = WTFMove(m_unlinkedCalls);
    10131011    m_jitCode->m_evalCallLinkInfos = WTFMove(m_evalCallLinkInfos);
    1014     m_jitCode->m_unlinkedStubInfos = FixedVector<UnlinkedStructureStubInfo>(m_unlinkedStubInfos.size());
    1015     if (m_jitCode->m_unlinkedStubInfos.size())
    1016         std::move(m_unlinkedStubInfos.begin(), m_unlinkedStubInfos.end(), m_jitCode->m_unlinkedStubInfos.begin());
     1012    m_jitCode->m_unlinkedStubInfos = WTFMove(m_unlinkedStubInfos);
    10171013    m_jitCode->m_switchJumpTables = WTFMove(m_switchJumpTables);
    10181014    m_jitCode->m_stringSwitchJumpTables = WTFMove(m_stringSwitchJumpTables);
Note: See TracChangeset for help on using the changeset viewer.