Changeset 252256 in webkit
- Timestamp:
- Nov 8, 2019 1:11:25 PM (5 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r252247 r252256 1 2019-11-08 Yusuke Suzuki <ysuzuki@apple.com> 2 3 [JSC] Use LinkTimeConstants and make some properties lazy 4 https://bugs.webkit.org/show_bug.cgi?id=203795 5 6 Reviewed by Keith Miller. 7 8 This patch makes Map and Set lazily initialized in JSGlobalObject by leveraging link-time-constant. @Set was accessed from 9 builtin-JS. So we cannot make it lazily-allocated. But now we have link-time-constant mechanism that makes such accesses 10 lazily-initialized. We use this to make Set lazily-allocated. 11 12 And, instead of JSGlobalObject's last sequence of initialization, we initialize watchpoint in MapPrototype::finishCreation 13 and SetPrototype::finishCreation. This allows us to make Map and Set lazily-allocated. We also refactor NumberPrototype to 14 align to this model. 15 16 * runtime/ArrayPrototype.cpp: 17 (JSC::speciesWatchpointIsValid): 18 * runtime/JSGlobalObject.cpp: 19 (JSC::setupAdaptiveWatchpoint): 20 (JSC::JSGlobalObject::init): 21 (JSC::JSGlobalObject::visitChildren): 22 (JSC::JSGlobalObject::tryInstallArraySpeciesWatchpoint): 23 (JSC::JSGlobalObject::installNumberPrototypeWatchpoint): 24 (JSC::JSGlobalObject::installMapPrototypeWatchpoint): 25 (JSC::JSGlobalObject::installSetPrototypeWatchpoint): 26 * runtime/JSGlobalObject.h: 27 (JSC::JSGlobalObject::numberProtoToStringFunction const): 28 (JSC::JSGlobalObject::mapPrototype const): 29 (JSC::JSGlobalObject::jsSetPrototype const): 30 (JSC::JSGlobalObject::numberObjectStructure const): 31 (JSC::JSGlobalObject::mapStructure const): Deleted. 32 * runtime/MapPrototype.cpp: 33 (JSC::MapPrototype::finishCreation): 34 * runtime/NumberPrototype.cpp: 35 (JSC::NumberPrototype::finishCreation): 36 * runtime/NumberPrototype.h: 37 * runtime/SetPrototype.cpp: 38 (JSC::SetPrototype::finishCreation): 39 1 40 2019-11-08 Mark Lam <mark.lam@apple.com> 2 41 -
trunk/Source/JavaScriptCore/runtime/ArrayPrototype.cpp
r252024 r252256 200 200 if (globalObject->arraySpeciesWatchpointSet().stateOnJSThread() == ClearWatchpoint) { 201 201 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))); 202 globalObject->tryInstallArraySpeciesWatchpoint( globalObject);202 globalObject->tryInstallArraySpeciesWatchpoint(); 203 203 ASSERT(globalObject->arraySpeciesWatchpointSet().stateOnJSThread() != ClearWatchpoint); 204 204 } -
trunk/Source/JavaScriptCore/runtime/JSGlobalObject.cpp
r252160 r252256 389 389 Error JSGlobalObject::m_errorStructure DontEnum|ClassStructure 390 390 Boolean JSGlobalObject::m_booleanObjectStructure DontEnum|ClassStructure 391 Map JSGlobalObject::m_mapStructure DontEnum|ClassStructure 391 392 Number JSGlobalObject::m_numberObjectStructure DontEnum|ClassStructure 393 Set JSGlobalObject::m_setStructure DontEnum|ClassStructure 392 394 Symbol JSGlobalObject::m_symbolObjectStructure DontEnum|ClassStructure 393 395 WeakMap JSGlobalObject::m_weakMapStructure DontEnum|ClassStructure … … 461 463 } 462 464 465 static ObjectPropertyCondition setupAdaptiveWatchpoint(JSGlobalObject* globalObject, JSObject* base, const Identifier& ident) 466 { 467 // Performing these gets should not throw. 468 VM& vm = globalObject->vm(); 469 auto catchScope = DECLARE_CATCH_SCOPE(vm); 470 PropertySlot slot(base, PropertySlot::InternalMethodType::Get); 471 bool result = base->getOwnPropertySlot(base, globalObject, ident, slot); 472 ASSERT_UNUSED(result, result); 473 catchScope.assertNoException(); 474 RELEASE_ASSERT(slot.isCacheableValue()); 475 JSValue functionValue = slot.getValue(globalObject, ident); 476 catchScope.assertNoException(); 477 ASSERT(jsDynamicCast<JSFunction*>(vm, functionValue)); 478 479 ObjectPropertyCondition condition = generateConditionForSelfEquivalence(vm, nullptr, base, ident.impl()); 480 RELEASE_ASSERT(condition.requiredValue() == functionValue); 481 482 bool isWatchable = condition.isWatchable(PropertyCondition::EnsureWatchability); 483 RELEASE_ASSERT(isWatchable); // We allow this to install the necessary watchpoints. 484 485 return condition; 486 } 487 463 488 template<ErrorType errorType> 464 489 void JSGlobalObject::initializeErrorConstructor(LazyClassStructure::Initializer& init) … … 542 567 [] (const Initializer<JSFunction>& init) { 543 568 init.set(JSFunction::create(init.vm, promiseConstructorResolveCodeGenerator(init.vm), init.owner)); 569 }); 570 571 m_numberProtoToStringFunction.initLater( 572 [] (const Initializer<JSFunction>& init) { 573 init.set(JSFunction::create(init.vm, jsCast<JSGlobalObject*>(init.owner), 1, init.vm.propertyNames->toString.string(), numberProtoFuncToString, NumberPrototypeToStringIntrinsic)); 544 574 }); 545 575 … … 947 977 m_linkTimeConstants[static_cast<unsigned>(LinkTimeConstant::regExpPrototypeSymbolReplace)].set(vm, this, m_regExpPrototype->getDirect(vm, vm.propertyNames->replaceSymbol).asCell()); 948 978 949 m_linkTimeConstants[static_cast<unsigned>(LinkTimeConstant::Set)].set(vm, this, setConstructor);950 979 m_linkTimeConstants[static_cast<unsigned>(LinkTimeConstant::isArray)].set(vm, this, arrayConstructor->getDirect(vm, vm.propertyNames->isArray).asCell()); 951 980 m_linkTimeConstants[static_cast<unsigned>(LinkTimeConstant::callFunction)].set(vm, this, callFunction); … … 978 1007 979 1008 // Map and Set helpers. 1009 m_linkTimeConstants[static_cast<unsigned>(LinkTimeConstant::Set)].initLater([] (const Initializer<JSCell>& init) { 1010 init.set(jsCast<JSGlobalObject*>(init.owner)->setConstructor()); 1011 }); 980 1012 m_linkTimeConstants[static_cast<unsigned>(LinkTimeConstant::mapBucketHead)].initLater([] (const Initializer<JSCell>& init) { 981 1013 init.set(JSFunction::create(init.vm, jsCast<JSGlobalObject*>(init.owner), 0, String(), mapPrivateFuncMapBucketHead, JSMapBucketHeadIntrinsic)); … … 1187 1219 #undef CREATE_PROTOTYPE_FOR_LAZY_TYPE 1188 1220 1189 auto setupAdaptiveWatchpoint = [&] (JSObject* base, const Identifier& ident) -> ObjectPropertyCondition {1190 // Performing these gets should not throw.1191 PropertySlot slot(base, PropertySlot::InternalMethodType::Get);1192 bool result = base->getOwnPropertySlot(base, this, ident, slot);1193 ASSERT_UNUSED(result, result);1194 catchScope.assertNoException();1195 RELEASE_ASSERT(slot.isCacheableValue());1196 JSValue functionValue = slot.getValue(this, ident);1197 catchScope.assertNoException();1198 ASSERT(jsDynamicCast<JSFunction*>(vm, functionValue));1199 1200 ObjectPropertyCondition condition = generateConditionForSelfEquivalence(vm, nullptr, base, ident.impl());1201 RELEASE_ASSERT(condition.requiredValue() == functionValue);1202 1203 bool isWatchable = condition.isWatchable(PropertyCondition::EnsureWatchability);1204 RELEASE_ASSERT(isWatchable); // We allow this to install the necessary watchpoints.1205 1206 return condition;1207 };1208 1209 1221 { 1210 ObjectPropertyCondition condition = setupAdaptiveWatchpoint( arrayIteratorPrototype, vm.propertyNames->next);1222 ObjectPropertyCondition condition = setupAdaptiveWatchpoint(this, arrayIteratorPrototype, vm.propertyNames->next); 1211 1223 m_arrayIteratorPrototypeNext = makeUnique<ObjectPropertyChangeAdaptiveWatchpoint<InlineWatchpointSet>>(this, condition, m_arrayIteratorProtocolWatchpointSet); 1212 1224 m_arrayIteratorPrototypeNext->install(vm); 1213 1225 } 1214 1226 { 1215 ObjectPropertyCondition condition = setupAdaptiveWatchpoint(this ->arrayPrototype(), vm.propertyNames->iteratorSymbol);1227 ObjectPropertyCondition condition = setupAdaptiveWatchpoint(this, this->arrayPrototype(), vm.propertyNames->iteratorSymbol); 1216 1228 m_arrayPrototypeSymbolIteratorWatchpoint = makeUnique<ObjectPropertyChangeAdaptiveWatchpoint<InlineWatchpointSet>>(this, condition, m_arrayIteratorProtocolWatchpointSet); 1217 1229 m_arrayPrototypeSymbolIteratorWatchpoint->install(vm); 1218 1230 } 1219 1231 { 1220 ObjectPropertyCondition condition = setupAdaptiveWatchpoint(this ->arrayPrototype(), vm.propertyNames->join);1232 ObjectPropertyCondition condition = setupAdaptiveWatchpoint(this, this->arrayPrototype(), vm.propertyNames->join); 1221 1233 m_arrayPrototypeJoinWatchpoint = makeUnique<ObjectPropertyChangeAdaptiveWatchpoint<InlineWatchpointSet>>(this, condition, m_arrayJoinWatchpointSet); 1222 1234 m_arrayPrototypeJoinWatchpoint->install(vm); … … 1224 1236 1225 1237 { 1226 ObjectPropertyCondition condition = setupAdaptiveWatchpoint( mapIteratorPrototype, vm.propertyNames->next);1238 ObjectPropertyCondition condition = setupAdaptiveWatchpoint(this, mapIteratorPrototype, vm.propertyNames->next); 1227 1239 m_mapIteratorPrototypeNextWatchpoint = makeUnique<ObjectPropertyChangeAdaptiveWatchpoint<InlineWatchpointSet>>(this, condition, m_mapIteratorProtocolWatchpointSet); 1228 1240 m_mapIteratorPrototypeNextWatchpoint->install(vm); 1229 1241 } 1230 1242 { 1231 ObjectPropertyCondition condition = setupAdaptiveWatchpoint(m_mapPrototype.get(), vm.propertyNames->iteratorSymbol); 1232 m_mapPrototypeSymbolIteratorWatchpoint = makeUnique<ObjectPropertyChangeAdaptiveWatchpoint<InlineWatchpointSet>>(this, condition, m_mapIteratorProtocolWatchpointSet); 1233 m_mapPrototypeSymbolIteratorWatchpoint->install(vm); 1234 } 1235 1236 { 1237 ObjectPropertyCondition condition = setupAdaptiveWatchpoint(setIteratorPrototype, vm.propertyNames->next); 1243 ObjectPropertyCondition condition = setupAdaptiveWatchpoint(this, setIteratorPrototype, vm.propertyNames->next); 1238 1244 m_setIteratorPrototypeNextWatchpoint = makeUnique<ObjectPropertyChangeAdaptiveWatchpoint<InlineWatchpointSet>>(this, condition, m_setIteratorProtocolWatchpointSet); 1239 1245 m_setIteratorPrototypeNextWatchpoint->install(vm); 1240 1246 } 1241 1247 { 1242 ObjectPropertyCondition condition = setupAdaptiveWatchpoint(m_setPrototype.get(), vm.propertyNames->iteratorSymbol); 1243 m_setPrototypeSymbolIteratorWatchpoint = makeUnique<ObjectPropertyChangeAdaptiveWatchpoint<InlineWatchpointSet>>(this, condition, m_setIteratorProtocolWatchpointSet); 1244 m_setPrototypeSymbolIteratorWatchpoint->install(vm); 1245 } 1246 1247 { 1248 ObjectPropertyCondition condition = setupAdaptiveWatchpoint(m_stringIteratorPrototype.get(), vm.propertyNames->next); 1248 ObjectPropertyCondition condition = setupAdaptiveWatchpoint(this, m_stringIteratorPrototype.get(), vm.propertyNames->next); 1249 1249 m_stringIteratorPrototypeNextWatchpoint = makeUnique<ObjectPropertyChangeAdaptiveWatchpoint<InlineWatchpointSet>>(this, condition, m_stringIteratorProtocolWatchpointSet); 1250 1250 m_stringIteratorPrototypeNextWatchpoint->install(vm); 1251 1251 } 1252 1252 { 1253 ObjectPropertyCondition condition = setupAdaptiveWatchpoint( m_stringPrototype.get(), vm.propertyNames->iteratorSymbol);1253 ObjectPropertyCondition condition = setupAdaptiveWatchpoint(this, m_stringPrototype.get(), vm.propertyNames->iteratorSymbol); 1254 1254 m_stringPrototypeSymbolIteratorWatchpoint = makeUnique<ObjectPropertyChangeAdaptiveWatchpoint<InlineWatchpointSet>>(this, condition, m_stringIteratorProtocolWatchpointSet); 1255 1255 m_stringPrototypeSymbolIteratorWatchpoint->install(vm); 1256 }1257 1258 {1259 ObjectPropertyCondition condition = setupAdaptiveWatchpoint(m_mapPrototype.get(), vm.propertyNames->set);1260 m_mapPrototypeSetWatchpoint = makeUnique<ObjectPropertyChangeAdaptiveWatchpoint<InlineWatchpointSet>>(this, condition, m_mapSetWatchpointSet);1261 m_mapPrototypeSetWatchpoint->install(vm);1262 }1263 1264 {1265 ObjectPropertyCondition condition = setupAdaptiveWatchpoint(m_setPrototype.get(), vm.propertyNames->add);1266 m_setPrototypeAddWatchpoint = makeUnique<ObjectPropertyChangeAdaptiveWatchpoint<InlineWatchpointSet>>(this, condition, m_setAddWatchpointSet);1267 m_setPrototypeAddWatchpoint->install(vm);1268 1256 } 1269 1257 … … 1271 1259 if (VM::canUseJIT()) { 1272 1260 this->booleanPrototype(); 1273 auto* numberPrototype =this->numberPrototype();1261 this->numberPrototype(); 1274 1262 this->symbolPrototype(); 1275 1276 ObjectPropertyCondition condition = setupAdaptiveWatchpoint(numberPrototype, vm.propertyNames->toString);1277 m_numberPrototypeToStringWatchpoint = makeUnique<ObjectPropertyChangeAdaptiveWatchpoint<InlineWatchpointSet>>(this, condition, m_numberToStringWatchpointSet);1278 m_numberPrototypeToStringWatchpoint->install(vm);1279 m_numberProtoToStringFunction.set(vm, this, jsCast<JSFunction*>(numberPrototype->getDirect(vm, vm.propertyNames->toString)));1280 1263 } 1281 1264 … … 1771 1754 thisObject->m_promiseResolveFunction.visit(visitor); 1772 1755 visitor.append(thisObject->m_objectProtoValueOfFunction); 1773 visitor.append(thisObject->m_numberProtoToStringFunction);1756 thisObject->m_numberProtoToStringFunction.visit(visitor); 1774 1757 visitor.append(thisObject->m_functionProtoHasInstanceSymbolFunction); 1775 1758 thisObject->m_throwTypeErrorGetterSetter.visit(visitor); … … 1946 1929 } 1947 1930 1948 void JSGlobalObject::tryInstallArraySpeciesWatchpoint( JSGlobalObject* globalObject)1931 void JSGlobalObject::tryInstallArraySpeciesWatchpoint() 1949 1932 { 1950 1933 RELEASE_ASSERT(!m_arrayPrototypeConstructorWatchpoint); 1951 1934 RELEASE_ASSERT(!m_arrayConstructorSpeciesWatchpoint); 1952 1935 1953 VM& vm = globalObject->vm();1936 VM& vm = this->vm(); 1954 1937 auto scope = DECLARE_THROW_SCOPE(vm); 1955 1938 … … 1971 1954 1972 1955 PropertySlot constructorSlot(arrayPrototype, PropertySlot::InternalMethodType::VMInquiry); 1973 arrayPrototype->getOwnPropertySlot(arrayPrototype, globalObject, vm.propertyNames->constructor, constructorSlot);1956 arrayPrototype->getOwnPropertySlot(arrayPrototype, this, vm.propertyNames->constructor, constructorSlot); 1974 1957 scope.assertNoException(); 1975 1958 if (constructorSlot.slotBase() != arrayPrototype 1976 1959 || !constructorSlot.isCacheableValue() 1977 || constructorSlot.getValue( globalObject, vm.propertyNames->constructor) != arrayConstructor) {1960 || constructorSlot.getValue(this, vm.propertyNames->constructor) != arrayConstructor) { 1978 1961 invalidateWatchpoint(); 1979 1962 return; … … 1985 1968 1986 1969 PropertySlot speciesSlot(arrayConstructor, PropertySlot::InternalMethodType::VMInquiry); 1987 arrayConstructor->getOwnPropertySlot(arrayConstructor, globalObject, vm.propertyNames->speciesSymbol, speciesSlot);1970 arrayConstructor->getOwnPropertySlot(arrayConstructor, this, vm.propertyNames->speciesSymbol, speciesSlot); 1988 1971 scope.assertNoException(); 1989 1972 if (speciesSlot.slotBase() != arrayConstructor … … 2015 1998 m_arrayConstructorSpeciesWatchpoint = makeUnique<ObjectPropertyChangeAdaptiveWatchpoint<InlineWatchpointSet>>(this, speciesCondition, m_arraySpeciesWatchpointSet); 2016 1999 m_arrayConstructorSpeciesWatchpoint->install(vm); 2000 } 2001 2002 void JSGlobalObject::installNumberPrototypeWatchpoint(NumberPrototype* numberPrototype) 2003 { 2004 VM& vm = this->vm(); 2005 ASSERT(m_numberToStringWatchpointSet.isStillValid()); 2006 ObjectPropertyCondition condition = setupAdaptiveWatchpoint(this, numberPrototype, vm.propertyNames->toString); 2007 m_numberPrototypeToStringWatchpoint = makeUnique<ObjectPropertyChangeAdaptiveWatchpoint<InlineWatchpointSet>>(this, condition, m_numberToStringWatchpointSet); 2008 m_numberPrototypeToStringWatchpoint->install(vm); 2009 } 2010 2011 void JSGlobalObject::installMapPrototypeWatchpoint(MapPrototype* mapPrototype) 2012 { 2013 VM& vm = this->vm(); 2014 if (m_mapIteratorProtocolWatchpointSet.isStillValid()) { 2015 ObjectPropertyCondition condition = setupAdaptiveWatchpoint(this, mapPrototype, vm.propertyNames->iteratorSymbol); 2016 m_mapPrototypeSymbolIteratorWatchpoint = makeUnique<ObjectPropertyChangeAdaptiveWatchpoint<InlineWatchpointSet>>(this, condition, m_mapIteratorProtocolWatchpointSet); 2017 m_mapPrototypeSymbolIteratorWatchpoint->install(vm); 2018 } 2019 ASSERT(m_mapSetWatchpointSet.isStillValid()); 2020 ObjectPropertyCondition condition = setupAdaptiveWatchpoint(this, mapPrototype, vm.propertyNames->set); 2021 m_mapPrototypeSetWatchpoint = makeUnique<ObjectPropertyChangeAdaptiveWatchpoint<InlineWatchpointSet>>(this, condition, m_mapSetWatchpointSet); 2022 m_mapPrototypeSetWatchpoint->install(vm); 2023 } 2024 2025 void JSGlobalObject::installSetPrototypeWatchpoint(SetPrototype* setPrototype) 2026 { 2027 VM& vm = this->vm(); 2028 if (m_setIteratorProtocolWatchpointSet.isStillValid()) { 2029 ObjectPropertyCondition condition = setupAdaptiveWatchpoint(this, setPrototype, vm.propertyNames->iteratorSymbol); 2030 m_setPrototypeSymbolIteratorWatchpoint = makeUnique<ObjectPropertyChangeAdaptiveWatchpoint<InlineWatchpointSet>>(this, condition, m_setIteratorProtocolWatchpointSet); 2031 m_setPrototypeSymbolIteratorWatchpoint->install(vm); 2032 } 2033 ASSERT(m_setAddWatchpointSet.isStillValid()); 2034 ObjectPropertyCondition condition = setupAdaptiveWatchpoint(this, setPrototype, vm.propertyNames->add); 2035 m_setPrototypeAddWatchpoint = makeUnique<ObjectPropertyChangeAdaptiveWatchpoint<InlineWatchpointSet>>(this, condition, m_setAddWatchpointSet); 2036 m_setPrototypeAddWatchpoint->install(vm); 2017 2037 } 2018 2038 -
trunk/Source/JavaScriptCore/runtime/JSGlobalObject.h
r252032 r252256 133 133 #define FOR_EACH_SIMPLE_BUILTIN_TYPE_WITH_CONSTRUCTOR(macro) \ 134 134 macro(String, string, stringObject, StringObject, String, object, typeExposedByDefault) \ 135 macro(Map, map, map, JSMap, Map, object, typeExposedByDefault) \136 macro(Set, set, set, JSSet, Set, object, typeExposedByDefault) \137 135 macro(JSPromise, promise, promise, JSPromise, Promise, object, typeExposedByDefault) \ 138 136 macro(BigInt, bigInt, bigIntObject, BigIntObject, BigInt, object, Options::useBigInt()) \ … … 150 148 macro(Date, date, date, DateInstance, Date, object, typeExposedByDefault) \ 151 149 macro(Error, error, error, ErrorInstance, Error, object, typeExposedByDefault) \ 150 macro(Map, map, map, JSMap, Map, object, typeExposedByDefault) \ 152 151 macro(Number, number, numberObject, NumberObject, Number, object, typeExposedByDefault) \ 152 macro(Set, set, set, JSSet, Set, object, typeExposedByDefault) \ 153 153 macro(Symbol, symbol, symbolObject, SymbolObject, Symbol, object, typeExposedByDefault) \ 154 154 DEFINE_STANDARD_BUILTIN(macro, WeakMap, weakMap) \ … … 303 303 LazyProperty<JSGlobalObject, JSFunction> m_iteratorProtocolFunction; 304 304 LazyProperty<JSGlobalObject, JSFunction> m_promiseResolveFunction; 305 LazyProperty<JSGlobalObject, JSFunction> m_numberProtoToStringFunction; 305 306 WriteBarrier<JSFunction> m_objectProtoValueOfFunction; 306 WriteBarrier<JSFunction> m_numberProtoToStringFunction;307 307 WriteBarrier<JSFunction> m_functionProtoHasInstanceSymbolFunction; 308 308 LazyProperty<JSGlobalObject, GetterSetter> m_throwTypeErrorGetterSetter; … … 616 616 JSFunction* promiseProtoThenFunction() const; 617 617 JSFunction* objectProtoValueOfFunction() const { return m_objectProtoValueOfFunction.get(); } 618 JSFunction* numberProtoToStringFunction() const { return m_numberProtoToStringFunction.get (); }618 JSFunction* numberProtoToStringFunction() const { return m_numberProtoToStringFunction.getInitializedOnMainThread(this); } 619 619 JSFunction* functionProtoHasInstanceSymbolFunction() const { return m_functionProtoHasInstanceSymbolFunction.get(); } 620 620 JSFunction* regExpProtoExecFunction() const; … … 645 645 GeneratorPrototype* generatorPrototype() const { return m_generatorPrototype.get(); } 646 646 AsyncFunctionPrototype* asyncFunctionPrototype() const { return m_asyncFunctionPrototype.get(); } 647 MapPrototype* mapPrototype() const { return m_mapPrototype.get(); }647 JSObject* mapPrototype() const { return m_mapStructure.prototype(this); } 648 648 // Workaround for the name conflict between JSCell::setPrototype. 649 SetPrototype* jsSetPrototype() const { return m_setPrototype.get(); }649 JSObject* jsSetPrototype() const { return m_setStructure.prototype(this); } 650 650 JSPromisePrototype* promisePrototype() const { return m_promisePrototype.get(); } 651 651 AsyncGeneratorPrototype* asyncGeneratorPrototype() const { return m_asyncGeneratorPrototype.get(); } … … 746 746 PropertyOffset functionNameOffset() const { return m_functionNameOffset; } 747 747 Structure* numberObjectStructure() const { return m_numberObjectStructure.get(this); } 748 Structure* mapStructure() const { return m_mapStructure.get(); }749 748 Structure* regExpStructure() const { return m_regExpStructure.get(); } 750 749 Structure* generatorStructure() const { return m_generatorStructure.get(); } … … 1013 1012 #endif 1014 1013 1015 void tryInstallArraySpeciesWatchpoint(JSGlobalObject*); 1014 void tryInstallArraySpeciesWatchpoint(); 1015 void installNumberPrototypeWatchpoint(NumberPrototype*); 1016 void installMapPrototypeWatchpoint(MapPrototype*); 1017 void installSetPrototypeWatchpoint(SetPrototype*); 1016 1018 1017 1019 protected: -
trunk/Source/JavaScriptCore/runtime/MapPrototype.cpp
r251425 r252256 77 77 78 78 JSC_NATIVE_GETTER_WITHOUT_TRANSITION(vm.propertyNames->size, mapProtoFuncSize, PropertyAttribute::DontEnum | PropertyAttribute::Accessor); 79 80 globalObject->installMapPrototypeWatchpoint(this); 79 81 } 80 82 -
trunk/Source/JavaScriptCore/runtime/NumberPrototype.cpp
r251425 r252256 45 45 namespace JSC { 46 46 47 static EncodedJSValue JSC_HOST_CALL numberProtoFuncToString(JSGlobalObject*, CallFrame*);48 47 static EncodedJSValue JSC_HOST_CALL numberProtoFuncToLocaleString(JSGlobalObject*, CallFrame*); 49 48 static EncodedJSValue JSC_HOST_CALL numberProtoFuncToFixed(JSGlobalObject*, CallFrame*); … … 80 79 Base::finishCreation(vm); 81 80 setInternalValue(vm, jsNumber(0)); 82 83 JSC_NATIVE_INTRINSIC_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->toString, numberProtoFuncToString, static_cast<unsigned>(PropertyAttribute::DontEnum), 1, NumberPrototypeToStringIntrinsic); 81 putDirectWithoutTransition(vm, vm.propertyNames->toString, globalObject->numberProtoToStringFunction(), static_cast<unsigned>(PropertyAttribute::DontEnum)); 84 82 ASSERT(inherits(vm, info())); 83 globalObject->installNumberPrototypeWatchpoint(this); 85 84 } 86 85 -
trunk/Source/JavaScriptCore/runtime/NumberPrototype.h
r251425 r252256 52 52 53 53 EncodedJSValue JSC_HOST_CALL numberProtoFuncValueOf(JSGlobalObject*, CallFrame*); 54 EncodedJSValue JSC_HOST_CALL numberProtoFuncToString(JSGlobalObject*, CallFrame*); 54 55 JSString* int32ToString(VM&, int32_t value, int32_t radix); 55 56 JSString* int52ToString(VM&, int64_t value, int32_t radix); -
trunk/Source/JavaScriptCore/runtime/SetPrototype.cpp
r251425 r252256 75 75 76 76 JSC_NATIVE_GETTER_WITHOUT_TRANSITION(vm.propertyNames->size, setProtoFuncSize, PropertyAttribute::DontEnum | PropertyAttribute::Accessor); 77 78 globalObject->installSetPrototypeWatchpoint(this); 77 79 } 78 80
Note: See TracChangeset
for help on using the changeset viewer.