Ignore:
Timestamp:
Jan 29, 2015, 8:28:36 PM (10 years ago)
Author:
[email protected]
Message:

Unreviewed, rolling out r179357 and r179358.
https://bugs.webkit.org/show_bug.cgi?id=141062

Suspect this caused WebGL tests to start flaking (Requested by
kling on #webkit).

Reverted changesets:

"Polymorphic call inlining should be based on polymorphic call
inline caching rather than logging"
https://bugs.webkit.org/show_bug.cgi?id=140660
http://trac.webkit.org/changeset/179357

"Unreviewed, fix no-JIT build."
http://trac.webkit.org/changeset/179358

Patch by Commit Queue <[email protected]> on 2015-01-29

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/bytecode/CallLinkInfo.cpp

    r179357 r179392  
    3030#include "DFGThunks.h"
    3131#include "JSCInlines.h"
    32 #include "Repatch.h"
    3332#include "RepatchBuffer.h"
    34 #include <wtf/ListDump.h>
    3533#include <wtf/NeverDestroyed.h>
    3634
     
    4038void CallLinkInfo::unlink(RepatchBuffer& repatchBuffer)
    4139{
    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());
    4841   
    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();
    5354
    5455    // It will be on a list if the callee has a code block.
     
    6162    if (isLinked()) {
    6263        if (stub) {
    63             if (!stub->visitWeak(repatchBuffer)) {
     64            if (!Heap::isMarked(stub->executable())) {
    6465                if (Options::verboseOSR()) {
    6566                    dataLog(
    6667                        "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");
    6970                }
    7071                unlink(repatchBuffer);
     
    8384    if (!!lastSeenCallee && !Heap::isMarked(lastSeenCallee.get()))
    8485        lastSeenCallee.clear();
     86   
     87    if (callEdgeProfile) {
     88        WTF::loadLoadFence();
     89        callEdgeProfile->visitWeak();
     90    }
    8591}
    8692
Note: See TracChangeset for help on using the changeset viewer.