diff options
| author | Lorry Tar Creator <lorry-tar-importer@lorry> | 2016-04-10 09:28:39 +0000 |
|---|---|---|
| committer | Lorry Tar Creator <lorry-tar-importer@lorry> | 2016-04-10 09:28:39 +0000 |
| commit | 32761a6cee1d0dee366b885b7b9c777e67885688 (patch) | |
| tree | d6bec92bebfb216f4126356e55518842c2f476a1 /Source/JavaScriptCore/bytecode/ValueProfile.h | |
| parent | a4e969f4965059196ca948db781e52f7cfebf19e (diff) | |
| download | WebKitGtk-tarball-32761a6cee1d0dee366b885b7b9c777e67885688.tar.gz | |
webkitgtk-2.4.11webkitgtk-2.4.11
Diffstat (limited to 'Source/JavaScriptCore/bytecode/ValueProfile.h')
| -rw-r--r-- | Source/JavaScriptCore/bytecode/ValueProfile.h | 60 |
1 files changed, 1 insertions, 59 deletions
diff --git a/Source/JavaScriptCore/bytecode/ValueProfile.h b/Source/JavaScriptCore/bytecode/ValueProfile.h index 48b47da7c..0790f79da 100644 --- a/Source/JavaScriptCore/bytecode/ValueProfile.h +++ b/Source/JavaScriptCore/bytecode/ValueProfile.h @@ -10,7 +10,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. Neither the name of Apple Inc. ("Apple") nor the names of + * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * @@ -206,65 +206,7 @@ inline int getRareCaseProfileBytecodeOffset(RareCaseProfile* rareCaseProfile) return rareCaseProfile->m_bytecodeOffset; } -struct ResultProfile { -private: - static const int numberOfFlagBits = 5; - -public: - ResultProfile(int bytecodeOffset) - : m_bytecodeOffsetAndFlags(bytecodeOffset << numberOfFlagBits) - { - ASSERT(((bytecodeOffset << numberOfFlagBits) >> numberOfFlagBits) == bytecodeOffset); - } - - enum ObservedResults { - NonNegZeroDouble = 1 << 0, - NegZeroDouble = 1 << 1, - NonNumber = 1 << 2, - Int32Overflow = 1 << 3, - Int52Overflow = 1 << 4, - }; - - int bytecodeOffset() const { return m_bytecodeOffsetAndFlags >> numberOfFlagBits; } - unsigned specialFastPathCount() const { return m_specialFastPathCount; } - - bool didObserveNonInt32() const { return hasBits(NonNegZeroDouble | NegZeroDouble | NonNumber); } - bool didObserveDouble() const { return hasBits(NonNegZeroDouble | NegZeroDouble); } - bool didObserveNonNegZeroDouble() const { return hasBits(NonNegZeroDouble); } - bool didObserveNegZeroDouble() const { return hasBits(NegZeroDouble); } - bool didObserveNonNumber() const { return hasBits(NonNumber); } - bool didObserveInt32Overflow() const { return hasBits(Int32Overflow); } - bool didObserveInt52Overflow() const { return hasBits(Int52Overflow); } - - void setObservedNonNegZeroDouble() { setBit(NonNegZeroDouble); } - void setObservedNegZeroDouble() { setBit(NegZeroDouble); } - void setObservedNonNumber() { setBit(NonNumber); } - void setObservedInt32Overflow() { setBit(Int32Overflow); } - void setObservedInt52Overflow() { setBit(Int52Overflow); } - - void* addressOfFlags() { return &m_bytecodeOffsetAndFlags; } - void* addressOfSpecialFastPathCount() { return &m_specialFastPathCount; } - -private: - bool hasBits(int mask) const { return m_bytecodeOffsetAndFlags & mask; } - void setBit(int mask) { m_bytecodeOffsetAndFlags |= mask; } - - int m_bytecodeOffsetAndFlags; - unsigned m_specialFastPathCount { 0 }; -}; - -inline int getResultProfileBytecodeOffset(ResultProfile* profile) -{ - return profile->bytecodeOffset(); -} - } // namespace JSC -namespace WTF { - -void printInternal(PrintStream&, const JSC::ResultProfile&); - -} // namespace WTF - #endif // ValueProfile_h |
