⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 284726 in webkit


Ignore:
Timestamp:
Oct 22, 2021, 4:31:08 PM (5 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):

Location:
trunk/Source/JavaScriptCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r284716 r284726  
     12021-10-22  Justin Michaud  <justin_michaud@apple.com>
     2
     3        Fix nits from 232019
     4        https://bugs.webkit.org/show_bug.cgi?id=232180
     5
     6        Reviewed by Saam Barati.
     7
     8        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.
     9        If we are delayed in watching the watchpoint, it does not change any of the interleavings.
     10
     11        * dfg/DFGAbstractInterpreterInlines.h:
     12        (JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
     13        * dfg/DFGConstantFoldingPhase.cpp:
     14        (JSC::DFG::ConstantFoldingPhase::foldConstants):
     15
    1162021-10-22  Yusuke Suzuki  <ysuzuki@apple.com>
    217
  • trunk/Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h

    r284664 r284726  
    31283128                // Having a bad time clears the structureCache, and so it should invalidate this structure.
    31293129                bool isHavingABadTime = globalObject->isHavingABadTime();
    3130                 WTF::loadLoadFence();
    3131                 if (!isHavingABadTime)
    3132                     m_graph.watchpoints().addLazily(globalObject->havingABadTimeWatchpoint());
    31333130                // Normally, we would always install a watchpoint. In this case, however, if we haveABadTime, we
    31343131                // still want to optimize. There is no watchpoint for that case though, so we need to make sure this load
    31353132                // does not get hoisted above the check.
    31363133                WTF::loadLoadFence();
    3137                 structure = m_vm.structureCache
    3138                     .emptyObjectStructureConcurrently(globalObject, base.getObject(), JSFinalObject::defaultInlineCapacity());
     3134                if (!isHavingABadTime)
     3135                    m_graph.watchpoints().addLazily(globalObject->havingABadTimeWatchpoint());
     3136                structure = m_vm.structureCache.emptyObjectStructureConcurrently(globalObject, base.getObject(), JSFinalObject::defaultInlineCapacity());
    31393137            }
    31403138           
  • 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.