void CallLinkInfo::unlink(RepatchBuffer& repatchBuffer) { ASSERT(isLinked()); if (Options::showDisassembly()) dataLog("Unlinking call from ", callReturnLocation, " to ", pointerDump(repatchBuffer.codeBlock()), "\n"); repatchBuffer.revertJumpReplacementToBranchPtrWithPatch(RepatchBuffer::startOfBranchPtrWithPatchOnRegister(hotPathBegin), static_cast<MacroAssembler::RegisterID>(calleeGPR), 0); repatchBuffer.relink( callReturnLocation, repatchBuffer.codeBlock()->vm()->getCTIStub(linkThunkGeneratorFor( (callType == Construct || callType == ConstructVarargs)? CodeForConstruct : CodeForCall, isFTL ? MustPreserveRegisters : RegisterPreservationNotRequired)).code()); hasSeenShouldRepatch = false; callee.clear(); stub.clear(); // It will be on a list if the callee has a code block. if (isOnList()) remove(); }