Changeset 260799 in webkit


Ignore:
Timestamp:
Apr 27, 2020 5:16:51 PM (4 years ago)
Author:
Jason_Lawrence
Message:

Unreviewed, reverting r260772.

This commit caused tests to start failing internally.

Reverted changeset:

"OSR Exit compiler should know and print the exiting DFG
node's index"
https://bugs.webkit.org/show_bug.cgi?id=210998
https://trac.webkit.org/changeset/260772

Location:
trunk/Source/JavaScriptCore
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r260784 r260799  
     12020-04-27  Jason Lawrence  <lawrence.j@apple.com>
     2
     3        Unreviewed, reverting r260772.
     4
     5        This commit caused tests to start failing internally.
     6
     7        Reverted changeset:
     8
     9        "OSR Exit compiler should know and print the exiting DFG
     10        node's index"
     11        https://bugs.webkit.org/show_bug.cgi?id=210998
     12        https://trac.webkit.org/changeset/260772
     13
    1142020-04-27  Yusuke Suzuki  <ysuzuki@apple.com>
    215
  • trunk/Source/JavaScriptCore/dfg/DFGOSRExit.cpp

    r260772 r260799  
    5050
    5151OSRExit::OSRExit(ExitKind kind, JSValueSource jsValueSource, MethodOfGettingAValueProfile valueProfile, SpeculativeJIT* jit, unsigned streamIndex, unsigned recoveryIndex)
    52     : OSRExitBase(kind, jit->m_origin.forExit, jit->m_origin.semantic, jit->m_origin.wasHoisted, jit->m_currentNode ? jit->m_currentNode->index() : 0)
     52    : OSRExitBase(kind, jit->m_origin.forExit, jit->m_origin.semantic, jit->m_origin.wasHoisted)
    5353    , m_jsValueSource(jsValueSource)
    5454    , m_valueProfile(valueProfile)
     
    210210            shouldDumpDisassembly() || Options::verboseOSR() || Options::verboseDFGOSRExit(),
    211211            patchBuffer, OSRExitPtrTag,
    212             "DFG OSR exit #%u (D@%u, %s, %s) from %s, with operands = %s",
    213                 exitIndex, exit.m_dfgNodeIndex, toCString(exit.m_codeOrigin).data(),
     212            "DFG OSR exit #%u (%s, %s) from %s, with operands = %s",
     213                exitIndex, toCString(exit.m_codeOrigin).data(),
    214214                exitKindToString(exit.m_kind), toCString(*codeBlock).data(),
    215215                toCString(ignoringContext<DumpContext>(operands)).data());
  • trunk/Source/JavaScriptCore/dfg/DFGOSRExitBase.h

    r260772 r260799  
    4040
    4141struct OSRExitBase {
    42     OSRExitBase(ExitKind kind, CodeOrigin origin, CodeOrigin originForProfile, bool wasHoisted, uint32_t dfgNodeIndex)
     42    OSRExitBase(ExitKind kind, CodeOrigin origin, CodeOrigin originForProfile, bool wasHoisted)
    4343        : m_kind(kind)
    4444        , m_wasHoisted(wasHoisted)
    4545        , m_codeOrigin(origin)
    4646        , m_codeOriginForExitProfile(originForProfile)
    47         , m_dfgNodeIndex(dfgNodeIndex)
    4847    {
    4948        ASSERT(m_codeOrigin.isSet());
     
    5857    CodeOrigin m_codeOriginForExitProfile;
    5958    CallSiteIndex m_exceptionHandlerCallSiteIndex;
    60     uint32_t m_dfgNodeIndex;
    6159
    6260    ALWAYS_INLINE bool isExceptionHandler() const
  • trunk/Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp

    r260772 r260799  
    354354
    355355            m_node = nullptr;
    356             m_nodeIndexInGraph = 0;
    357356            m_origin = NodeOrigin(CodeOrigin(BytecodeIndex(0)), CodeOrigin(BytecodeIndex(0)), true);
    358357
     
    513512        m_state.beginBasicBlock(m_highBlock);
    514513       
    515         for (unsigned nodeIndex = 0; nodeIndex < m_highBlock->size(); ++nodeIndex) {
    516             if (!compileNode(nodeIndex))
     514        for (m_nodeIndex = 0; m_nodeIndex < m_highBlock->size(); ++m_nodeIndex) {
     515            if (!compileNode(m_nodeIndex))
    517516                break;
    518517        }
     
    677676       
    678677        m_node = m_highBlock->at(nodeIndex);
    679         m_nodeIndexInGraph = m_node->index();
    680678        m_origin = m_node->origin;
    681679        m_out.setOrigin(m_node);
     
    1082510823
    1082610824                RefPtr<OSRExitHandle> handle = descriptor->emitOSRExitLater(
    10827                     *state, UncountableInvalidation, origin, params, m_nodeIndexInGraph, 0);
     10825                    *state, UncountableInvalidation, origin, params);
    1082810826
    1082910827                RefPtr<JITCode> jitCode = state->jitCode.get();
     
    1389913897                    fpScratch.append(params.fpScratch(i));
    1390013898
    13901                 RefPtr<OSRExitHandle> handle = exitDescriptor->emitOSRExitLater(*state, BadType, origin, params, m_nodeIndexInGraph, osrExitArgumentOffset);
     13899                RefPtr<OSRExitHandle> handle = exitDescriptor->emitOSRExitLater(*state, BadType, origin, params, osrExitArgumentOffset);
    1390213900
    1390313901                SnippetParams domJITParams(*state, params, node, nullptr, WTFMove(regs), WTFMove(gpScratch), WTFMove(fpScratch));
     
    1858918587        bool willCatchException = m_graph.willCatchExceptionInMachineFrame(m_origin.forExit, opCatchOrigin, exceptionHandler);
    1859018588        if (!willCatchException)
    18591             return PatchpointExceptionHandle::defaultHandle(m_ftlState, m_nodeIndexInGraph);
     18589            return PatchpointExceptionHandle::defaultHandle(m_ftlState);
    1859218590
    1859318591        dataLogLnIf(verboseCompilationEnabled(), "    Patchpoint exception OSR exit #", m_ftlState.jitCode->osrExitDescriptors.size(), " with availability: ", availabilityMap());
     
    1861218610
    1861318611        return PatchpointExceptionHandle::create(
    18614             m_ftlState, exitDescriptor, origin, m_nodeIndexInGraph, offset, *exceptionHandler);
     18612            m_ftlState, exitDescriptor, origin, offset, *exceptionHandler);
    1861518613    }
    1861618614
     
    1869418692            [=] (CCallHelpers& jit, const B3::StackmapGenerationParams& params) {
    1869518693                exitDescriptor->emitOSRExit(
    18696                     *state, kind, origin, jit, params, m_nodeIndexInGraph, 0);
     18694                    *state, kind, origin, jit, params, 0);
    1869718695            });
    1869818696    }
     
    1918919187
    1919019188    NodeOrigin m_origin;
    19191     unsigned m_nodeIndexInGraph { 0 };
     19189    unsigned m_nodeIndex;
    1919219190    Node* m_node;
    1919319191
  • trunk/Source/JavaScriptCore/ftl/FTLOSRExit.cpp

    r260772 r260799  
    6666Ref<OSRExitHandle> OSRExitDescriptor::emitOSRExit(
    6767    State& state, ExitKind exitKind, const NodeOrigin& nodeOrigin, CCallHelpers& jit,
    68     const StackmapGenerationParams& params, uint32_t dfgNodeIndex, unsigned offset)
     68    const StackmapGenerationParams& params, unsigned offset)
    6969{
    7070    Ref<OSRExitHandle> handle =
    71         prepareOSRExitHandle(state, exitKind, nodeOrigin, params, dfgNodeIndex, offset);
     71        prepareOSRExitHandle(state, exitKind, nodeOrigin, params, offset);
    7272    handle->emitExitThunk(state, jit);
    7373    return handle;
     
    7676Ref<OSRExitHandle> OSRExitDescriptor::emitOSRExitLater(
    7777    State& state, ExitKind exitKind, const NodeOrigin& nodeOrigin,
    78     const StackmapGenerationParams& params, uint32_t dfgNodeIndex, unsigned offset)
     78    const StackmapGenerationParams& params, unsigned offset)
    7979{
    8080    RefPtr<OSRExitHandle> handle =
    81         prepareOSRExitHandle(state, exitKind, nodeOrigin, params, dfgNodeIndex, offset);
     81        prepareOSRExitHandle(state, exitKind, nodeOrigin, params, offset);
    8282    params.addLatePath(
    8383        [handle, &state] (CCallHelpers& jit) {
     
    8989Ref<OSRExitHandle> OSRExitDescriptor::prepareOSRExitHandle(
    9090    State& state, ExitKind exitKind, const NodeOrigin& nodeOrigin,
    91     const StackmapGenerationParams& params, uint32_t dfgNodeIndex, unsigned offset)
     91    const StackmapGenerationParams& params, unsigned offset)
    9292{
    9393    unsigned index = state.jitCode->osrExit.size();
    9494    OSRExit& exit = state.jitCode->osrExit.alloc(
    95         this, exitKind, nodeOrigin.forExit, nodeOrigin.semantic, nodeOrigin.wasHoisted, dfgNodeIndex);
     95        this, exitKind, nodeOrigin.forExit, nodeOrigin.semantic, nodeOrigin.wasHoisted);
    9696    Ref<OSRExitHandle> handle = adoptRef(*new OSRExitHandle(index, exit));
    9797    for (unsigned i = offset; i < params.size(); ++i)
     
    103103OSRExit::OSRExit(
    104104    OSRExitDescriptor* descriptor, ExitKind exitKind, CodeOrigin codeOrigin,
    105     CodeOrigin codeOriginForExitProfile, bool wasHoisted, uint32_t dfgNodeIndex)
    106     : OSRExitBase(exitKind, codeOrigin, codeOriginForExitProfile, wasHoisted, dfgNodeIndex)
     105    CodeOrigin codeOriginForExitProfile, bool wasHoisted)
     106    : OSRExitBase(exitKind, codeOrigin, codeOriginForExitProfile, wasHoisted)
    107107    , m_descriptor(descriptor)
    108108{
  • trunk/Source/JavaScriptCore/ftl/FTLOSRExit.h

    r260772 r260799  
    9393    Ref<OSRExitHandle> emitOSRExit(
    9494        State&, ExitKind, const DFG::NodeOrigin&, CCallHelpers&, const B3::StackmapGenerationParams&,
    95         uint32_t dfgNodeIndex, unsigned offset);
     95        unsigned offset = 0);
    9696
    9797    // In some cases you want an OSRExit to come into existence, but you don't want to emit it right now.
     
    105105    Ref<OSRExitHandle> emitOSRExitLater(
    106106        State&, ExitKind, const DFG::NodeOrigin&, const B3::StackmapGenerationParams&,
    107         uint32_t dfgNodeIndex, unsigned offset);
     107        unsigned offset = 0);
    108108
    109109private:
     
    113113    Ref<OSRExitHandle> prepareOSRExitHandle(
    114114        State&, ExitKind, const DFG::NodeOrigin&, const B3::StackmapGenerationParams&,
    115         uint32_t dfgNodeIndex, unsigned offset);
     115        unsigned offset = 0);
    116116};
    117117
    118118struct OSRExit : public DFG::OSRExitBase {
    119     OSRExit(OSRExitDescriptor*, ExitKind, CodeOrigin, CodeOrigin codeOriginForExitProfile, bool wasHoisted, uint32_t dfgNodeIndex);
     119    OSRExit(OSRExitDescriptor*, ExitKind, CodeOrigin, CodeOrigin codeOriginForExitProfile, bool wasHoisted);
    120120
    121121    OSRExitDescriptor* m_descriptor;
  • trunk/Source/JavaScriptCore/ftl/FTLOSRExitCompiler.cpp

    r260772 r260799  
    533533        shouldDumpDisassembly() || Options::verboseOSR() || Options::verboseFTLOSRExit(),
    534534        patchBuffer, OSRExitPtrTag,
    535         "FTL OSR exit #%u (D@%u, %s, %s) from %s, with operands = %s",
    536             exitID, exit.m_dfgNodeIndex, toCString(exit.m_codeOrigin).data(),
     535        "FTL OSR exit #%u (%s, %s) from %s, with operands = %s",
     536            exitID, toCString(exit.m_codeOrigin).data(),
    537537            exitKindToString(exit.m_kind), toCString(*codeBlock).data(),
    538538            toCString(ignoringContext<DumpContext>(exit.m_descriptor->m_values)).data()
  • trunk/Source/JavaScriptCore/ftl/FTLPatchpointExceptionHandle.cpp

    r260772 r260799  
    4040
    4141Ref<PatchpointExceptionHandle> PatchpointExceptionHandle::create(
    42     State& state, OSRExitDescriptor* descriptor, NodeOrigin origin, unsigned dfgNodeIndex, unsigned offset,
     42    State& state, OSRExitDescriptor* descriptor, NodeOrigin origin, unsigned offset,
    4343    const HandlerInfo& handler)
    4444{
    45     return adoptRef(*new PatchpointExceptionHandle(state, descriptor, origin, dfgNodeIndex, offset, handler));
     45    return adoptRef(*new PatchpointExceptionHandle(state, descriptor, origin, offset, handler));
    4646}
    4747
    48 RefPtr<PatchpointExceptionHandle> PatchpointExceptionHandle::defaultHandle(State& state, unsigned dfgNodeIndex)
     48RefPtr<PatchpointExceptionHandle> PatchpointExceptionHandle::defaultHandle(State& state)
    4949{
    5050    if (!state.defaultExceptionHandle) {
    5151        state.defaultExceptionHandle = adoptRef(
    52             new PatchpointExceptionHandle(state, nullptr, NodeOrigin(), dfgNodeIndex, 0, HandlerInfo()));
     52            new PatchpointExceptionHandle(state, nullptr, NodeOrigin(), 0, HandlerInfo()));
    5353    }
    5454    return state.defaultExceptionHandle;
     
    9999
    100100PatchpointExceptionHandle::PatchpointExceptionHandle(
    101     State& state, OSRExitDescriptor* descriptor, NodeOrigin origin, unsigned dfgNodeIndex, unsigned offset,
     101    State& state, OSRExitDescriptor* descriptor, NodeOrigin origin, unsigned offset,
    102102    const HandlerInfo& handler)
    103103    : m_state(state)
    104104    , m_descriptor(descriptor)
    105105    , m_origin(origin)
    106     , m_dfgNodeIndex(dfgNodeIndex)
    107106    , m_offset(offset)
    108107    , m_handler(handler)
     
    114113{
    115114    return m_descriptor->emitOSRExitLater(
    116         m_state, kind, m_origin, params, m_dfgNodeIndex, m_offset);
     115        m_state, kind, m_origin, params, m_offset);
    117116}
    118117
  • trunk/Source/JavaScriptCore/ftl/FTLPatchpointExceptionHandle.h

    r260772 r260799  
    5353public:
    5454    static Ref<PatchpointExceptionHandle> create(
    55         State&, OSRExitDescriptor*, DFG::NodeOrigin, unsigned dfgNodeIndex, unsigned offset, const HandlerInfo&);
     55        State&, OSRExitDescriptor*, DFG::NodeOrigin, unsigned offset, const HandlerInfo&);
    5656
    57     static RefPtr<PatchpointExceptionHandle> defaultHandle(State&, unsigned dfgNodeIndex);
     57    static RefPtr<PatchpointExceptionHandle> defaultHandle(State&);
    5858   
    5959    ~PatchpointExceptionHandle();
     
    8888private:
    8989    PatchpointExceptionHandle(
    90         State&, OSRExitDescriptor*, DFG::NodeOrigin, unsigned dfgNodeIndex, unsigned offset, const HandlerInfo&);
     90        State&, OSRExitDescriptor*, DFG::NodeOrigin, unsigned offset, const HandlerInfo&);
    9191
    9292    Ref<OSRExitHandle> createHandle(ExitKind, const B3::StackmapGenerationParams&);
     
    9595    OSRExitDescriptor* m_descriptor;
    9696    DFG::NodeOrigin m_origin;
    97     unsigned m_dfgNodeIndex;
    9897    unsigned m_offset;
    9998    HandlerInfo m_handler;
Note: See TracChangeset for help on using the changeset viewer.