Skip to content

Commit 619ba0e

Browse files
author
Truitt Savell
committed
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 Canonical link: https://commits.webkit.org/217181@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@252021 268f45cc-cd09-0410-ab3c-d52691b4dbfc
1 parent a5590bb commit 619ba0e

46 files changed

Lines changed: 439 additions & 546 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎Source/JavaScriptCore/ChangeLog‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
2019-11-04 Truitt Savell <tsavell@apple.com>
2+
3+
Unreviewed, rolling out r252015.
4+
5+
Broke the Windows build
6+
7+
Reverted changeset:
8+
9+
"Split ArithProfile into a Unary and a Binary version"
10+
https://bugs.webkit.org/show_bug.cgi?id=202832
11+
https://trac.webkit.org/changeset/252015
12+
113
2019-11-04 Alexey Shvayka <shvaikalesh@gmail.com>
214

315
[[Set]] isn't correct with respect to the spec and Proxy

‎Source/JavaScriptCore/bytecode/ArithProfile.cpp‎

Lines changed: 18 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@
3232
namespace 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

113102
using 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

176153
void printInternal(PrintStream& out, const JSC::ObservedType& observedType)

0 commit comments

Comments
 (0)