Title: [284726] trunk/Source/_javascript_Core
- Revision
- 284726
- Author
- [email protected]
- Date
- 2021-10-22 16:31:08 -0700 (Fri, 22 Oct 2021)
Log 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):
Modified Paths
Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (284725 => 284726)
--- trunk/Source/_javascript_Core/ChangeLog 2021-10-22 23:21:57 UTC (rev 284725)
+++ trunk/Source/_javascript_Core/ChangeLog 2021-10-22 23:31:08 UTC (rev 284726)
@@ -1,3 +1,18 @@
+2021-10-22 Justin Michaud <[email protected]>
+
+ 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):
+
2021-10-22 Yusuke Suzuki <[email protected]>
[JSC] GetTypedArrayLengthAsInt52 must be inserted only when we ensure that input is TypedArray via array-mode-based filtering
Modified: trunk/Source/_javascript_Core/dfg/DFGAbstractInterpreterInlines.h (284725 => 284726)
--- trunk/Source/_javascript_Core/dfg/DFGAbstractInterpreterInlines.h 2021-10-22 23:21:57 UTC (rev 284725)
+++ trunk/Source/_javascript_Core/dfg/DFGAbstractInterpreterInlines.h 2021-10-22 23:31:08 UTC (rev 284726)
@@ -3127,15 +3127,13 @@
else if (base.isObject()) {
// Having a bad time clears the structureCache, and so it should invalidate this structure.
bool isHavingABadTime = globalObject->isHavingABadTime();
- WTF::loadLoadFence();
- if (!isHavingABadTime)
- m_graph.watchpoints().addLazily(globalObject->havingABadTimeWatchpoint());
// Normally, we would always install a watchpoint. In this case, however, if we haveABadTime, we
// still want to optimize. There is no watchpoint for that case though, so we need to make sure this load
// does not get hoisted above the check.
WTF::loadLoadFence();
- structure = m_vm.structureCache
- .emptyObjectStructureConcurrently(globalObject, base.getObject(), JSFinalObject::defaultInlineCapacity());
+ if (!isHavingABadTime)
+ m_graph.watchpoints().addLazily(globalObject->havingABadTimeWatchpoint());
+ structure = m_vm.structureCache.emptyObjectStructureConcurrently(globalObject, base.getObject(), JSFinalObject::defaultInlineCapacity());
}
if (structure) {
Modified: trunk/Source/_javascript_Core/dfg/DFGConstantFoldingPhase.cpp (284725 => 284726)
--- trunk/Source/_javascript_Core/dfg/DFGConstantFoldingPhase.cpp 2021-10-22 23:21:57 UTC (rev 284725)
+++ trunk/Source/_javascript_Core/dfg/DFGConstantFoldingPhase.cpp 2021-10-22 23:31:08 UTC (rev 284726)
@@ -839,15 +839,13 @@
else if (base.isObject()) {
// Having a bad time clears the structureCache, and so it should invalidate this structure.
bool isHavingABadTime = globalObject->isHavingABadTime();
- WTF::loadLoadFence();
- if (!isHavingABadTime)
- m_graph.watchpoints().addLazily(globalObject->havingABadTimeWatchpoint());
// Normally, we would always install a watchpoint. In this case, however, if we haveABadTime, we
// still want to optimize. There is no watchpoint for that case though, so we need to make sure this load
// does not get hoisted above the check.
WTF::loadLoadFence();
- structure = globalObject->vm().structureCache
- .emptyObjectStructureConcurrently(globalObject, base.getObject(), JSFinalObject::defaultInlineCapacity());
+ if (!isHavingABadTime)
+ m_graph.watchpoints().addLazily(globalObject->havingABadTimeWatchpoint());
+ structure = globalObject->vm().structureCache.emptyObjectStructureConcurrently(globalObject, base.getObject(), JSFinalObject::defaultInlineCapacity());
}
if (structure) {
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes