Ignore:
Timestamp:
Nov 29, 2014, 4:06:58 PM (11 years ago)
Author:
[email protected]
Message:

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):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp

    r176479 r176583  
    28352835            unsigned identifierNumber = m_inlineStackTop->m_identifierRemap[currentInstruction[3].u.operand];
    28362836           
    2837             StringImpl* uid = m_graph.identifiers()[identifierNumber];
     2837            AtomicStringImpl* uid = m_graph.identifiers()[identifierNumber];
    28382838            GetByIdStatus getByIdStatus = GetByIdStatus::computeFor(
    28392839                m_inlineStackTop->m_profiledBlock, m_dfgCodeBlock,
     
    32093209            int scope = currentInstruction[2].u.operand;
    32103210            unsigned identifierNumber = m_inlineStackTop->m_identifierRemap[currentInstruction[3].u.operand];
    3211             StringImpl* uid = m_graph.identifiers()[identifierNumber];
     3211            AtomicStringImpl* uid = m_graph.identifiers()[identifierNumber];
    32123212            ResolveType resolveType = ResolveModeAndType(currentInstruction[4].u.operand).type();
    32133213
     
    32983298            unsigned value = currentInstruction[3].u.operand;
    32993299            ResolveType resolveType = ResolveModeAndType(currentInstruction[4].u.operand).type();
    3300             StringImpl* uid = m_graph.identifiers()[identifierNumber];
     3300            AtomicStringImpl* uid = m_graph.identifiers()[identifierNumber];
    33013301
    33023302            Structure* structure = 0;
     
    37103710
    37113711        for (size_t i = 0; i < codeBlock->numberOfIdentifiers(); ++i) {
    3712             StringImpl* rep = codeBlock->identifier(i).impl();
     3712            AtomicStringImpl* rep = codeBlock->identifier(i).impl();
    37133713            BorrowedIdentifierMap::AddResult result = byteCodeParser->m_identifierMap.add(rep, byteCodeParser->m_graph.identifiers().numberOfIdentifiers());
    37143714            if (result.isNewEntry)
Note: See TracChangeset for help on using the changeset viewer.