Changeset 284576 in webkit for trunk/Source/JavaScriptCore/dfg/DFGConstantFoldingPhase.cpp
- Timestamp:
- Oct 20, 2021, 3:08:45 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/dfg/DFGConstantFoldingPhase.cpp
r284330 r284576 842 842 if (base.isNull()) 843 843 structure = globalObject->nullPrototypeObjectStructure(); 844 else if (base.isObject()) 845 structure = globalObject->vm().structureCache.emptyObjectStructureConcurrently(globalObject, base.getObject(), JSFinalObject::defaultInlineCapacity()); 844 else if (base.isObject()) { 845 // Having a bad time clears the structureCache, and so it should invalidate this structure. 846 bool isHavingABadTime = globalObject->isHavingABadTime(); 847 WTF::loadLoadFence(); 848 if (!isHavingABadTime) 849 m_graph.watchpoints().addLazily(globalObject->havingABadTimeWatchpoint()); 850 // Normally, we would always install a watchpoint. In this case, however, if we haveABadTime, we 851 // still want to optimize. There is no watchpoint for that case though, so we need to make sure this load 852 // does not get hoisted above the check. 853 WTF::loadLoadFence(); 854 structure = globalObject->vm().structureCache 855 .emptyObjectStructureConcurrently(globalObject, base.getObject(), JSFinalObject::defaultInlineCapacity()); 856 } 846 857 847 858 if (structure) {
Note:
See TracChangeset
for help on using the changeset viewer.