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/bytecode/ArithProfile.cpp

    r252015 r252021  
    3333
    3434#if ENABLE(JIT)
    35 template<typename BitfieldType>
    36 void ArithProfile<BitfieldType>::emitObserveResult(CCallHelpers& jit, JSValueRegs regs, TagRegistersMode mode)
     35void ArithProfile::emitObserveResult(CCallHelpers& jit, JSValueRegs regs, TagRegistersMode mode)
    3736{
    3837    if (!shouldEmitSetDouble() && !shouldEmitSetNonNumeric() && !shouldEmitSetBigInt())
     
    6059}
    6160
    62 template<typename BitfieldType>
    63 bool ArithProfile<BitfieldType>::shouldEmitSetDouble() const
     61bool ArithProfile::shouldEmitSetDouble() const
    6462{
    65     uint32_t mask = Int32Overflow | Int52Overflow | NegZeroDouble | NonNegZeroDouble;
     63    uint32_t mask = ArithProfile::Int32Overflow | ArithProfile::Int52Overflow | ArithProfile::NegZeroDouble | ArithProfile::NonNegZeroDouble;
    6664    return (m_bits & mask) != mask;
    6765}
    6866
    69 template<typename BitfieldType>
    70 void ArithProfile<BitfieldType>::emitSetDouble(CCallHelpers& jit) const
     67void ArithProfile::emitSetDouble(CCallHelpers& jit) const
    7168{
    7269    if (shouldEmitSetDouble())
    73         jit.or32(CCallHelpers::TrustedImm32(Int32Overflow | Int52Overflow | NegZeroDouble | NonNegZeroDouble), CCallHelpers::AbsoluteAddress(addressOfBits()));
     70        jit.or32(CCallHelpers::TrustedImm32(ArithProfile::Int32Overflow | ArithProfile::Int52Overflow | ArithProfile::NegZeroDouble | ArithProfile::NonNegZeroDouble), CCallHelpers::AbsoluteAddress(addressOfBits()));
    7471}
    7572
    76 template<typename BitfieldType>
    77 bool ArithProfile<BitfieldType>::shouldEmitSetNonNumeric() const
     73bool ArithProfile::shouldEmitSetNonNumeric() const
    7874{
    7975    uint32_t mask = ArithProfile::NonNumeric;
     
    8177}
    8278
    83 template<typename BitfieldType>
    84 bool ArithProfile<BitfieldType>::shouldEmitSetBigInt() const
     79bool ArithProfile::shouldEmitSetBigInt() const
    8580{
    8681    uint32_t mask = ArithProfile::BigInt;
     
    8883}
    8984
    90 template<typename BitfieldType>
    91 void ArithProfile<BitfieldType>::emitSetNonNumeric(CCallHelpers& jit) const
     85void ArithProfile::emitSetNonNumeric(CCallHelpers& jit) const
    9286{
    9387    if (shouldEmitSetNonNumeric())
    94         jit.or32(CCallHelpers::TrustedImm32(NonNumeric), CCallHelpers::AbsoluteAddress(addressOfBits()));
     88        jit.or32(CCallHelpers::TrustedImm32(ArithProfile::NonNumeric), CCallHelpers::AbsoluteAddress(addressOfBits()));
    9589}
    9690
    97 template<typename BitfieldType>
    98 void ArithProfile<BitfieldType>::emitSetBigInt(CCallHelpers& jit) const
     91void ArithProfile::emitSetBigInt(CCallHelpers& jit) const
    9992{
    10093    if (shouldEmitSetBigInt())
    101         jit.or32(CCallHelpers::TrustedImm32(BigInt), CCallHelpers::AbsoluteAddress(addressOfBits()));
     94        jit.or32(CCallHelpers::TrustedImm32(ArithProfile::BigInt), CCallHelpers::AbsoluteAddress(addressOfBits()));
    10295}
    103 
    104 // Generate the implementations of the functions above for UnaryArithProfile/BinaryArithProfile
    105 // If changing the size of either, add the corresponding lines here.
    106 template class ArithProfile<uint16_t>;
    10796#endif // ENABLE(JIT)
    10897
     
    113102using namespace JSC;
    114103
    115 template <typename T>
    116 void printInternal(PrintStream& out, const ArithProfile<T>& profile)
     104void printInternal(PrintStream& out, const ArithProfile& profile)
    117105{
    118106    const char* separator = "";
     
    148136        }
    149137    }
     138    if (profile.tookSpecialFastPath())
     139        out.print(separator, "Took special fast path.");
    150140    out.print(">");
    151 }
    152 
    153 void printInternal(PrintStream& out, const UnaryArithProfile& profile)
    154 {
    155     printInternal(out, static_cast<ArithProfile<UnaryArithProfileBase>>(profile));
    156 
    157     out.print(" Arg ObservedType:<");
    158     out.print(profile.argObservedType());
    159     out.print(">");
    160 }
    161 
    162 void printInternal(PrintStream& out, const BinaryArithProfile& profile)
    163 {
    164     printInternal(out, static_cast<ArithProfile<UnaryArithProfileBase>>(profile));
    165 
    166     if (profile.tookSpecialFastPath())
    167         out.print(" Took special fast path.");
    168141
    169142    out.print(" LHS ObservedType:<");
     
    171144    out.print("> RHS ObservedType:<");
    172145    out.print(profile.rhsObservedType());
     146    out.print(">");
     147
     148    out.print(" LHS ResultType:<", RawPointer(bitwise_cast<void*>(static_cast<uintptr_t>(profile.lhsResultType().bits()))));
     149    out.print("> RHS ResultType:<", RawPointer(bitwise_cast<void*>(static_cast<uintptr_t>(profile.rhsResultType().bits()))));
    173150    out.print(">");
    174151}
Note: See TracChangeset for help on using the changeset viewer.