Ignore:
Timestamp:
Oct 22, 2021, 4:31:08 PM (4 years ago)
Author:
Justin Michaud
Message:

Fix nits from 232019
https://bugs.webkit.org/show_bug.cgi?id=232180

Reviewed by Saam Barati.

We only need one write barrier, since we only need to guarantee that we read the status of the write barrier before we read from the structure cache.
If we are delayed in watching the watchpoint, it does not change any of the interleavings.

  • dfg/DFGAbstractInterpreterInlines.h:

(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):

  • dfg/DFGConstantFoldingPhase.cpp:

(JSC::DFG::ConstantFoldingPhase::foldConstants):

File:
1 edited

Legend:

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

    r284664 r284726  
    840840                        // Having a bad time clears the structureCache, and so it should invalidate this structure.
    841841                        bool isHavingABadTime = globalObject->isHavingABadTime();
    842                         WTF::loadLoadFence();
    843                         if (!isHavingABadTime)
    844                             m_graph.watchpoints().addLazily(globalObject->havingABadTimeWatchpoint());
    845842                        // Normally, we would always install a watchpoint. In this case, however, if we haveABadTime, we
    846843                        // still want to optimize. There is no watchpoint for that case though, so we need to make sure this load
    847844                        // does not get hoisted above the check.
    848845                        WTF::loadLoadFence();
    849                         structure = globalObject->vm().structureCache
    850                             .emptyObjectStructureConcurrently(globalObject, base.getObject(), JSFinalObject::defaultInlineCapacity());
     846                        if (!isHavingABadTime)
     847                            m_graph.watchpoints().addLazily(globalObject->havingABadTimeWatchpoint());
     848                        structure = globalObject->vm().structureCache.emptyObjectStructureConcurrently(globalObject, base.getObject(), JSFinalObject::defaultInlineCapacity());
    851849                    }
    852850                   
Note: See TracChangeset for help on using the changeset viewer.