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/jit/JITOperations.cpp

    r179357 r179392  
    11/*
    2  * Copyright (C) 2013-2015 Apple Inc. All rights reserved.
     2 * Copyright (C) 2013, 2014 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    777777}
    778778
    779 char* JIT_OPERATION operationLinkPolymorphicCall(ExecState* execCallee, CallLinkInfo* callLinkInfo)
     779static bool attemptToOptimizeClosureCall(
     780    ExecState* execCallee, RegisterPreservationMode registers, JSCell* calleeAsFunctionCell,
     781    CallLinkInfo& callLinkInfo)
     782{
     783    if (!calleeAsFunctionCell)
     784        return false;
     785   
     786    JSFunction* callee = jsCast<JSFunction*>(calleeAsFunctionCell);
     787    JSFunction* oldCallee = callLinkInfo.callee.get();
     788   
     789    if (!oldCallee || oldCallee->executable() != callee->executable())
     790        return false;
     791   
     792    ASSERT(callee->executable()->hasJITCodeForCall());
     793    MacroAssemblerCodePtr codePtr =
     794        callee->executable()->generatedJITCodeForCall()->addressForCall(
     795            *execCallee->callerFrame()->codeBlock()->vm(), callee->executable(),
     796            ArityCheckNotRequired, registers);
     797   
     798    CodeBlock* codeBlock;
     799    if (callee->executable()->isHostFunction())
     800        codeBlock = 0;
     801    else {
     802        codeBlock = jsCast<FunctionExecutable*>(callee->executable())->codeBlockForCall();
     803        if (execCallee->argumentCountIncludingThis() < static_cast<size_t>(codeBlock->numParameters()) || callLinkInfo.callType == CallLinkInfo::CallVarargs || callLinkInfo.callType == CallLinkInfo::ConstructVarargs)
     804            return false;
     805    }
     806   
     807    linkClosureCall(
     808        execCallee, callLinkInfo, codeBlock, callee->executable(), codePtr, registers);
     809   
     810    return true;
     811}
     812
     813char* JIT_OPERATION operationLinkClosureCall(ExecState* execCallee, CallLinkInfo* callLinkInfo)
    780814{
    781815    JSCell* calleeAsFunctionCell;
    782816    char* result = virtualForWithFunction(execCallee, CodeForCall, RegisterPreservationNotRequired, calleeAsFunctionCell);
    783817
    784     linkPolymorphicCall(execCallee, *callLinkInfo, CallVariant(calleeAsFunctionCell), RegisterPreservationNotRequired);
     818    if (!attemptToOptimizeClosureCall(execCallee, RegisterPreservationNotRequired, calleeAsFunctionCell, *callLinkInfo))
     819        linkSlowFor(execCallee, *callLinkInfo, CodeForCall, RegisterPreservationNotRequired);
    785820   
    786821    return result;
     
    797832}
    798833
    799 char* JIT_OPERATION operationLinkPolymorphicCallThatPreservesRegs(ExecState* execCallee, CallLinkInfo* callLinkInfo)
     834char* JIT_OPERATION operationLinkClosureCallThatPreservesRegs(ExecState* execCallee, CallLinkInfo* callLinkInfo)
    800835{
    801836    JSCell* calleeAsFunctionCell;
    802837    char* result = virtualForWithFunction(execCallee, CodeForCall, MustPreserveRegisters, calleeAsFunctionCell);
    803838
    804     linkPolymorphicCall(execCallee, *callLinkInfo, CallVariant(calleeAsFunctionCell), MustPreserveRegisters);
     839    if (!attemptToOptimizeClosureCall(execCallee, MustPreserveRegisters, calleeAsFunctionCell, *callLinkInfo))
     840        linkSlowFor(execCallee, *callLinkInfo, CodeForCall, MustPreserveRegisters);
    805841   
    806842    return result;
     
    9981034   
    9991035    CodeBlock* codeBlock = exec->codeBlock();
    1000     if (codeBlock->jitType() != JITCode::BaselineJIT) {
    1001         dataLog("Unexpected code block in Baseline->DFG tier-up: ", *codeBlock, "\n");
    1002         RELEASE_ASSERT_NOT_REACHED();
    1003     }
    10041036   
    10051037    if (bytecodeIndex) {
Note: See TracChangeset for help on using the changeset viewer.