Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (242649 => 242650)
--- trunk/Source/_javascript_Core/ChangeLog 2019-03-08 19:18:18 UTC (rev 242649)
+++ trunk/Source/_javascript_Core/ChangeLog 2019-03-08 19:33:51 UTC (rev 242650)
@@ -1,3 +1,117 @@
+2019-03-08 Yusuke Suzuki <ysuz...@apple.com>
+
+ [JSC] We should have more WithoutTransition functions which are usable for JSGlobalObject initialization
+ https://bugs.webkit.org/show_bug.cgi?id=195447
+
+ Reviewed by Filip Pizlo.
+
+ This patch reduces # of unnecessary structure transitions in JSGlobalObject initialization to avoid unnecessary allocations
+ caused by Structure transition. One example is WeakBlock allocation for StructureTransitionTable.
+ To achieve this, we (1) add putDirectNonIndexAccessorWithoutTransition and putDirectNativeIntrinsicGetterWithoutTransition
+ to add accessor properties without transition, and (2) add NameAdditionMode::WithoutStructureTransition mode to InternalFunction::finishCreation
+ to use `putDirectWithoutTransition` instead of `putDirect`.
+
+ * inspector/JSInjectedScriptHostPrototype.cpp:
+ (Inspector::JSInjectedScriptHostPrototype::finishCreation):
+ * inspector/JSJavaScriptCallFramePrototype.cpp:
+ (Inspector::JSJavaScriptCallFramePrototype::finishCreation):
+ * runtime/ArrayConstructor.cpp:
+ (JSC::ArrayConstructor::finishCreation):
+ * runtime/AsyncFunctionConstructor.cpp:
+ (JSC::AsyncFunctionConstructor::finishCreation):
+ * runtime/AsyncGeneratorFunctionConstructor.cpp:
+ (JSC::AsyncGeneratorFunctionConstructor::finishCreation):
+ * runtime/BigIntConstructor.cpp:
+ (JSC::BigIntConstructor::finishCreation):
+ * runtime/BooleanConstructor.cpp:
+ (JSC::BooleanConstructor::finishCreation):
+ * runtime/DateConstructor.cpp:
+ (JSC::DateConstructor::finishCreation):
+ * runtime/ErrorConstructor.cpp:
+ (JSC::ErrorConstructor::finishCreation):
+ * runtime/FunctionConstructor.cpp:
+ (JSC::FunctionConstructor::finishCreation):
+ * runtime/FunctionPrototype.cpp:
+ (JSC::FunctionPrototype::finishCreation):
+ (JSC::FunctionPrototype::addFunctionProperties):
+ (JSC::FunctionPrototype::initRestrictedProperties):
+ * runtime/FunctionPrototype.h:
+ * runtime/GeneratorFunctionConstructor.cpp:
+ (JSC::GeneratorFunctionConstructor::finishCreation):
+ * runtime/InternalFunction.cpp:
+ (JSC::InternalFunction::finishCreation):
+ * runtime/InternalFunction.h:
+ * runtime/IntlCollatorConstructor.cpp:
+ (JSC::IntlCollatorConstructor::finishCreation):
+ * runtime/IntlDateTimeFormatConstructor.cpp:
+ (JSC::IntlDateTimeFormatConstructor::finishCreation):
+ * runtime/IntlNumberFormatConstructor.cpp:
+ (JSC::IntlNumberFormatConstructor::finishCreation):
+ * runtime/IntlPluralRulesConstructor.cpp:
+ (JSC::IntlPluralRulesConstructor::finishCreation):
+ * runtime/JSArrayBufferConstructor.cpp:
+ (JSC::JSGenericArrayBufferConstructor<sharingMode>::finishCreation):
+ * runtime/JSArrayBufferPrototype.cpp:
+ (JSC::JSArrayBufferPrototype::finishCreation):
+ * runtime/JSGenericTypedArrayViewConstructorInlines.h:
+ (JSC::JSGenericTypedArrayViewConstructor<ViewClass>::finishCreation):
+ * runtime/JSGlobalObject.cpp:
+ (JSC::JSGlobalObject::init):
+ * runtime/JSObject.cpp:
+ (JSC::JSObject::putDirectNonIndexAccessorWithoutTransition):
+ (JSC::JSObject::putDirectNativeIntrinsicGetterWithoutTransition):
+ * runtime/JSObject.h:
+ * runtime/JSPromiseConstructor.cpp:
+ (JSC::JSPromiseConstructor::finishCreation):
+ * runtime/JSTypedArrayViewConstructor.cpp:
+ (JSC::JSTypedArrayViewConstructor::finishCreation):
+ * runtime/JSTypedArrayViewPrototype.cpp:
+ (JSC::JSTypedArrayViewPrototype::finishCreation):
+ * runtime/MapConstructor.cpp:
+ (JSC::MapConstructor::finishCreation):
+ * runtime/MapPrototype.cpp:
+ (JSC::MapPrototype::finishCreation):
+ * runtime/NativeErrorConstructor.cpp:
+ (JSC::NativeErrorConstructorBase::finishCreation):
+ * runtime/NullGetterFunction.h:
+ * runtime/NullSetterFunction.h:
+ * runtime/NumberConstructor.cpp:
+ (JSC::NumberConstructor::finishCreation):
+ * runtime/ObjectConstructor.cpp:
+ (JSC::ObjectConstructor::finishCreation):
+ * runtime/ProxyConstructor.cpp:
+ (JSC::ProxyConstructor::finishCreation):
+ * runtime/RegExpConstructor.cpp:
+ (JSC::RegExpConstructor::finishCreation):
+ * runtime/RegExpPrototype.cpp:
+ (JSC::RegExpPrototype::finishCreation):
+ * runtime/SetConstructor.cpp:
+ (JSC::SetConstructor::finishCreation):
+ * runtime/SetPrototype.cpp:
+ (JSC::SetPrototype::finishCreation):
+ * runtime/StringConstructor.cpp:
+ (JSC::StringConstructor::finishCreation):
+ * runtime/SymbolConstructor.cpp:
+ (JSC::SymbolConstructor::finishCreation):
+ * runtime/WeakMapConstructor.cpp:
+ (JSC::WeakMapConstructor::finishCreation):
+ * runtime/WeakSetConstructor.cpp:
+ (JSC::WeakSetConstructor::finishCreation):
+ * wasm/js/WebAssemblyCompileErrorConstructor.cpp:
+ (JSC::WebAssemblyCompileErrorConstructor::finishCreation):
+ * wasm/js/WebAssemblyInstanceConstructor.cpp:
+ (JSC::WebAssemblyInstanceConstructor::finishCreation):
+ * wasm/js/WebAssemblyLinkErrorConstructor.cpp:
+ (JSC::WebAssemblyLinkErrorConstructor::finishCreation):
+ * wasm/js/WebAssemblyMemoryConstructor.cpp:
+ (JSC::WebAssemblyMemoryConstructor::finishCreation):
+ * wasm/js/WebAssemblyModuleConstructor.cpp:
+ (JSC::WebAssemblyModuleConstructor::finishCreation):
+ * wasm/js/WebAssemblyRuntimeErrorConstructor.cpp:
+ (JSC::WebAssemblyRuntimeErrorConstructor::finishCreation):
+ * wasm/js/WebAssemblyTableConstructor.cpp:
+ (JSC::WebAssemblyTableConstructor::finishCreation):
+
2019-03-08 Tadeu Zagallo <tzaga...@apple.com>
op_check_tdz does not def its argument
Modified: trunk/Source/_javascript_Core/inspector/JSInjectedScriptHostPrototype.cpp (242649 => 242650)
--- trunk/Source/_javascript_Core/inspector/JSInjectedScriptHostPrototype.cpp 2019-03-08 19:18:18 UTC (rev 242649)
+++ trunk/Source/_javascript_Core/inspector/JSInjectedScriptHostPrototype.cpp 2019-03-08 19:33:51 UTC (rev 242650)
@@ -76,7 +76,7 @@
JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("queryObjects", jsInjectedScriptHostPrototypeFunctionQueryObjects, static_cast<unsigned>(PropertyAttribute::DontEnum), 1);
JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("evaluateWithScopeExtension", jsInjectedScriptHostPrototypeFunctionEvaluateWithScopeExtension, static_cast<unsigned>(PropertyAttribute::DontEnum), 1);
- JSC_NATIVE_GETTER("evaluate", jsInjectedScriptHostPrototypeAttributeEvaluate, PropertyAttribute::DontEnum | PropertyAttribute::Accessor);
+ JSC_NATIVE_GETTER_WITHOUT_TRANSITION("evaluate", jsInjectedScriptHostPrototypeAttributeEvaluate, PropertyAttribute::DontEnum | PropertyAttribute::Accessor);
}
EncodedJSValue JSC_HOST_CALL jsInjectedScriptHostPrototypeAttributeEvaluate(ExecState* exec)
Modified: trunk/Source/_javascript_Core/inspector/JSJavaScriptCallFramePrototype.cpp (242649 => 242650)
--- trunk/Source/_javascript_Core/inspector/JSJavaScriptCallFramePrototype.cpp 2019-03-08 19:18:18 UTC (rev 242649)
+++ trunk/Source/_javascript_Core/inspector/JSJavaScriptCallFramePrototype.cpp 2019-03-08 19:33:51 UTC (rev 242650)
@@ -62,15 +62,15 @@
JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("evaluateWithScopeExtension", jsJavaScriptCallFramePrototypeFunctionEvaluateWithScopeExtension, static_cast<unsigned>(PropertyAttribute::DontEnum), 1);
JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("scopeDescriptions", jsJavaScriptCallFramePrototypeFunctionScopeDescriptions, static_cast<unsigned>(PropertyAttribute::DontEnum), 0);
- JSC_NATIVE_GETTER("caller", jsJavaScriptCallFrameAttributeCaller, PropertyAttribute::DontEnum | PropertyAttribute::Accessor);
- JSC_NATIVE_GETTER("sourceID", jsJavaScriptCallFrameAttributeSourceID, PropertyAttribute::DontEnum | PropertyAttribute::Accessor);
- JSC_NATIVE_GETTER("line", jsJavaScriptCallFrameAttributeLine, PropertyAttribute::DontEnum | PropertyAttribute::Accessor);
- JSC_NATIVE_GETTER("column", jsJavaScriptCallFrameAttributeColumn, PropertyAttribute::DontEnum | PropertyAttribute::Accessor);
- JSC_NATIVE_GETTER("functionName", jsJavaScriptCallFrameAttributeFunctionName, PropertyAttribute::DontEnum | PropertyAttribute::Accessor);
- JSC_NATIVE_GETTER("scopeChain", jsJavaScriptCallFrameAttributeScopeChain, PropertyAttribute::DontEnum | PropertyAttribute::Accessor);
- JSC_NATIVE_GETTER("thisObject", jsJavaScriptCallFrameAttributeThisObject, PropertyAttribute::DontEnum | PropertyAttribute::Accessor);
- JSC_NATIVE_GETTER("type", jsJavaScriptCallFrameAttributeType, PropertyAttribute::DontEnum | PropertyAttribute::Accessor);
- JSC_NATIVE_GETTER("isTailDeleted", jsJavaScriptCallFrameIsTailDeleted, PropertyAttribute::DontEnum | PropertyAttribute::Accessor);
+ JSC_NATIVE_GETTER_WITHOUT_TRANSITION("caller", jsJavaScriptCallFrameAttributeCaller, PropertyAttribute::DontEnum | PropertyAttribute::Accessor);
+ JSC_NATIVE_GETTER_WITHOUT_TRANSITION("sourceID", jsJavaScriptCallFrameAttributeSourceID, PropertyAttribute::DontEnum | PropertyAttribute::Accessor);
+ JSC_NATIVE_GETTER_WITHOUT_TRANSITION("line", jsJavaScriptCallFrameAttributeLine, PropertyAttribute::DontEnum | PropertyAttribute::Accessor);
+ JSC_NATIVE_GETTER_WITHOUT_TRANSITION("column", jsJavaScriptCallFrameAttributeColumn, PropertyAttribute::DontEnum | PropertyAttribute::Accessor);
+ JSC_NATIVE_GETTER_WITHOUT_TRANSITION("functionName", jsJavaScriptCallFrameAttributeFunctionName, PropertyAttribute::DontEnum | PropertyAttribute::Accessor);
+ JSC_NATIVE_GETTER_WITHOUT_TRANSITION("scopeChain", jsJavaScriptCallFrameAttributeScopeChain, PropertyAttribute::DontEnum | PropertyAttribute::Accessor);
+ JSC_NATIVE_GETTER_WITHOUT_TRANSITION("thisObject", jsJavaScriptCallFrameAttributeThisObject, PropertyAttribute::DontEnum | PropertyAttribute::Accessor);
+ JSC_NATIVE_GETTER_WITHOUT_TRANSITION("type", jsJavaScriptCallFrameAttributeType, PropertyAttribute::DontEnum | PropertyAttribute::Accessor);
+ JSC_NATIVE_GETTER_WITHOUT_TRANSITION("isTailDeleted", jsJavaScriptCallFrameIsTailDeleted, PropertyAttribute::DontEnum | PropertyAttribute::Accessor);
}
EncodedJSValue JSC_HOST_CALL jsJavaScriptCallFramePrototypeFunctionEvaluateWithScopeExtension(ExecState* exec)
Modified: trunk/Source/_javascript_Core/runtime/ArrayConstructor.cpp (242649 => 242650)
--- trunk/Source/_javascript_Core/runtime/ArrayConstructor.cpp 2019-03-08 19:18:18 UTC (rev 242649)
+++ trunk/Source/_javascript_Core/runtime/ArrayConstructor.cpp 2019-03-08 19:33:51 UTC (rev 242650)
@@ -60,10 +60,10 @@
void ArrayConstructor::finishCreation(VM& vm, JSGlobalObject* globalObject, ArrayPrototype* arrayPrototype, GetterSetter* speciesSymbol)
{
- Base::finishCreation(vm, arrayPrototype->classInfo(vm)->className);
+ Base::finishCreation(vm, vm.propertyNames->Array.string(), NameVisibility::Visible, NameAdditionMode::WithoutStructureTransition);
putDirectWithoutTransition(vm, vm.propertyNames->prototype, arrayPrototype, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly);
putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum);
- putDirectNonIndexAccessor(vm, vm.propertyNames->speciesSymbol, speciesSymbol, PropertyAttribute::Accessor | PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum);
+ putDirectNonIndexAccessorWithoutTransition(vm, vm.propertyNames->speciesSymbol, speciesSymbol, PropertyAttribute::Accessor | PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum);
JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->isArray, arrayConstructorIsArrayCodeGenerator, static_cast<unsigned>(PropertyAttribute::DontEnum));
}
Modified: trunk/Source/_javascript_Core/runtime/AsyncFunctionConstructor.cpp (242649 => 242650)
--- trunk/Source/_javascript_Core/runtime/AsyncFunctionConstructor.cpp 2019-03-08 19:18:18 UTC (rev 242649)
+++ trunk/Source/_javascript_Core/runtime/AsyncFunctionConstructor.cpp 2019-03-08 19:33:51 UTC (rev 242650)
@@ -55,7 +55,7 @@
void AsyncFunctionConstructor::finishCreation(VM& vm, AsyncFunctionPrototype* prototype)
{
- Base::finishCreation(vm, "AsyncFunction");
+ Base::finishCreation(vm, "AsyncFunction"_s, NameVisibility::Visible, NameAdditionMode::WithoutStructureTransition);
putDirectWithoutTransition(vm, vm.propertyNames->prototype, prototype, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly);
putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum);
}
Modified: trunk/Source/_javascript_Core/runtime/AsyncGeneratorFunctionConstructor.cpp (242649 => 242650)
--- trunk/Source/_javascript_Core/runtime/AsyncGeneratorFunctionConstructor.cpp 2019-03-08 19:18:18 UTC (rev 242649)
+++ trunk/Source/_javascript_Core/runtime/AsyncGeneratorFunctionConstructor.cpp 2019-03-08 19:33:51 UTC (rev 242650)
@@ -55,7 +55,7 @@
void AsyncGeneratorFunctionConstructor::finishCreation(VM& vm, AsyncGeneratorFunctionPrototype* prototype)
{
- Base::finishCreation(vm, "AsyncGeneratorFunction");
+ Base::finishCreation(vm, "AsyncGeneratorFunction"_s, NameVisibility::Visible, NameAdditionMode::WithoutStructureTransition);
putDirectWithoutTransition(vm, vm.propertyNames->prototype, prototype, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly);
// Number of arguments for constructor
Modified: trunk/Source/_javascript_Core/runtime/BigIntConstructor.cpp (242649 => 242650)
--- trunk/Source/_javascript_Core/runtime/BigIntConstructor.cpp 2019-03-08 19:18:18 UTC (rev 242649)
+++ trunk/Source/_javascript_Core/runtime/BigIntConstructor.cpp 2019-03-08 19:33:51 UTC (rev 242650)
@@ -66,12 +66,11 @@
void BigIntConstructor::finishCreation(VM& vm, BigIntPrototype* bigIntPrototype)
{
- Base::finishCreation(vm, BigIntPrototype::info()->className);
+ Base::finishCreation(vm, "BigInt"_s, NameVisibility::Visible, NameAdditionMode::WithoutStructureTransition);
ASSERT(inherits(vm, info()));
putDirectWithoutTransition(vm, vm.propertyNames->prototype, bigIntPrototype, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly);
putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum);
- putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String("BigInt"_s)), PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum);
}
// ------------------------------ Functions ---------------------------
Modified: trunk/Source/_javascript_Core/runtime/BooleanConstructor.cpp (242649 => 242650)
--- trunk/Source/_javascript_Core/runtime/BooleanConstructor.cpp 2019-03-08 19:18:18 UTC (rev 242649)
+++ trunk/Source/_javascript_Core/runtime/BooleanConstructor.cpp 2019-03-08 19:33:51 UTC (rev 242650)
@@ -57,7 +57,7 @@
void BooleanConstructor::finishCreation(VM& vm, BooleanPrototype* booleanPrototype)
{
- Base::finishCreation(vm, booleanPrototype->classInfo(vm)->className);
+ Base::finishCreation(vm, vm.propertyNames->Boolean.string(), NameVisibility::Visible, NameAdditionMode::WithoutStructureTransition);
putDirectWithoutTransition(vm, vm.propertyNames->prototype, booleanPrototype, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly);
putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum);
}
Modified: trunk/Source/_javascript_Core/runtime/DateConstructor.cpp (242649 => 242650)
--- trunk/Source/_javascript_Core/runtime/DateConstructor.cpp 2019-03-08 19:18:18 UTC (rev 242649)
+++ trunk/Source/_javascript_Core/runtime/DateConstructor.cpp 2019-03-08 19:33:51 UTC (rev 242650)
@@ -78,7 +78,7 @@
void DateConstructor::finishCreation(VM& vm, DatePrototype* datePrototype)
{
- Base::finishCreation(vm, "Date");
+ Base::finishCreation(vm, vm.propertyNames->Date.string(), NameVisibility::Visible, NameAdditionMode::WithoutStructureTransition);
putDirectWithoutTransition(vm, vm.propertyNames->prototype, datePrototype, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly);
putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(7), PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum);
}
Modified: trunk/Source/_javascript_Core/runtime/ErrorConstructor.cpp (242649 => 242650)
--- trunk/Source/_javascript_Core/runtime/ErrorConstructor.cpp 2019-03-08 19:18:18 UTC (rev 242649)
+++ trunk/Source/_javascript_Core/runtime/ErrorConstructor.cpp 2019-03-08 19:33:51 UTC (rev 242650)
@@ -43,7 +43,7 @@
void ErrorConstructor::finishCreation(VM& vm, ErrorPrototype* errorPrototype)
{
- Base::finishCreation(vm, "Error"_s);
+ Base::finishCreation(vm, vm.propertyNames->Error.string(), NameVisibility::Visible, NameAdditionMode::WithoutStructureTransition);
// ECMA 15.11.3.1 Error.prototype
putDirectWithoutTransition(vm, vm.propertyNames->prototype, errorPrototype, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly);
putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly);
Modified: trunk/Source/_javascript_Core/runtime/FunctionConstructor.cpp (242649 => 242650)
--- trunk/Source/_javascript_Core/runtime/FunctionConstructor.cpp 2019-03-08 19:18:18 UTC (rev 242649)
+++ trunk/Source/_javascript_Core/runtime/FunctionConstructor.cpp 2019-03-08 19:33:51 UTC (rev 242650)
@@ -58,7 +58,7 @@
void FunctionConstructor::finishCreation(VM& vm, FunctionPrototype* functionPrototype)
{
- Base::finishCreation(vm, functionPrototype->classInfo()->className);
+ Base::finishCreation(vm, vm.propertyNames->Function.string(), NameVisibility::Visible, NameAdditionMode::WithoutStructureTransition);
putDirectWithoutTransition(vm, vm.propertyNames->prototype, functionPrototype, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly);
putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum);
}
Modified: trunk/Source/_javascript_Core/runtime/FunctionPrototype.cpp (242649 => 242650)
--- trunk/Source/_javascript_Core/runtime/FunctionPrototype.cpp 2019-03-08 19:18:18 UTC (rev 242649)
+++ trunk/Source/_javascript_Core/runtime/FunctionPrototype.cpp 2019-03-08 19:33:51 UTC (rev 242650)
@@ -52,14 +52,12 @@
void FunctionPrototype::finishCreation(VM& vm, const String& name)
{
- Base::finishCreation(vm, name);
+ Base::finishCreation(vm, name, NameVisibility::Visible, NameAdditionMode::WithoutStructureTransition);
putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(0), PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum);
}
-void FunctionPrototype::addFunctionProperties(ExecState* exec, JSGlobalObject* globalObject, JSFunction** callFunction, JSFunction** applyFunction, JSFunction** hasInstanceSymbolFunction)
+void FunctionPrototype::addFunctionProperties(VM& vm, JSGlobalObject* globalObject, JSFunction** callFunction, JSFunction** applyFunction, JSFunction** hasInstanceSymbolFunction)
{
- VM& vm = exec->vm();
-
JSFunction* toStringFunction = JSFunction::create(vm, globalObject, 0, vm.propertyNames->toString.string(), functionProtoFuncToString);
putDirectWithoutTransition(vm, vm.propertyNames->toString, toStringFunction, static_cast<unsigned>(PropertyAttribute::DontEnum));
@@ -71,12 +69,11 @@
putDirectWithoutTransition(vm, vm.propertyNames->hasInstanceSymbol, *hasInstanceSymbolFunction, PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum);
}
-void FunctionPrototype::initRestrictedProperties(ExecState* exec, JSGlobalObject* globalObject)
+void FunctionPrototype::initRestrictedProperties(VM& vm, JSGlobalObject* globalObject)
{
- VM& vm = exec->vm();
GetterSetter* errorGetterSetter = globalObject->throwTypeErrorArgumentsCalleeAndCallerGetterSetter();
- putDirectAccessor(exec, vm.propertyNames->caller, errorGetterSetter, PropertyAttribute::DontEnum | PropertyAttribute::Accessor);
- putDirectAccessor(exec, vm.propertyNames->arguments, errorGetterSetter, PropertyAttribute::DontEnum | PropertyAttribute::Accessor);
+ putDirectNonIndexAccessorWithoutTransition(vm, vm.propertyNames->caller, errorGetterSetter, PropertyAttribute::DontEnum | PropertyAttribute::Accessor);
+ putDirectNonIndexAccessorWithoutTransition(vm, vm.propertyNames->arguments, errorGetterSetter, PropertyAttribute::DontEnum | PropertyAttribute::Accessor);
}
EncodedJSValue JSC_HOST_CALL functionProtoFuncToString(ExecState* exec)
Modified: trunk/Source/_javascript_Core/runtime/FunctionPrototype.h (242649 => 242650)
--- trunk/Source/_javascript_Core/runtime/FunctionPrototype.h 2019-03-08 19:18:18 UTC (rev 242649)
+++ trunk/Source/_javascript_Core/runtime/FunctionPrototype.h 2019-03-08 19:33:51 UTC (rev 242650)
@@ -35,9 +35,9 @@
return prototype;
}
- void addFunctionProperties(ExecState*, JSGlobalObject*, JSFunction** callFunction, JSFunction** applyFunction, JSFunction** hasInstanceSymbolFunction);
+ void addFunctionProperties(VM&, JSGlobalObject*, JSFunction** callFunction, JSFunction** applyFunction, JSFunction** hasInstanceSymbolFunction);
- void initRestrictedProperties(ExecState*, JSGlobalObject*);
+ void initRestrictedProperties(VM&, JSGlobalObject*);
static Structure* createStructure(VM& vm, JSGlobalObject* globalObject, JSValue proto)
{
Modified: trunk/Source/_javascript_Core/runtime/GeneratorFunctionConstructor.cpp (242649 => 242650)
--- trunk/Source/_javascript_Core/runtime/GeneratorFunctionConstructor.cpp 2019-03-08 19:18:18 UTC (rev 242649)
+++ trunk/Source/_javascript_Core/runtime/GeneratorFunctionConstructor.cpp 2019-03-08 19:33:51 UTC (rev 242650)
@@ -55,7 +55,7 @@
void GeneratorFunctionConstructor::finishCreation(VM& vm, GeneratorFunctionPrototype* generatorFunctionPrototype)
{
- Base::finishCreation(vm, "GeneratorFunction");
+ Base::finishCreation(vm, "GeneratorFunction"_s, NameVisibility::Visible, NameAdditionMode::WithoutStructureTransition);
putDirectWithoutTransition(vm, vm.propertyNames->prototype, generatorFunctionPrototype, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly);
putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum);
}
Modified: trunk/Source/_javascript_Core/runtime/InternalFunction.cpp (242649 => 242650)
--- trunk/Source/_javascript_Core/runtime/InternalFunction.cpp 2019-03-08 19:18:18 UTC (rev 242649)
+++ trunk/Source/_javascript_Core/runtime/InternalFunction.cpp 2019-03-08 19:33:51 UTC (rev 242650)
@@ -45,7 +45,7 @@
ASSERT(m_functionForConstruct);
}
-void InternalFunction::finishCreation(VM& vm, const String& name, NameVisibility nameVisibility)
+void InternalFunction::finishCreation(VM& vm, const String& name, NameVisibility nameVisibility, NameAdditionMode nameAdditionMode)
{
Base::finishCreation(vm);
ASSERT(jsDynamicCast<InternalFunction*>(vm, this));
@@ -54,8 +54,12 @@
ASSERT(type() == InternalFunctionType);
JSString* nameString = jsString(&vm, name);
m_originalName.set(vm, this, nameString);
- if (nameVisibility == NameVisibility::Visible)
- putDirect(vm, vm.propertyNames->name, nameString, PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum);
+ if (nameVisibility == NameVisibility::Visible) {
+ if (nameAdditionMode == NameAdditionMode::WithStructureTransition)
+ putDirect(vm, vm.propertyNames->name, nameString, PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum);
+ else
+ putDirectWithoutTransition(vm, vm.propertyNames->name, nameString, PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum);
+ }
}
void InternalFunction::visitChildren(JSCell* cell, SlotVisitor& visitor)
Modified: trunk/Source/_javascript_Core/runtime/InternalFunction.h (242649 => 242650)
--- trunk/Source/_javascript_Core/runtime/InternalFunction.h 2019-03-08 19:18:18 UTC (rev 242649)
+++ trunk/Source/_javascript_Core/runtime/InternalFunction.h 2019-03-08 19:33:51 UTC (rev 242650)
@@ -79,7 +79,8 @@
JS_EXPORT_PRIVATE InternalFunction(VM&, Structure*, NativeFunction functionForCall, NativeFunction functionForConstruct);
enum class NameVisibility { Visible, Anonymous };
- JS_EXPORT_PRIVATE void finishCreation(VM&, const String& name, NameVisibility = NameVisibility::Visible);
+ enum class NameAdditionMode { WithStructureTransition, WithoutStructureTransition };
+ JS_EXPORT_PRIVATE void finishCreation(VM&, const String& name, NameVisibility = NameVisibility::Visible, NameAdditionMode = NameAdditionMode::WithStructureTransition);
JS_EXPORT_PRIVATE static Structure* createSubclassStructureSlow(ExecState*, JSValue newTarget, Structure*);
Modified: trunk/Source/_javascript_Core/runtime/IntlCollatorConstructor.cpp (242649 => 242650)
--- trunk/Source/_javascript_Core/runtime/IntlCollatorConstructor.cpp 2019-03-08 19:18:18 UTC (rev 242649)
+++ trunk/Source/_javascript_Core/runtime/IntlCollatorConstructor.cpp 2019-03-08 19:33:51 UTC (rev 242650)
@@ -79,7 +79,7 @@
void IntlCollatorConstructor::finishCreation(VM& vm, IntlCollatorPrototype* collatorPrototype)
{
- Base::finishCreation(vm, "Collator"_s);
+ Base::finishCreation(vm, "Collator"_s, NameVisibility::Visible, NameAdditionMode::WithoutStructureTransition);
putDirectWithoutTransition(vm, vm.propertyNames->prototype, collatorPrototype, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly);
putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(0), PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum);
collatorPrototype->putDirectWithoutTransition(vm, vm.propertyNames->constructor, this, static_cast<unsigned>(PropertyAttribute::DontEnum));
Modified: trunk/Source/_javascript_Core/runtime/IntlDateTimeFormatConstructor.cpp (242649 => 242650)
--- trunk/Source/_javascript_Core/runtime/IntlDateTimeFormatConstructor.cpp 2019-03-08 19:18:18 UTC (rev 242649)
+++ trunk/Source/_javascript_Core/runtime/IntlDateTimeFormatConstructor.cpp 2019-03-08 19:33:51 UTC (rev 242650)
@@ -79,7 +79,7 @@
void IntlDateTimeFormatConstructor::finishCreation(VM& vm, IntlDateTimeFormatPrototype* dateTimeFormatPrototype)
{
- Base::finishCreation(vm, "DateTimeFormat"_s);
+ Base::finishCreation(vm, "DateTimeFormat"_s, NameVisibility::Visible, NameAdditionMode::WithoutStructureTransition);
putDirectWithoutTransition(vm, vm.propertyNames->prototype, dateTimeFormatPrototype, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly);
putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(0), PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum);
dateTimeFormatPrototype->putDirectWithoutTransition(vm, vm.propertyNames->constructor, this, static_cast<unsigned>(PropertyAttribute::DontEnum));
Modified: trunk/Source/_javascript_Core/runtime/IntlNumberFormatConstructor.cpp (242649 => 242650)
--- trunk/Source/_javascript_Core/runtime/IntlNumberFormatConstructor.cpp 2019-03-08 19:18:18 UTC (rev 242649)
+++ trunk/Source/_javascript_Core/runtime/IntlNumberFormatConstructor.cpp 2019-03-08 19:33:51 UTC (rev 242650)
@@ -79,7 +79,7 @@
void IntlNumberFormatConstructor::finishCreation(VM& vm, IntlNumberFormatPrototype* numberFormatPrototype)
{
- Base::finishCreation(vm, "NumberFormat"_s);
+ Base::finishCreation(vm, "NumberFormat"_s, NameVisibility::Visible, NameAdditionMode::WithoutStructureTransition);
putDirectWithoutTransition(vm, vm.propertyNames->prototype, numberFormatPrototype, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly);
putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(0), PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum);
numberFormatPrototype->putDirectWithoutTransition(vm, vm.propertyNames->constructor, this, static_cast<unsigned>(PropertyAttribute::DontEnum));
Modified: trunk/Source/_javascript_Core/runtime/IntlPluralRulesConstructor.cpp (242649 => 242650)
--- trunk/Source/_javascript_Core/runtime/IntlPluralRulesConstructor.cpp 2019-03-08 19:18:18 UTC (rev 242649)
+++ trunk/Source/_javascript_Core/runtime/IntlPluralRulesConstructor.cpp 2019-03-08 19:33:51 UTC (rev 242650)
@@ -77,7 +77,7 @@
void IntlPluralRulesConstructor::finishCreation(VM& vm, IntlPluralRulesPrototype* pluralRulesPrototype)
{
- Base::finishCreation(vm, "PluralRules"_s);
+ Base::finishCreation(vm, "PluralRules"_s, NameVisibility::Visible, NameAdditionMode::WithoutStructureTransition);
putDirectWithoutTransition(vm, vm.propertyNames->prototype, pluralRulesPrototype, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly);
putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(0), PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum);
pluralRulesPrototype->putDirectWithoutTransition(vm, vm.propertyNames->constructor, this, static_cast<unsigned>(PropertyAttribute::DontEnum));
Modified: trunk/Source/_javascript_Core/runtime/JSArrayBufferConstructor.cpp (242649 => 242650)
--- trunk/Source/_javascript_Core/runtime/JSArrayBufferConstructor.cpp 2019-03-08 19:18:18 UTC (rev 242649)
+++ trunk/Source/_javascript_Core/runtime/JSArrayBufferConstructor.cpp 2019-03-08 19:33:51 UTC (rev 242650)
@@ -61,10 +61,10 @@
template<ArrayBufferSharingMode sharingMode>
void JSGenericArrayBufferConstructor<sharingMode>::finishCreation(VM& vm, JSArrayBufferPrototype* prototype, GetterSetter* speciesSymbol)
{
- Base::finishCreation(vm, arrayBufferSharingModeName(sharingMode));
+ Base::finishCreation(vm, arrayBufferSharingModeName(sharingMode), NameVisibility::Visible, NameAdditionMode::WithoutStructureTransition);
putDirectWithoutTransition(vm, vm.propertyNames->prototype, prototype, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly);
putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly);
- putDirectNonIndexAccessor(vm, vm.propertyNames->speciesSymbol, speciesSymbol, PropertyAttribute::Accessor | PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum);
+ putDirectNonIndexAccessorWithoutTransition(vm, vm.propertyNames->speciesSymbol, speciesSymbol, PropertyAttribute::Accessor | PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum);
if (sharingMode == ArrayBufferSharingMode::Default) {
JSGlobalObject* globalObject = this->globalObject(vm);
Modified: trunk/Source/_javascript_Core/runtime/JSArrayBufferPrototype.cpp (242649 => 242650)
--- trunk/Source/_javascript_Core/runtime/JSArrayBufferPrototype.cpp 2019-03-08 19:18:18 UTC (rev 242649)
+++ trunk/Source/_javascript_Core/runtime/JSArrayBufferPrototype.cpp 2019-03-08 19:33:51 UTC (rev 242650)
@@ -118,9 +118,9 @@
JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->slice, arrayBufferProtoFuncSlice, static_cast<unsigned>(PropertyAttribute::DontEnum), 2);
putDirectWithoutTransition(vm, vm.propertyNames->toStringTagSymbol, jsString(&vm, arrayBufferSharingModeName(m_sharingMode)), PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly);
if (m_sharingMode == ArrayBufferSharingMode::Default)
- JSC_NATIVE_GETTER(vm.propertyNames->byteLength, arrayBufferProtoGetterFuncByteLength, PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly);
+ JSC_NATIVE_GETTER_WITHOUT_TRANSITION(vm.propertyNames->byteLength, arrayBufferProtoGetterFuncByteLength, PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly);
else
- JSC_NATIVE_GETTER(vm.propertyNames->byteLength, sharedArrayBufferProtoGetterFuncByteLength, PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly);
+ JSC_NATIVE_GETTER_WITHOUT_TRANSITION(vm.propertyNames->byteLength, sharedArrayBufferProtoGetterFuncByteLength, PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly);
}
JSArrayBufferPrototype* JSArrayBufferPrototype::create(VM& vm, JSGlobalObject* globalObject, Structure* structure, ArrayBufferSharingMode sharingMode)
Modified: trunk/Source/_javascript_Core/runtime/JSGenericTypedArrayViewConstructorInlines.h (242649 => 242650)
--- trunk/Source/_javascript_Core/runtime/JSGenericTypedArrayViewConstructorInlines.h 2019-03-08 19:18:18 UTC (rev 242649)
+++ trunk/Source/_javascript_Core/runtime/JSGenericTypedArrayViewConstructorInlines.h 2019-03-08 19:33:51 UTC (rev 242650)
@@ -52,7 +52,7 @@
template<typename ViewClass>
void JSGenericTypedArrayViewConstructor<ViewClass>::finishCreation(VM& vm, JSGlobalObject* globalObject, JSObject* prototype, const String& name, FunctionExecutable* privateAllocator)
{
- Base::finishCreation(vm, name);
+ Base::finishCreation(vm, name, NameVisibility::Visible, NameAdditionMode::WithoutStructureTransition);
putDirectWithoutTransition(vm, vm.propertyNames->prototype, prototype, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly);
putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(3), PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly);
putDirectWithoutTransition(vm, vm.propertyNames->BYTES_PER_ELEMENT, jsNumber(ViewClass::elementSize), PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly | PropertyAttribute::DontDelete);
Modified: trunk/Source/_javascript_Core/runtime/JSGlobalObject.cpp (242649 => 242650)
--- trunk/Source/_javascript_Core/runtime/JSGlobalObject.cpp 2019-03-08 19:18:18 UTC (rev 242649)
+++ trunk/Source/_javascript_Core/runtime/JSGlobalObject.cpp 2019-03-08 19:33:51 UTC (rev 242650)
@@ -482,7 +482,7 @@
JSFunction* callFunction = nullptr;
JSFunction* applyFunction = nullptr;
JSFunction* hasInstanceSymbolFunction = nullptr;
- m_functionPrototype->addFunctionProperties(exec, this, &callFunction, &applyFunction, &hasInstanceSymbolFunction);
+ m_functionPrototype->addFunctionProperties(vm, this, &callFunction, &applyFunction, &hasInstanceSymbolFunction);
m_callFunction.set(vm, this, callFunction);
m_applyFunction.set(vm, this, applyFunction);
m_arrayProtoToStringFunction.initLater(
@@ -523,7 +523,7 @@
GetterSetter* protoAccessor = GetterSetter::create(vm, this,
JSFunction::create(vm, this, 0, makeString("get ", vm.propertyNames->underscoreProto.string()), globalFuncProtoGetter, UnderscoreProtoIntrinsic),
JSFunction::create(vm, this, 0, makeString("set ", vm.propertyNames->underscoreProto.string()), globalFuncProtoSetter));
- m_objectPrototype->putDirectNonIndexAccessor(vm, vm.propertyNames->underscoreProto, protoAccessor, PropertyAttribute::Accessor | PropertyAttribute::DontEnum);
+ m_objectPrototype->putDirectNonIndexAccessorWithoutTransition(vm, vm.propertyNames->underscoreProto, protoAccessor, PropertyAttribute::Accessor | PropertyAttribute::DontEnum);
m_functionPrototype->structure(vm)->setPrototypeWithoutTransition(vm, m_objectPrototype.get());
m_objectStructureForObjectConstructor.set(vm, this, vm.structureCache.emptyObjectStructureForPrototype(this, m_objectPrototype.get(), JSFinalObject::defaultInlineCapacity()));
m_objectProtoValueOfFunction.set(vm, this, jsCast<JSFunction*>(objectPrototype()->getDirect(vm, vm.propertyNames->valueOf)));
@@ -532,7 +532,7 @@
GetterSetter* getterSetter = GetterSetter::create(vm, this, thrower, thrower);
m_throwTypeErrorArgumentsCalleeAndCallerGetterSetter.set(vm, this, getterSetter);
- m_functionPrototype->initRestrictedProperties(exec, this);
+ m_functionPrototype->initRestrictedProperties(vm, this);
m_speciesGetterSetter.set(vm, this, GetterSetter::create(vm, this, JSFunction::create(vm, globalOperationsSpeciesGetterCodeGenerator(vm), this), nullptr));
Modified: trunk/Source/_javascript_Core/runtime/JSObject.cpp (242649 => 242650)
--- trunk/Source/_javascript_Core/runtime/JSObject.cpp 2019-03-08 19:18:18 UTC (rev 242649)
+++ trunk/Source/_javascript_Core/runtime/JSObject.cpp 2019-03-08 19:33:51 UTC (rev 242650)
@@ -1922,6 +1922,19 @@
return result;
}
+void JSObject::putDirectNonIndexAccessorWithoutTransition(VM& vm, PropertyName propertyName, GetterSetter* accessor, unsigned attributes)
+{
+ ASSERT(attributes & PropertyAttribute::Accessor);
+ StructureID structureID = this->structureID();
+ Structure* structure = vm.heap.structureIDTable().get(structureID);
+ PropertyOffset offset = prepareToPutDirectWithoutTransition(vm, propertyName, attributes, structureID, structure);
+ putDirect(vm, offset, accessor);
+ if (attributes & PropertyAttribute::ReadOnly)
+ structure->setContainsReadOnlyProperties();
+
+ structure->setHasGetterSetterPropertiesWithProtoCheck(propertyName == vm.propertyNames->underscoreProto);
+}
+
// HasProperty(O, P) from Section 7.3.10 of the spec.
// http://www.ecma-international.org/ecma-262/6.0/index.html#sec-hasproperty
bool JSObject::hasProperty(ExecState* exec, PropertyName propertyName) const
@@ -3112,6 +3125,13 @@
return putDirectNonIndexAccessor(vm, name, accessor, attributes);
}
+void JSObject::putDirectNativeIntrinsicGetterWithoutTransition(VM& vm, JSGlobalObject* globalObject, Identifier name, NativeFunction nativeFunction, Intrinsic intrinsic, unsigned attributes)
+{
+ JSFunction* function = JSFunction::create(vm, globalObject, 0, makeString("get ", name.string()), nativeFunction, intrinsic);
+ GetterSetter* accessor = GetterSetter::create(vm, globalObject, function, nullptr);
+ putDirectNonIndexAccessorWithoutTransition(vm, name, accessor, attributes);
+}
+
bool JSObject::putDirectNativeFunction(VM& vm, JSGlobalObject* globalObject, const PropertyName& propertyName, unsigned functionLength, NativeFunction nativeFunction, Intrinsic intrinsic, unsigned attributes)
{
StringImpl* name = propertyName.publicName();
Modified: trunk/Source/_javascript_Core/runtime/JSObject.h (242649 => 242650)
--- trunk/Source/_javascript_Core/runtime/JSObject.h 2019-03-08 19:18:18 UTC (rev 242649)
+++ trunk/Source/_javascript_Core/runtime/JSObject.h 2019-03-08 19:33:51 UTC (rev 242650)
@@ -583,6 +583,7 @@
bool putDirect(VM&, PropertyName, JSValue, PutPropertySlot&);
void putDirectWithoutTransition(VM&, PropertyName, JSValue, unsigned attributes = 0);
bool putDirectNonIndexAccessor(VM&, PropertyName, GetterSetter*, unsigned attributes);
+ void putDirectNonIndexAccessorWithoutTransition(VM&, PropertyName, GetterSetter*, unsigned attributes);
bool putDirectAccessor(ExecState*, PropertyName, GetterSetter*, unsigned attributes);
JS_EXPORT_PRIVATE bool putDirectCustomAccessor(VM&, PropertyName, JSValue, unsigned attributes);
@@ -717,6 +718,7 @@
void putDirectUndefined(PropertyOffset offset) { locationForOffset(offset)->setUndefined(); }
JS_EXPORT_PRIVATE bool putDirectNativeIntrinsicGetter(VM&, JSGlobalObject*, Identifier, NativeFunction, Intrinsic, unsigned attributes);
+ JS_EXPORT_PRIVATE void putDirectNativeIntrinsicGetterWithoutTransition(VM&, JSGlobalObject*, Identifier, NativeFunction, Intrinsic, unsigned attributes);
JS_EXPORT_PRIVATE bool putDirectNativeFunction(VM&, JSGlobalObject*, const PropertyName&, unsigned functionLength, NativeFunction, Intrinsic, unsigned attributes);
JS_EXPORT_PRIVATE bool putDirectNativeFunction(VM&, JSGlobalObject*, const PropertyName&, unsigned functionLength, NativeFunction, Intrinsic, const DOMJIT::Signature*, unsigned attributes);
JS_EXPORT_PRIVATE void putDirectNativeFunctionWithoutTransition(VM&, JSGlobalObject*, const PropertyName&, unsigned functionLength, NativeFunction, Intrinsic, unsigned attributes);
@@ -1639,7 +1641,15 @@
vm, globalObject, makeIdentifier(vm, (jsName)), (cppName), \
(intrinsic), ((attributes) | PropertyAttribute::Accessor))
+#define JSC_NATIVE_INTRINSIC_GETTER_WITHOUT_TRANSITION(jsName, cppName, attributes, intrinsic) \
+ putDirectNativeIntrinsicGetterWithoutTransition(\
+ vm, globalObject, makeIdentifier(vm, (jsName)), (cppName), \
+ (intrinsic), ((attributes) | PropertyAttribute::Accessor))
+
#define JSC_NATIVE_GETTER(jsName, cppName, attributes) \
JSC_NATIVE_INTRINSIC_GETTER((jsName), (cppName), (attributes), NoIntrinsic)
+#define JSC_NATIVE_GETTER_WITHOUT_TRANSITION(jsName, cppName, attributes) \
+ JSC_NATIVE_INTRINSIC_GETTER_WITHOUT_TRANSITION((jsName), (cppName), (attributes), NoIntrinsic)
+
} // namespace JSC
Modified: trunk/Source/_javascript_Core/runtime/JSPromiseConstructor.cpp (242649 => 242650)
--- trunk/Source/_javascript_Core/runtime/JSPromiseConstructor.cpp 2019-03-08 19:18:18 UTC (rev 242649)
+++ trunk/Source/_javascript_Core/runtime/JSPromiseConstructor.cpp 2019-03-08 19:33:51 UTC (rev 242650)
@@ -89,10 +89,10 @@
void JSPromiseConstructor::finishCreation(VM& vm, JSPromisePrototype* promisePrototype, GetterSetter* speciesSymbol)
{
- Base::finishCreation(vm, "Promise"_s);
+ Base::finishCreation(vm, vm.propertyNames->Promise.string(), NameVisibility::Visible, NameAdditionMode::WithoutStructureTransition);
putDirectWithoutTransition(vm, vm.propertyNames->prototype, promisePrototype, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly);
putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly);
- putDirectNonIndexAccessor(vm, vm.propertyNames->speciesSymbol, speciesSymbol, PropertyAttribute::Accessor | PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum);
+ putDirectNonIndexAccessorWithoutTransition(vm, vm.propertyNames->speciesSymbol, speciesSymbol, PropertyAttribute::Accessor | PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum);
}
void JSPromiseConstructor::addOwnInternalSlots(VM& vm, JSGlobalObject* globalObject)
Modified: trunk/Source/_javascript_Core/runtime/JSTypedArrayViewConstructor.cpp (242649 => 242650)
--- trunk/Source/_javascript_Core/runtime/JSTypedArrayViewConstructor.cpp 2019-03-08 19:18:18 UTC (rev 242649)
+++ trunk/Source/_javascript_Core/runtime/JSTypedArrayViewConstructor.cpp 2019-03-08 19:33:51 UTC (rev 242650)
@@ -48,10 +48,10 @@
void JSTypedArrayViewConstructor::finishCreation(VM& vm, JSGlobalObject* globalObject, JSTypedArrayViewPrototype* prototype, GetterSetter* speciesSymbol)
{
- Base::finishCreation(vm, "TypedArray");
+ Base::finishCreation(vm, "TypedArray"_s, NameVisibility::Visible, NameAdditionMode::WithoutStructureTransition);
putDirectWithoutTransition(vm, vm.propertyNames->prototype, prototype, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly);
putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(0), PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly);
- putDirectNonIndexAccessor(vm, vm.propertyNames->speciesSymbol, speciesSymbol, PropertyAttribute::Accessor | PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum);
+ putDirectNonIndexAccessorWithoutTransition(vm, vm.propertyNames->speciesSymbol, speciesSymbol, PropertyAttribute::Accessor | PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum);
JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->of, typedArrayConstructorOfCodeGenerator, static_cast<unsigned>(PropertyAttribute::DontEnum));
JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->from, typedArrayConstructorFromCodeGenerator, static_cast<unsigned>(PropertyAttribute::DontEnum));
Modified: trunk/Source/_javascript_Core/runtime/JSTypedArrayViewPrototype.cpp (242649 => 242650)
--- trunk/Source/_javascript_Core/runtime/JSTypedArrayViewPrototype.cpp 2019-03-08 19:18:18 UTC (rev 242649)
+++ trunk/Source/_javascript_Core/runtime/JSTypedArrayViewPrototype.cpp 2019-03-08 19:33:51 UTC (rev 242650)
@@ -297,9 +297,9 @@
putDirectWithoutTransition(vm, vm.propertyNames->toString, globalObject->arrayProtoToStringFunction(), static_cast<unsigned>(PropertyAttribute::DontEnum));
- JSC_NATIVE_GETTER("buffer", typedArrayViewProtoGetterFuncBuffer, PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly);
- JSC_NATIVE_INTRINSIC_GETTER(vm.propertyNames->byteLength, typedArrayViewProtoGetterFuncByteLength, PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly, TypedArrayByteLengthIntrinsic);
- JSC_NATIVE_INTRINSIC_GETTER(vm.propertyNames->byteOffset, typedArrayViewProtoGetterFuncByteOffset, PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly, TypedArrayByteOffsetIntrinsic);
+ JSC_NATIVE_GETTER_WITHOUT_TRANSITION("buffer", typedArrayViewProtoGetterFuncBuffer, PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly);
+ JSC_NATIVE_INTRINSIC_GETTER_WITHOUT_TRANSITION(vm.propertyNames->byteLength, typedArrayViewProtoGetterFuncByteLength, PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly, TypedArrayByteLengthIntrinsic);
+ JSC_NATIVE_INTRINSIC_GETTER_WITHOUT_TRANSITION(vm.propertyNames->byteOffset, typedArrayViewProtoGetterFuncByteOffset, PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly, TypedArrayByteOffsetIntrinsic);
JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("copyWithin", typedArrayViewProtoFuncCopyWithin, static_cast<unsigned>(PropertyAttribute::DontEnum), 2);
JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION("every", typedArrayPrototypeEveryCodeGenerator, static_cast<unsigned>(PropertyAttribute::DontEnum));
JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION("filter", typedArrayPrototypeFilterCodeGenerator, static_cast<unsigned>(PropertyAttribute::DontEnum));
@@ -314,7 +314,7 @@
JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->join, typedArrayViewProtoFuncJoin, static_cast<unsigned>(PropertyAttribute::DontEnum), 1);
JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->builtinNames().keysPublicName(), typedArrayPrototypeKeysCodeGenerator, static_cast<unsigned>(PropertyAttribute::DontEnum));
JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("lastIndexOf", typedArrayViewProtoFuncLastIndexOf, static_cast<unsigned>(PropertyAttribute::DontEnum), 1);
- JSC_NATIVE_INTRINSIC_GETTER(vm.propertyNames->length, typedArrayViewProtoGetterFuncLength, static_cast<unsigned>(PropertyAttribute::DontEnum) | PropertyAttribute::ReadOnly, TypedArrayLengthIntrinsic);
+ JSC_NATIVE_INTRINSIC_GETTER_WITHOUT_TRANSITION(vm.propertyNames->length, typedArrayViewProtoGetterFuncLength, static_cast<unsigned>(PropertyAttribute::DontEnum) | PropertyAttribute::ReadOnly, TypedArrayLengthIntrinsic);
JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION("map", typedArrayPrototypeMapCodeGenerator, static_cast<unsigned>(PropertyAttribute::DontEnum));
JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION("reduce", typedArrayPrototypeReduceCodeGenerator, static_cast<unsigned>(PropertyAttribute::DontEnum));
JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION("reduceRight", typedArrayPrototypeReduceRightCodeGenerator, static_cast<unsigned>(PropertyAttribute::DontEnum));
@@ -327,7 +327,7 @@
JSFunction* toStringTagFunction = JSFunction::create(vm, globalObject, 0, "get [Symbol.toStringTag]"_s, typedArrayViewProtoGetterFuncToStringTag, NoIntrinsic);
GetterSetter* toStringTagAccessor = GetterSetter::create(vm, globalObject, toStringTagFunction, nullptr);
- putDirectNonIndexAccessor(vm, vm.propertyNames->toStringTagSymbol, toStringTagAccessor, PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly | PropertyAttribute::Accessor);
+ putDirectNonIndexAccessorWithoutTransition(vm, vm.propertyNames->toStringTagSymbol, toStringTagAccessor, PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly | PropertyAttribute::Accessor);
JSFunction* valuesFunction = JSFunction::create(vm, typedArrayPrototypeValuesCodeGenerator(vm), globalObject);
Modified: trunk/Source/_javascript_Core/runtime/MapConstructor.cpp (242649 => 242650)
--- trunk/Source/_javascript_Core/runtime/MapConstructor.cpp 2019-03-08 19:18:18 UTC (rev 242649)
+++ trunk/Source/_javascript_Core/runtime/MapConstructor.cpp 2019-03-08 19:33:51 UTC (rev 242650)
@@ -41,10 +41,10 @@
void MapConstructor::finishCreation(VM& vm, MapPrototype* mapPrototype, GetterSetter* speciesSymbol)
{
- Base::finishCreation(vm, mapPrototype->classInfo(vm)->className);
+ Base::finishCreation(vm, "Map"_s, NameVisibility::Visible, NameAdditionMode::WithoutStructureTransition);
putDirectWithoutTransition(vm, vm.propertyNames->prototype, mapPrototype, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly);
putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(0), PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly);
- putDirectNonIndexAccessor(vm, vm.propertyNames->speciesSymbol, speciesSymbol, PropertyAttribute::Accessor | PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum);
+ putDirectNonIndexAccessorWithoutTransition(vm, vm.propertyNames->speciesSymbol, speciesSymbol, PropertyAttribute::Accessor | PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum);
}
static EncodedJSValue JSC_HOST_CALL callMap(ExecState*);
Modified: trunk/Source/_javascript_Core/runtime/MapPrototype.cpp (242649 => 242650)
--- trunk/Source/_javascript_Core/runtime/MapPrototype.cpp 2019-03-08 19:18:18 UTC (rev 242649)
+++ trunk/Source/_javascript_Core/runtime/MapPrototype.cpp 2019-03-08 19:33:51 UTC (rev 242650)
@@ -76,7 +76,7 @@
putDirectWithoutTransition(vm, vm.propertyNames->iteratorSymbol, entries, static_cast<unsigned>(PropertyAttribute::DontEnum));
putDirectWithoutTransition(vm, vm.propertyNames->toStringTagSymbol, jsString(&vm, "Map"), PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly);
- JSC_NATIVE_GETTER(vm.propertyNames->size, mapProtoFuncSize, PropertyAttribute::DontEnum | PropertyAttribute::Accessor);
+ JSC_NATIVE_GETTER_WITHOUT_TRANSITION(vm.propertyNames->size, mapProtoFuncSize, PropertyAttribute::DontEnum | PropertyAttribute::Accessor);
}
ALWAYS_INLINE static JSMap* getMap(CallFrame* callFrame, JSValue thisValue)
Modified: trunk/Source/_javascript_Core/runtime/NativeErrorConstructor.cpp (242649 => 242650)
--- trunk/Source/_javascript_Core/runtime/NativeErrorConstructor.cpp 2019-03-08 19:18:18 UTC (rev 242649)
+++ trunk/Source/_javascript_Core/runtime/NativeErrorConstructor.cpp 2019-03-08 19:33:51 UTC (rev 242650)
@@ -42,7 +42,7 @@
void NativeErrorConstructorBase::finishCreation(VM& vm, NativeErrorPrototype* prototype, ErrorType errorType)
{
- Base::finishCreation(vm, errorTypeName(errorType));
+ Base::finishCreation(vm, errorTypeName(errorType), NameVisibility::Visible, NameAdditionMode::WithoutStructureTransition);
ASSERT(inherits(vm, info()));
putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly);
Modified: trunk/Source/_javascript_Core/runtime/NullGetterFunction.h (242649 => 242650)
--- trunk/Source/_javascript_Core/runtime/NullGetterFunction.h 2019-03-08 19:18:18 UTC (rev 242649)
+++ trunk/Source/_javascript_Core/runtime/NullGetterFunction.h 2019-03-08 19:33:51 UTC (rev 242650)
@@ -35,8 +35,9 @@
static NullGetterFunction* create(VM& vm, Structure* structure)
{
+ // Since NullGetterFunction is per JSGlobalObject, we use put-without-transition in InternalFunction::finishCreation.
NullGetterFunction* function = new (NotNull, allocateCell< NullGetterFunction>(vm.heap)) NullGetterFunction(vm, structure);
- function->finishCreation(vm, String());
+ function->finishCreation(vm, String(), NameVisibility::Visible, NameAdditionMode::WithStructureTransition);
return function;
}
Modified: trunk/Source/_javascript_Core/runtime/NullSetterFunction.h (242649 => 242650)
--- trunk/Source/_javascript_Core/runtime/NullSetterFunction.h 2019-03-08 19:18:18 UTC (rev 242649)
+++ trunk/Source/_javascript_Core/runtime/NullSetterFunction.h 2019-03-08 19:33:51 UTC (rev 242650)
@@ -35,8 +35,9 @@
static NullSetterFunction* create(VM& vm, Structure* structure)
{
+ // Since NullSetterFunction is per JSGlobalObject, we use put-without-transition in InternalFunction::finishCreation.
NullSetterFunction* function = new (NotNull, allocateCell< NullSetterFunction>(vm.heap)) NullSetterFunction(vm, structure);
- function->finishCreation(vm, String());
+ function->finishCreation(vm, String(), NameVisibility::Visible, NameAdditionMode::WithStructureTransition);
return function;
}
Modified: trunk/Source/_javascript_Core/runtime/NumberConstructor.cpp (242649 => 242650)
--- trunk/Source/_javascript_Core/runtime/NumberConstructor.cpp 2019-03-08 19:18:18 UTC (rev 242649)
+++ trunk/Source/_javascript_Core/runtime/NumberConstructor.cpp 2019-03-08 19:33:51 UTC (rev 242650)
@@ -62,7 +62,7 @@
void NumberConstructor::finishCreation(VM& vm, NumberPrototype* numberPrototype)
{
- Base::finishCreation(vm, NumberPrototype::info()->className);
+ Base::finishCreation(vm, vm.propertyNames->Number.string(), NameVisibility::Visible, NameAdditionMode::WithoutStructureTransition);
ASSERT(inherits(vm, info()));
JSGlobalObject* globalObject = numberPrototype->globalObject(vm);
Modified: trunk/Source/_javascript_Core/runtime/ObjectConstructor.cpp (242649 => 242650)
--- trunk/Source/_javascript_Core/runtime/ObjectConstructor.cpp 2019-03-08 19:18:18 UTC (rev 242649)
+++ trunk/Source/_javascript_Core/runtime/ObjectConstructor.cpp 2019-03-08 19:33:51 UTC (rev 242650)
@@ -103,7 +103,7 @@
void ObjectConstructor::finishCreation(VM& vm, JSGlobalObject* globalObject, ObjectPrototype* objectPrototype)
{
- Base::finishCreation(vm, objectPrototype->classInfo(vm)->className);
+ Base::finishCreation(vm, vm.propertyNames->Object.string(), NameVisibility::Visible, NameAdditionMode::WithoutStructureTransition);
putDirectWithoutTransition(vm, vm.propertyNames->prototype, objectPrototype, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly);
putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum);
Modified: trunk/Source/_javascript_Core/runtime/ProxyConstructor.cpp (242649 => 242650)
--- trunk/Source/_javascript_Core/runtime/ProxyConstructor.cpp 2019-03-08 19:18:18 UTC (rev 242649)
+++ trunk/Source/_javascript_Core/runtime/ProxyConstructor.cpp 2019-03-08 19:33:51 UTC (rev 242650)
@@ -87,8 +87,7 @@
void ProxyConstructor::finishCreation(VM& vm, const char* name, JSGlobalObject* globalObject)
{
- Base::finishCreation(vm, name);
-
+ Base::finishCreation(vm, name, NameVisibility::Visible, NameAdditionMode::WithStructureTransition);
putDirect(vm, vm.propertyNames->length, jsNumber(2), PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly);
putDirect(vm, makeIdentifier(vm, "revocable"), JSFunction::create(vm, globalObject, 2, "revocable"_s, makeRevocableProxy, NoIntrinsic, proxyRevocableConstructorThrowError));
}
Modified: trunk/Source/_javascript_Core/runtime/RegExpConstructor.cpp (242649 => 242650)
--- trunk/Source/_javascript_Core/runtime/RegExpConstructor.cpp 2019-03-08 19:18:18 UTC (rev 242649)
+++ trunk/Source/_javascript_Core/runtime/RegExpConstructor.cpp 2019-03-08 19:33:51 UTC (rev 242650)
@@ -88,13 +88,13 @@
void RegExpConstructor::finishCreation(VM& vm, RegExpPrototype* regExpPrototype, GetterSetter* speciesSymbol)
{
- Base::finishCreation(vm, "RegExp"_s);
+ Base::finishCreation(vm, vm.propertyNames->RegExp.string(), NameVisibility::Visible, NameAdditionMode::WithoutStructureTransition);
ASSERT(inherits(vm, info()));
putDirectWithoutTransition(vm, vm.propertyNames->prototype, regExpPrototype, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly);
putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(2), PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum);
- putDirectNonIndexAccessor(vm, vm.propertyNames->speciesSymbol, speciesSymbol, PropertyAttribute::Accessor | PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum);
+ putDirectNonIndexAccessorWithoutTransition(vm, vm.propertyNames->speciesSymbol, speciesSymbol, PropertyAttribute::Accessor | PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum);
}
template<int N>
Modified: trunk/Source/_javascript_Core/runtime/RegExpPrototype.cpp (242649 => 242650)
--- trunk/Source/_javascript_Core/runtime/RegExpPrototype.cpp 2019-03-08 19:18:18 UTC (rev 242649)
+++ trunk/Source/_javascript_Core/runtime/RegExpPrototype.cpp 2019-03-08 19:33:51 UTC (rev 242650)
@@ -69,14 +69,14 @@
JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->compile, regExpProtoFuncCompile, static_cast<unsigned>(PropertyAttribute::DontEnum), 2);
JSC_NATIVE_INTRINSIC_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->exec, regExpProtoFuncExec, static_cast<unsigned>(PropertyAttribute::DontEnum), 1, RegExpExecIntrinsic);
JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->toString, regExpProtoFuncToString, static_cast<unsigned>(PropertyAttribute::DontEnum), 0);
- JSC_NATIVE_GETTER(vm.propertyNames->global, regExpProtoGetterGlobal, PropertyAttribute::DontEnum | PropertyAttribute::Accessor);
- JSC_NATIVE_GETTER(vm.propertyNames->dotAll, regExpProtoGetterDotAll, PropertyAttribute::DontEnum | PropertyAttribute::Accessor);
- JSC_NATIVE_GETTER(vm.propertyNames->ignoreCase, regExpProtoGetterIgnoreCase, PropertyAttribute::DontEnum | PropertyAttribute::Accessor);
- JSC_NATIVE_GETTER(vm.propertyNames->multiline, regExpProtoGetterMultiline, PropertyAttribute::DontEnum | PropertyAttribute::Accessor);
- JSC_NATIVE_GETTER(vm.propertyNames->sticky, regExpProtoGetterSticky, PropertyAttribute::DontEnum | PropertyAttribute::Accessor);
- JSC_NATIVE_GETTER(vm.propertyNames->unicode, regExpProtoGetterUnicode, PropertyAttribute::DontEnum | PropertyAttribute::Accessor);
- JSC_NATIVE_GETTER(vm.propertyNames->source, regExpProtoGetterSource, PropertyAttribute::DontEnum | PropertyAttribute::Accessor);
- JSC_NATIVE_GETTER(vm.propertyNames->flags, regExpProtoGetterFlags, PropertyAttribute::DontEnum | PropertyAttribute::Accessor);
+ JSC_NATIVE_GETTER_WITHOUT_TRANSITION(vm.propertyNames->global, regExpProtoGetterGlobal, PropertyAttribute::DontEnum | PropertyAttribute::Accessor);
+ JSC_NATIVE_GETTER_WITHOUT_TRANSITION(vm.propertyNames->dotAll, regExpProtoGetterDotAll, PropertyAttribute::DontEnum | PropertyAttribute::Accessor);
+ JSC_NATIVE_GETTER_WITHOUT_TRANSITION(vm.propertyNames->ignoreCase, regExpProtoGetterIgnoreCase, PropertyAttribute::DontEnum | PropertyAttribute::Accessor);
+ JSC_NATIVE_GETTER_WITHOUT_TRANSITION(vm.propertyNames->multiline, regExpProtoGetterMultiline, PropertyAttribute::DontEnum | PropertyAttribute::Accessor);
+ JSC_NATIVE_GETTER_WITHOUT_TRANSITION(vm.propertyNames->sticky, regExpProtoGetterSticky, PropertyAttribute::DontEnum | PropertyAttribute::Accessor);
+ JSC_NATIVE_GETTER_WITHOUT_TRANSITION(vm.propertyNames->unicode, regExpProtoGetterUnicode, PropertyAttribute::DontEnum | PropertyAttribute::Accessor);
+ JSC_NATIVE_GETTER_WITHOUT_TRANSITION(vm.propertyNames->source, regExpProtoGetterSource, PropertyAttribute::DontEnum | PropertyAttribute::Accessor);
+ JSC_NATIVE_GETTER_WITHOUT_TRANSITION(vm.propertyNames->flags, regExpProtoGetterFlags, PropertyAttribute::DontEnum | PropertyAttribute::Accessor);
JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->matchSymbol, regExpPrototypeMatchCodeGenerator, static_cast<unsigned>(PropertyAttribute::DontEnum));
JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->replaceSymbol, regExpPrototypeReplaceCodeGenerator, static_cast<unsigned>(PropertyAttribute::DontEnum));
JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->searchSymbol, regExpPrototypeSearchCodeGenerator, static_cast<unsigned>(PropertyAttribute::DontEnum));
Modified: trunk/Source/_javascript_Core/runtime/SetConstructor.cpp (242649 => 242650)
--- trunk/Source/_javascript_Core/runtime/SetConstructor.cpp 2019-03-08 19:18:18 UTC (rev 242649)
+++ trunk/Source/_javascript_Core/runtime/SetConstructor.cpp 2019-03-08 19:33:51 UTC (rev 242650)
@@ -41,10 +41,10 @@
void SetConstructor::finishCreation(VM& vm, SetPrototype* setPrototype, GetterSetter* speciesSymbol)
{
- Base::finishCreation(vm, setPrototype->classInfo(vm)->className);
+ Base::finishCreation(vm, vm.propertyNames->Set.string(), NameVisibility::Visible, NameAdditionMode::WithoutStructureTransition);
putDirectWithoutTransition(vm, vm.propertyNames->prototype, setPrototype, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly);
putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(0), PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly);
- putDirectNonIndexAccessor(vm, vm.propertyNames->speciesSymbol, speciesSymbol, PropertyAttribute::Accessor | PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum);
+ putDirectNonIndexAccessorWithoutTransition(vm, vm.propertyNames->speciesSymbol, speciesSymbol, PropertyAttribute::Accessor | PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum);
}
static EncodedJSValue JSC_HOST_CALL callSet(ExecState*);
Modified: trunk/Source/_javascript_Core/runtime/SetPrototype.cpp (242649 => 242650)
--- trunk/Source/_javascript_Core/runtime/SetPrototype.cpp 2019-03-08 19:18:18 UTC (rev 242649)
+++ trunk/Source/_javascript_Core/runtime/SetPrototype.cpp 2019-03-08 19:33:51 UTC (rev 242650)
@@ -74,7 +74,7 @@
putDirectWithoutTransition(vm, vm.propertyNames->iteratorSymbol, values, static_cast<unsigned>(PropertyAttribute::DontEnum));
putDirectWithoutTransition(vm, vm.propertyNames->toStringTagSymbol, jsString(&vm, "Set"), PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly);
- JSC_NATIVE_GETTER(vm.propertyNames->size, setProtoFuncSize, PropertyAttribute::DontEnum | PropertyAttribute::Accessor);
+ JSC_NATIVE_GETTER_WITHOUT_TRANSITION(vm.propertyNames->size, setProtoFuncSize, PropertyAttribute::DontEnum | PropertyAttribute::Accessor);
}
ALWAYS_INLINE static JSSet* getSet(CallFrame* callFrame, JSValue thisValue)
Modified: trunk/Source/_javascript_Core/runtime/StringConstructor.cpp (242649 => 242650)
--- trunk/Source/_javascript_Core/runtime/StringConstructor.cpp 2019-03-08 19:18:18 UTC (rev 242649)
+++ trunk/Source/_javascript_Core/runtime/StringConstructor.cpp 2019-03-08 19:33:51 UTC (rev 242650)
@@ -63,7 +63,7 @@
void StringConstructor::finishCreation(VM& vm, StringPrototype* stringPrototype)
{
- Base::finishCreation(vm, stringPrototype->classInfo(vm)->className);
+ Base::finishCreation(vm, vm.propertyNames->String.string(), NameVisibility::Visible, NameAdditionMode::WithoutStructureTransition);
putDirectWithoutTransition(vm, vm.propertyNames->prototype, stringPrototype, PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum | PropertyAttribute::DontDelete);
putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum);
}
Modified: trunk/Source/_javascript_Core/runtime/SymbolConstructor.cpp (242649 => 242650)
--- trunk/Source/_javascript_Core/runtime/SymbolConstructor.cpp 2019-03-08 19:18:18 UTC (rev 242649)
+++ trunk/Source/_javascript_Core/runtime/SymbolConstructor.cpp 2019-03-08 19:33:51 UTC (rev 242650)
@@ -68,7 +68,7 @@
void SymbolConstructor::finishCreation(VM& vm, SymbolPrototype* prototype)
{
- Base::finishCreation(vm, prototype->classInfo(vm)->className);
+ Base::finishCreation(vm, vm.propertyNames->Symbol.string(), NameVisibility::Visible, NameAdditionMode::WithoutStructureTransition);
putDirectWithoutTransition(vm, vm.propertyNames->prototype, prototype, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly);
putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(0), PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum);
Modified: trunk/Source/_javascript_Core/runtime/WeakMapConstructor.cpp (242649 => 242650)
--- trunk/Source/_javascript_Core/runtime/WeakMapConstructor.cpp 2019-03-08 19:18:18 UTC (rev 242649)
+++ trunk/Source/_javascript_Core/runtime/WeakMapConstructor.cpp 2019-03-08 19:33:51 UTC (rev 242650)
@@ -40,7 +40,7 @@
void WeakMapConstructor::finishCreation(VM& vm, WeakMapPrototype* prototype)
{
- Base::finishCreation(vm, prototype->classInfo(vm)->className);
+ Base::finishCreation(vm, "WeakMap"_s, NameVisibility::Visible, NameAdditionMode::WithoutStructureTransition);
putDirectWithoutTransition(vm, vm.propertyNames->prototype, prototype, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly);
putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(0), PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly);
}
Modified: trunk/Source/_javascript_Core/runtime/WeakSetConstructor.cpp (242649 => 242650)
--- trunk/Source/_javascript_Core/runtime/WeakSetConstructor.cpp 2019-03-08 19:18:18 UTC (rev 242649)
+++ trunk/Source/_javascript_Core/runtime/WeakSetConstructor.cpp 2019-03-08 19:33:51 UTC (rev 242650)
@@ -40,7 +40,7 @@
void WeakSetConstructor::finishCreation(VM& vm, WeakSetPrototype* prototype)
{
- Base::finishCreation(vm, prototype->classInfo(vm)->className);
+ Base::finishCreation(vm, "WeakSet"_s, NameVisibility::Visible, NameAdditionMode::WithoutStructureTransition);
putDirectWithoutTransition(vm, vm.propertyNames->prototype, prototype, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly);
putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(0), PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly);
}
Modified: trunk/Source/_javascript_Core/wasm/js/WebAssemblyCompileErrorConstructor.cpp (242649 => 242650)
--- trunk/Source/_javascript_Core/wasm/js/WebAssemblyCompileErrorConstructor.cpp 2019-03-08 19:18:18 UTC (rev 242649)
+++ trunk/Source/_javascript_Core/wasm/js/WebAssemblyCompileErrorConstructor.cpp 2019-03-08 19:33:51 UTC (rev 242650)
@@ -75,7 +75,7 @@
void WebAssemblyCompileErrorConstructor::finishCreation(VM& vm, WebAssemblyCompileErrorPrototype* prototype)
{
- Base::finishCreation(vm, "CompileError"_s);
+ Base::finishCreation(vm, "CompileError"_s, NameVisibility::Visible, NameAdditionMode::WithoutStructureTransition);
putDirectWithoutTransition(vm, vm.propertyNames->prototype, prototype, PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum | PropertyAttribute::DontDelete);
putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum | PropertyAttribute::DontDelete);
}
Modified: trunk/Source/_javascript_Core/wasm/js/WebAssemblyInstanceConstructor.cpp (242649 => 242650)
--- trunk/Source/_javascript_Core/wasm/js/WebAssemblyInstanceConstructor.cpp 2019-03-08 19:18:18 UTC (rev 242649)
+++ trunk/Source/_javascript_Core/wasm/js/WebAssemblyInstanceConstructor.cpp 2019-03-08 19:33:51 UTC (rev 242650)
@@ -106,7 +106,7 @@
void WebAssemblyInstanceConstructor::finishCreation(VM& vm, WebAssemblyInstancePrototype* prototype)
{
- Base::finishCreation(vm, "Instance"_s);
+ Base::finishCreation(vm, "Instance"_s, NameVisibility::Visible, NameAdditionMode::WithoutStructureTransition);
putDirectWithoutTransition(vm, vm.propertyNames->prototype, prototype, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly);
putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum | PropertyAttribute::DontDelete);
}
Modified: trunk/Source/_javascript_Core/wasm/js/WebAssemblyLinkErrorConstructor.cpp (242649 => 242650)
--- trunk/Source/_javascript_Core/wasm/js/WebAssemblyLinkErrorConstructor.cpp 2019-03-08 19:18:18 UTC (rev 242649)
+++ trunk/Source/_javascript_Core/wasm/js/WebAssemblyLinkErrorConstructor.cpp 2019-03-08 19:33:51 UTC (rev 242650)
@@ -75,7 +75,7 @@
void WebAssemblyLinkErrorConstructor::finishCreation(VM& vm, WebAssemblyLinkErrorPrototype* prototype)
{
- Base::finishCreation(vm, "LinkError"_s);
+ Base::finishCreation(vm, "LinkError"_s, NameVisibility::Visible, NameAdditionMode::WithoutStructureTransition);
putDirectWithoutTransition(vm, vm.propertyNames->prototype, prototype, PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum | PropertyAttribute::DontDelete);
putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum | PropertyAttribute::DontDelete);
}
Modified: trunk/Source/_javascript_Core/wasm/js/WebAssemblyMemoryConstructor.cpp (242649 => 242650)
--- trunk/Source/_javascript_Core/wasm/js/WebAssemblyMemoryConstructor.cpp 2019-03-08 19:18:18 UTC (rev 242649)
+++ trunk/Source/_javascript_Core/wasm/js/WebAssemblyMemoryConstructor.cpp 2019-03-08 19:33:51 UTC (rev 242650)
@@ -134,7 +134,7 @@
void WebAssemblyMemoryConstructor::finishCreation(VM& vm, WebAssemblyMemoryPrototype* prototype)
{
- Base::finishCreation(vm, "Memory"_s);
+ Base::finishCreation(vm, "Memory"_s, NameVisibility::Visible, NameAdditionMode::WithoutStructureTransition);
putDirectWithoutTransition(vm, vm.propertyNames->prototype, prototype, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly);
putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum | PropertyAttribute::DontDelete);
}
Modified: trunk/Source/_javascript_Core/wasm/js/WebAssemblyModuleConstructor.cpp (242649 => 242650)
--- trunk/Source/_javascript_Core/wasm/js/WebAssemblyModuleConstructor.cpp 2019-03-08 19:18:18 UTC (rev 242649)
+++ trunk/Source/_javascript_Core/wasm/js/WebAssemblyModuleConstructor.cpp 2019-03-08 19:33:51 UTC (rev 242650)
@@ -201,7 +201,7 @@
void WebAssemblyModuleConstructor::finishCreation(VM& vm, WebAssemblyModulePrototype* prototype)
{
- Base::finishCreation(vm, "Module"_s);
+ Base::finishCreation(vm, "Module"_s, NameVisibility::Visible, NameAdditionMode::WithoutStructureTransition);
putDirectWithoutTransition(vm, vm.propertyNames->prototype, prototype, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly);
putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum | PropertyAttribute::DontDelete);
}
Modified: trunk/Source/_javascript_Core/wasm/js/WebAssemblyRuntimeErrorConstructor.cpp (242649 => 242650)
--- trunk/Source/_javascript_Core/wasm/js/WebAssemblyRuntimeErrorConstructor.cpp 2019-03-08 19:18:18 UTC (rev 242649)
+++ trunk/Source/_javascript_Core/wasm/js/WebAssemblyRuntimeErrorConstructor.cpp 2019-03-08 19:33:51 UTC (rev 242650)
@@ -75,7 +75,7 @@
void WebAssemblyRuntimeErrorConstructor::finishCreation(VM& vm, WebAssemblyRuntimeErrorPrototype* prototype)
{
- Base::finishCreation(vm, "RuntimeError"_s);
+ Base::finishCreation(vm, "RuntimeError"_s, NameVisibility::Visible, NameAdditionMode::WithoutStructureTransition);
putDirectWithoutTransition(vm, vm.propertyNames->prototype, prototype, PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum | PropertyAttribute::DontDelete);
putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum | PropertyAttribute::DontDelete);
}
Modified: trunk/Source/_javascript_Core/wasm/js/WebAssemblyTableConstructor.cpp (242649 => 242650)
--- trunk/Source/_javascript_Core/wasm/js/WebAssemblyTableConstructor.cpp 2019-03-08 19:18:18 UTC (rev 242649)
+++ trunk/Source/_javascript_Core/wasm/js/WebAssemblyTableConstructor.cpp 2019-03-08 19:33:51 UTC (rev 242650)
@@ -120,7 +120,7 @@
void WebAssemblyTableConstructor::finishCreation(VM& vm, WebAssemblyTablePrototype* prototype)
{
- Base::finishCreation(vm, "Table"_s);
+ Base::finishCreation(vm, "Table"_s, NameVisibility::Visible, NameAdditionMode::WithoutStructureTransition);
putDirectWithoutTransition(vm, vm.propertyNames->prototype, prototype, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly);
putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum | PropertyAttribute::DontDelete);
}