3232namespace JSC {
3333
3434#if ENABLE(JIT)
35- template <typename BitfieldType>
36- void ArithProfile<BitfieldType>::emitObserveResult(CCallHelpers& jit, JSValueRegs regs, TagRegistersMode mode)
35+ void ArithProfile::emitObserveResult (CCallHelpers& jit, JSValueRegs regs, TagRegistersMode mode)
3736{
3837 if (!shouldEmitSetDouble () && !shouldEmitSetNonNumeric () && !shouldEmitSetBigInt ())
3938 return ;
@@ -59,51 +58,41 @@ void ArithProfile<BitfieldType>::emitObserveResult(CCallHelpers& jit, JSValueReg
5958 done.link (&jit);
6059}
6160
62- template <typename BitfieldType>
63- bool ArithProfile<BitfieldType>::shouldEmitSetDouble() const
61+ bool 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
67+ void 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
73+ bool ArithProfile::shouldEmitSetNonNumeric () const
7874{
7975 uint32_t mask = ArithProfile::NonNumeric;
8076 return (m_bits & mask) != mask;
8177}
8278
83- template <typename BitfieldType>
84- bool ArithProfile<BitfieldType>::shouldEmitSetBigInt() const
79+ bool ArithProfile::shouldEmitSetBigInt () const
8580{
8681 uint32_t mask = ArithProfile::BigInt;
8782 return (m_bits & mask) != mask;
8883}
8984
90- template <typename BitfieldType>
91- void ArithProfile<BitfieldType>::emitSetNonNumeric(CCallHelpers& jit) const
85+ void 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
91+ void 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
10998} // namespace JSC
@@ -112,8 +101,7 @@ namespace WTF {
112101
113102using namespace JSC ;
114103
115- template <typename T>
116- void printInternal (PrintStream& out, const ArithProfile<T>& profile)
104+ void printInternal (PrintStream& out, const ArithProfile& profile)
117105{
118106 const char * separator = " " ;
119107
@@ -147,30 +135,19 @@ void printInternal(PrintStream& out, const ArithProfile<T>& profile)
147135 separator = " |" ;
148136 }
149137 }
150- 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-
166138 if (profile.tookSpecialFastPath ())
167- out.print (" Took special fast path." );
139+ out.print (separator, " Took special fast path." );
140+ out.print (" >" );
168141
169142 out.print (" LHS ObservedType:<" );
170143 out.print (profile.lhsObservedType ());
171144 out.print (" > RHS ObservedType:<" );
172145 out.print (profile.rhsObservedType ());
173146 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 ()))));
150+ out.print (" >" );
174151}
175152
176153void printInternal (PrintStream& out, const JSC ::ObservedType& observedType)
0 commit comments