Changeset 179392 in webkit for trunk/Source/JavaScriptCore/bytecode/CallLinkInfo.cpp
- Timestamp:
- Jan 29, 2015, 8:28:36 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/bytecode/CallLinkInfo.cpp
r179357 r179392 30 30 #include "DFGThunks.h" 31 31 #include "JSCInlines.h" 32 #include "Repatch.h"33 32 #include "RepatchBuffer.h" 34 #include <wtf/ListDump.h>35 33 #include <wtf/NeverDestroyed.h> 36 34 … … 40 38 void CallLinkInfo::unlink(RepatchBuffer& repatchBuffer) 41 39 { 42 if (!isLinked()) { 43 // We could be called even if we're not linked anymore because of how polymorphic calls 44 // work. Each callsite within the polymorphic call stub may separately ask us to unlink(). 45 RELEASE_ASSERT(!isOnList()); 46 return; 47 } 40 ASSERT(isLinked()); 48 41 49 unlinkFor( 50 repatchBuffer, *this, 51 (callType == Construct || callType == ConstructVarargs)? CodeForConstruct : CodeForCall, 52 isFTL ? MustPreserveRegisters : RegisterPreservationNotRequired); 42 if (Options::showDisassembly()) 43 dataLog("Unlinking call from ", callReturnLocation, " to ", pointerDump(repatchBuffer.codeBlock()), "\n"); 44 45 repatchBuffer.revertJumpReplacementToBranchPtrWithPatch(RepatchBuffer::startOfBranchPtrWithPatchOnRegister(hotPathBegin), static_cast<MacroAssembler::RegisterID>(calleeGPR), 0); 46 repatchBuffer.relink( 47 callReturnLocation, 48 repatchBuffer.codeBlock()->vm()->getCTIStub(linkThunkGeneratorFor( 49 (callType == Construct || callType == ConstructVarargs)? CodeForConstruct : CodeForCall, 50 isFTL ? MustPreserveRegisters : RegisterPreservationNotRequired)).code()); 51 hasSeenShouldRepatch = false; 52 callee.clear(); 53 stub.clear(); 53 54 54 55 // It will be on a list if the callee has a code block. … … 61 62 if (isLinked()) { 62 63 if (stub) { 63 if (! stub->visitWeak(repatchBuffer)) {64 if (!Heap::isMarked(stub->executable())) { 64 65 if (Options::verboseOSR()) { 65 66 dataLog( 66 67 "Clearing closure call from ", *repatchBuffer.codeBlock(), " to ", 67 listDump(stub->variants()), ", stub routine ", RawPointer(stub.get()),68 " .\n");68 stub->executable()->hashFor(specializationKind()), 69 ", stub routine ", RawPointer(stub.get()), ".\n"); 69 70 } 70 71 unlink(repatchBuffer); … … 83 84 if (!!lastSeenCallee && !Heap::isMarked(lastSeenCallee.get())) 84 85 lastSeenCallee.clear(); 86 87 if (callEdgeProfile) { 88 WTF::loadLoadFence(); 89 callEdgeProfile->visitWeak(); 90 } 85 91 } 86 92
Note:
See TracChangeset
for help on using the changeset viewer.