Changeset 248906 in webkit
- Timestamp:
- Aug 20, 2019 10:37:07 AM (5 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JSTests/ChangeLog
r248905 r248906 1 2019-08-20 Yusuke Suzuki <ysuzuki@apple.com> 2 3 [JSC] Array.prototype.toString should not get "join" function each time 4 https://bugs.webkit.org/show_bug.cgi?id=200905 5 6 Reviewed by Mark Lam. 7 8 * stress/array-prototype-join-change.js: Added. 9 (shouldBe): 10 (array2.join): 11 (DerivedArray): 12 (DerivedArray.prototype.join): 13 (array3.__proto__.join): 14 (Array.prototype.join): 15 1 16 2019-08-20 Justin Michaud <justin_michaud@apple.com> 2 17 -
trunk/Source/JavaScriptCore/ChangeLog
r248898 r248906 1 2019-08-20 Yusuke Suzuki <ysuzuki@apple.com> 2 3 [JSC] Array.prototype.toString should not get "join" function each time 4 https://bugs.webkit.org/show_bug.cgi?id=200905 5 6 Reviewed by Mark Lam. 7 8 We avoid looking up `join` every time Array#toString is called. This patch implements the most profitable and easy 9 case first as we are doing optimization for Array#slice: non-modified original Array. Configuring watchpoint for 10 Array.prototype.join change and use this information and structure information to determine whether `join` lookup 11 in Array.prototype.toString is unnecessary. This improves JetStream2/3d-raytrace-SP score by 1.6% 12 13 ToT: 363.56 14 Patched: 369.26 15 16 This patch also renames InlineWatchpointSet fields from Watchpoint to WatchpointSet since they are not Watchpoint. 17 18 * dfg/DFGByteCodeParser.cpp: 19 (JSC::DFG::ByteCodeParser::handleIntrinsicCall): 20 * dfg/DFGGraph.h: 21 (JSC::DFG::Graph::isWatchingArrayIteratorProtocolWatchpoint): 22 (JSC::DFG::Graph::isWatchingNumberToStringWatchpoint): 23 * runtime/ArrayPrototype.cpp: 24 (JSC::speciesWatchpointIsValid): 25 (JSC::canUseDefaultArrayJoinForToString): 26 (JSC::arrayProtoFuncToString): 27 * runtime/JSGlobalObject.cpp: 28 (JSC::JSGlobalObject::JSGlobalObject): 29 (JSC::JSGlobalObject::init): 30 (JSC::JSGlobalObject::tryInstallArraySpeciesWatchpoint): 31 * runtime/JSGlobalObject.h: 32 (JSC::JSGlobalObject::arrayIteratorProtocolWatchpointSet): 33 (JSC::JSGlobalObject::mapIteratorProtocolWatchpointSet): 34 (JSC::JSGlobalObject::setIteratorProtocolWatchpointSet): 35 (JSC::JSGlobalObject::stringIteratorProtocolWatchpointSet): 36 (JSC::JSGlobalObject::mapSetWatchpointSet): 37 (JSC::JSGlobalObject::setAddWatchpointSet): 38 (JSC::JSGlobalObject::arraySpeciesWatchpointSet): 39 (JSC::JSGlobalObject::arrayJoinWatchpointSet): 40 (JSC::JSGlobalObject::numberToStringWatchpointSet): 41 (JSC::JSGlobalObject::arrayIteratorProtocolWatchpoint): Deleted. 42 (JSC::JSGlobalObject::mapIteratorProtocolWatchpoint): Deleted. 43 (JSC::JSGlobalObject::setIteratorProtocolWatchpoint): Deleted. 44 (JSC::JSGlobalObject::stringIteratorProtocolWatchpoint): Deleted. 45 (JSC::JSGlobalObject::mapSetWatchpoint): Deleted. 46 (JSC::JSGlobalObject::setAddWatchpoint): Deleted. 47 (JSC::JSGlobalObject::arraySpeciesWatchpoint): Deleted. 48 (JSC::JSGlobalObject::numberToStringWatchpoint): Deleted. 49 * runtime/JSGlobalObjectInlines.h: 50 (JSC::JSGlobalObject::isArrayPrototypeIteratorProtocolFastAndNonObservable): 51 (JSC::JSGlobalObject::isMapPrototypeIteratorProtocolFastAndNonObservable): 52 (JSC::JSGlobalObject::isSetPrototypeIteratorProtocolFastAndNonObservable): 53 (JSC::JSGlobalObject::isStringPrototypeIteratorProtocolFastAndNonObservable): 54 (JSC::JSGlobalObject::isMapPrototypeSetFastAndNonObservable): 55 (JSC::JSGlobalObject::isSetPrototypeAddFastAndNonObservable): 56 1 57 2019-08-20 Joseph Pecoraro <pecoraro@apple.com> 2 58 -
trunk/Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp
r248872 r248906 2352 2352 // FIXME: We could easily relax the Array/Object.prototype transition as long as we OSR exitted if we saw a hole. 2353 2353 // https://bugs.webkit.org/show_bug.cgi?id=173171 2354 if (globalObject->arraySpeciesWatchpoint ().state() == IsWatched2354 if (globalObject->arraySpeciesWatchpointSet().state() == IsWatched 2355 2355 && globalObject->havingABadTimeWatchpoint()->isStillValid() 2356 2356 && arrayPrototypeStructure->transitionWatchpointSetIsStillValid() … … 2358 2358 && globalObject->arrayPrototypeChainIsSane()) { 2359 2359 2360 m_graph.watchpoints().addLazily(globalObject->arraySpeciesWatchpoint ());2360 m_graph.watchpoints().addLazily(globalObject->arraySpeciesWatchpointSet()); 2361 2361 m_graph.watchpoints().addLazily(globalObject->havingABadTimeWatchpoint()); 2362 2362 m_graph.registerAndWatchStructureTransition(arrayPrototypeStructure); -
trunk/Source/JavaScriptCore/dfg/DFGGraph.h
r248642 r248906 801 801 { 802 802 JSGlobalObject* globalObject = globalObjectFor(node->origin.semantic); 803 InlineWatchpointSet& set = globalObject->arrayIteratorProtocolWatchpoint ();803 InlineWatchpointSet& set = globalObject->arrayIteratorProtocolWatchpointSet(); 804 804 return isWatchingGlobalObjectWatchpoint(globalObject, set); 805 805 } … … 808 808 { 809 809 JSGlobalObject* globalObject = globalObjectFor(node->origin.semantic); 810 InlineWatchpointSet& set = globalObject->numberToStringWatchpoint ();810 InlineWatchpointSet& set = globalObject->numberToStringWatchpointSet(); 811 811 return isWatchingGlobalObjectWatchpoint(globalObject, set); 812 812 } -
trunk/Source/JavaScriptCore/runtime/ArrayPrototype.cpp
r247296 r248906 197 197 ArrayPrototype* arrayPrototype = globalObject->arrayPrototype(); 198 198 199 if (globalObject->arraySpeciesWatchpoint ().stateOnJSThread() == ClearWatchpoint) {199 if (globalObject->arraySpeciesWatchpointSet().stateOnJSThread() == ClearWatchpoint) { 200 200 dataLogLnIf(ArrayPrototypeInternal::verbose, "Initializing Array species watchpoints for Array.prototype: ", pointerDump(arrayPrototype), " with structure: ", pointerDump(arrayPrototype->structure(vm)), "\nand Array: ", pointerDump(globalObject->arrayConstructor()), " with structure: ", pointerDump(globalObject->arrayConstructor()->structure(vm))); 201 201 globalObject->tryInstallArraySpeciesWatchpoint(exec); 202 ASSERT(globalObject->arraySpeciesWatchpoint ().stateOnJSThread() != ClearWatchpoint);202 ASSERT(globalObject->arraySpeciesWatchpointSet().stateOnJSThread() != ClearWatchpoint); 203 203 } 204 204 205 205 return !thisObject->hasCustomProperties(vm) 206 206 && arrayPrototype == thisObject->getPrototypeDirect(vm) 207 && globalObject->arraySpeciesWatchpoint ().stateOnJSThread() == IsWatched;207 && globalObject->arraySpeciesWatchpointSet().stateOnJSThread() == IsWatched; 208 208 } 209 209 … … 577 577 } 578 578 579 inline bool canUseDefaultArrayJoinForToString(VM& vm, JSObject* thisObject) 580 { 581 JSGlobalObject* globalObject = thisObject->globalObject(); 582 583 if (globalObject->arrayJoinWatchpointSet().stateOnJSThread() != IsWatched) 584 return false; 585 586 Structure* structure = thisObject->structure(vm); 587 588 // This is the fast case. Many arrays will be an original array. 589 // We are doing very simple check here. If we do more complicated checks like looking into getDirect "join" of thisObject, 590 // it would be possible that just looking into "join" function will show the same performance. 591 return globalObject->isOriginalArrayStructure(structure); 592 } 593 579 594 EncodedJSValue JSC_HOST_CALL arrayProtoFuncToString(ExecState* exec) 580 595 { … … 586 601 JSObject* thisObject = thisValue.toObject(exec); 587 602 RETURN_IF_EXCEPTION(scope, encodedJSValue()); 588 589 // 2. Let func be the result of calling the [[Get]] internal method of array with argument "join". 590 JSValue function = JSValue(thisObject).get(exec, vm.propertyNames->join); 591 RETURN_IF_EXCEPTION(scope, encodedJSValue()); 592 593 // 3. If IsCallable(func) is false, then let func be the standard built-in method Object.prototype.toString (15.2.4.2). 594 bool customJoinCase = false; 595 if (!function.isCell()) 596 customJoinCase = true; 597 CallData callData; 598 CallType callType = getCallData(vm, function, callData); 599 if (callType == CallType::None) 600 customJoinCase = true; 601 602 if (UNLIKELY(customJoinCase)) 603 RELEASE_AND_RETURN(scope, JSValue::encode(jsMakeNontrivialString(exec, "[object ", thisObject->methodTable(vm)->className(thisObject, vm), "]"))); 604 605 // 4. Return the result of calling the [[Call]] internal method of func providing array as the this value and an empty arguments list. 606 if (!isJSArray(thisObject) || callType != CallType::Host || callData.native.function != arrayProtoFuncJoin) 607 RELEASE_AND_RETURN(scope, JSValue::encode(call(exec, function, callType, callData, thisObject, *vm.emptyList))); 603 604 if (!canUseDefaultArrayJoinForToString(vm, thisObject)) { 605 // 2. Let func be the result of calling the [[Get]] internal method of array with argument "join". 606 JSValue function = JSValue(thisObject).get(exec, vm.propertyNames->join); 607 RETURN_IF_EXCEPTION(scope, encodedJSValue()); 608 609 // 3. If IsCallable(func) is false, then let func be the standard built-in method Object.prototype.toString (15.2.4.2). 610 bool customJoinCase = false; 611 if (!function.isCell()) 612 customJoinCase = true; 613 CallData callData; 614 CallType callType = getCallData(vm, function, callData); 615 if (callType == CallType::None) 616 customJoinCase = true; 617 618 if (UNLIKELY(customJoinCase)) 619 RELEASE_AND_RETURN(scope, JSValue::encode(jsMakeNontrivialString(exec, "[object ", thisObject->methodTable(vm)->className(thisObject, vm), "]"))); 620 621 // 4. Return the result of calling the [[Call]] internal method of func providing array as the this value and an empty arguments list. 622 if (!isJSArray(thisObject) || callType != CallType::Host || callData.native.function != arrayProtoFuncJoin) 623 RELEASE_AND_RETURN(scope, JSValue::encode(call(exec, function, callType, callData, thisObject, *vm.emptyList))); 624 } 608 625 609 626 ASSERT(isJSArray(thisValue)); -
trunk/Source/JavaScriptCore/runtime/JSGlobalObject.cpp
r248846 r248906 418 418 , m_varInjectionWatchpoint(adoptRef(new WatchpointSet(IsWatched))) 419 419 , m_weakRandom(Options::forceWeakRandomSeed() ? Options::forcedWeakRandomSeed() : static_cast<unsigned>(randomNumber() * (std::numeric_limits<unsigned>::max() + 1.0))) 420 , m_arrayIteratorProtocolWatchpoint(IsWatched) 421 , m_mapIteratorProtocolWatchpoint(IsWatched) 422 , m_setIteratorProtocolWatchpoint(IsWatched) 423 , m_stringIteratorProtocolWatchpoint(IsWatched) 424 , m_mapSetWatchpoint(IsWatched) 425 , m_setAddWatchpoint(IsWatched) 426 , m_arraySpeciesWatchpoint(ClearWatchpoint) 427 , m_numberToStringWatchpoint(IsWatched) 420 , m_arrayIteratorProtocolWatchpointSet(IsWatched) 421 , m_mapIteratorProtocolWatchpointSet(IsWatched) 422 , m_setIteratorProtocolWatchpointSet(IsWatched) 423 , m_stringIteratorProtocolWatchpointSet(IsWatched) 424 , m_mapSetWatchpointSet(IsWatched) 425 , m_setAddWatchpointSet(IsWatched) 426 , m_arraySpeciesWatchpointSet(ClearWatchpoint) 427 , m_arrayJoinWatchpointSet(IsWatched) 428 , m_numberToStringWatchpointSet(IsWatched) 428 429 , m_runtimeFlags() 429 430 , m_stackTraceLimit(Options::defaultErrorStackTraceLimit()) … … 1146 1147 { 1147 1148 ObjectPropertyCondition condition = setupAdaptiveWatchpoint(arrayIteratorPrototype, m_vm.propertyNames->next); 1148 m_arrayIteratorPrototypeNext = makeUnique<ObjectPropertyChangeAdaptiveWatchpoint<InlineWatchpointSet>>(this, condition, m_arrayIteratorProtocolWatchpoint );1149 m_arrayIteratorPrototypeNext = makeUnique<ObjectPropertyChangeAdaptiveWatchpoint<InlineWatchpointSet>>(this, condition, m_arrayIteratorProtocolWatchpointSet); 1149 1150 m_arrayIteratorPrototypeNext->install(vm); 1150 1151 } 1151 1152 { 1152 1153 ObjectPropertyCondition condition = setupAdaptiveWatchpoint(this->arrayPrototype(), m_vm.propertyNames->iteratorSymbol); 1153 m_arrayPrototypeSymbolIteratorWatchpoint = makeUnique<ObjectPropertyChangeAdaptiveWatchpoint<InlineWatchpointSet>>(this, condition, m_arrayIteratorProtocolWatchpoint );1154 m_arrayPrototypeSymbolIteratorWatchpoint = makeUnique<ObjectPropertyChangeAdaptiveWatchpoint<InlineWatchpointSet>>(this, condition, m_arrayIteratorProtocolWatchpointSet); 1154 1155 m_arrayPrototypeSymbolIteratorWatchpoint->install(vm); 1156 } 1157 { 1158 ObjectPropertyCondition condition = setupAdaptiveWatchpoint(this->arrayPrototype(), m_vm.propertyNames->join); 1159 m_arrayPrototypeJoinWatchpoint = makeUnique<ObjectPropertyChangeAdaptiveWatchpoint<InlineWatchpointSet>>(this, condition, m_arrayJoinWatchpointSet); 1160 m_arrayPrototypeJoinWatchpoint->install(vm); 1155 1161 } 1156 1162 1157 1163 { 1158 1164 ObjectPropertyCondition condition = setupAdaptiveWatchpoint(mapIteratorPrototype, m_vm.propertyNames->next); 1159 m_mapIteratorPrototypeNextWatchpoint = makeUnique<ObjectPropertyChangeAdaptiveWatchpoint<InlineWatchpointSet>>(this, condition, m_mapIteratorProtocolWatchpoint );1165 m_mapIteratorPrototypeNextWatchpoint = makeUnique<ObjectPropertyChangeAdaptiveWatchpoint<InlineWatchpointSet>>(this, condition, m_mapIteratorProtocolWatchpointSet); 1160 1166 m_mapIteratorPrototypeNextWatchpoint->install(vm); 1161 1167 } 1162 1168 { 1163 1169 ObjectPropertyCondition condition = setupAdaptiveWatchpoint(m_mapPrototype.get(), m_vm.propertyNames->iteratorSymbol); 1164 m_mapPrototypeSymbolIteratorWatchpoint = makeUnique<ObjectPropertyChangeAdaptiveWatchpoint<InlineWatchpointSet>>(this, condition, m_mapIteratorProtocolWatchpoint );1170 m_mapPrototypeSymbolIteratorWatchpoint = makeUnique<ObjectPropertyChangeAdaptiveWatchpoint<InlineWatchpointSet>>(this, condition, m_mapIteratorProtocolWatchpointSet); 1165 1171 m_mapPrototypeSymbolIteratorWatchpoint->install(vm); 1166 1172 } … … 1168 1174 { 1169 1175 ObjectPropertyCondition condition = setupAdaptiveWatchpoint(setIteratorPrototype, m_vm.propertyNames->next); 1170 m_setIteratorPrototypeNextWatchpoint = makeUnique<ObjectPropertyChangeAdaptiveWatchpoint<InlineWatchpointSet>>(this, condition, m_setIteratorProtocolWatchpoint );1176 m_setIteratorPrototypeNextWatchpoint = makeUnique<ObjectPropertyChangeAdaptiveWatchpoint<InlineWatchpointSet>>(this, condition, m_setIteratorProtocolWatchpointSet); 1171 1177 m_setIteratorPrototypeNextWatchpoint->install(vm); 1172 1178 } 1173 1179 { 1174 1180 ObjectPropertyCondition condition = setupAdaptiveWatchpoint(m_setPrototype.get(), m_vm.propertyNames->iteratorSymbol); 1175 m_setPrototypeSymbolIteratorWatchpoint = makeUnique<ObjectPropertyChangeAdaptiveWatchpoint<InlineWatchpointSet>>(this, condition, m_setIteratorProtocolWatchpoint );1181 m_setPrototypeSymbolIteratorWatchpoint = makeUnique<ObjectPropertyChangeAdaptiveWatchpoint<InlineWatchpointSet>>(this, condition, m_setIteratorProtocolWatchpointSet); 1176 1182 m_setPrototypeSymbolIteratorWatchpoint->install(vm); 1177 1183 } … … 1179 1185 { 1180 1186 ObjectPropertyCondition condition = setupAdaptiveWatchpoint(m_stringIteratorPrototype.get(), m_vm.propertyNames->next); 1181 m_stringIteratorPrototypeNextWatchpoint = makeUnique<ObjectPropertyChangeAdaptiveWatchpoint<InlineWatchpointSet>>(this, condition, m_stringIteratorProtocolWatchpoint );1187 m_stringIteratorPrototypeNextWatchpoint = makeUnique<ObjectPropertyChangeAdaptiveWatchpoint<InlineWatchpointSet>>(this, condition, m_stringIteratorProtocolWatchpointSet); 1182 1188 m_stringIteratorPrototypeNextWatchpoint->install(vm); 1183 1189 } 1184 1190 { 1185 1191 ObjectPropertyCondition condition = setupAdaptiveWatchpoint(m_stringPrototype.get(), m_vm.propertyNames->iteratorSymbol); 1186 m_stringPrototypeSymbolIteratorWatchpoint = makeUnique<ObjectPropertyChangeAdaptiveWatchpoint<InlineWatchpointSet>>(this, condition, m_stringIteratorProtocolWatchpoint );1192 m_stringPrototypeSymbolIteratorWatchpoint = makeUnique<ObjectPropertyChangeAdaptiveWatchpoint<InlineWatchpointSet>>(this, condition, m_stringIteratorProtocolWatchpointSet); 1187 1193 m_stringPrototypeSymbolIteratorWatchpoint->install(vm); 1188 1194 } … … 1190 1196 { 1191 1197 ObjectPropertyCondition condition = setupAdaptiveWatchpoint(m_mapPrototype.get(), m_vm.propertyNames->set); 1192 m_mapPrototypeSetWatchpoint = makeUnique<ObjectPropertyChangeAdaptiveWatchpoint<InlineWatchpointSet>>(this, condition, m_mapSetWatchpoint );1198 m_mapPrototypeSetWatchpoint = makeUnique<ObjectPropertyChangeAdaptiveWatchpoint<InlineWatchpointSet>>(this, condition, m_mapSetWatchpointSet); 1193 1199 m_mapPrototypeSetWatchpoint->install(vm); 1194 1200 } … … 1196 1202 { 1197 1203 ObjectPropertyCondition condition = setupAdaptiveWatchpoint(m_setPrototype.get(), m_vm.propertyNames->add); 1198 m_setPrototypeAddWatchpoint = makeUnique<ObjectPropertyChangeAdaptiveWatchpoint<InlineWatchpointSet>>(this, condition, m_setAddWatchpoint );1204 m_setPrototypeAddWatchpoint = makeUnique<ObjectPropertyChangeAdaptiveWatchpoint<InlineWatchpointSet>>(this, condition, m_setAddWatchpointSet); 1199 1205 m_setPrototypeAddWatchpoint->install(vm); 1200 1206 } … … 1207 1213 1208 1214 ObjectPropertyCondition condition = setupAdaptiveWatchpoint(numberPrototype, m_vm.propertyNames->toString); 1209 m_numberPrototypeToStringWatchpoint = makeUnique<ObjectPropertyChangeAdaptiveWatchpoint<InlineWatchpointSet>>(this, condition, m_numberToStringWatchpoint );1215 m_numberPrototypeToStringWatchpoint = makeUnique<ObjectPropertyChangeAdaptiveWatchpoint<InlineWatchpointSet>>(this, condition, m_numberToStringWatchpointSet); 1210 1216 m_numberPrototypeToStringWatchpoint->install(vm); 1211 1217 m_numberProtoToStringFunction.set(vm, this, jsCast<JSFunction*>(numberPrototype->getDirect(vm, vm.propertyNames->toString))); … … 1890 1896 1891 1897 auto invalidateWatchpoint = [&] { 1892 m_arraySpeciesWatchpoint .invalidate(vm, StringFireDetail("Was not able to set up array species watchpoint."));1898 m_arraySpeciesWatchpointSet.invalidate(vm, StringFireDetail("Was not able to set up array species watchpoint.")); 1893 1899 }; 1894 1900 … … 1930 1936 1931 1937 // We only watch this from the DFG, and the DFG makes sure to only start watching if the watchpoint is in the IsWatched state. 1932 RELEASE_ASSERT(!m_arraySpeciesWatchpoint .isBeingWatched());1933 m_arraySpeciesWatchpoint .touch(vm, "Set up array species watchpoint.");1934 1935 m_arrayPrototypeConstructorWatchpoint = makeUnique<ObjectPropertyChangeAdaptiveWatchpoint<InlineWatchpointSet>>(this, constructorCondition, m_arraySpeciesWatchpoint );1938 RELEASE_ASSERT(!m_arraySpeciesWatchpointSet.isBeingWatched()); 1939 m_arraySpeciesWatchpointSet.touch(vm, "Set up array species watchpoint."); 1940 1941 m_arrayPrototypeConstructorWatchpoint = makeUnique<ObjectPropertyChangeAdaptiveWatchpoint<InlineWatchpointSet>>(this, constructorCondition, m_arraySpeciesWatchpointSet); 1936 1942 m_arrayPrototypeConstructorWatchpoint->install(vm); 1937 1943 1938 m_arrayConstructorSpeciesWatchpoint = makeUnique<ObjectPropertyChangeAdaptiveWatchpoint<InlineWatchpointSet>>(this, speciesCondition, m_arraySpeciesWatchpoint );1944 m_arrayConstructorSpeciesWatchpoint = makeUnique<ObjectPropertyChangeAdaptiveWatchpoint<InlineWatchpointSet>>(this, speciesCondition, m_arraySpeciesWatchpointSet); 1939 1945 m_arrayConstructorSpeciesWatchpoint->install(vm); 1940 1946 } -
trunk/Source/JavaScriptCore/runtime/JSGlobalObject.h
r248846 r248906 453 453 JSCallee* stackOverflowFrameCallee() const { return m_stackOverflowFrameCallee.get(); } 454 454 455 InlineWatchpointSet& arrayIteratorProtocolWatchpoint() { return m_arrayIteratorProtocolWatchpoint; } 456 InlineWatchpointSet& mapIteratorProtocolWatchpoint() { return m_mapIteratorProtocolWatchpoint; } 457 InlineWatchpointSet& setIteratorProtocolWatchpoint() { return m_setIteratorProtocolWatchpoint; } 458 InlineWatchpointSet& stringIteratorProtocolWatchpoint() { return m_stringIteratorProtocolWatchpoint; } 459 InlineWatchpointSet& mapSetWatchpoint() { return m_mapSetWatchpoint; } 460 InlineWatchpointSet& setAddWatchpoint() { return m_setAddWatchpoint; } 461 InlineWatchpointSet& arraySpeciesWatchpoint() { return m_arraySpeciesWatchpoint; } 462 InlineWatchpointSet& numberToStringWatchpoint() 455 InlineWatchpointSet& arrayIteratorProtocolWatchpointSet() { return m_arrayIteratorProtocolWatchpointSet; } 456 InlineWatchpointSet& mapIteratorProtocolWatchpointSet() { return m_mapIteratorProtocolWatchpointSet; } 457 InlineWatchpointSet& setIteratorProtocolWatchpointSet() { return m_setIteratorProtocolWatchpointSet; } 458 InlineWatchpointSet& stringIteratorProtocolWatchpointSet() { return m_stringIteratorProtocolWatchpointSet; } 459 InlineWatchpointSet& mapSetWatchpointSet() { return m_mapSetWatchpointSet; } 460 InlineWatchpointSet& setAddWatchpointSet() { return m_setAddWatchpointSet; } 461 InlineWatchpointSet& arraySpeciesWatchpointSet() { return m_arraySpeciesWatchpointSet; } 462 InlineWatchpointSet& arrayJoinWatchpointSet() { return m_arrayJoinWatchpointSet; } 463 InlineWatchpointSet& numberToStringWatchpointSet() 463 464 { 464 465 RELEASE_ASSERT(VM::canUseJIT()); 465 return m_numberToStringWatchpoint ;466 return m_numberToStringWatchpointSet; 466 467 } 467 468 // If this hasn't been invalidated, it means the array iterator protocol 468 469 // is not observable to user code yet. 469 InlineWatchpointSet m_arrayIteratorProtocolWatchpoint; 470 InlineWatchpointSet m_mapIteratorProtocolWatchpoint; 471 InlineWatchpointSet m_setIteratorProtocolWatchpoint; 472 InlineWatchpointSet m_stringIteratorProtocolWatchpoint; 473 InlineWatchpointSet m_mapSetWatchpoint; 474 InlineWatchpointSet m_setAddWatchpoint; 475 InlineWatchpointSet m_arraySpeciesWatchpoint; 476 InlineWatchpointSet m_numberToStringWatchpoint; 470 InlineWatchpointSet m_arrayIteratorProtocolWatchpointSet; 471 InlineWatchpointSet m_mapIteratorProtocolWatchpointSet; 472 InlineWatchpointSet m_setIteratorProtocolWatchpointSet; 473 InlineWatchpointSet m_stringIteratorProtocolWatchpointSet; 474 InlineWatchpointSet m_mapSetWatchpointSet; 475 InlineWatchpointSet m_setAddWatchpointSet; 476 InlineWatchpointSet m_arraySpeciesWatchpointSet; 477 InlineWatchpointSet m_arrayJoinWatchpointSet; 478 InlineWatchpointSet m_numberToStringWatchpointSet; 477 479 std::unique_ptr<ObjectPropertyChangeAdaptiveWatchpoint<InlineWatchpointSet>> m_arrayConstructorSpeciesWatchpoint; 478 480 std::unique_ptr<ObjectPropertyChangeAdaptiveWatchpoint<InlineWatchpointSet>> m_arrayPrototypeConstructorWatchpoint; 479 481 std::unique_ptr<ObjectPropertyChangeAdaptiveWatchpoint<InlineWatchpointSet>> m_arrayPrototypeSymbolIteratorWatchpoint; 482 std::unique_ptr<ObjectPropertyChangeAdaptiveWatchpoint<InlineWatchpointSet>> m_arrayPrototypeJoinWatchpoint; 480 483 std::unique_ptr<ObjectPropertyChangeAdaptiveWatchpoint<InlineWatchpointSet>> m_arrayIteratorPrototypeNext; 481 484 std::unique_ptr<ObjectPropertyChangeAdaptiveWatchpoint<InlineWatchpointSet>> m_mapPrototypeSymbolIteratorWatchpoint; -
trunk/Source/JavaScriptCore/runtime/JSGlobalObjectInlines.h
r237447 r248906 63 63 // executing concurrently. 64 64 65 return arrayIteratorProtocolWatchpoint ().isStillValid() && !isHavingABadTime() && arrayPrototypeChainIsSane();65 return arrayIteratorProtocolWatchpointSet().isStillValid() && !isHavingABadTime() && arrayPrototypeChainIsSane(); 66 66 } 67 67 … … 74 74 ALWAYS_INLINE bool JSGlobalObject::isMapPrototypeIteratorProtocolFastAndNonObservable() 75 75 { 76 return mapIteratorProtocolWatchpoint ().isStillValid();76 return mapIteratorProtocolWatchpointSet().isStillValid(); 77 77 } 78 78 79 79 ALWAYS_INLINE bool JSGlobalObject::isSetPrototypeIteratorProtocolFastAndNonObservable() 80 80 { 81 return setIteratorProtocolWatchpoint ().isStillValid();81 return setIteratorProtocolWatchpointSet().isStillValid(); 82 82 } 83 83 84 84 ALWAYS_INLINE bool JSGlobalObject::isStringPrototypeIteratorProtocolFastAndNonObservable() 85 85 { 86 return stringIteratorProtocolWatchpoint ().isStillValid();86 return stringIteratorProtocolWatchpointSet().isStillValid(); 87 87 } 88 88 89 89 ALWAYS_INLINE bool JSGlobalObject::isMapPrototypeSetFastAndNonObservable() 90 90 { 91 return mapSetWatchpoint ().isStillValid();91 return mapSetWatchpointSet().isStillValid(); 92 92 } 93 93 94 94 ALWAYS_INLINE bool JSGlobalObject::isSetPrototypeAddFastAndNonObservable() 95 95 { 96 return setAddWatchpoint ().isStillValid();96 return setAddWatchpointSet().isStillValid(); 97 97 } 98 98
Note: See TracChangeset
for help on using the changeset viewer.