<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[204065] trunk/Source</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/204065">204065</a></dd>
<dt>Author</dt> <dd>benjamin@webkit.org</dd>
<dt>Date</dt> <dd>2016-08-02 20:45:07 -0700 (Tue, 02 Aug 2016)</dd>
</dl>
<h3>Log Message</h3>
<pre>[JSC] Simplify the initialization of AbstractValue in the AbstractInterpreter
https://bugs.webkit.org/show_bug.cgi?id=160370
Reviewed by Saam Barati.
Source/JavaScriptCore:
We use a ton of AbstractValue to run the Abstract Interpreter.
When we set up the initial values, the compiler sets
a zero on a first word, a one on a second word, and a zero
again on a third word.
Since no vector or double-store can deal with 3 words, unrolling
is done by repeating those instructions.
The reason for the one was TinyPtrSet. It needed a flag for
empty value to identify the set as thin. I flipped the flag to "fat"
to make sure TinyPtrSet is initialized to zero.
With that done, I just had to clean some places to make
the initialization shorter.
It makes the binary easier to follow but this does not help with
the bigger problem: the time spent per block on Abstract Interpreter.
* bytecode/Operands.h:
The traits were useless, no client code defines it.
(JSC::Operands::Operands):
(JSC::Operands::ensureLocals):
Because of the size of the function, llvm is not inlining it.
We were literally loading 3 registers from memory and storing
them in the vector.
Now that AbstractValue has a VectorTraits, we should just rely
on the memset of Vector when possible.
(JSC::Operands::getLocal):
(JSC::Operands::setArgumentFirstTime):
(JSC::Operands::setLocalFirstTime):
(JSC::Operands::clear):
(JSC::OperandValueTraits::defaultValue): Deleted.
(JSC::OperandValueTraits::isEmptyForDump): Deleted.
* bytecode/OperandsInlines.h:
(JSC::Operands<T>::dumpInContext):
(JSC::Operands<T>::dump):
(JSC::Traits>::dumpInContext): Deleted.
(JSC::Traits>::dump): Deleted.
* dfg/DFGAbstractValue.cpp:
* dfg/DFGAbstractValue.h:
(JSC::DFG::AbstractValue::AbstractValue):
Source/WTF:
* wtf/TinyPtrSet.h:
(WTF::TinyPtrSet::isThin):
(WTF::TinyPtrSet::set):</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceJavaScriptCoreChangeLog">trunk/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCorebytecodeOperandsh">trunk/Source/JavaScriptCore/bytecode/Operands.h</a></li>
<li><a href="#trunkSourceJavaScriptCorebytecodeOperandsInlinesh">trunk/Source/JavaScriptCore/bytecode/OperandsInlines.h</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGAbstractValuecpp">trunk/Source/JavaScriptCore/dfg/DFGAbstractValue.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGAbstractValueh">trunk/Source/JavaScriptCore/dfg/DFGAbstractValue.h</a></li>
<li><a href="#trunkSourceWTFChangeLog">trunk/Source/WTF/ChangeLog</a></li>
<li><a href="#trunkSourceWTFwtfTinyPtrSeth">trunk/Source/WTF/wtf/TinyPtrSet.h</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (204064 => 204065)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog        2016-08-03 02:56:22 UTC (rev 204064)
+++ trunk/Source/JavaScriptCore/ChangeLog        2016-08-03 03:45:07 UTC (rev 204065)
</span><span class="lines">@@ -1,3 +1,53 @@
</span><ins>+2016-08-02 Benjamin Poulain <benjamin@webkit.org>
+
+ [JSC] Simplify the initialization of AbstractValue in the AbstractInterpreter
+ https://bugs.webkit.org/show_bug.cgi?id=160370
+
+ Reviewed by Saam Barati.
+
+ We use a ton of AbstractValue to run the Abstract Interpreter.
+
+ When we set up the initial values, the compiler sets
+ a zero on a first word, a one on a second word, and a zero
+ again on a third word.
+ Since no vector or double-store can deal with 3 words, unrolling
+ is done by repeating those instructions.
+
+ The reason for the one was TinyPtrSet. It needed a flag for
+ empty value to identify the set as thin. I flipped the flag to "fat"
+ to make sure TinyPtrSet is initialized to zero.
+
+ With that done, I just had to clean some places to make
+ the initialization shorter.
+ It makes the binary easier to follow but this does not help with
+ the bigger problem: the time spent per block on Abstract Interpreter.
+
+ * bytecode/Operands.h:
+ The traits were useless, no client code defines it.
+
+ (JSC::Operands::Operands):
+ (JSC::Operands::ensureLocals):
+ Because of the size of the function, llvm is not inlining it.
+ We were literally loading 3 registers from memory and storing
+ them in the vector.
+ Now that AbstractValue has a VectorTraits, we should just rely
+ on the memset of Vector when possible.
+
+ (JSC::Operands::getLocal):
+ (JSC::Operands::setArgumentFirstTime):
+ (JSC::Operands::setLocalFirstTime):
+ (JSC::Operands::clear):
+ (JSC::OperandValueTraits::defaultValue): Deleted.
+ (JSC::OperandValueTraits::isEmptyForDump): Deleted.
+ * bytecode/OperandsInlines.h:
+ (JSC::Operands<T>::dumpInContext):
+ (JSC::Operands<T>::dump):
+ (JSC::Traits>::dumpInContext): Deleted.
+ (JSC::Traits>::dump): Deleted.
+ * dfg/DFGAbstractValue.cpp:
+ * dfg/DFGAbstractValue.h:
+ (JSC::DFG::AbstractValue::AbstractValue):
+
</ins><span class="cx"> 2016-08-02 Saam Barati <sbarati@apple.com>
</span><span class="cx">
</span><span class="cx"> update a class extending null w.r.t the ES7 spec
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebytecodeOperandsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/bytecode/Operands.h (204064 => 204065)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/bytecode/Operands.h        2016-08-03 02:56:22 UTC (rev 204064)
+++ trunk/Source/JavaScriptCore/bytecode/Operands.h        2016-08-03 03:45:07 UTC (rev 204065)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2011, 2012, 2013, 2015 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2011, 2012, 2013, 2015, 2016 Apple Inc. All rights reserved.
</ins><span class="cx"> *
</span><span class="cx"> * Redistribution and use in source and binary forms, with or without
</span><span class="cx"> * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -37,32 +37,37 @@
</span><span class="cx">
</span><span class="cx"> template<typename T> struct OperandValueTraits;
</span><span class="cx">
</span><del>-template<typename T>
-struct OperandValueTraits {
- static T defaultValue() { return T(); }
- static bool isEmptyForDump(const T& value) { return !value; }
-};
-
</del><span class="cx"> enum OperandKind { ArgumentOperand, LocalOperand };
</span><span class="cx">
</span><span class="cx"> enum OperandsLikeTag { OperandsLike };
</span><span class="cx">
</span><del>-template<typename T, typename Traits = OperandValueTraits<T>>
</del><ins>+template<typename T>
</ins><span class="cx"> class Operands {
</span><span class="cx"> public:
</span><span class="cx"> Operands() { }
</span><span class="cx">
</span><del>- explicit Operands(size_t numArguments, size_t numLocals, const T& initialValue = Traits::defaultValue())
</del><ins>+ explicit Operands(size_t numArguments, size_t numLocals)
</ins><span class="cx"> {
</span><ins>+ if (WTF::VectorTraits<T>::needsInitialization) {
+ m_arguments.resize(numArguments);
+ m_locals.resize(numLocals);
+ } else {
+ m_arguments.fill(T(), numArguments);
+ m_locals.fill(T(), numLocals);
+ }
+ }
+
+ explicit Operands(size_t numArguments, size_t numLocals, const T& initialValue)
+ {
</ins><span class="cx"> m_arguments.fill(initialValue, numArguments);
</span><span class="cx"> m_locals.fill(initialValue, numLocals);
</span><span class="cx"> }
</span><span class="cx">
</span><del>- template<typename U, typename OtherTraits>
- explicit Operands(OperandsLikeTag, const Operands<U, OtherTraits>& other)
</del><ins>+ template<typename U>
+ explicit Operands(OperandsLikeTag, const Operands<U>& other)
</ins><span class="cx"> {
</span><del>- m_arguments.fill(Traits::defaultValue(), other.numberOfArguments());
- m_locals.fill(Traits::defaultValue(), other.numberOfLocals());
</del><ins>+ m_arguments.fill(T(), other.numberOfArguments());
+ m_locals.fill(T(), other.numberOfLocals());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> size_t numberOfArguments() const { return m_arguments.size(); }
</span><span class="lines">@@ -96,7 +101,7 @@
</span><span class="cx"> return local(idx);
</span><span class="cx"> }
</span><span class="cx">
</span><del>- void ensureLocals(size_t size, const T& ensuredValue = Traits::defaultValue())
</del><ins>+ void ensureLocals(size_t size)
</ins><span class="cx"> {
</span><span class="cx"> if (size <= m_locals.size())
</span><span class="cx"> return;
</span><span class="lines">@@ -103,6 +108,19 @@
</span><span class="cx">
</span><span class="cx"> size_t oldSize = m_locals.size();
</span><span class="cx"> m_locals.resize(size);
</span><ins>+ if (!WTF::VectorTraits<T>::needsInitialization) {
+ for (size_t i = oldSize; i < m_locals.size(); ++i)
+ m_locals[i] = T();
+ }
+ }
+
+ void ensureLocals(size_t size, const T& ensuredValue)
+ {
+ if (size <= m_locals.size())
+ return;
+
+ size_t oldSize = m_locals.size();
+ m_locals.resize(size);
</ins><span class="cx"> for (size_t i = oldSize; i < m_locals.size(); ++i)
</span><span class="cx"> m_locals[i] = ensuredValue;
</span><span class="cx"> }
</span><span class="lines">@@ -117,19 +135,19 @@
</span><span class="cx"> T getLocal(size_t idx)
</span><span class="cx"> {
</span><span class="cx"> if (idx >= m_locals.size())
</span><del>- return Traits::defaultValue();
</del><ins>+ return T();
</ins><span class="cx"> return m_locals[idx];
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void setArgumentFirstTime(size_t idx, const T& value)
</span><span class="cx"> {
</span><del>- ASSERT(m_arguments[idx] == Traits::defaultValue());
</del><ins>+ ASSERT(m_arguments[idx] == T());
</ins><span class="cx"> argument(idx) = value;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void setLocalFirstTime(size_t idx, const T& value)
</span><span class="cx"> {
</span><del>- ASSERT(idx >= m_locals.size() || m_locals[idx] == Traits::defaultValue());
</del><ins>+ ASSERT(idx >= m_locals.size() || m_locals[idx] == T());
</ins><span class="cx"> setLocal(idx, value);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -245,7 +263,7 @@
</span><span class="cx">
</span><span class="cx"> void clear()
</span><span class="cx"> {
</span><del>- fill(Traits::defaultValue());
</del><ins>+ fill(T());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool operator==(const Operands& other) const
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebytecodeOperandsInlinesh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/bytecode/OperandsInlines.h (204064 => 204065)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/bytecode/OperandsInlines.h        2016-08-03 02:56:22 UTC (rev 204064)
+++ trunk/Source/JavaScriptCore/bytecode/OperandsInlines.h        2016-08-03 03:45:07 UTC (rev 204065)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2013 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2013, 2016 Apple Inc. All rights reserved.
</ins><span class="cx"> *
</span><span class="cx"> * Redistribution and use in source and binary forms, with or without
</span><span class="cx"> * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -31,33 +31,33 @@
</span><span class="cx">
</span><span class="cx"> namespace JSC {
</span><span class="cx">
</span><del>-template<typename T, typename Traits>
-void Operands<T, Traits>::dumpInContext(PrintStream& out, DumpContext* context) const
</del><ins>+template<typename T>
+void Operands<T>::dumpInContext(PrintStream& out, DumpContext* context) const
</ins><span class="cx"> {
</span><span class="cx"> CommaPrinter comma(" ");
</span><span class="cx"> for (size_t argumentIndex = numberOfArguments(); argumentIndex--;) {
</span><del>- if (Traits::isEmptyForDump(argument(argumentIndex)))
</del><ins>+ if (!argument(argumentIndex))
</ins><span class="cx"> continue;
</span><span class="cx"> out.print(comma, "arg", argumentIndex, ":", inContext(argument(argumentIndex), context));
</span><span class="cx"> }
</span><span class="cx"> for (size_t localIndex = 0; localIndex < numberOfLocals(); ++localIndex) {
</span><del>- if (Traits::isEmptyForDump(local(localIndex)))
</del><ins>+ if (!local(localIndex))
</ins><span class="cx"> continue;
</span><span class="cx"> out.print(comma, "loc", localIndex, ":", inContext(local(localIndex), context));
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><del>-template<typename T, typename Traits>
-void Operands<T, Traits>::dump(PrintStream& out) const
</del><ins>+template<typename T>
+void Operands<T>::dump(PrintStream& out) const
</ins><span class="cx"> {
</span><span class="cx"> CommaPrinter comma(" ");
</span><span class="cx"> for (size_t argumentIndex = numberOfArguments(); argumentIndex--;) {
</span><del>- if (Traits::isEmptyForDump(argument(argumentIndex)))
</del><ins>+ if (!argument(argumentIndex))
</ins><span class="cx"> continue;
</span><span class="cx"> out.print(comma, "arg", argumentIndex, ":", argument(argumentIndex));
</span><span class="cx"> }
</span><span class="cx"> for (size_t localIndex = 0; localIndex < numberOfLocals(); ++localIndex) {
</span><del>- if (Traits::isEmptyForDump(local(localIndex)))
</del><ins>+ if (!local(localIndex))
</ins><span class="cx"> continue;
</span><span class="cx"> out.print(comma, "loc", localIndex, ":", local(localIndex));
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGAbstractValuecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGAbstractValue.cpp (204064 => 204065)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGAbstractValue.cpp        2016-08-03 02:56:22 UTC (rev 204064)
+++ trunk/Source/JavaScriptCore/dfg/DFGAbstractValue.cpp        2016-08-03 03:45:07 UTC (rev 204065)
</span><span class="lines">@@ -34,6 +34,8 @@
</span><span class="cx">
</span><span class="cx"> namespace JSC { namespace DFG {
</span><span class="cx">
</span><ins>+static_assert(sizeof(AbstractValue) == (sizeof(void*) + sizeof(unsigned) * 2 + sizeof(JSValue)), "AbstractValue should be as small as possible.");
+
</ins><span class="cx"> void AbstractValue::observeTransitions(const TransitionVector& vector)
</span><span class="cx"> {
</span><span class="cx"> if (m_type & SpecCell) {
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGAbstractValueh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGAbstractValue.h (204064 => 204065)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGAbstractValue.h        2016-08-03 02:56:22 UTC (rev 204064)
+++ trunk/Source/JavaScriptCore/dfg/DFGAbstractValue.h        2016-08-03 03:45:07 UTC (rev 204065)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2011-2015 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2011-2016 Apple Inc. All rights reserved.
</ins><span class="cx"> *
</span><span class="cx"> * Redistribution and use in source and binary forms, with or without
</span><span class="cx"> * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -55,6 +55,17 @@
</span><span class="cx"> : m_type(SpecNone)
</span><span class="cx"> , m_arrayModes(0)
</span><span class="cx"> {
</span><ins>+#ifndef NDEBUG
+ // The WTF Traits for AbstractValue allow the initialization of values with bzero().
+ // We verify the correctness of this assumption here.
+ static bool needsDefaultConstructorCheck = true;
+ if (needsDefaultConstructorCheck) {
+ needsDefaultConstructorCheck = false;
+
+ for (unsigned i = 0; i < sizeof(AbstractValue); ++i)
+ ASSERT(!(reinterpret_cast<char*>(this)[i]));
+ }
+#endif
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void clear()
</span><span class="lines">@@ -456,6 +467,18 @@
</span><span class="cx">
</span><span class="cx"> } } // namespace JSC::DFG
</span><span class="cx">
</span><ins>+namespace WTF {
+template <>
+struct VectorTraits<JSC::DFG::AbstractValue> : VectorTraitsBase<false, JSC::DFG::AbstractValue> {
+ static const bool canInitializeWithMemset = true;
+};
+
+template <>
+struct HashTraits<JSC::DFG::AbstractValue> : GenericHashTraits<JSC::DFG::AbstractValue> {
+ static const bool emptyValueIsZero = true;
+};
+};
+
</ins><span class="cx"> #endif // ENABLE(DFG_JIT)
</span><span class="cx">
</span><span class="cx"> #endif // DFGAbstractValue_h
</span></span></pre></div>
<a id="trunkSourceWTFChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/ChangeLog (204064 => 204065)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/ChangeLog        2016-08-03 02:56:22 UTC (rev 204064)
+++ trunk/Source/WTF/ChangeLog        2016-08-03 03:45:07 UTC (rev 204065)
</span><span class="lines">@@ -1,3 +1,14 @@
</span><ins>+2016-08-02 Benjamin Poulain <benjamin@webkit.org>
+
+ [JSC] Simplify the initialization of AbstractValue in the AbstractInterpreter
+ https://bugs.webkit.org/show_bug.cgi?id=160370
+
+ Reviewed by Saam Barati.
+
+ * wtf/TinyPtrSet.h:
+ (WTF::TinyPtrSet::isThin):
+ (WTF::TinyPtrSet::set):
+
</ins><span class="cx"> 2016-08-02 Benjamin Poulain <bpoulain@apple.com>
</span><span class="cx">
</span><span class="cx"> Clean up some useless AtomicString atoms
</span></span></pre></div>
<a id="trunkSourceWTFwtfTinyPtrSeth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/wtf/TinyPtrSet.h (204064 => 204065)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/wtf/TinyPtrSet.h        2016-08-03 02:56:22 UTC (rev 204064)
+++ trunk/Source/WTF/wtf/TinyPtrSet.h        2016-08-03 03:45:07 UTC (rev 204065)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx"> /*
</span><del>- * Copyright (C) 2015 Apple Inc. All rights reserved.
</del><ins>+ * Copyright (C) 2015-2016 Apple Inc. All rights reserved.
</ins><span class="cx"> *
</span><span class="cx"> * Redistribution and use in source and binary forms, with or without
</span><span class="cx"> * modification, are permitted provided that the following conditions
</span><span class="lines">@@ -371,9 +371,9 @@
</span><span class="cx"> private:
</span><span class="cx"> friend class JSC::DFG::StructureAbstractValue;
</span><span class="cx">
</span><del>- static const uintptr_t thinFlag = 1;
</del><ins>+ static const uintptr_t fatFlag = 1;
</ins><span class="cx"> static const uintptr_t reservedFlag = 2;
</span><del>- static const uintptr_t flags = thinFlag | reservedFlag;
</del><ins>+ static const uintptr_t flags = fatFlag | reservedFlag;
</ins><span class="cx"> static const uintptr_t reservedValue = 4;
</span><span class="cx">
</span><span class="cx"> static const unsigned defaultStartingSize = 4;
</span><span class="lines">@@ -463,7 +463,7 @@
</span><span class="cx"> OutOfLineList::destroy(list());
</span><span class="cx"> }
</span><span class="cx">
</span><del>- bool isThin() const { return m_pointer & thinFlag; }
</del><ins>+ bool isThin() const { return !(m_pointer & fatFlag); }
</ins><span class="cx">
</span><span class="cx"> void* pointer() const
</span><span class="cx"> {
</span><span class="lines">@@ -496,7 +496,7 @@
</span><span class="cx"> }
</span><span class="cx"> void set(uintptr_t pointer, bool singleEntry)
</span><span class="cx"> {
</span><del>- m_pointer = pointer | (singleEntry ? thinFlag : 0) | (m_pointer & reservedFlag);
</del><ins>+ m_pointer = pointer | (singleEntry ? 0 : fatFlag) | (m_pointer & reservedFlag);
</ins><span class="cx"> }
</span><span class="cx"> bool getReservedFlag() const { return m_pointer & reservedFlag; }
</span><span class="cx"> void setReservedFlag(bool value)
</span></span></pre>
</div>
</div>
</body>
</html>