Ignore:
Timestamp:
Jul 24, 2013, 8:58:56 PM (12 years ago)
Author:
[email protected]
Message:

fourthTier: Create an equivalent of Structure::get() that can work from a compilation thread
https://bugs.webkit.org/show_bug.cgi?id=114987

Reviewed by Geoffrey Garen.

This completes the work started by r148570. That patch made it possible to do
Structure::get() without modifying Structure. This patch takes this further, and
makes this thread-safe (for non-uncacheable-dictionaries) via
Structure::getConcurrently(). This method not only doesn't modify Structure, but
also ensures that any concurrent attempts to add to, remove from, or steal the
table from that structure doesn't mess up the result of the call. The call may
return invalidOffset even if a property is *just* about to be added, but it will
never do the reverse: if it returns a property then you can be sure that the
structure really does have that property and always will have it.

  • bytecode/GetByIdStatus.cpp:

(JSC::GetByIdStatus::computeFromLLInt):
(JSC::GetByIdStatus::computeForChain):
(JSC::GetByIdStatus::computeFor):

  • bytecode/PutByIdStatus.cpp:

(JSC::PutByIdStatus::computeFromLLInt):
(JSC::PutByIdStatus::computeFor):

  • dfg/DFGFixupPhase.cpp:

(JSC::DFG::FixupPhase::isStringPrototypeMethodSane):

  • runtime/PropertyMapHashTable.h:

(PropertyTable):
(JSC::PropertyTable::findConcurrently):
(JSC):
(JSC::PropertyTable::add):
(JSC::PropertyTable::remove):
(JSC::PropertyTable::reinsert):
(JSC::PropertyTable::rehash):

  • runtime/PropertyTable.cpp:

(JSC::PropertyTable::PropertyTable):

  • runtime/Structure.cpp:

(JSC::Structure::findStructuresAndMapForMaterialization):
(JSC::Structure::getConcurrently):

  • runtime/Structure.h:

(Structure):

  • runtime/StructureInlines.h:

(JSC::Structure::getConcurrently):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/runtime/StructureInlines.h

    r153120 r153128  
    7979}
    8080   
    81 inline PropertyOffset Structure::getWithoutMaterializing(VM& vm, PropertyName propertyName)
     81inline PropertyOffset Structure::getConcurrently(VM& vm, PropertyName propertyName)
    8282{
    8383    unsigned attributesIgnored;
    8484    JSCell* specificValueIgnored;
    85     return getWithoutMaterializing(
     85    return getConcurrently(
    8686        vm, propertyName, attributesIgnored, specificValueIgnored);
    8787}
Note: See TracChangeset for help on using the changeset viewer.