Ignore:
Timestamp:
Nov 4, 2019, 3:47:07 PM (6 years ago)
Author:
Truitt Savell
Message:

Unreviewed, rolling out r252015.

Broke the Windows build

Reverted changeset:

"Split ArithProfile into a Unary and a Binary version"
https://bugs.webkit.org/show_bug.cgi?id=202832
https://trac.webkit.org/changeset/252015

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp

    r252015 r252021  
    943943            return node;
    944944
    945         switch (node->op()) {
    946         case ArithAdd:
    947         case ArithSub:
    948         case ValueAdd: {
    949             BinaryArithProfile* arithProfile = m_inlineStackTop->m_profiledBlock->binaryArithProfileForBytecodeIndex(m_currentIndex);
    950             if (!arithProfile)
    951                 break;
    952             if (arithProfile->didObserveDouble())
    953                 node->mergeFlags(NodeMayHaveDoubleResult);
    954             if (arithProfile->didObserveNonNumeric())
    955                 node->mergeFlags(NodeMayHaveNonNumericResult);
    956             if (arithProfile->didObserveBigInt())
    957                 node->mergeFlags(NodeMayHaveBigIntResult);
    958             break;
    959         }
    960         case ValueMul:
    961         case ArithMul: {
    962             BinaryArithProfile* arithProfile = m_inlineStackTop->m_profiledBlock->binaryArithProfileForBytecodeIndex(m_currentIndex);
    963             if (!arithProfile)
    964                 break;
    965             if (arithProfile->didObserveInt52Overflow())
    966                 node->mergeFlags(NodeMayOverflowInt52);
    967             if (arithProfile->didObserveInt32Overflow() || m_inlineStackTop->m_exitProfile.hasExitSite(m_currentIndex, Overflow))
    968                 node->mergeFlags(NodeMayOverflowInt32InBaseline);
    969             if (arithProfile->didObserveNegZeroDouble() || m_inlineStackTop->m_exitProfile.hasExitSite(m_currentIndex, NegativeZero))
    970                 node->mergeFlags(NodeMayNegZeroInBaseline);
    971             if (arithProfile->didObserveDouble())
    972                 node->mergeFlags(NodeMayHaveDoubleResult);
    973             if (arithProfile->didObserveNonNumeric())
    974                 node->mergeFlags(NodeMayHaveNonNumericResult);
    975             if (arithProfile->didObserveBigInt())
    976                 node->mergeFlags(NodeMayHaveBigIntResult);
    977             break;
    978         }
    979         case ValueNegate:
    980         case ArithNegate: {
    981             UnaryArithProfile* arithProfile = m_inlineStackTop->m_profiledBlock->unaryArithProfileForBytecodeIndex(m_currentIndex);
    982             if (!arithProfile)
    983                 break;
    984             if (arithProfile->argObservedType().sawNumber() || arithProfile->didObserveDouble())
    985                 node->mergeFlags(NodeMayHaveDoubleResult);
    986             if (arithProfile->didObserveNegZeroDouble() || m_inlineStackTop->m_exitProfile.hasExitSite(m_currentIndex, NegativeZero))
    987                 node->mergeFlags(NodeMayNegZeroInBaseline);
    988             if (arithProfile->didObserveInt32Overflow() || m_inlineStackTop->m_exitProfile.hasExitSite(m_currentIndex, Overflow))
    989                 node->mergeFlags(NodeMayOverflowInt32InBaseline);
    990             if (arithProfile->didObserveNonNumeric())
    991                 node->mergeFlags(NodeMayHaveNonNumericResult);
    992             if (arithProfile->didObserveBigInt())
    993                 node->mergeFlags(NodeMayHaveBigIntResult);
    994             break;
    995         }
    996 
    997         default:
    998             break;
     945        {
     946            ArithProfile* arithProfile = m_inlineStackTop->m_profiledBlock->arithProfileForBytecodeIndex(m_currentIndex);
     947            if (arithProfile) {
     948                switch (node->op()) {
     949                case ArithAdd:
     950                case ArithSub:
     951                case ValueAdd:
     952                    if (arithProfile->didObserveDouble())
     953                        node->mergeFlags(NodeMayHaveDoubleResult);
     954                    if (arithProfile->didObserveNonNumeric())
     955                        node->mergeFlags(NodeMayHaveNonNumericResult);
     956                    if (arithProfile->didObserveBigInt())
     957                        node->mergeFlags(NodeMayHaveBigIntResult);
     958                    break;
     959
     960                case ValueMul:
     961                case ArithMul: {
     962                    if (arithProfile->didObserveInt52Overflow())
     963                        node->mergeFlags(NodeMayOverflowInt52);
     964                    if (arithProfile->didObserveInt32Overflow() || m_inlineStackTop->m_exitProfile.hasExitSite(m_currentIndex, Overflow))
     965                        node->mergeFlags(NodeMayOverflowInt32InBaseline);
     966                    if (arithProfile->didObserveNegZeroDouble() || m_inlineStackTop->m_exitProfile.hasExitSite(m_currentIndex, NegativeZero))
     967                        node->mergeFlags(NodeMayNegZeroInBaseline);
     968                    if (arithProfile->didObserveDouble())
     969                        node->mergeFlags(NodeMayHaveDoubleResult);
     970                    if (arithProfile->didObserveNonNumeric())
     971                        node->mergeFlags(NodeMayHaveNonNumericResult);
     972                    if (arithProfile->didObserveBigInt())
     973                        node->mergeFlags(NodeMayHaveBigIntResult);
     974                    break;
     975                }
     976                case ValueNegate:
     977                case ArithNegate: {
     978                    if (arithProfile->lhsObservedType().sawNumber() || arithProfile->didObserveDouble())
     979                        node->mergeFlags(NodeMayHaveDoubleResult);
     980                    if (arithProfile->didObserveNegZeroDouble() || m_inlineStackTop->m_exitProfile.hasExitSite(m_currentIndex, NegativeZero))
     981                        node->mergeFlags(NodeMayNegZeroInBaseline);
     982                    if (arithProfile->didObserveInt32Overflow() || m_inlineStackTop->m_exitProfile.hasExitSite(m_currentIndex, Overflow))
     983                        node->mergeFlags(NodeMayOverflowInt32InBaseline);
     984                    if (arithProfile->didObserveNonNumeric())
     985                        node->mergeFlags(NodeMayHaveNonNumericResult);
     986                    if (arithProfile->didObserveBigInt())
     987                        node->mergeFlags(NodeMayHaveBigIntResult);
     988                    break;
     989                }
     990
     991                default:
     992                    break;
     993                }
     994            }
    999995        }
    1000996       
     
    10381034        // FIXME: It might be possible to make this more granular.
    10391035        node->mergeFlags(NodeMayOverflowInt32InBaseline | NodeMayNegZeroInBaseline);
    1040 
    1041         BinaryArithProfile* arithProfile = m_inlineStackTop->m_profiledBlock->binaryArithProfileForBytecodeIndex(m_currentIndex);
     1036       
     1037        ArithProfile* arithProfile = m_inlineStackTop->m_profiledBlock->arithProfileForBytecodeIndex(m_currentIndex);
    10421038        if (arithProfile->didObserveBigInt())
    10431039            node->mergeFlags(NodeMayHaveBigIntResult);
Note: See TracChangeset for help on using the changeset viewer.