Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (176582 => 176583)
--- trunk/Source/_javascript_Core/ChangeLog 2014-11-29 23:40:30 UTC (rev 176582)
+++ trunk/Source/_javascript_Core/ChangeLog 2014-11-30 00:06:58 UTC (rev 176583)
@@ -1,3 +1,60 @@
+2014-11-29 Andreas Kling <[email protected]>
+
+ PropertyTable keys should be AtomicStringImpl.
+ <https://webkit.org/b/139096>
+
+ Reviewed by Sam Weinig.
+
+ Since PropertyTable keys are really always Identifiers, switch the key
+ type from StringImpl* to AtomicStringImpl*.
+
+ We have code in the GetByVal opcode implementations that assumes things
+ about this, so this change adds confidence to those algorithms.
+
+ * bytecode/ComplexGetStatus.cpp:
+ (JSC::ComplexGetStatus::computeFor):
+ * bytecode/ComplexGetStatus.h:
+ * bytecode/GetByIdStatus.cpp:
+ (JSC::GetByIdStatus::computeFromLLInt):
+ (JSC::GetByIdStatus::computeFor):
+ (JSC::GetByIdStatus::computeForStubInfo):
+ * bytecode/GetByIdStatus.h:
+ * bytecode/PutByIdStatus.cpp:
+ (JSC::PutByIdStatus::computeFromLLInt):
+ (JSC::PutByIdStatus::computeFor):
+ (JSC::PutByIdStatus::computeForStubInfo):
+ * bytecode/PutByIdStatus.h:
+ * dfg/DFGByteCodeParser.cpp:
+ (JSC::DFG::ByteCodeParser::parseBlock):
+ (JSC::DFG::ByteCodeParser::InlineStackEntry::InlineStackEntry):
+ * dfg/DFGDesiredIdentifiers.cpp:
+ (JSC::DFG::DesiredIdentifiers::addLazily):
+ (JSC::DFG::DesiredIdentifiers::at):
+ * dfg/DFGDesiredIdentifiers.h:
+ (JSC::DFG::DesiredIdentifiers::operator[]):
+ * dfg/DFGFixupPhase.cpp:
+ (JSC::DFG::FixupPhase::isStringPrototypeMethodSane):
+ * runtime/Identifier.h:
+ (JSC::Identifier::impl):
+ * runtime/IntendedStructureChain.cpp:
+ (JSC::IntendedStructureChain::mayInterceptStoreTo):
+ * runtime/IntendedStructureChain.h:
+ * runtime/PropertyMapHashTable.h:
+ * runtime/Structure.cpp:
+ (JSC::StructureTransitionTable::contains):
+ (JSC::StructureTransitionTable::get):
+ (JSC::Structure::addPropertyTransitionToExistingStructureImpl):
+ (JSC::Structure::addPropertyTransitionToExistingStructureConcurrently):
+ (JSC::Structure::getConcurrently):
+ (JSC::Structure::add):
+ (JSC::Structure::remove):
+ * runtime/Structure.h:
+ (JSC::PropertyMapEntry::PropertyMapEntry):
+ * runtime/StructureInlines.h:
+ (JSC::Structure::getConcurrently):
+ * runtime/StructureTransitionTable.h:
+ (JSC::StructureTransitionTable::Hash::hash):
+
2014-11-28 Gyuyoung Kim <[email protected]>
Use std::unique_ptr<>|make_unique<> in ftl, bytecode of JSC
Modified: trunk/Source/_javascript_Core/bytecode/ComplexGetStatus.cpp (176582 => 176583)
--- trunk/Source/_javascript_Core/bytecode/ComplexGetStatus.cpp 2014-11-29 23:40:30 UTC (rev 176582)
+++ trunk/Source/_javascript_Core/bytecode/ComplexGetStatus.cpp 2014-11-30 00:06:58 UTC (rev 176583)
@@ -32,7 +32,7 @@
ComplexGetStatus ComplexGetStatus::computeFor(
CodeBlock* profiledBlock, Structure* headStructure, StructureChain* chain,
- unsigned chainCount, StringImpl* uid)
+ unsigned chainCount, AtomicStringImpl* uid)
{
// FIXME: We should assert that we never see a structure that
// hasImpureGetOwnPropertySlot() but for which we don't
Modified: trunk/Source/_javascript_Core/bytecode/ComplexGetStatus.h (176582 => 176583)
--- trunk/Source/_javascript_Core/bytecode/ComplexGetStatus.h 2014-11-29 23:40:30 UTC (rev 176582)
+++ trunk/Source/_javascript_Core/bytecode/ComplexGetStatus.h 2014-11-30 00:06:58 UTC (rev 176583)
@@ -98,7 +98,7 @@
static ComplexGetStatus computeFor(
CodeBlock* profiledBlock, Structure* headStructure, StructureChain* chain,
- unsigned chainCount, StringImpl* uid);
+ unsigned chainCount, AtomicStringImpl* uid);
Kind kind() const { return m_kind; }
unsigned attributes() const { return m_attributes; }
Modified: trunk/Source/_javascript_Core/bytecode/GetByIdStatus.cpp (176582 => 176583)
--- trunk/Source/_javascript_Core/bytecode/GetByIdStatus.cpp 2014-11-29 23:40:30 UTC (rev 176582)
+++ trunk/Source/_javascript_Core/bytecode/GetByIdStatus.cpp 2014-11-30 00:06:58 UTC (rev 176583)
@@ -66,7 +66,7 @@
}
#endif
-GetByIdStatus GetByIdStatus::computeFromLLInt(CodeBlock* profiledBlock, unsigned bytecodeIndex, StringImpl* uid)
+GetByIdStatus GetByIdStatus::computeFromLLInt(CodeBlock* profiledBlock, unsigned bytecodeIndex, AtomicStringImpl* uid)
{
UNUSED_PARAM(profiledBlock);
UNUSED_PARAM(bytecodeIndex);
@@ -91,7 +91,7 @@
return GetByIdStatus(Simple, false, GetByIdVariant(StructureSet(structure), offset));
}
-GetByIdStatus GetByIdStatus::computeFor(CodeBlock* profiledBlock, StubInfoMap& map, unsigned bytecodeIndex, StringImpl* uid)
+GetByIdStatus GetByIdStatus::computeFor(CodeBlock* profiledBlock, StubInfoMap& map, unsigned bytecodeIndex, AtomicStringImpl* uid)
{
ConcurrentJITLocker locker(profiledBlock->m_lock);
@@ -118,7 +118,7 @@
#if ENABLE(JIT)
GetByIdStatus GetByIdStatus::computeForStubInfo(
- const ConcurrentJITLocker& locker, CodeBlock* profiledBlock, StructureStubInfo* stubInfo, StringImpl* uid,
+ const ConcurrentJITLocker& locker, CodeBlock* profiledBlock, StructureStubInfo* stubInfo, AtomicStringImpl* uid,
CallLinkStatus::ExitSiteData callExitSiteData)
{
if (!stubInfo || !stubInfo->seen)
@@ -224,7 +224,7 @@
GetByIdStatus GetByIdStatus::computeFor(
CodeBlock* profiledBlock, CodeBlock* dfgBlock, StubInfoMap& baselineMap,
- StubInfoMap& dfgMap, CodeOrigin codeOrigin, StringImpl* uid)
+ StubInfoMap& dfgMap, CodeOrigin codeOrigin, AtomicStringImpl* uid)
{
#if ENABLE(DFG_JIT)
if (dfgBlock) {
@@ -262,7 +262,7 @@
return computeFor(profiledBlock, baselineMap, codeOrigin.bytecodeIndex, uid);
}
-GetByIdStatus GetByIdStatus::computeFor(const StructureSet& set, StringImpl* uid)
+GetByIdStatus GetByIdStatus::computeFor(const StructureSet& set, AtomicStringImpl* uid)
{
// For now we only handle the super simple self access case. We could handle the
// prototype case in the future.
Modified: trunk/Source/_javascript_Core/bytecode/GetByIdStatus.h (176582 => 176583)
--- trunk/Source/_javascript_Core/bytecode/GetByIdStatus.h 2014-11-29 23:40:30 UTC (rev 176582)
+++ trunk/Source/_javascript_Core/bytecode/GetByIdStatus.h 2014-11-30 00:06:58 UTC (rev 176583)
@@ -67,10 +67,10 @@
m_variants.append(variant);
}
- static GetByIdStatus computeFor(CodeBlock*, StubInfoMap&, unsigned bytecodeIndex, StringImpl* uid);
- static GetByIdStatus computeFor(const StructureSet&, StringImpl* uid);
+ static GetByIdStatus computeFor(CodeBlock*, StubInfoMap&, unsigned bytecodeIndex, AtomicStringImpl* uid);
+ static GetByIdStatus computeFor(const StructureSet&, AtomicStringImpl* uid);
- static GetByIdStatus computeFor(CodeBlock* baselineBlock, CodeBlock* dfgBlock, StubInfoMap& baselineMap, StubInfoMap& dfgMap, CodeOrigin, StringImpl* uid);
+ static GetByIdStatus computeFor(CodeBlock* baselineBlock, CodeBlock* dfgBlock, StubInfoMap& baselineMap, StubInfoMap& dfgMap, CodeOrigin, AtomicStringImpl* uid);
State state() const { return m_state; }
@@ -97,9 +97,9 @@
#if ENABLE(JIT)
static GetByIdStatus computeForStubInfo(
const ConcurrentJITLocker&, CodeBlock* profiledBlock, StructureStubInfo*,
- StringImpl* uid, CallLinkStatus::ExitSiteData);
+ AtomicStringImpl* uid, CallLinkStatus::ExitSiteData);
#endif
- static GetByIdStatus computeFromLLInt(CodeBlock*, unsigned bytecodeIndex, StringImpl* uid);
+ static GetByIdStatus computeFromLLInt(CodeBlock*, unsigned bytecodeIndex, AtomicStringImpl* uid);
bool appendVariant(const GetByIdVariant&);
Modified: trunk/Source/_javascript_Core/bytecode/PutByIdStatus.cpp (176582 => 176583)
--- trunk/Source/_javascript_Core/bytecode/PutByIdStatus.cpp 2014-11-29 23:40:30 UTC (rev 176582)
+++ trunk/Source/_javascript_Core/bytecode/PutByIdStatus.cpp 2014-11-30 00:06:58 UTC (rev 176583)
@@ -62,7 +62,7 @@
}
#endif
-PutByIdStatus PutByIdStatus::computeFromLLInt(CodeBlock* profiledBlock, unsigned bytecodeIndex, StringImpl* uid)
+PutByIdStatus PutByIdStatus::computeFromLLInt(CodeBlock* profiledBlock, unsigned bytecodeIndex, AtomicStringImpl* uid)
{
UNUSED_PARAM(profiledBlock);
UNUSED_PARAM(bytecodeIndex);
@@ -105,7 +105,7 @@
return PutByIdVariant::transition(structure, newStructure, intendedChain.get(), offset);
}
-PutByIdStatus PutByIdStatus::computeFor(CodeBlock* profiledBlock, StubInfoMap& map, unsigned bytecodeIndex, StringImpl* uid)
+PutByIdStatus PutByIdStatus::computeFor(CodeBlock* profiledBlock, StubInfoMap& map, unsigned bytecodeIndex, AtomicStringImpl* uid)
{
ConcurrentJITLocker locker(profiledBlock->m_lock);
@@ -134,7 +134,7 @@
#if ENABLE(JIT)
PutByIdStatus PutByIdStatus::computeForStubInfo(
const ConcurrentJITLocker& locker, CodeBlock* profiledBlock, StructureStubInfo* stubInfo,
- StringImpl* uid, CallLinkStatus::ExitSiteData callExitSiteData)
+ AtomicStringImpl* uid, CallLinkStatus::ExitSiteData callExitSiteData)
{
if (!stubInfo || !stubInfo->seen)
return PutByIdStatus();
@@ -274,7 +274,7 @@
}
#endif
-PutByIdStatus PutByIdStatus::computeFor(CodeBlock* baselineBlock, CodeBlock* dfgBlock, StubInfoMap& baselineMap, StubInfoMap& dfgMap, CodeOrigin codeOrigin, StringImpl* uid)
+PutByIdStatus PutByIdStatus::computeFor(CodeBlock* baselineBlock, CodeBlock* dfgBlock, StubInfoMap& baselineMap, StubInfoMap& dfgMap, CodeOrigin codeOrigin, AtomicStringImpl* uid)
{
#if ENABLE(DFG_JIT)
if (dfgBlock) {
@@ -308,7 +308,7 @@
return computeFor(baselineBlock, baselineMap, codeOrigin.bytecodeIndex, uid);
}
-PutByIdStatus PutByIdStatus::computeFor(JSGlobalObject* globalObject, const StructureSet& set, StringImpl* uid, bool isDirect)
+PutByIdStatus PutByIdStatus::computeFor(JSGlobalObject* globalObject, const StructureSet& set, AtomicStringImpl* uid, bool isDirect)
{
if (toUInt32FromStringImpl(uid) != PropertyName::NotAnIndex)
return PutByIdStatus(TakesSlowPath);
Modified: trunk/Source/_javascript_Core/bytecode/PutByIdStatus.h (176582 => 176583)
--- trunk/Source/_javascript_Core/bytecode/PutByIdStatus.h 2014-11-29 23:40:30 UTC (rev 176582)
+++ trunk/Source/_javascript_Core/bytecode/PutByIdStatus.h 2014-11-30 00:06:58 UTC (rev 176583)
@@ -70,10 +70,10 @@
m_variants.append(variant);
}
- static PutByIdStatus computeFor(CodeBlock*, StubInfoMap&, unsigned bytecodeIndex, StringImpl* uid);
- static PutByIdStatus computeFor(JSGlobalObject*, const StructureSet&, StringImpl* uid, bool isDirect);
+ static PutByIdStatus computeFor(CodeBlock*, StubInfoMap&, unsigned bytecodeIndex, AtomicStringImpl* uid);
+ static PutByIdStatus computeFor(JSGlobalObject*, const StructureSet&, AtomicStringImpl* uid, bool isDirect);
- static PutByIdStatus computeFor(CodeBlock* baselineBlock, CodeBlock* dfgBlock, StubInfoMap& baselineMap, StubInfoMap& dfgMap, CodeOrigin, StringImpl* uid);
+ static PutByIdStatus computeFor(CodeBlock* baselineBlock, CodeBlock* dfgBlock, StubInfoMap& baselineMap, StubInfoMap& dfgMap, CodeOrigin, AtomicStringImpl* uid);
State state() const { return m_state; }
@@ -96,10 +96,10 @@
#endif
#if ENABLE(JIT)
static PutByIdStatus computeForStubInfo(
- const ConcurrentJITLocker&, CodeBlock*, StructureStubInfo*, StringImpl* uid,
+ const ConcurrentJITLocker&, CodeBlock*, StructureStubInfo*, AtomicStringImpl* uid,
CallLinkStatus::ExitSiteData);
#endif
- static PutByIdStatus computeFromLLInt(CodeBlock*, unsigned bytecodeIndex, StringImpl* uid);
+ static PutByIdStatus computeFromLLInt(CodeBlock*, unsigned bytecodeIndex, AtomicStringImpl* uid);
bool appendVariant(const PutByIdVariant&);
Modified: trunk/Source/_javascript_Core/dfg/DFGByteCodeParser.cpp (176582 => 176583)
--- trunk/Source/_javascript_Core/dfg/DFGByteCodeParser.cpp 2014-11-29 23:40:30 UTC (rev 176582)
+++ trunk/Source/_javascript_Core/dfg/DFGByteCodeParser.cpp 2014-11-30 00:06:58 UTC (rev 176583)
@@ -2834,7 +2834,7 @@
Node* base = get(VirtualRegister(currentInstruction[2].u.operand));
unsigned identifierNumber = m_inlineStackTop->m_identifierRemap[currentInstruction[3].u.operand];
- StringImpl* uid = m_graph.identifiers()[identifierNumber];
+ AtomicStringImpl* uid = m_graph.identifiers()[identifierNumber];
GetByIdStatus getByIdStatus = GetByIdStatus::computeFor(
m_inlineStackTop->m_profiledBlock, m_dfgCodeBlock,
m_inlineStackTop->m_stubInfos, m_dfgStubInfos,
@@ -3208,7 +3208,7 @@
int dst = currentInstruction[1].u.operand;
int scope = currentInstruction[2].u.operand;
unsigned identifierNumber = m_inlineStackTop->m_identifierRemap[currentInstruction[3].u.operand];
- StringImpl* uid = m_graph.identifiers()[identifierNumber];
+ AtomicStringImpl* uid = m_graph.identifiers()[identifierNumber];
ResolveType resolveType = ResolveModeAndType(currentInstruction[4].u.operand).type();
Structure* structure = 0;
@@ -3297,7 +3297,7 @@
unsigned identifierNumber = m_inlineStackTop->m_identifierRemap[currentInstruction[2].u.operand];
unsigned value = currentInstruction[3].u.operand;
ResolveType resolveType = ResolveModeAndType(currentInstruction[4].u.operand).type();
- StringImpl* uid = m_graph.identifiers()[identifierNumber];
+ AtomicStringImpl* uid = m_graph.identifiers()[identifierNumber];
Structure* structure = 0;
VariableWatchpointSet* watchpoints = 0;
@@ -3709,7 +3709,7 @@
m_switchRemap.resize(codeBlock->numberOfSwitchJumpTables());
for (size_t i = 0; i < codeBlock->numberOfIdentifiers(); ++i) {
- StringImpl* rep = codeBlock->identifier(i).impl();
+ AtomicStringImpl* rep = codeBlock->identifier(i).impl();
BorrowedIdentifierMap::AddResult result = byteCodeParser->m_identifierMap.add(rep, byteCodeParser->m_graph.identifiers().numberOfIdentifiers());
if (result.isNewEntry)
byteCodeParser->m_graph.identifiers().addLazily(rep);
Modified: trunk/Source/_javascript_Core/dfg/DFGDesiredIdentifiers.cpp (176582 => 176583)
--- trunk/Source/_javascript_Core/dfg/DFGDesiredIdentifiers.cpp 2014-11-29 23:40:30 UTC (rev 176582)
+++ trunk/Source/_javascript_Core/dfg/DFGDesiredIdentifiers.cpp 2014-11-30 00:06:58 UTC (rev 176583)
@@ -52,14 +52,14 @@
return m_codeBlock->numberOfIdentifiers() + m_addedIdentifiers.size();
}
-void DesiredIdentifiers::addLazily(StringImpl* rep)
+void DesiredIdentifiers::addLazily(AtomicStringImpl* rep)
{
m_addedIdentifiers.append(rep);
}
-StringImpl* DesiredIdentifiers::at(unsigned index) const
+AtomicStringImpl* DesiredIdentifiers::at(unsigned index) const
{
- StringImpl* result;
+ AtomicStringImpl* result;
if (index < m_codeBlock->numberOfIdentifiers())
result = m_codeBlock->identifier(index).impl();
else
Modified: trunk/Source/_javascript_Core/dfg/DFGDesiredIdentifiers.h (176582 => 176583)
--- trunk/Source/_javascript_Core/dfg/DFGDesiredIdentifiers.h 2014-11-29 23:40:30 UTC (rev 176582)
+++ trunk/Source/_javascript_Core/dfg/DFGDesiredIdentifiers.h 2014-11-30 00:06:58 UTC (rev 176583)
@@ -45,17 +45,17 @@
~DesiredIdentifiers();
unsigned numberOfIdentifiers();
- void addLazily(StringImpl*);
+ void addLazily(AtomicStringImpl*);
- StringImpl* at(unsigned index) const;
+ AtomicStringImpl* at(unsigned index) const;
- StringImpl* operator[](unsigned index) const { return at(index); }
+ AtomicStringImpl* operator[](unsigned index) const { return at(index); }
void reallyAdd(VM&, CommonData*);
private:
CodeBlock* m_codeBlock;
- Vector<StringImpl*> m_addedIdentifiers;
+ Vector<AtomicStringImpl*> m_addedIdentifiers;
};
} } // namespace JSC::DFG
Modified: trunk/Source/_javascript_Core/dfg/DFGFixupPhase.cpp (176582 => 176583)
--- trunk/Source/_javascript_Core/dfg/DFGFixupPhase.cpp 2014-11-29 23:40:30 UTC (rev 176582)
+++ trunk/Source/_javascript_Core/dfg/DFGFixupPhase.cpp 2014-11-30 00:06:58 UTC (rev 176583)
@@ -1440,7 +1440,7 @@
}
bool isStringPrototypeMethodSane(
- JSObject* stringPrototype, Structure* stringPrototypeStructure, StringImpl* uid)
+ JSObject* stringPrototype, Structure* stringPrototypeStructure, AtomicStringImpl* uid)
{
unsigned attributesUnused;
PropertyOffset offset =
Modified: trunk/Source/_javascript_Core/runtime/Identifier.h (176582 => 176583)
--- trunk/Source/_javascript_Core/runtime/Identifier.h 2014-11-29 23:40:30 UTC (rev 176582)
+++ trunk/Source/_javascript_Core/runtime/Identifier.h 2014-11-30 00:06:58 UTC (rev 176583)
@@ -53,7 +53,7 @@
Identifier(VM* vm, const String& s) : m_string(add(vm, s.impl())) { ASSERT(m_string.impl()->isAtomic()); }
const String& string() const { return m_string; }
- StringImpl* impl() const { return m_string.impl(); }
+ AtomicStringImpl* impl() const { return static_cast<AtomicStringImpl*>(m_string.impl()); }
int length() const { return m_string.length(); }
Modified: trunk/Source/_javascript_Core/runtime/IntendedStructureChain.cpp (176582 => 176583)
--- trunk/Source/_javascript_Core/runtime/IntendedStructureChain.cpp 2014-11-29 23:40:30 UTC (rev 176582)
+++ trunk/Source/_javascript_Core/runtime/IntendedStructureChain.cpp 2014-11-30 00:06:58 UTC (rev 176583)
@@ -103,7 +103,7 @@
return true;
}
-bool IntendedStructureChain::mayInterceptStoreTo(StringImpl* uid)
+bool IntendedStructureChain::mayInterceptStoreTo(AtomicStringImpl* uid)
{
for (unsigned i = 0; i < m_vector.size(); ++i) {
unsigned attributes;
Modified: trunk/Source/_javascript_Core/runtime/IntendedStructureChain.h (176582 => 176583)
--- trunk/Source/_javascript_Core/runtime/IntendedStructureChain.h 2014-11-29 23:40:30 UTC (rev 176582)
+++ trunk/Source/_javascript_Core/runtime/IntendedStructureChain.h 2014-11-30 00:06:58 UTC (rev 176583)
@@ -49,7 +49,7 @@
bool isStillValid() const;
bool matches(StructureChain*) const;
- bool mayInterceptStoreTo(StringImpl* uid);
+ bool mayInterceptStoreTo(AtomicStringImpl* uid);
bool isNormalized();
bool takesSlowPathInDFGForImpureProperty();
Modified: trunk/Source/_javascript_Core/runtime/PropertyMapHashTable.h (176582 => 176583)
--- trunk/Source/_javascript_Core/runtime/PropertyMapHashTable.h 2014-11-29 23:40:30 UTC (rev 176582)
+++ trunk/Source/_javascript_Core/runtime/PropertyMapHashTable.h 2014-11-30 00:06:58 UTC (rev 176583)
@@ -30,13 +30,13 @@
#include <wtf/MathExtras.h>
#include <wtf/PassOwnPtr.h>
#include <wtf/Vector.h>
-#include <wtf/text/StringImpl.h>
+#include <wtf/text/AtomicStringImpl.h>
#define DUMP_PROPERTYMAP_STATS 0
#define DUMP_PROPERTYMAP_COLLISIONS 0
-#define PROPERTY_MAP_DELETED_ENTRY_KEY ((StringImpl*)1)
+#define PROPERTY_MAP_DELETED_ENTRY_KEY ((AtomicStringImpl*)1)
namespace JSC {
@@ -132,7 +132,7 @@
return Structure::create(vm, globalObject, prototype, TypeInfo(CellType, StructureFlags), info());
}
- typedef StringImpl* KeyType;
+ typedef AtomicStringImpl* KeyType;
typedef PropertyMapEntry ValueType;
// The in order iterator provides overloaded * and -> to access the Value at the current position.
Modified: trunk/Source/_javascript_Core/runtime/Structure.cpp (176582 => 176583)
--- trunk/Source/_javascript_Core/runtime/Structure.cpp 2014-11-29 23:40:30 UTC (rev 176582)
+++ trunk/Source/_javascript_Core/runtime/Structure.cpp 2014-11-30 00:06:58 UTC (rev 176583)
@@ -59,7 +59,7 @@
static HashSet<Structure*>& liveStructureSet = *(new HashSet<Structure*>);
#endif
-bool StructureTransitionTable::contains(StringImpl* rep, unsigned attributes) const
+bool StructureTransitionTable::contains(AtomicStringImpl* rep, unsigned attributes) const
{
if (isUsingSingleSlot()) {
Structure* transition = singleTransition();
@@ -68,7 +68,7 @@
return map()->get(std::make_pair(rep, attributes));
}
-inline Structure* StructureTransitionTable::get(StringImpl* rep, unsigned attributes) const
+inline Structure* StructureTransitionTable::get(AtomicStringImpl* rep, unsigned attributes) const
{
if (isUsingSingleSlot()) {
Structure* transition = singleTransition();
@@ -315,7 +315,7 @@
checkOffsetConsistency();
}
-Structure* Structure::addPropertyTransitionToExistingStructureImpl(Structure* structure, StringImpl* uid, unsigned attributes, PropertyOffset& offset)
+Structure* Structure::addPropertyTransitionToExistingStructureImpl(Structure* structure, AtomicStringImpl* uid, unsigned attributes, PropertyOffset& offset)
{
ASSERT(!structure->isDictionary());
ASSERT(structure->isObject());
@@ -335,7 +335,7 @@
return addPropertyTransitionToExistingStructureImpl(structure, propertyName.uid(), attributes, offset);
}
-Structure* Structure::addPropertyTransitionToExistingStructureConcurrently(Structure* structure, StringImpl* uid, unsigned attributes, PropertyOffset& offset)
+Structure* Structure::addPropertyTransitionToExistingStructureConcurrently(Structure* structure, AtomicStringImpl* uid, unsigned attributes, PropertyOffset& offset)
{
ConcurrentJITLocker locker(structure->m_lock);
return addPropertyTransitionToExistingStructureImpl(structure, uid, attributes, offset);
@@ -850,7 +850,7 @@
return PropertyTable::create(vm, numberOfSlotsForLastOffset(m_offset, m_inlineCapacity));
}
-PropertyOffset Structure::getConcurrently(StringImpl* uid, unsigned& attributes)
+PropertyOffset Structure::getConcurrently(AtomicStringImpl* uid, unsigned& attributes)
{
PropertyOffset result = invalidOffset;
@@ -890,7 +890,7 @@
if (attributes & DontEnum)
setHasNonEnumerableProperties(true);
- StringImpl* rep = propertyName.uid();
+ AtomicStringImpl* rep = propertyName.uid();
if (!propertyTable())
createPropertyMap(locker, vm);
@@ -909,7 +909,7 @@
checkConsistency();
- StringImpl* rep = propertyName.uid();
+ AtomicStringImpl* rep = propertyName.uid();
if (!propertyTable())
return invalidOffset;
Modified: trunk/Source/_javascript_Core/runtime/Structure.h (176582 => 176583)
--- trunk/Source/_javascript_Core/runtime/Structure.h 2014-11-29 23:40:30 UTC (rev 176582)
+++ trunk/Source/_javascript_Core/runtime/Structure.h 2014-11-30 00:06:58 UTC (rev 176583)
@@ -48,9 +48,8 @@
#include <wtf/PassRefPtr.h>
#include <wtf/PrintStream.h>
#include <wtf/RefCounted.h>
-#include <wtf/text/StringImpl.h>
+#include <wtf/text/AtomicStringImpl.h>
-
namespace JSC {
class DeferGC;
@@ -74,7 +73,7 @@
static const unsigned outOfLineGrowthFactor = 2;
struct PropertyMapEntry {
- StringImpl* key;
+ AtomicStringImpl* key;
PropertyOffset offset;
unsigned attributes;
@@ -85,7 +84,7 @@
{
}
- PropertyMapEntry(StringImpl* key, PropertyOffset offset, unsigned attributes)
+ PropertyMapEntry(AtomicStringImpl* key, PropertyOffset offset, unsigned attributes)
: key(key)
, offset(offset)
, attributes(attributes)
@@ -133,7 +132,7 @@
static void dumpStatistics();
JS_EXPORT_PRIVATE static Structure* addPropertyTransition(VM&, Structure*, PropertyName, unsigned attributes, PropertyOffset&, PutPropertySlot::Context = PutPropertySlot::UnknownContext);
- static Structure* addPropertyTransitionToExistingStructureConcurrently(Structure*, StringImpl* uid, unsigned attributes, PropertyOffset&);
+ static Structure* addPropertyTransitionToExistingStructureConcurrently(Structure*, AtomicStringImpl* uid, unsigned attributes, PropertyOffset&);
JS_EXPORT_PRIVATE static Structure* addPropertyTransitionToExistingStructure(Structure*, PropertyName, unsigned attributes, PropertyOffset&);
static Structure* removePropertyTransition(VM&, Structure*, PropertyName, PropertyOffset&);
JS_EXPORT_PRIVATE static Structure* changePrototypeTransition(VM&, Structure*, JSValue prototype);
@@ -289,8 +288,8 @@
template<typename Functor>
void forEachPropertyConcurrently(const Functor&);
- PropertyOffset getConcurrently(StringImpl* uid);
- PropertyOffset getConcurrently(StringImpl* uid, unsigned& attributes);
+ PropertyOffset getConcurrently(AtomicStringImpl* uid);
+ PropertyOffset getConcurrently(AtomicStringImpl* uid, unsigned& attributes);
Vector<PropertyMapEntry> getPropertiesConcurrently();
@@ -486,7 +485,7 @@
static Structure* create(VM&, Structure*);
- static Structure* addPropertyTransitionToExistingStructureImpl(Structure*, StringImpl* uid, unsigned attributes, PropertyOffset&);
+ static Structure* addPropertyTransitionToExistingStructureImpl(Structure*, AtomicStringImpl* uid, unsigned attributes, PropertyOffset&);
// This will return the structure that has a usable property table, that property table,
// and the list of structures that we visited before we got to it. If it returns a
@@ -594,7 +593,7 @@
WriteBarrier<JSCell> m_previousOrRareData;
- RefPtr<StringImpl> m_nameInPrevious;
+ RefPtr<AtomicStringImpl> m_nameInPrevious;
const ClassInfo* m_classInfo;
Modified: trunk/Source/_javascript_Core/runtime/StructureInlines.h (176582 => 176583)
--- trunk/Source/_javascript_Core/runtime/StructureInlines.h 2014-11-29 23:40:30 UTC (rev 176582)
+++ trunk/Source/_javascript_Core/runtime/StructureInlines.h 2014-11-30 00:06:58 UTC (rev 176583)
@@ -133,7 +133,7 @@
}
}
-inline PropertyOffset Structure::getConcurrently(StringImpl* uid)
+inline PropertyOffset Structure::getConcurrently(AtomicStringImpl* uid)
{
unsigned attributesIgnored;
return getConcurrently(uid, attributesIgnored);
Modified: trunk/Source/_javascript_Core/runtime/StructureTransitionTable.h (176582 => 176583)
--- trunk/Source/_javascript_Core/runtime/StructureTransitionTable.h 2014-11-29 23:40:30 UTC (rev 176582)
+++ trunk/Source/_javascript_Core/runtime/StructureTransitionTable.h 2014-11-30 00:06:58 UTC (rev 176583)
@@ -30,7 +30,7 @@
#include "WeakGCMap.h"
#include <wtf/HashFunctions.h>
#include <wtf/OwnPtr.h>
-#include <wtf/text/StringImpl.h>
+#include <wtf/text/AtomicStringImpl.h>
namespace JSC {
@@ -94,11 +94,11 @@
struct Hash {
- typedef std::pair<StringImpl*, unsigned> Key;
+ typedef std::pair<AtomicStringImpl*, unsigned> Key;
static unsigned hash(const Key& p)
{
- return PtrHash<StringImpl*>::hash(p.first) + p.second;
+ return PtrHash<AtomicStringImpl*>::hash(p.first) + p.second;
}
static bool equal(const Key& a, const Key& b)
@@ -131,8 +131,8 @@
}
inline void add(VM&, Structure*);
- inline bool contains(StringImpl* rep, unsigned attributes) const;
- inline Structure* get(StringImpl* rep, unsigned attributes) const;
+ inline bool contains(AtomicStringImpl* rep, unsigned attributes) const;
+ inline Structure* get(AtomicStringImpl* rep, unsigned attributes) const;
private:
bool isUsingSingleSlot() const