Changeset 260799 in webkit
- Timestamp:
- Apr 27, 2020 5:16:51 PM (4 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r260784 r260799 1 2020-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 1 14 2020-04-27 Yusuke Suzuki <ysuzuki@apple.com> 2 15 -
trunk/Source/JavaScriptCore/dfg/DFGOSRExit.cpp
r260772 r260799 50 50 51 51 OSRExit::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) 53 53 , m_jsValueSource(jsValueSource) 54 54 , m_valueProfile(valueProfile) … … 210 210 shouldDumpDisassembly() || Options::verboseOSR() || Options::verboseDFGOSRExit(), 211 211 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(), 214 214 exitKindToString(exit.m_kind), toCString(*codeBlock).data(), 215 215 toCString(ignoringContext<DumpContext>(operands)).data()); -
trunk/Source/JavaScriptCore/dfg/DFGOSRExitBase.h
r260772 r260799 40 40 41 41 struct OSRExitBase { 42 OSRExitBase(ExitKind kind, CodeOrigin origin, CodeOrigin originForProfile, bool wasHoisted , uint32_t dfgNodeIndex)42 OSRExitBase(ExitKind kind, CodeOrigin origin, CodeOrigin originForProfile, bool wasHoisted) 43 43 : m_kind(kind) 44 44 , m_wasHoisted(wasHoisted) 45 45 , m_codeOrigin(origin) 46 46 , m_codeOriginForExitProfile(originForProfile) 47 , m_dfgNodeIndex(dfgNodeIndex)48 47 { 49 48 ASSERT(m_codeOrigin.isSet()); … … 58 57 CodeOrigin m_codeOriginForExitProfile; 59 58 CallSiteIndex m_exceptionHandlerCallSiteIndex; 60 uint32_t m_dfgNodeIndex;61 59 62 60 ALWAYS_INLINE bool isExceptionHandler() const -
trunk/Source/JavaScriptCore/ftl/FTLLowerDFGToB3.cpp
r260772 r260799 354 354 355 355 m_node = nullptr; 356 m_nodeIndexInGraph = 0;357 356 m_origin = NodeOrigin(CodeOrigin(BytecodeIndex(0)), CodeOrigin(BytecodeIndex(0)), true); 358 357 … … 513 512 m_state.beginBasicBlock(m_highBlock); 514 513 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)) 517 516 break; 518 517 } … … 677 676 678 677 m_node = m_highBlock->at(nodeIndex); 679 m_nodeIndexInGraph = m_node->index();680 678 m_origin = m_node->origin; 681 679 m_out.setOrigin(m_node); … … 10825 10823 10826 10824 RefPtr<OSRExitHandle> handle = descriptor->emitOSRExitLater( 10827 *state, UncountableInvalidation, origin, params , m_nodeIndexInGraph, 0);10825 *state, UncountableInvalidation, origin, params); 10828 10826 10829 10827 RefPtr<JITCode> jitCode = state->jitCode.get(); … … 13899 13897 fpScratch.append(params.fpScratch(i)); 13900 13898 13901 RefPtr<OSRExitHandle> handle = exitDescriptor->emitOSRExitLater(*state, BadType, origin, params, m_nodeIndexInGraph,osrExitArgumentOffset);13899 RefPtr<OSRExitHandle> handle = exitDescriptor->emitOSRExitLater(*state, BadType, origin, params, osrExitArgumentOffset); 13902 13900 13903 13901 SnippetParams domJITParams(*state, params, node, nullptr, WTFMove(regs), WTFMove(gpScratch), WTFMove(fpScratch)); … … 18589 18587 bool willCatchException = m_graph.willCatchExceptionInMachineFrame(m_origin.forExit, opCatchOrigin, exceptionHandler); 18590 18588 if (!willCatchException) 18591 return PatchpointExceptionHandle::defaultHandle(m_ftlState , m_nodeIndexInGraph);18589 return PatchpointExceptionHandle::defaultHandle(m_ftlState); 18592 18590 18593 18591 dataLogLnIf(verboseCompilationEnabled(), " Patchpoint exception OSR exit #", m_ftlState.jitCode->osrExitDescriptors.size(), " with availability: ", availabilityMap()); … … 18612 18610 18613 18611 return PatchpointExceptionHandle::create( 18614 m_ftlState, exitDescriptor, origin, m_nodeIndexInGraph,offset, *exceptionHandler);18612 m_ftlState, exitDescriptor, origin, offset, *exceptionHandler); 18615 18613 } 18616 18614 … … 18694 18692 [=] (CCallHelpers& jit, const B3::StackmapGenerationParams& params) { 18695 18693 exitDescriptor->emitOSRExit( 18696 *state, kind, origin, jit, params, m_nodeIndexInGraph,0);18694 *state, kind, origin, jit, params, 0); 18697 18695 }); 18698 18696 } … … 19189 19187 19190 19188 NodeOrigin m_origin; 19191 unsigned m_nodeIndex InGraph { 0 };19189 unsigned m_nodeIndex; 19192 19190 Node* m_node; 19193 19191 -
trunk/Source/JavaScriptCore/ftl/FTLOSRExit.cpp
r260772 r260799 66 66 Ref<OSRExitHandle> OSRExitDescriptor::emitOSRExit( 67 67 State& state, ExitKind exitKind, const NodeOrigin& nodeOrigin, CCallHelpers& jit, 68 const StackmapGenerationParams& params, u int32_t dfgNodeIndex, unsigned offset)68 const StackmapGenerationParams& params, unsigned offset) 69 69 { 70 70 Ref<OSRExitHandle> handle = 71 prepareOSRExitHandle(state, exitKind, nodeOrigin, params, dfgNodeIndex,offset);71 prepareOSRExitHandle(state, exitKind, nodeOrigin, params, offset); 72 72 handle->emitExitThunk(state, jit); 73 73 return handle; … … 76 76 Ref<OSRExitHandle> OSRExitDescriptor::emitOSRExitLater( 77 77 State& state, ExitKind exitKind, const NodeOrigin& nodeOrigin, 78 const StackmapGenerationParams& params, u int32_t dfgNodeIndex, unsigned offset)78 const StackmapGenerationParams& params, unsigned offset) 79 79 { 80 80 RefPtr<OSRExitHandle> handle = 81 prepareOSRExitHandle(state, exitKind, nodeOrigin, params, dfgNodeIndex,offset);81 prepareOSRExitHandle(state, exitKind, nodeOrigin, params, offset); 82 82 params.addLatePath( 83 83 [handle, &state] (CCallHelpers& jit) { … … 89 89 Ref<OSRExitHandle> OSRExitDescriptor::prepareOSRExitHandle( 90 90 State& state, ExitKind exitKind, const NodeOrigin& nodeOrigin, 91 const StackmapGenerationParams& params, u int32_t dfgNodeIndex, unsigned offset)91 const StackmapGenerationParams& params, unsigned offset) 92 92 { 93 93 unsigned index = state.jitCode->osrExit.size(); 94 94 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); 96 96 Ref<OSRExitHandle> handle = adoptRef(*new OSRExitHandle(index, exit)); 97 97 for (unsigned i = offset; i < params.size(); ++i) … … 103 103 OSRExit::OSRExit( 104 104 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) 107 107 , m_descriptor(descriptor) 108 108 { -
trunk/Source/JavaScriptCore/ftl/FTLOSRExit.h
r260772 r260799 93 93 Ref<OSRExitHandle> emitOSRExit( 94 94 State&, ExitKind, const DFG::NodeOrigin&, CCallHelpers&, const B3::StackmapGenerationParams&, 95 u int32_t dfgNodeIndex, unsigned offset);95 unsigned offset = 0); 96 96 97 97 // In some cases you want an OSRExit to come into existence, but you don't want to emit it right now. … … 105 105 Ref<OSRExitHandle> emitOSRExitLater( 106 106 State&, ExitKind, const DFG::NodeOrigin&, const B3::StackmapGenerationParams&, 107 u int32_t dfgNodeIndex, unsigned offset);107 unsigned offset = 0); 108 108 109 109 private: … … 113 113 Ref<OSRExitHandle> prepareOSRExitHandle( 114 114 State&, ExitKind, const DFG::NodeOrigin&, const B3::StackmapGenerationParams&, 115 u int32_t dfgNodeIndex, unsigned offset);115 unsigned offset = 0); 116 116 }; 117 117 118 118 struct 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); 120 120 121 121 OSRExitDescriptor* m_descriptor; -
trunk/Source/JavaScriptCore/ftl/FTLOSRExitCompiler.cpp
r260772 r260799 533 533 shouldDumpDisassembly() || Options::verboseOSR() || Options::verboseFTLOSRExit(), 534 534 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(), 537 537 exitKindToString(exit.m_kind), toCString(*codeBlock).data(), 538 538 toCString(ignoringContext<DumpContext>(exit.m_descriptor->m_values)).data() -
trunk/Source/JavaScriptCore/ftl/FTLPatchpointExceptionHandle.cpp
r260772 r260799 40 40 41 41 Ref<PatchpointExceptionHandle> PatchpointExceptionHandle::create( 42 State& state, OSRExitDescriptor* descriptor, NodeOrigin origin, unsigned dfgNodeIndex, unsignedoffset,42 State& state, OSRExitDescriptor* descriptor, NodeOrigin origin, unsigned offset, 43 43 const HandlerInfo& handler) 44 44 { 45 return adoptRef(*new PatchpointExceptionHandle(state, descriptor, origin, dfgNodeIndex,offset, handler));45 return adoptRef(*new PatchpointExceptionHandle(state, descriptor, origin, offset, handler)); 46 46 } 47 47 48 RefPtr<PatchpointExceptionHandle> PatchpointExceptionHandle::defaultHandle(State& state , unsigned dfgNodeIndex)48 RefPtr<PatchpointExceptionHandle> PatchpointExceptionHandle::defaultHandle(State& state) 49 49 { 50 50 if (!state.defaultExceptionHandle) { 51 51 state.defaultExceptionHandle = adoptRef( 52 new PatchpointExceptionHandle(state, nullptr, NodeOrigin(), dfgNodeIndex,0, HandlerInfo()));52 new PatchpointExceptionHandle(state, nullptr, NodeOrigin(), 0, HandlerInfo())); 53 53 } 54 54 return state.defaultExceptionHandle; … … 99 99 100 100 PatchpointExceptionHandle::PatchpointExceptionHandle( 101 State& state, OSRExitDescriptor* descriptor, NodeOrigin origin, unsigned dfgNodeIndex, unsignedoffset,101 State& state, OSRExitDescriptor* descriptor, NodeOrigin origin, unsigned offset, 102 102 const HandlerInfo& handler) 103 103 : m_state(state) 104 104 , m_descriptor(descriptor) 105 105 , m_origin(origin) 106 , m_dfgNodeIndex(dfgNodeIndex)107 106 , m_offset(offset) 108 107 , m_handler(handler) … … 114 113 { 115 114 return m_descriptor->emitOSRExitLater( 116 m_state, kind, m_origin, params, m_ dfgNodeIndex, m_offset);115 m_state, kind, m_origin, params, m_offset); 117 116 } 118 117 -
trunk/Source/JavaScriptCore/ftl/FTLPatchpointExceptionHandle.h
r260772 r260799 53 53 public: 54 54 static Ref<PatchpointExceptionHandle> create( 55 State&, OSRExitDescriptor*, DFG::NodeOrigin, unsigned dfgNodeIndex, unsignedoffset, const HandlerInfo&);55 State&, OSRExitDescriptor*, DFG::NodeOrigin, unsigned offset, const HandlerInfo&); 56 56 57 static RefPtr<PatchpointExceptionHandle> defaultHandle(State& , unsigned dfgNodeIndex);57 static RefPtr<PatchpointExceptionHandle> defaultHandle(State&); 58 58 59 59 ~PatchpointExceptionHandle(); … … 88 88 private: 89 89 PatchpointExceptionHandle( 90 State&, OSRExitDescriptor*, DFG::NodeOrigin, unsigned dfgNodeIndex, unsignedoffset, const HandlerInfo&);90 State&, OSRExitDescriptor*, DFG::NodeOrigin, unsigned offset, const HandlerInfo&); 91 91 92 92 Ref<OSRExitHandle> createHandle(ExitKind, const B3::StackmapGenerationParams&); … … 95 95 OSRExitDescriptor* m_descriptor; 96 96 DFG::NodeOrigin m_origin; 97 unsigned m_dfgNodeIndex;98 97 unsigned m_offset; 99 98 HandlerInfo m_handler;
Note: See TracChangeset
for help on using the changeset viewer.