Ignore:
Timestamp:
Jan 29, 2015, 8:28:36 PM (11 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/dfg/DFGByteCodeParser.cpp

    r179357 r179392  
    11 /*
    2  * Copyright (C) 2011-2015 Apple Inc. All rights reserved.
     2 * Copyright (C) 2011, 2012, 2013, 2014 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    676676            m_parameterSlots = parameterSlots;
    677677
    678         int dummyThisArgument = op == Call || op == NativeCall ? 0 : 1;
     678        int dummyThisArgument = op == Call || op == NativeCall || op == ProfiledCall ? 0 : 1;
    679679        for (int i = 0 + dummyThisArgument; i < argCount; ++i)
    680680            addVarArgChild(get(virtualRegisterForArgument(i, registerOffset)));
     
    10451045        callLinkStatus = CallLinkStatus(callTarget->asJSValue()).setIsProved(true);
    10461046   
    1047     if (Options::verboseDFGByteCodeParsing())
    1048         dataLog("    Handling call at ", currentCodeOrigin(), ": ", callLinkStatus, "\n");
     1047    if ((!callLinkStatus.canOptimize() || callLinkStatus.size() != 1)
     1048        && !isFTL(m_graph.m_plan.mode) && Options::useFTLJIT()
     1049        && InlineCallFrame::isNormalCall(kind)
     1050        && CallEdgeLog::isEnabled()
     1051        && Options::dfgDoesCallEdgeProfiling()) {
     1052        ASSERT(op == Call || op == Construct);
     1053        if (op == Call)
     1054            op = ProfiledCall;
     1055        else
     1056            op = ProfiledConstruct;
     1057    }
    10491058   
    10501059    if (!callLinkStatus.canOptimize()) {
     
    10681077#if ENABLE(FTL_NATIVE_CALL_INLINING)
    10691078    if (isFTL(m_graph.m_plan.mode) && Options::optimizeNativeCalls() && callLinkStatus.size() == 1 && !callLinkStatus.couldTakeSlowPath()) {
    1070         CallVariant callee = callLinkStatus[0];
     1079        CallVariant callee = callLinkStatus[0].callee();
    10711080        JSFunction* function = callee.function();
    10721081        CodeSpecializationKind specializationKind = InlineCallFrame::specializationKindFor(kind);
     
    10751084            callOpInfo = OpInfo(m_graph.freeze(function));
    10761085
    1077             if (op == Call)
     1086            if (op == Call || op == ProfiledCall)
    10781087                op = NativeCall;
    10791088            else {
    1080                 ASSERT(op == Construct);
     1089                ASSERT(op == Construct || op == ProfiledConstruct);
    10811090                op = NativeConstruct;
    10821091            }
     
    14181427    if (!callLinkStatus.couldTakeSlowPath() && callLinkStatus.size() == 1) {
    14191428        emitFunctionChecks(
    1420             callLinkStatus[0], callTargetNode, registerOffset, specializationKind);
     1429            callLinkStatus[0].callee(), callTargetNode, registerOffset, specializationKind);
    14211430        bool result = attemptToInlineCall(
    1422             callTargetNode, resultOperand, callLinkStatus[0], registerOffset,
     1431            callTargetNode, resultOperand, callLinkStatus[0].callee(), registerOffset,
    14231432            argumentCountIncludingThis, nextOffset, kind, CallerDoesNormalLinking, prediction,
    14241433            inliningBalance);
    14251434        if (!result && !callLinkStatus.isProved())
    1426             undoFunctionChecks(callLinkStatus[0]);
     1435            undoFunctionChecks(callLinkStatus[0].callee());
    14271436        if (verbose) {
    14281437            dataLog("Done inlining (simple).\n");
     
    14541463    bool allAreDirectCalls = true;
    14551464    for (unsigned i = callLinkStatus.size(); i--;) {
    1456         if (callLinkStatus[i].isClosureCall())
     1465        if (callLinkStatus[i].callee().isClosureCall())
    14571466            allAreDirectCalls = false;
    14581467        else
     
    14671476    else {
    14681477        // FIXME: We should be able to handle this case, but it's tricky and we don't know of cases
    1469         // where it would be beneficial. It might be best to handle these cases as if all calls were
    1470         // closure calls.
     1478        // where it would be beneficial. Also, CallLinkStatus would make all callees appear like
     1479        // closure calls if any calls were closure calls - except for calls to internal functions.
     1480        // So this will only arise if some callees are internal functions and others are closures.
    14711481        // https://bugs.webkit.org/show_bug.cgi?id=136020
    14721482        if (verbose) {
     
    15081518    Vector<BasicBlock*> landingBlocks;
    15091519   
    1510     // We may force this true if we give up on inlining any of the edges.
     1520    // We make force this true if we give up on inlining any of the edges.
    15111521    bool couldTakeSlowPath = callLinkStatus.couldTakeSlowPath();
    15121522   
     
    15241534       
    15251535        bool inliningResult = attemptToInlineCall(
    1526             myCallTargetNode, resultOperand, callLinkStatus[i], registerOffset,
     1536            myCallTargetNode, resultOperand, callLinkStatus[i].callee(), registerOffset,
    15271537            argumentCountIncludingThis, nextOffset, kind, CallerLinksManually, prediction,
    15281538            inliningBalance);
     
    15431553        JSCell* thingToCaseOn;
    15441554        if (allAreDirectCalls)
    1545             thingToCaseOn = callLinkStatus[i].nonExecutableCallee();
     1555            thingToCaseOn = callLinkStatus[i].callee().nonExecutableCallee();
    15461556        else {
    15471557            ASSERT(allAreClosureCalls);
    1548             thingToCaseOn = callLinkStatus[i].executable();
     1558            thingToCaseOn = callLinkStatus[i].callee().executable();
    15491559        }
    15501560        data.cases.append(SwitchCase(m_graph.freeze(thingToCaseOn), block.get()));
     
    15581568
    15591569        if (verbose)
    1560             dataLog("Finished inlining ", callLinkStatus[i], " at ", currentCodeOrigin(), ".\n");
     1570            dataLog("Finished inlining ", callLinkStatus[i].callee(), " at ", currentCodeOrigin(), ".\n");
    15611571    }
    15621572   
Note: See TracChangeset for help on using the changeset viewer.