Ignore:
Timestamp:
Aug 5, 2020, 12:12:00 PM (5 years ago)
Author:
[email protected]
Message:

Add assertions / inline capacity to checkpoint side state stacks
https://bugs.webkit.org/show_bug.cgi?id=215175

Reviewed by Saam Barati.

The inline capacity should hopefully avoid unneeded mallocs close to 100% of the time during our OSR exit ramp.

  • dfg/DFGOSRExit.cpp:

(JSC::DFG::OSRExit::compileExit):

  • ftl/FTLOSRExitCompiler.cpp:

(JSC::FTL::compileStub):

  • runtime/VM.cpp:

(JSC::VM::pushCheckpointOSRSideState):

  • runtime/VM.h:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/runtime/VM.cpp

    r265272 r265297  
    10951095#endif
    10961096    m_checkpointSideState.append(WTFMove(payload));
     1097
     1098#if ASSERT_ENABLED
     1099    auto bounds = StackBounds::currentThreadStackBounds();
     1100    void* previousCallFrame = bounds.end();
     1101    for (size_t i = m_checkpointSideState.size(); i--;) {
     1102        auto* callFrame = m_checkpointSideState[i]->associatedCallFrame;
     1103        if (!bounds.contains(callFrame))
     1104            break;
     1105        ASSERT(previousCallFrame < callFrame);
     1106        previousCallFrame = callFrame;
     1107    }
     1108#endif
    10971109}
    10981110
Note: See TracChangeset for help on using the changeset viewer.