⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 245404 in webkit


Ignore:
Timestamp:
May 16, 2019, 12:33:40 PM (7 years ago)
Author:
Kocsen Chung
Message:

Apply patch. rdar://problem/50754976

Location:
branches/safari-607.2.1.2-branch/Source/JavaScriptCore/bytecompiler
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/safari-607.2.1.2-branch/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp

    r245333 r245404  
    17091709}
    17101710
    1711 template<typename EqOp>
    1712 RegisterID* BytecodeGenerator::emitEqualityOp(RegisterID* dst, RegisterID* src1, RegisterID* src2)
     1711bool BytecodeGenerator::emitEqualityOpImpl(RegisterID* dst, RegisterID* src1, RegisterID* src2)
    17131712{
    17141713    if (!canDoPeepholeOptimization())
     
    17251724                rewind();
    17261725                OpIsUndefined::emit(this, dst, op.m_value);
    1727                 return dst;
     1726                return true;
    17281727            }
    17291728            if (value == "boolean") {
    17301729                rewind();
    17311730                OpIsBoolean::emit(this, dst, op.m_value);
    1732                 return dst;
     1731                return true;
    17331732            }
    17341733            if (value == "number") {
    17351734                rewind();
    17361735                OpIsNumber::emit(this, dst, op.m_value);
    1737                 return dst;
     1736                return true;
    17381737            }
    17391738            if (value == "string") {
    17401739                rewind();
    17411740                OpIsCellWithType::emit(this, dst, op.m_value, StringType);
    1742                 return dst;
     1741                return true;
    17431742            }
    17441743            if (value == "symbol") {
    17451744                rewind();
    17461745                OpIsCellWithType::emit(this, dst, op.m_value, SymbolType);
    1747                 return dst;
     1746                return true;
    17481747            }
    17491748            if (Options::useBigInt() && value == "bigint") {
    17501749                rewind();
    17511750                OpIsCellWithType::emit(this, dst, op.m_value, BigIntType);
    1752                 return dst;
     1751                return true;
    17531752            }
    17541753            if (value == "object") {
    17551754                rewind();
    17561755                OpIsObjectOrNull::emit(this, dst, op.m_value);
    1757                 return dst;
     1756                return true;
    17581757            }
    17591758            if (value == "function") {
    17601759                rewind();
    17611760                OpIsFunction::emit(this, dst, op.m_value);
    1762                 return dst;
     1761                return true;
    17631762            }
    17641763        }
    17651764    }
    17661765
    1767     EqOp::emit(this, dst, src1, src2);
    1768     return dst;
     1766    return false;
    17691767}
    17701768
  • branches/safari-607.2.1.2-branch/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h

    r245333 r245404  
    712712
    713713        template<typename EqOp>
    714         RegisterID* emitEqualityOp(RegisterID* dst, RegisterID* src1, RegisterID* src2);
     714        RegisterID* emitEqualityOp(RegisterID* dst, RegisterID* src1, RegisterID* src2)
     715        {
     716            if (!emitEqualityOpImpl(dst, src1, src2))
     717                EqOp::emit(this, dst, src1, src2);
     718            return dst;
     719        }
     720
     721        bool emitEqualityOpImpl(RegisterID* dst, RegisterID* src1, RegisterID* src2);
     722
    715723        RegisterID* emitCreateThis(RegisterID* dst);
    716724        void emitTDZCheck(RegisterID* target);
Note: See TracChangeset for help on using the changeset viewer.