Changeset 284726 in webkit
- Timestamp:
- Oct 22, 2021, 4:31:08 PM (5 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 3 edited
-
ChangeLog (modified) (1 diff)
-
dfg/DFGAbstractInterpreterInlines.h (modified) (1 diff)
-
dfg/DFGConstantFoldingPhase.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r284716 r284726 1 2021-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 1 16 2021-10-22 Yusuke Suzuki <ysuzuki@apple.com> 2 17 -
trunk/Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h
r284664 r284726 3128 3128 // Having a bad time clears the structureCache, and so it should invalidate this structure. 3129 3129 bool isHavingABadTime = globalObject->isHavingABadTime(); 3130 WTF::loadLoadFence();3131 if (!isHavingABadTime)3132 m_graph.watchpoints().addLazily(globalObject->havingABadTimeWatchpoint());3133 3130 // Normally, we would always install a watchpoint. In this case, however, if we haveABadTime, we 3134 3131 // still want to optimize. There is no watchpoint for that case though, so we need to make sure this load 3135 3132 // does not get hoisted above the check. 3136 3133 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()); 3139 3137 } 3140 3138 -
trunk/Source/JavaScriptCore/dfg/DFGConstantFoldingPhase.cpp
r284664 r284726 840 840 // Having a bad time clears the structureCache, and so it should invalidate this structure. 841 841 bool isHavingABadTime = globalObject->isHavingABadTime(); 842 WTF::loadLoadFence();843 if (!isHavingABadTime)844 m_graph.watchpoints().addLazily(globalObject->havingABadTimeWatchpoint());845 842 // Normally, we would always install a watchpoint. In this case, however, if we haveABadTime, we 846 843 // still want to optimize. There is no watchpoint for that case though, so we need to make sure this load 847 844 // does not get hoisted above the check. 848 845 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()); 851 849 } 852 850
Note:
See TracChangeset
for help on using the changeset viewer.