Changeset 237447 in webkit
- Timestamp:
- Oct 26, 2018, 12:56:56 AM (8 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 5 edited
-
ChangeLog (modified) (1 diff)
-
dfg/DFGByteCodeParser.cpp (modified) (1 diff)
-
runtime/JSArrayInlines.h (modified) (1 diff)
-
runtime/JSGlobalObject.h (modified) (1 diff)
-
runtime/JSGlobalObjectInlines.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r237445 r237447 1 2018-10-25 Yusuke Suzuki <yusukesuzuki@slowstart.org> 2 3 [JSC] havingABadTimeWatchpoint is not required in Array#indexOf optimization 4 https://bugs.webkit.org/show_bug.cgi?id=190941 5 6 Reviewed by Saam Barati. 7 8 While "Rest" operation fast path requires havingABadTimeWatchpoint since it allocates 9 JSArray, Array#{indexOf,lastIndexOf} do not require it when we use the fast path for them. 10 This patch removes watching on havingABadTimeWatchpoint in Array#indexOf. The test causing 11 "havingABadTime" is already included in our test suites (e.g. array-indexof-have-a-bad-time.js). 12 13 * dfg/DFGByteCodeParser.cpp: 14 (JSC::DFG::ByteCodeParser::handleIntrinsicCall): 15 * runtime/JSArrayInlines.h: 16 (JSC::JSArray::canDoFastIndexedAccess): 17 * runtime/JSGlobalObject.h: 18 * runtime/JSGlobalObjectInlines.h: 19 (JSC::JSGlobalObject::isArrayPrototypeIteratorProtocolFastAndNonObservable): 20 (JSC::JSGlobalObject::isArrayPrototypeIndexedAccessFastAndNonObservable): Deleted. 21 1 22 2018-10-25 Yusuke Suzuki <yusukesuzuki@slowstart.org> 2 23 -
trunk/Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp
r237285 r237447 2363 2363 // FIXME: We could easily relax the Array/Object.prototype transition as long as we OSR exitted if we saw a hole. 2364 2364 // https://bugs.webkit.org/show_bug.cgi?id=173171 2365 if (globalObject->havingABadTimeWatchpoint()->isStillValid() 2366 && arrayPrototypeStructure->transitionWatchpointSetIsStillValid() 2365 if (arrayPrototypeStructure->transitionWatchpointSetIsStillValid() 2367 2366 && objectPrototypeStructure->transitionWatchpointSetIsStillValid() 2368 2367 && globalObject->arrayPrototypeChainIsSane()) { 2369 2368 2370 m_graph.watchpoints().addLazily(globalObject->havingABadTimeWatchpoint());2371 2369 m_graph.registerAndWatchStructureTransition(arrayPrototypeStructure); 2372 2370 m_graph.registerAndWatchStructureTransition(objectPrototypeStructure); -
trunk/Source/JavaScriptCore/runtime/JSArrayInlines.h
r236697 r237447 75 75 { 76 76 JSGlobalObject* globalObject = this->globalObject(); 77 if (!globalObject-> isArrayPrototypeIndexedAccessFastAndNonObservable())77 if (!globalObject->arrayPrototypeChainIsSane()) 78 78 return false; 79 79 -
trunk/Source/JavaScriptCore/runtime/JSGlobalObject.h
r236240 r237447 477 477 PoisonedUniquePtr<ObjectPropertyChangeAdaptiveWatchpoint<InlineWatchpointSet>> m_numberPrototypeToStringWatchpoint; 478 478 479 bool isArrayPrototypeIndexedAccessFastAndNonObservable();480 479 bool isArrayPrototypeIteratorProtocolFastAndNonObservable(); 481 480 bool isMapPrototypeIteratorProtocolFastAndNonObservable(); -
trunk/Source/JavaScriptCore/runtime/JSGlobalObjectInlines.h
r236240 r237447 53 53 } 54 54 55 ALWAYS_INLINE bool JSGlobalObject::isArrayPrototypeIndexedAccessFastAndNonObservable()56 {57 // We're fast if we don't have any indexed properties on the prototype.58 return !isHavingABadTime() && arrayPrototypeChainIsSane();59 }60 61 55 ALWAYS_INLINE bool JSGlobalObject::isArrayPrototypeIteratorProtocolFastAndNonObservable() 62 56 { … … 69 63 // executing concurrently. 70 64 71 return arrayIteratorProtocolWatchpoint().isStillValid() && isArrayPrototypeIndexedAccessFastAndNonObservable();65 return arrayIteratorProtocolWatchpoint().isStillValid() && !isHavingABadTime() && arrayPrototypeChainIsSane(); 72 66 } 73 67
Note:
See TracChangeset
for help on using the changeset viewer.