<!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>[165999] 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/165999">165999</a></dd>
<dt>Author</dt> <dd>barraclough@apple.com</dd>
<dt>Date</dt> <dd>2014-03-20 14:05:49 -0700 (Thu, 20 Mar 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>Source/JavaScriptCore: Crash beneath operationTearOffActivation running this JS compression demo
https://bugs.webkit.org/show_bug.cgi?id=130295
<rdar://problem/16332337>
Patch by Filip Pizlo <fpizlo@apple.com> on 2014-03-20
Reviewed by Oliver Hunt.
Make sure that we flush things as if we were at a terminal, if we are at a block with
no forward edges. This fixes infinitely loopy code with captured variables.
Make sure that the CFG simplifier adds explicit flushes whenever it jettisons a block.
Make it so that NodeIsFlushed is a thing. Previously only SSA used it and it computed
it by itself. Now it's an artifact of CPS rethreading.
Add a bunch of tests. All of them previously either crashed or returned bad output due
to memory corruption.
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::isCaptured):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::flushForTerminal):
(JSC::DFG::ByteCodeParser::flushForReturn):
(JSC::DFG::ByteCodeParser::flushIfTerminal):
(JSC::DFG::ByteCodeParser::branchData):
(JSC::DFG::ByteCodeParser::parseBlock):
* dfg/DFGCFGSimplificationPhase.cpp:
(JSC::DFG::CFGSimplificationPhase::keepOperandAlive):
* dfg/DFGCPSRethreadingPhase.cpp:
(JSC::DFG::CPSRethreadingPhase::run):
(JSC::DFG::CPSRethreadingPhase::computeIsFlushed):
(JSC::DFG::CPSRethreadingPhase::addFlushedLocalOp):
(JSC::DFG::CPSRethreadingPhase::addFlushedLocalEdge):
* dfg/DFGCSEPhase.cpp:
(JSC::DFG::CSEPhase::performNodeCSE):
* dfg/DFGGraph.cpp:
(JSC::DFG::Graph::clearFlagsOnAllNodes):
* dfg/DFGGraph.h:
* dfg/DFGNode.h:
* dfg/DFGNodeFlags.cpp:
(JSC::DFG::dumpNodeFlags):
* dfg/DFGNodeFlags.h:
* dfg/DFGSSAConversionPhase.cpp:
(JSC::DFG::SSAConversionPhase::run):
* tests/stress/activation-test-loop.js: Added.
(Inner.this.doStuff):
(Inner):
(foo.inner.isDone):
(foo):
* tests/stress/inferred-infinite-loop-that-uses-captured-variables.js: Added.
(bar):
(foo):
(noInline):
* tests/stress/infinite-loop-that-uses-captured-variables-before-throwing.js: Added.
(bar):
(foo):
(noInline):
* tests/stress/infinite-loop-that-uses-captured-variables-but-they-do-not-escape.js: Added.
(bar):
(foo):
(noInline):
* tests/stress/infinite-loop-that-uses-captured-variables-with-osr-entry.js: Added.
(bar):
(foo):
(noInline):
* tests/stress/infinite-loop-that-uses-captured-variables.js: Added.
(bar):
(foo):
(noInline):
* tests/stress/tricky-indirectly-inferred-infinite-loop-that-uses-captured-variables-and-creates-the-activation-outside-the-loop.js: Added.
(bar):
(fuzz):
(foo.f):
(foo):
* tests/stress/tricky-inferred-infinite-loop-that-uses-captured-variables-and-creates-the-activation-outside-the-loop.js: Added.
(bar):
(foo.f):
(foo):
* tests/stress/tricky-infinite-loop-that-uses-captured-variables-and-creates-the-activation-outside-the-loop.js: Added.
(bar):
(foo.f):
(foo):
* tests/stress/tricky-infinite-loop-that-uses-captured-variables.js: Added.
(bar):
(foo):
(noInline):
Source/WTF: Remove IdentifierTable typedef, isIdentifier()
https://bugs.webkit.org/show_bug.cgi?id=130533
Rubber stamped by Geoff Garen.
Code should use AtomicStringTable, isAtomic() directly.
* wtf/WTFThreadData.h:
(WTF::WTFThreadData::setCurrentAtomicStringTable):
(WTF::WTFThreadData::resetCurrentAtomicStringTable):
- removed IdentifierTypedef.
* wtf/text/StringImpl.h:
(WTF::StringImpl::flagIsAtomic):
- renamed flagIsIdentfier -> flagIsAtomic.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceJavaScriptCoreAPIJSClassRefcpp">trunk/Source/JavaScriptCore/API/JSClassRef.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreAPIJSClassRefh">trunk/Source/JavaScriptCore/API/JSClassRef.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreChangeLog">trunk/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCorebytecodeSpeculatedTypecpp">trunk/Source/JavaScriptCore/bytecode/SpeculatedType.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCorebytecompilerBytecodeGeneratorcpp">trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGSpeculativeJITcpp">trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreftlFTLLowerDFGToLLVMcpp">trunk/Source/JavaScriptCore/ftl/FTLLowerDFGToLLVM.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreheapHeapcpp">trunk/Source/JavaScriptCore/heap/Heap.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreinterpreterCallFrameh">trunk/Source/JavaScriptCore/interpreter/CallFrame.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreparserASTBuilderh">trunk/Source/JavaScriptCore/parser/ASTBuilder.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreparserParsercpp">trunk/Source/JavaScriptCore/parser/Parser.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeCompletioncpp">trunk/Source/JavaScriptCore/runtime/Completion.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeIdentifiercpp">trunk/Source/JavaScriptCore/runtime/Identifier.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeIdentifierh">trunk/Source/JavaScriptCore/runtime/Identifier.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeIdentifierInlinesh">trunk/Source/JavaScriptCore/runtime/IdentifierInlines.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeJSCJSValuecpp">trunk/Source/JavaScriptCore/runtime/JSCJSValue.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeJSLockcpp">trunk/Source/JavaScriptCore/runtime/JSLock.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeJSLockh">trunk/Source/JavaScriptCore/runtime/JSLock.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimePropertyMapHashTableh">trunk/Source/JavaScriptCore/runtime/PropertyMapHashTable.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimePropertyNameh">trunk/Source/JavaScriptCore/runtime/PropertyName.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimePropertyNameArraycpp">trunk/Source/JavaScriptCore/runtime/PropertyNameArray.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeVMcpp">trunk/Source/JavaScriptCore/runtime/VM.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeVMh">trunk/Source/JavaScriptCore/runtime/VM.h</a></li>
<li><a href="#trunkSourceWTFChangeLog">trunk/Source/WTF/ChangeLog</a></li>
<li><a href="#trunkSourceWTFwtfWTFThreadDatah">trunk/Source/WTF/wtf/WTFThreadData.h</a></li>
<li><a href="#trunkSourceWTFwtftextAtomicStringcpp">trunk/Source/WTF/wtf/text/AtomicString.cpp</a></li>
<li><a href="#trunkSourceWTFwtftextAtomicStringh">trunk/Source/WTF/wtf/text/AtomicString.h</a></li>
<li><a href="#trunkSourceWTFwtftextStringImplh">trunk/Source/WTF/wtf/text/StringImpl.h</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceJavaScriptCoreAPIJSClassRefcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/API/JSClassRef.cpp (165998 => 165999)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/API/JSClassRef.cpp        2014-03-20 21:02:31 UTC (rev 165998)
+++ trunk/Source/JavaScriptCore/API/JSClassRef.cpp        2014-03-20 21:05:49 UTC (rev 165999)
</span><span class="lines">@@ -88,19 +88,19 @@
</span><span class="cx"> OpaqueJSClass::~OpaqueJSClass()
</span><span class="cx"> {
</span><span class="cx"> // The empty string is shared across threads & is an identifier, in all other cases we should have done a deep copy in className(), below.
</span><del>- ASSERT(!m_className.length() || !m_className.impl()->isIdentifier());
</del><ins>+ ASSERT(!m_className.length() || !m_className.impl()->isAtomic());
</ins><span class="cx">
</span><span class="cx"> #ifndef NDEBUG
</span><span class="cx"> if (m_staticValues) {
</span><span class="cx"> OpaqueJSClassStaticValuesTable::const_iterator end = m_staticValues->end();
</span><span class="cx"> for (OpaqueJSClassStaticValuesTable::const_iterator it = m_staticValues->begin(); it != end; ++it)
</span><del>- ASSERT(!it->key->isIdentifier());
</del><ins>+ ASSERT(!it->key->isAtomic());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (m_staticFunctions) {
</span><span class="cx"> OpaqueJSClassStaticFunctionsTable::const_iterator end = m_staticFunctions->end();
</span><span class="cx"> for (OpaqueJSClassStaticFunctionsTable::const_iterator it = m_staticFunctions->begin(); it != end; ++it)
</span><del>- ASSERT(!it->key->isIdentifier());
</del><ins>+ ASSERT(!it->key->isAtomic());
</ins><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx">
</span><span class="lines">@@ -134,7 +134,7 @@
</span><span class="cx"> staticValues = std::make_unique<OpaqueJSClassStaticValuesTable>();
</span><span class="cx"> OpaqueJSClassStaticValuesTable::const_iterator end = jsClass->m_staticValues->end();
</span><span class="cx"> for (OpaqueJSClassStaticValuesTable::const_iterator it = jsClass->m_staticValues->begin(); it != end; ++it) {
</span><del>- ASSERT(!it->key->isIdentifier());
</del><ins>+ ASSERT(!it->key->isAtomic());
</ins><span class="cx"> String valueName = it->key->isolatedCopy();
</span><span class="cx"> staticValues->add(valueName.impl(), std::make_unique<StaticValueEntry>(it->value->getProperty, it->value->setProperty, it->value->attributes, valueName));
</span><span class="cx"> }
</span><span class="lines">@@ -144,7 +144,7 @@
</span><span class="cx"> staticFunctions = std::make_unique<OpaqueJSClassStaticFunctionsTable>();
</span><span class="cx"> OpaqueJSClassStaticFunctionsTable::const_iterator end = jsClass->m_staticFunctions->end();
</span><span class="cx"> for (OpaqueJSClassStaticFunctionsTable::const_iterator it = jsClass->m_staticFunctions->begin(); it != end; ++it) {
</span><del>- ASSERT(!it->key->isIdentifier());
</del><ins>+ ASSERT(!it->key->isAtomic());
</ins><span class="cx"> staticFunctions->add(it->key->isolatedCopy(), std::make_unique<StaticFunctionEntry>(it->value->callAsFunction, it->value->attributes));
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="lines">@@ -160,7 +160,7 @@
</span><span class="cx">
</span><span class="cx"> String OpaqueJSClass::className()
</span><span class="cx"> {
</span><del>- // Make a deep copy, so that the caller has no chance to put the original into IdentifierTable.
</del><ins>+ // Make a deep copy, so that the caller has no chance to put the original into AtomicStringTable.
</ins><span class="cx"> return m_className.isolatedCopy();
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreAPIJSClassRefh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/API/JSClassRef.h (165998 => 165999)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/API/JSClassRef.h        2014-03-20 21:02:31 UTC (rev 165998)
+++ trunk/Source/JavaScriptCore/API/JSClassRef.h        2014-03-20 21:05:49 UTC (rev 165999)
</span><span class="lines">@@ -118,7 +118,7 @@
</span><span class="cx">
</span><span class="cx"> OpaqueJSClassContextData& contextData(JSC::ExecState*);
</span><span class="cx">
</span><del>- // Strings in these data members should not be put into any IdentifierTable.
</del><ins>+ // Strings in these data members should not be put into any AtomicStringTable.
</ins><span class="cx"> String m_className;
</span><span class="cx"> OwnPtr<OpaqueJSClassStaticValuesTable> m_staticValues;
</span><span class="cx"> OwnPtr<OpaqueJSClassStaticFunctionsTable> m_staticFunctions;
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (165998 => 165999)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog        2014-03-20 21:02:31 UTC (rev 165998)
+++ trunk/Source/JavaScriptCore/ChangeLog        2014-03-20 21:05:49 UTC (rev 165999)
</span><span class="lines">@@ -107,6 +107,68 @@
</span><span class="cx">
</span><span class="cx"> 2014-03-20 Gavin Barraclough <barraclough@apple.com>
</span><span class="cx">
</span><ins>+ Remove IdentifierTable typedef, isIdentifier()
+ https://bugs.webkit.org/show_bug.cgi?id=130533
+
+ Rubber stamped by Geoff Garen.
+
+ Code should use AtomicStringTable, isAtomic() directly.
+
+ * API/JSClassRef.cpp:
+ (OpaqueJSClass::~OpaqueJSClass):
+ (OpaqueJSClassContextData::OpaqueJSClassContextData):
+ (OpaqueJSClass::className):
+ * API/JSClassRef.h:
+ * bytecode/SpeculatedType.cpp:
+ (JSC::speculationFromCell):
+ * bytecompiler/BytecodeGenerator.cpp:
+ (JSC::BytecodeGenerator::BytecodeGenerator):
+ * dfg/DFGSpeculativeJIT.cpp:
+ (JSC::DFG::SpeculativeJIT::compileIn):
+ (JSC::DFG::SpeculativeJIT::speculateStringIdentAndLoadStorage):
+ * ftl/FTLLowerDFGToLLVM.cpp:
+ (JSC::FTL::LowerDFGToLLVM::speculateStringIdent):
+ * heap/Heap.cpp:
+ (JSC::Heap::collect):
+ * interpreter/CallFrame.h:
+ (JSC::ExecState::atomicStringTable):
+ * parser/ASTBuilder.h:
+ (JSC::ASTBuilder::addVar):
+ * parser/Parser.cpp:
+ (JSC::Parser<LexerType>::createBindingPattern):
+ * runtime/Completion.cpp:
+ (JSC::checkSyntax):
+ (JSC::evaluate):
+ * runtime/Identifier.cpp:
+ (JSC::Identifier::checkCurrentAtomicStringTable):
+ * runtime/Identifier.h:
+ (JSC::Identifier::Identifier):
+ * runtime/IdentifierInlines.h:
+ (JSC::Identifier::add):
+ * runtime/JSCJSValue.cpp:
+ (JSC::JSValue::dumpInContext):
+ * runtime/JSLock.cpp:
+ (JSC::JSLock::didAcquireLock):
+ (JSC::JSLock::willReleaseLock):
+ (JSC::JSLock::DropAllLocks::DropAllLocks):
+ (JSC::JSLock::DropAllLocks::~DropAllLocks):
+ * runtime/JSLock.h:
+ * runtime/PropertyMapHashTable.h:
+ (JSC::PropertyTable::find):
+ (JSC::PropertyTable::get):
+ (JSC::PropertyTable::findWithString):
+ * runtime/PropertyName.h:
+ (JSC::PropertyName::PropertyName):
+ * runtime/PropertyNameArray.cpp:
+ (JSC::PropertyNameArray::add):
+ * runtime/VM.cpp:
+ (JSC::VM::VM):
+ (JSC::VM::~VM):
+ * runtime/VM.h:
+ (JSC::VM::atomicStringTable):
+
+2014-03-20 Gavin Barraclough <barraclough@apple.com>
+
</ins><span class="cx"> Merge AtomicString, Identifier
</span><span class="cx"> https://bugs.webkit.org/show_bug.cgi?id=128624
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebytecodeSpeculatedTypecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/bytecode/SpeculatedType.cpp (165998 => 165999)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/bytecode/SpeculatedType.cpp        2014-03-20 21:02:31 UTC (rev 165998)
+++ trunk/Source/JavaScriptCore/bytecode/SpeculatedType.cpp        2014-03-20 21:05:49 UTC (rev 165999)
</span><span class="lines">@@ -331,7 +331,7 @@
</span><span class="cx"> {
</span><span class="cx"> if (JSString* string = jsDynamicCast<JSString*>(cell)) {
</span><span class="cx"> if (const StringImpl* impl = string->tryGetValueImpl()) {
</span><del>- if (impl->isIdentifier())
</del><ins>+ if (impl->isAtomic())
</ins><span class="cx"> return SpecStringIdent;
</span><span class="cx"> }
</span><span class="cx"> return SpecStringVar;
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebytecompilerBytecodeGeneratorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp (165998 => 165999)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp        2014-03-20 21:02:31 UTC (rev 165998)
+++ trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp        2014-03-20 21:05:49 UTC (rev 165999)
</span><span class="lines">@@ -454,7 +454,7 @@
</span><span class="cx"> Vector<Identifier, 0, UnsafeVectorOverflow> variables;
</span><span class="cx"> variables.reserveCapacity(numVariables);
</span><span class="cx"> for (size_t i = 0; i < numVariables; ++i) {
</span><del>- ASSERT(varStack[i].first.impl()->isIdentifier());
</del><ins>+ ASSERT(varStack[i].first.impl()->isAtomic());
</ins><span class="cx"> variables.append(varStack[i].first);
</span><span class="cx"> }
</span><span class="cx"> codeBlock->adoptVariables(variables);
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGSpeculativeJITcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp (165998 => 165999)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp        2014-03-20 21:02:31 UTC (rev 165998)
+++ trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp        2014-03-20 21:05:49 UTC (rev 165999)
</span><span class="lines">@@ -860,7 +860,7 @@
</span><span class="cx"> JSString* string =
</span><span class="cx"> jsDynamicCast<JSString*>(valueOfJSConstant(node->child1().node()));
</span><span class="cx"> if (string && string->tryGetValueImpl()
</span><del>- && string->tryGetValueImpl()->isIdentifier()) {
</del><ins>+ && string->tryGetValueImpl()->isAtomic()) {
</ins><span class="cx"> StructureStubInfo* stubInfo = m_jit.codeBlock()->addStubInfo();
</span><span class="cx">
</span><span class="cx"> GPRTemporary result(this);
</span><span class="lines">@@ -4644,7 +4644,7 @@
</span><span class="cx"> BadType, JSValueSource::unboxedCell(string), edge, m_jit.branchTest32(
</span><span class="cx"> MacroAssembler::Zero,
</span><span class="cx"> MacroAssembler::Address(storage, StringImpl::flagsOffset()),
</span><del>- MacroAssembler::TrustedImm32(StringImpl::flagIsIdentifier())));
</del><ins>+ MacroAssembler::TrustedImm32(StringImpl::flagIsAtomic())));
</ins><span class="cx">
</span><span class="cx"> m_interpreter.filter(edge, SpecStringIdent | ~SpecString);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreftlFTLLowerDFGToLLVMcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ftl/FTLLowerDFGToLLVM.cpp (165998 => 165999)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ftl/FTLLowerDFGToLLVM.cpp        2014-03-20 21:02:31 UTC (rev 165998)
+++ trunk/Source/JavaScriptCore/ftl/FTLLowerDFGToLLVM.cpp        2014-03-20 21:05:49 UTC (rev 165999)
</span><span class="lines">@@ -5436,7 +5436,7 @@
</span><span class="cx"> BadType, jsValueValue(string), edge.node(),
</span><span class="cx"> m_out.testIsZero32(
</span><span class="cx"> m_out.load32(stringImpl, m_heaps.StringImpl_hashAndFlags),
</span><del>- m_out.constInt32(StringImpl::flagIsIdentifier())));
</del><ins>+ m_out.constInt32(StringImpl::flagIsAtomic())));
</ins><span class="cx"> m_interpreter.filter(edge, SpecStringIdent | ~SpecString);
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreheapHeapcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/heap/Heap.cpp (165998 => 165999)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/heap/Heap.cpp        2014-03-20 21:02:31 UTC (rev 165998)
+++ trunk/Source/JavaScriptCore/heap/Heap.cpp        2014-03-20 21:05:49 UTC (rev 165999)
</span><span class="lines">@@ -180,7 +180,7 @@
</span><span class="cx">
</span><span class="cx"> static inline bool isValidThreadState(VM* vm)
</span><span class="cx"> {
</span><del>- if (vm->identifierTable != wtfThreadData().currentIdentifierTable())
</del><ins>+ if (vm->atomicStringTable() != wtfThreadData().atomicStringTable())
</ins><span class="cx"> return false;
</span><span class="cx">
</span><span class="cx"> if (vm->isSharedInstance() && !isValidSharedInstanceThreadState(vm))
</span><span class="lines">@@ -887,7 +887,7 @@
</span><span class="cx"> RELEASE_ASSERT(!m_deferralDepth);
</span><span class="cx"> GCPHASE(Collect);
</span><span class="cx"> ASSERT(vm()->currentThreadIsHoldingAPILock());
</span><del>- RELEASE_ASSERT(vm()->identifierTable == wtfThreadData().currentIdentifierTable());
</del><ins>+ RELEASE_ASSERT(vm()->atomicStringTable() == wtfThreadData().atomicStringTable());
</ins><span class="cx"> ASSERT(m_isSafeToCollect);
</span><span class="cx"> JAVASCRIPTCORE_GC_BEGIN();
</span><span class="cx"> RELEASE_ASSERT(m_operationInProgress == NoOperation);
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinterpreterCallFrameh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/interpreter/CallFrame.h (165998 => 165999)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/interpreter/CallFrame.h        2014-03-20 21:02:31 UTC (rev 165998)
+++ trunk/Source/JavaScriptCore/interpreter/CallFrame.h        2014-03-20 21:05:49 UTC (rev 165999)
</span><span class="lines">@@ -81,7 +81,7 @@
</span><span class="cx"> JSValue exception() const { return vm().exception(); }
</span><span class="cx"> bool hadException() const { return !vm().exception().isEmpty(); }
</span><span class="cx">
</span><del>- IdentifierTable& atomicStringTable() const { return vm().atomicStringTable(); }
</del><ins>+ AtomicStringTable* atomicStringTable() const { return vm().atomicStringTable(); }
</ins><span class="cx"> const CommonIdentifiers& propertyNames() const { return *vm().propertyNames; }
</span><span class="cx"> const MarkedArgumentBuffer& emptyList() const { return *vm().emptyList; }
</span><span class="cx"> Interpreter* interpreter() { return vm().interpreter; }
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreparserASTBuilderh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/parser/ASTBuilder.h (165998 => 165999)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/parser/ASTBuilder.h        2014-03-20 21:02:31 UTC (rev 165998)
+++ trunk/Source/JavaScriptCore/parser/ASTBuilder.h        2014-03-20 21:05:49 UTC (rev 165999)
</span><span class="lines">@@ -549,7 +549,7 @@
</span><span class="cx"> {
</span><span class="cx"> if (m_vm->propertyNames->arguments == *ident)
</span><span class="cx"> usesArguments();
</span><del>- ASSERT(ident->impl()->isIdentifier());
</del><ins>+ ASSERT(ident->impl()->isAtomic());
</ins><span class="cx"> m_scope.m_varDeclarations->data.append(std::make_pair(*ident, attrs));
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreparserParsercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/parser/Parser.cpp (165998 => 165999)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/parser/Parser.cpp        2014-03-20 21:02:31 UTC (rev 165998)
+++ trunk/Source/JavaScriptCore/parser/Parser.cpp        2014-03-20 21:05:49 UTC (rev 165999)
</span><span class="lines">@@ -508,7 +508,7 @@
</span><span class="cx"> ASSERT(!name.isEmpty());
</span><span class="cx"> ASSERT(!name.isNull());
</span><span class="cx">
</span><del>- ASSERT(name.impl()->isIdentifier());
</del><ins>+ ASSERT(name.impl()->isAtomic());
</ins><span class="cx"> if (depth) {
</span><span class="cx"> if (kind == DeconstructToVariables)
</span><span class="cx"> failIfFalseIfStrict(declareVariable(&name), "Cannot deconstruct to a variable named '", name.impl(), "' in strict mode");
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeCompletioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/Completion.cpp (165998 => 165999)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/Completion.cpp        2014-03-20 21:02:31 UTC (rev 165998)
+++ trunk/Source/JavaScriptCore/runtime/Completion.cpp        2014-03-20 21:05:49 UTC (rev 165999)
</span><span class="lines">@@ -38,7 +38,7 @@
</span><span class="cx"> bool checkSyntax(ExecState* exec, const SourceCode& source, JSValue* returnedException)
</span><span class="cx"> {
</span><span class="cx"> JSLockHolder lock(exec);
</span><del>- RELEASE_ASSERT(exec->vm().identifierTable == wtfThreadData().currentIdentifierTable());
</del><ins>+ RELEASE_ASSERT(exec->vm().atomicStringTable() == wtfThreadData().atomicStringTable());
</ins><span class="cx">
</span><span class="cx"> ProgramExecutable* program = ProgramExecutable::create(exec, source);
</span><span class="cx"> JSObject* error = program->checkSyntax(exec);
</span><span class="lines">@@ -54,7 +54,7 @@
</span><span class="cx"> bool checkSyntax(VM& vm, const SourceCode& source, ParserError& error)
</span><span class="cx"> {
</span><span class="cx"> JSLockHolder lock(vm);
</span><del>- RELEASE_ASSERT(vm.identifierTable == wtfThreadData().currentIdentifierTable());
</del><ins>+ RELEASE_ASSERT(vm.atomicStringTable() == wtfThreadData().atomicStringTable());
</ins><span class="cx"> RefPtr<ProgramNode> programNode = parse<ProgramNode>(&vm, source, 0, Identifier(), JSParseNormal, JSParseProgramCode, error);
</span><span class="cx"> return programNode;
</span><span class="cx"> }
</span><span class="lines">@@ -62,7 +62,7 @@
</span><span class="cx"> JSValue evaluate(ExecState* exec, const SourceCode& source, JSValue thisValue, JSValue* returnedException)
</span><span class="cx"> {
</span><span class="cx"> JSLockHolder lock(exec);
</span><del>- RELEASE_ASSERT(exec->vm().identifierTable == wtfThreadData().currentIdentifierTable());
</del><ins>+ RELEASE_ASSERT(exec->vm().atomicStringTable() == wtfThreadData().atomicStringTable());
</ins><span class="cx"> RELEASE_ASSERT(!exec->vm().isCollectorBusy());
</span><span class="cx">
</span><span class="cx"> CodeProfiling profile(source);
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeIdentifiercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/Identifier.cpp (165998 => 165999)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/Identifier.cpp        2014-03-20 21:02:31 UTC (rev 165998)
+++ trunk/Source/JavaScriptCore/runtime/Identifier.cpp        2014-03-20 21:05:49 UTC (rev 165999)
</span><span class="lines">@@ -32,23 +32,12 @@
</span><span class="cx"> #include <wtf/FastMalloc.h>
</span><span class="cx"> #include <wtf/HashSet.h>
</span><span class="cx"> #include <wtf/text/ASCIIFastPath.h>
</span><del>-#include <wtf/text/AtomicStringTable.h>
</del><span class="cx"> #include <wtf/text/StringHash.h>
</span><span class="cx">
</span><span class="cx"> using WTF::ThreadSpecific;
</span><span class="cx">
</span><span class="cx"> namespace JSC {
</span><span class="cx">
</span><del>-IdentifierTable* createIdentifierTable()
-{
- return new IdentifierTable;
-}
-
-void deleteIdentifierTable(IdentifierTable* table)
-{
- delete table;
-}
-
</del><span class="cx"> PassRef<StringImpl> Identifier::add(VM* vm, const char* c)
</span><span class="cx"> {
</span><span class="cx"> ASSERT(c);
</span><span class="lines">@@ -110,24 +99,24 @@
</span><span class="cx">
</span><span class="cx"> #ifndef NDEBUG
</span><span class="cx">
</span><del>-void Identifier::checkCurrentIdentifierTable(VM* vm)
</del><ins>+void Identifier::checkCurrentAtomicStringTable(VM* vm)
</ins><span class="cx"> {
</span><span class="cx"> // Check the identifier table accessible through the threadspecific matches the
</span><span class="cx"> // vm's identifier table.
</span><del>- ASSERT_UNUSED(vm, vm->identifierTable == wtfThreadData().currentIdentifierTable());
</del><ins>+ ASSERT_UNUSED(vm, vm->atomicStringTable() == wtfThreadData().atomicStringTable());
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-void Identifier::checkCurrentIdentifierTable(ExecState* exec)
</del><ins>+void Identifier::checkCurrentAtomicStringTable(ExecState* exec)
</ins><span class="cx"> {
</span><del>- checkCurrentIdentifierTable(&exec->vm());
</del><ins>+ checkCurrentAtomicStringTable(&exec->vm());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #else
</span><span class="cx">
</span><span class="cx"> // These only exists so that our exports are the same for debug and release builds.
</span><span class="cx"> // This would be an RELEASE_ASSERT_NOT_REACHED(), but we're in NDEBUG only code here!
</span><del>-NO_RETURN_DUE_TO_CRASH void Identifier::checkCurrentIdentifierTable(VM*) { CRASH(); }
-NO_RETURN_DUE_TO_CRASH void Identifier::checkCurrentIdentifierTable(ExecState*) { CRASH(); }
</del><ins>+NO_RETURN_DUE_TO_CRASH void Identifier::checkCurrentAtomicStringTable(VM*) { CRASH(); }
+NO_RETURN_DUE_TO_CRASH void Identifier::checkCurrentAtomicStringTable(ExecState*) { CRASH(); }
</ins><span class="cx">
</span><span class="cx"> #endif
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeIdentifierh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/Identifier.h (165998 => 165999)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/Identifier.h        2014-03-20 21:02:31 UTC (rev 165998)
+++ trunk/Source/JavaScriptCore/runtime/Identifier.h        2014-03-20 21:05:49 UTC (rev 165999)
</span><span class="lines">@@ -36,21 +36,21 @@
</span><span class="cx"> public:
</span><span class="cx"> Identifier() { }
</span><span class="cx"> enum EmptyIdentifierFlag { EmptyIdentifier };
</span><del>- Identifier(EmptyIdentifierFlag) : m_string(StringImpl::empty()) { ASSERT(m_string.impl()->isIdentifier()); }
</del><ins>+ Identifier(EmptyIdentifierFlag) : m_string(StringImpl::empty()) { ASSERT(m_string.impl()->isAtomic()); }
</ins><span class="cx">
</span><span class="cx"> // Only to be used with string literals.
</span><span class="cx"> template<unsigned charactersCount>
</span><del>- Identifier(ExecState* exec, const char (&characters)[charactersCount]) : m_string(add(exec, characters)) { ASSERT(m_string.impl()->isIdentifier()); }
</del><ins>+ Identifier(ExecState* exec, const char (&characters)[charactersCount]) : m_string(add(exec, characters)) { ASSERT(m_string.impl()->isAtomic()); }
</ins><span class="cx"> template<unsigned charactersCount>
</span><del>- Identifier(VM* vm, const char (&characters)[charactersCount]) : m_string(add(vm, characters)) { ASSERT(m_string.impl()->isIdentifier()); }
</del><ins>+ Identifier(VM* vm, const char (&characters)[charactersCount]) : m_string(add(vm, characters)) { ASSERT(m_string.impl()->isAtomic()); }
</ins><span class="cx">
</span><del>- Identifier(ExecState* exec, StringImpl* rep) : m_string(add(exec, rep)) { ASSERT(m_string.impl()->isIdentifier()); }
- Identifier(ExecState* exec, const String& s) : m_string(add(exec, s.impl())) { ASSERT(m_string.impl()->isIdentifier()); }
</del><ins>+ Identifier(ExecState* exec, StringImpl* rep) : m_string(add(exec, rep)) { ASSERT(m_string.impl()->isAtomic()); }
+ Identifier(ExecState* exec, const String& s) : m_string(add(exec, s.impl())) { ASSERT(m_string.impl()->isAtomic()); }
</ins><span class="cx">
</span><del>- Identifier(VM* vm, const LChar* s, int length) : m_string(add(vm, s, length)) { ASSERT(m_string.impl()->isIdentifier()); }
- Identifier(VM* vm, const UChar* s, int length) : m_string(add(vm, s, length)) { ASSERT(m_string.impl()->isIdentifier()); }
- Identifier(VM* vm, StringImpl* rep) : m_string(add(vm, rep)) { ASSERT(m_string.impl()->isIdentifier()); }
- Identifier(VM* vm, const String& s) : m_string(add(vm, s.impl())) { ASSERT(m_string.impl()->isIdentifier()); }
</del><ins>+ Identifier(VM* vm, const LChar* s, int length) : m_string(add(vm, s, length)) { ASSERT(m_string.impl()->isAtomic()); }
+ Identifier(VM* vm, const UChar* s, int length) : m_string(add(vm, s, length)) { ASSERT(m_string.impl()->isAtomic()); }
+ Identifier(VM* vm, StringImpl* rep) : m_string(add(vm, rep)) { ASSERT(m_string.impl()->isAtomic()); }
+ Identifier(VM* vm, const String& s) : m_string(add(vm, s.impl())) { ASSERT(m_string.impl()->isAtomic()); }
</ins><span class="cx">
</span><span class="cx"> const String& string() const { return m_string; }
</span><span class="cx"> StringImpl* impl() const { return m_string.impl(); }
</span><span class="lines">@@ -113,8 +113,8 @@
</span><span class="cx"> static PassRef<StringImpl> add(ExecState*, StringImpl*);
</span><span class="cx"> static PassRef<StringImpl> add(VM*, StringImpl*);
</span><span class="cx">
</span><del>- JS_EXPORT_PRIVATE static void checkCurrentIdentifierTable(ExecState*);
- JS_EXPORT_PRIVATE static void checkCurrentIdentifierTable(VM*);
</del><ins>+ JS_EXPORT_PRIVATE static void checkCurrentAtomicStringTable(ExecState*);
+ JS_EXPORT_PRIVATE static void checkCurrentAtomicStringTable(VM*);
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> template <> ALWAYS_INLINE bool Identifier::canUseSingleCharacterString(LChar)
</span><span class="lines">@@ -187,9 +187,6 @@
</span><span class="cx"> return WTF::equal(r, s, length);
</span><span class="cx"> }
</span><span class="cx">
</span><del>- IdentifierTable* createIdentifierTable();
- void deleteIdentifierTable(IdentifierTable*);
-
</del><span class="cx"> struct IdentifierRepHash : PtrHash<RefPtr<StringImpl>> {
</span><span class="cx"> static unsigned hash(const RefPtr<StringImpl>& key) { return key->existingHash(); }
</span><span class="cx"> static unsigned hash(StringImpl* key) { return key->existingHash(); }
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeIdentifierInlinesh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/IdentifierInlines.h (165998 => 165999)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/IdentifierInlines.h        2014-03-20 21:02:31 UTC (rev 165998)
+++ trunk/Source/JavaScriptCore/runtime/IdentifierInlines.h        2014-03-20 21:05:49 UTC (rev 165999)
</span><span class="lines">@@ -34,14 +34,14 @@
</span><span class="cx"> inline PassRef<StringImpl> Identifier::add(ExecState* exec, StringImpl* r)
</span><span class="cx"> {
</span><span class="cx"> #ifndef NDEBUG
</span><del>- checkCurrentIdentifierTable(exec);
</del><ins>+ checkCurrentAtomicStringTable(exec);
</ins><span class="cx"> #endif
</span><span class="cx"> return *AtomicString::addWithStringTableProvider(*exec, r);
</span><span class="cx"> }
</span><span class="cx"> inline PassRef<StringImpl> Identifier::add(VM* vm, StringImpl* r)
</span><span class="cx"> {
</span><span class="cx"> #ifndef NDEBUG
</span><del>- checkCurrentIdentifierTable(vm);
</del><ins>+ checkCurrentAtomicStringTable(vm);
</ins><span class="cx"> #endif
</span><span class="cx"> return *AtomicString::addWithStringTableProvider(*vm, r);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeJSCJSValuecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/JSCJSValue.cpp (165998 => 165999)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/JSCJSValue.cpp        2014-03-20 21:02:31 UTC (rev 165998)
+++ trunk/Source/JavaScriptCore/runtime/JSCJSValue.cpp        2014-03-20 21:05:49 UTC (rev 165999)
</span><span class="lines">@@ -216,7 +216,7 @@
</span><span class="cx"> if (impl) {
</span><span class="cx"> if (impl->isAtomic())
</span><span class="cx"> out.print(" (atomic)");
</span><del>- if (impl->isIdentifier())
</del><ins>+ if (impl->isAtomic())
</ins><span class="cx"> out.print(" (identifier)");
</span><span class="cx"> if (impl->isEmptyUnique())
</span><span class="cx"> out.print(" (unique)");
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeJSLockcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/JSLock.cpp (165998 => 165999)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/JSLock.cpp        2014-03-20 21:02:31 UTC (rev 165998)
+++ trunk/Source/JavaScriptCore/runtime/JSLock.cpp        2014-03-20 21:05:49 UTC (rev 165999)
</span><span class="lines">@@ -139,7 +139,7 @@
</span><span class="cx"> WTFThreadData& threadData = wtfThreadData();
</span><span class="cx"> m_vm->setLastStackTop(threadData.savedLastStackTop());
</span><span class="cx">
</span><del>- m_entryIdentifierTable = threadData.setCurrentIdentifierTable(m_vm->identifierTable);
</del><ins>+ m_entryAtomicStringTable = threadData.setCurrentAtomicStringTable(m_vm->atomicStringTable());
</ins><span class="cx"> m_vm->heap.machineThreads().addCurrentThread();
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -170,7 +170,7 @@
</span><span class="cx"> if (m_vm)
</span><span class="cx"> m_vm->setStackPointerAtVMEntry(nullptr);
</span><span class="cx">
</span><del>- wtfThreadData().setCurrentIdentifierTable(m_entryIdentifierTable);
</del><ins>+ wtfThreadData().setCurrentAtomicStringTable(m_entryAtomicStringTable);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void JSLock::lock(ExecState* exec)
</span><span class="lines">@@ -251,7 +251,7 @@
</span><span class="cx"> {
</span><span class="cx"> if (!m_vm)
</span><span class="cx"> return;
</span><del>- wtfThreadData().resetCurrentIdentifierTable();
</del><ins>+ wtfThreadData().resetCurrentAtomicStringTable();
</ins><span class="cx"> RELEASE_ASSERT(!m_vm->isCollectorBusy());
</span><span class="cx"> m_droppedLockCount = m_vm->apiLock().dropAllLocks(this);
</span><span class="cx"> }
</span><span class="lines">@@ -271,7 +271,7 @@
</span><span class="cx"> if (!m_vm)
</span><span class="cx"> return;
</span><span class="cx"> m_vm->apiLock().grabAllLocks(this, m_droppedLockCount);
</span><del>- wtfThreadData().setCurrentIdentifierTable(m_vm->identifierTable);
</del><ins>+ wtfThreadData().setCurrentAtomicStringTable(m_vm->atomicStringTable());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> } // namespace JSC
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeJSLockh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/JSLock.h (165998 => 165999)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/JSLock.h        2014-03-20 21:02:31 UTC (rev 165998)
+++ trunk/Source/JavaScriptCore/runtime/JSLock.h        2014-03-20 21:05:49 UTC (rev 165999)
</span><span class="lines">@@ -139,7 +139,7 @@
</span><span class="cx"> unsigned m_lockDropDepth;
</span><span class="cx"> bool m_hasExclusiveThread;
</span><span class="cx"> VM* m_vm;
</span><del>- IdentifierTable* m_entryIdentifierTable;
</del><ins>+ AtomicStringTable* m_entryAtomicStringTable;
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> } // namespace
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimePropertyMapHashTableh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/PropertyMapHashTable.h (165998 => 165999)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/PropertyMapHashTable.h        2014-03-20 21:02:31 UTC (rev 165998)
+++ trunk/Source/JavaScriptCore/runtime/PropertyMapHashTable.h        2014-03-20 21:05:49 UTC (rev 165999)
</span><span class="lines">@@ -284,7 +284,7 @@
</span><span class="cx"> inline PropertyTable::find_iterator PropertyTable::find(const KeyType& key)
</span><span class="cx"> {
</span><span class="cx"> ASSERT(key);
</span><del>- ASSERT(key->isIdentifier() || key->isEmptyUnique());
</del><ins>+ ASSERT(key->isAtomic() || key->isEmptyUnique());
</ins><span class="cx"> unsigned hash = key->existingHash();
</span><span class="cx"> unsigned step = 0;
</span><span class="cx">
</span><span class="lines">@@ -316,7 +316,7 @@
</span><span class="cx"> inline PropertyTable::ValueType* PropertyTable::get(const KeyType& key)
</span><span class="cx"> {
</span><span class="cx"> ASSERT(key);
</span><del>- ASSERT(key->isIdentifier() || key->isEmptyUnique());
</del><ins>+ ASSERT(key->isAtomic() || key->isEmptyUnique());
</ins><span class="cx">
</span><span class="cx"> if (!m_keyCount)
</span><span class="cx"> return nullptr;
</span><span class="lines">@@ -352,7 +352,7 @@
</span><span class="cx"> inline PropertyTable::find_iterator PropertyTable::findWithString(const KeyType& key)
</span><span class="cx"> {
</span><span class="cx"> ASSERT(key);
</span><del>- ASSERT(!key->isIdentifier() && !key->hasHash());
</del><ins>+ ASSERT(!key->isAtomic() && !key->hasHash());
</ins><span class="cx"> unsigned hash = key->hash();
</span><span class="cx"> unsigned step = 0;
</span><span class="cx">
</span><span class="lines">@@ -365,7 +365,7 @@
</span><span class="cx"> if (entryIndex == EmptyEntryIndex)
</span><span class="cx"> return std::make_pair((ValueType*)0, hash & m_indexMask);
</span><span class="cx"> const KeyType& keyInMap = table()[entryIndex - 1].key;
</span><del>- if (equal(key, keyInMap) && keyInMap->isIdentifier())
</del><ins>+ if (equal(key, keyInMap) && keyInMap->isAtomic())
</ins><span class="cx"> return std::make_pair(&table()[entryIndex - 1], hash & m_indexMask);
</span><span class="cx">
</span><span class="cx"> #if DUMP_PROPERTYMAP_STATS
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimePropertyNameh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/PropertyName.h (165998 => 165999)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/PropertyName.h        2014-03-20 21:02:31 UTC (rev 165998)
+++ trunk/Source/JavaScriptCore/runtime/PropertyName.h        2014-03-20 21:05:49 UTC (rev 165999)
</span><span class="lines">@@ -81,7 +81,7 @@
</span><span class="cx"> PropertyName(const Identifier& propertyName)
</span><span class="cx"> : m_impl(propertyName.impl())
</span><span class="cx"> {
</span><del>- ASSERT(!m_impl || m_impl->isIdentifier());
</del><ins>+ ASSERT(!m_impl || m_impl->isAtomic());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> PropertyName(const PrivateName& propertyName)
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimePropertyNameArraycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/PropertyNameArray.cpp (165998 => 165999)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/PropertyNameArray.cpp        2014-03-20 21:02:31 UTC (rev 165998)
+++ trunk/Source/JavaScriptCore/runtime/PropertyNameArray.cpp        2014-03-20 21:05:49 UTC (rev 165999)
</span><span class="lines">@@ -32,7 +32,7 @@
</span><span class="cx">
</span><span class="cx"> void PropertyNameArray::add(StringImpl* identifier)
</span><span class="cx"> {
</span><del>- ASSERT(!identifier || identifier == StringImpl::empty() || identifier->isIdentifier());
</del><ins>+ ASSERT(!identifier || identifier == StringImpl::empty() || identifier->isAtomic());
</ins><span class="cx">
</span><span class="cx"> size_t size = m_data->propertyNameVector().size();
</span><span class="cx"> if (size < setThreshold) {
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeVMcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/VM.cpp (165998 => 165999)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/VM.cpp        2014-03-20 21:02:31 UTC (rev 165998)
+++ trunk/Source/JavaScriptCore/runtime/VM.cpp        2014-03-20 21:05:49 UTC (rev 165999)
</span><span class="lines">@@ -86,6 +86,7 @@
</span><span class="cx"> #include <wtf/StringPrintStream.h>
</span><span class="cx"> #include <wtf/Threading.h>
</span><span class="cx"> #include <wtf/WTFThreadData.h>
</span><ins>+#include <wtf/text/AtomicStringTable.h>
</ins><span class="cx">
</span><span class="cx"> #if ENABLE(DFG_JIT)
</span><span class="cx"> #include "ConservativeRoots.h"
</span><span class="lines">@@ -194,7 +195,7 @@
</span><span class="cx"> , promisePrototypeTable(adoptPtr(new HashTable(JSC::promisePrototypeTable)))
</span><span class="cx"> , promiseConstructorTable(adoptPtr(new HashTable(JSC::promiseConstructorTable)))
</span><span class="cx"> #endif
</span><del>- , identifierTable(vmType == Default ? wtfThreadData().currentIdentifierTable() : createIdentifierTable())
</del><ins>+ , m_atomicStringTable(vmType == Default ? wtfThreadData().atomicStringTable() : new AtomicStringTable)
</ins><span class="cx"> , propertyNames(nullptr)
</span><span class="cx"> , emptyList(new MarkedArgumentBuffer)
</span><span class="cx"> , parserArena(adoptPtr(new ParserArena))
</span><span class="lines">@@ -245,7 +246,7 @@
</span><span class="cx">
</span><span class="cx"> // Need to be careful to keep everything consistent here
</span><span class="cx"> JSLockHolder lock(this);
</span><del>- IdentifierTable* existingEntryIdentifierTable = wtfThreadData().setCurrentIdentifierTable(identifierTable);
</del><ins>+ AtomicStringTable* existingEntryAtomicStringTable = wtfThreadData().setCurrentAtomicStringTable(m_atomicStringTable);
</ins><span class="cx"> propertyNames = new CommonIdentifiers(this);
</span><span class="cx"> structureStructure.set(*this, Structure::createStructure(*this));
</span><span class="cx"> structureRareDataStructure.set(*this, StructureRareData::createStructure(*this, 0, jsNull()));
</span><span class="lines">@@ -282,7 +283,7 @@
</span><span class="cx"> iterationTerminator.set(*this, JSFinalObject::create(*this, JSFinalObject::createStructure(*this, 0, jsNull(), 1)));
</span><span class="cx"> smallStrings.initializeCommonStrings(*this);
</span><span class="cx">
</span><del>- wtfThreadData().setCurrentIdentifierTable(existingEntryIdentifierTable);
</del><ins>+ wtfThreadData().setCurrentAtomicStringTable(existingEntryAtomicStringTable);
</ins><span class="cx">
</span><span class="cx"> #if ENABLE(JIT)
</span><span class="cx"> jitStubs = adoptPtr(new JITThunks());
</span><span class="lines">@@ -381,7 +382,7 @@
</span><span class="cx">
</span><span class="cx"> delete propertyNames;
</span><span class="cx"> if (vmType != Default)
</span><del>- deleteIdentifierTable(identifierTable);
</del><ins>+ delete m_atomicStringTable;
</ins><span class="cx">
</span><span class="cx"> delete clientData;
</span><span class="cx"> delete m_regExpCache;
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeVMh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/VM.h (165998 => 165999)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/VM.h        2014-03-20 21:02:31 UTC (rev 165998)
+++ trunk/Source/JavaScriptCore/runtime/VM.h        2014-03-20 21:05:49 UTC (rev 165999)
</span><span class="lines">@@ -287,7 +287,7 @@
</span><span class="cx"> #endif
</span><span class="cx"> Strong<JSCell> iterationTerminator;
</span><span class="cx">
</span><del>- IdentifierTable* identifierTable;
</del><ins>+ AtomicStringTable* m_atomicStringTable;
</ins><span class="cx"> CommonIdentifiers* propertyNames;
</span><span class="cx"> const MarkedArgumentBuffer* emptyList; // Lists are supposed to be allocated on the stack to have their elements properly marked, which is not the case here - but this list has nothing to mark.
</span><span class="cx"> SmallStrings smallStrings;
</span><span class="lines">@@ -295,7 +295,7 @@
</span><span class="cx"> DateInstanceCache dateInstanceCache;
</span><span class="cx"> WTF::SimpleStats machineCodeBytesPerBytecodeWordForBaselineJIT;
</span><span class="cx">
</span><del>- IdentifierTable& atomicStringTable() const { return *identifierTable; }
</del><ins>+ AtomicStringTable* atomicStringTable() const { return m_atomicStringTable; }
</ins><span class="cx">
</span><span class="cx"> void setInDefineOwnProperty(bool inDefineOwnProperty)
</span><span class="cx"> {
</span></span></pre></div>
<a id="trunkSourceWTFChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/ChangeLog (165998 => 165999)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/ChangeLog        2014-03-20 21:02:31 UTC (rev 165998)
+++ trunk/Source/WTF/ChangeLog        2014-03-20 21:05:49 UTC (rev 165999)
</span><span class="lines">@@ -1,5 +1,22 @@
</span><span class="cx"> 2014-03-20 Gavin Barraclough <barraclough@apple.com>
</span><span class="cx">
</span><ins>+ Remove IdentifierTable typedef, isIdentifier()
+ https://bugs.webkit.org/show_bug.cgi?id=130533
+
+ Rubber stamped by Geoff Garen.
+
+ Code should use AtomicStringTable, isAtomic() directly.
+
+ * wtf/WTFThreadData.h:
+ (WTF::WTFThreadData::setCurrentAtomicStringTable):
+ (WTF::WTFThreadData::resetCurrentAtomicStringTable):
+ - removed IdentifierTypedef.
+ * wtf/text/StringImpl.h:
+ (WTF::StringImpl::flagIsAtomic):
+ - renamed flagIsIdentfier -> flagIsAtomic.
+
+2014-03-20 Gavin Barraclough <barraclough@apple.com>
+
</ins><span class="cx"> Merge AtomicString, Identifier
</span><span class="cx"> https://bugs.webkit.org/show_bug.cgi?id=128624
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWTFwtfWTFThreadDatah"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/wtf/WTFThreadData.h (165998 => 165999)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/wtf/WTFThreadData.h        2014-03-20 21:02:31 UTC (rev 165998)
+++ trunk/Source/WTF/wtf/WTFThreadData.h        2014-03-20 21:05:49 UTC (rev 165999)
</span><span class="lines">@@ -52,7 +52,6 @@
</span><span class="cx"> namespace WTF {
</span><span class="cx">
</span><span class="cx"> class AtomicStringTable;
</span><del>-typedef AtomicStringTable IdentifierTable;
</del><span class="cx">
</span><span class="cx"> typedef void (*AtomicStringTableDestructor)(AtomicStringTable*);
</span><span class="cx">
</span><span class="lines">@@ -67,20 +66,15 @@
</span><span class="cx"> return m_currentAtomicStringTable;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- IdentifierTable* currentIdentifierTable()
</del><ins>+ AtomicStringTable* setCurrentAtomicStringTable(AtomicStringTable* atomicStringTable)
</ins><span class="cx"> {
</span><del>- return m_currentAtomicStringTable;
</del><ins>+ AtomicStringTable* oldAtomicStringTable = m_currentAtomicStringTable;
+ m_currentAtomicStringTable = atomicStringTable;
+ return oldAtomicStringTable;
</ins><span class="cx"> }
</span><span class="cx">
</span><del>- IdentifierTable* setCurrentIdentifierTable(IdentifierTable* identifierTable)
</del><ins>+ void resetCurrentAtomicStringTable()
</ins><span class="cx"> {
</span><del>- IdentifierTable* oldIdentifierTable = m_currentAtomicStringTable;
- m_currentAtomicStringTable = identifierTable;
- return oldIdentifierTable;
- }
-
- void resetCurrentIdentifierTable()
- {
</del><span class="cx"> m_currentAtomicStringTable = m_defaultAtomicStringTable;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -169,6 +163,6 @@
</span><span class="cx">
</span><span class="cx"> using WTF::WTFThreadData;
</span><span class="cx"> using WTF::wtfThreadData;
</span><del>-using WTF::IdentifierTable;
</del><ins>+using WTF::AtomicStringTable;
</ins><span class="cx">
</span><span class="cx"> #endif // WTFThreadData_h
</span></span></pre></div>
<a id="trunkSourceWTFwtftextAtomicStringcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/wtf/text/AtomicString.cpp (165998 => 165999)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/wtf/text/AtomicString.cpp        2014-03-20 21:02:31 UTC (rev 165998)
+++ trunk/Source/WTF/wtf/text/AtomicString.cpp        2014-03-20 21:05:49 UTC (rev 165999)
</span><span class="lines">@@ -414,7 +414,7 @@
</span><span class="cx"> return *addResult.iterator;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-PassRefPtr<StringImpl> AtomicString::addSlowCase(AtomicStringTable& stringTable, StringImpl* string)
</del><ins>+PassRefPtr<StringImpl> AtomicString::addSlowCase(AtomicStringTable* stringTable, StringImpl* string)
</ins><span class="cx"> {
</span><span class="cx"> if (!string->length())
</span><span class="cx"> return StringImpl::empty();
</span><span class="lines">@@ -422,7 +422,7 @@
</span><span class="cx"> ASSERT_WITH_MESSAGE(!string->isAtomic(), "AtomicString should not hit the slow case if the string is already atomic.");
</span><span class="cx">
</span><span class="cx"> AtomicStringTableLocker locker;
</span><del>- HashSet<StringImpl*>::AddResult addResult = stringTable.table().add(string);
</del><ins>+ HashSet<StringImpl*>::AddResult addResult = stringTable->table().add(string);
</ins><span class="cx">
</span><span class="cx"> if (addResult.isNewEntry) {
</span><span class="cx"> ASSERT(*addResult.iterator == string);
</span></span></pre></div>
<a id="trunkSourceWTFwtftextAtomicStringh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/wtf/text/AtomicString.h (165998 => 165999)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/wtf/text/AtomicString.h        2014-03-20 21:02:31 UTC (rev 165998)
+++ trunk/Source/WTF/wtf/text/AtomicString.h        2014-03-20 21:05:49 UTC (rev 165999)
</span><span class="lines">@@ -207,7 +207,7 @@
</span><span class="cx"> String m_string;
</span><span class="cx">
</span><span class="cx"> WTF_EXPORT_STRING_API static PassRefPtr<StringImpl> addSlowCase(StringImpl*);
</span><del>- WTF_EXPORT_STRING_API static PassRefPtr<StringImpl> addSlowCase(AtomicStringTable&, StringImpl*);
</del><ins>+ WTF_EXPORT_STRING_API static PassRefPtr<StringImpl> addSlowCase(AtomicStringTable*, StringImpl*);
</ins><span class="cx">
</span><span class="cx"> WTF_EXPORT_STRING_API static AtomicStringImpl* findSlowCase(StringImpl&);
</span><span class="cx"> WTF_EXPORT_STRING_API static AtomicString fromUTF8Internal(const char*, const char*);
</span></span></pre></div>
<a id="trunkSourceWTFwtftextStringImplh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/wtf/text/StringImpl.h (165998 => 165999)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/wtf/text/StringImpl.h        2014-03-20 21:02:31 UTC (rev 165998)
+++ trunk/Source/WTF/wtf/text/StringImpl.h        2014-03-20 21:05:49 UTC (rev 165999)
</span><span class="lines">@@ -395,7 +395,7 @@
</span><span class="cx">
</span><span class="cx"> static unsigned flagsOffset() { return OBJECT_OFFSETOF(StringImpl, m_hashAndFlags); }
</span><span class="cx"> static unsigned flagIs8Bit() { return s_hashFlag8BitBuffer; }
</span><del>- static unsigned flagIsIdentifier() { return s_hashFlagIsAtomic; }
</del><ins>+ static unsigned flagIsAtomic() { return s_hashFlagIsAtomic; }
</ins><span class="cx"> static unsigned dataOffset() { return OBJECT_OFFSETOF(StringImpl, m_data8); }
</span><span class="cx">
</span><span class="cx"> template<typename CharType, size_t inlineCapacity, typename OverflowHandler>
</span><span class="lines">@@ -463,7 +463,6 @@
</span><span class="cx">
</span><span class="cx"> bool has16BitShadow() const { return m_hashAndFlags & s_hashFlagHas16BitShadow; }
</span><span class="cx"> WTF_EXPORT_STRING_API void upconvertCharacters(unsigned, unsigned) const;
</span><del>- bool isIdentifier() const { return isAtomic(); }
</del><span class="cx"> bool isEmptyUnique() const
</span><span class="cx"> {
</span><span class="cx"> return !length() && !isStatic();
</span></span></pre>
</div>
</div>
</body>
</html>