Changeset 222473 in webkit for trunk/Source/JavaScriptCore


Ignore:
Timestamp:
Sep 25, 2017, 3:37:03 PM (8 years ago)
Author:
[email protected]
Message:

Make Attribute an enum class
https://bugs.webkit.org/show_bug.cgi?id=177414

Reviewed by Yusuke Suzuki.

Source/JavaScriptCore:

I've had enough of these naming collisions. This is what enum classes are for.
Unfortunately a lot of static_cast<unsigned> is necessary until those functions take
an OptionSet<Attribute> instead of an unsigned parameter, but this is a big step
towards where we ought to be.

  • API/JSCallbackObjectFunctions.h:

(JSC::JSCallbackObject<Parent>::getOwnPropertySlot):

  • API/JSObjectRef.cpp:

(JSObjectMakeConstructor):

  • Scripts/builtins/builtins_generate_internals_wrapper_implementation.py:

(BuiltinsInternalsWrapperImplementationGenerator.property_macro):

  • bytecode/GetByIdStatus.cpp:

(JSC::GetByIdStatus::computeFromLLInt):
(JSC::GetByIdStatus::computeForStubInfoWithoutExitSiteFeedback):
(JSC::GetByIdStatus::computeFor):

  • bytecode/PropertyCondition.cpp:

(JSC::PropertyCondition::isStillValidAssumingImpurePropertyWatchpoint const):
(JSC::PropertyCondition::isValidValueForAttributes):

  • bytecode/PutByIdStatus.cpp:

(JSC::PutByIdStatus::computeFor):

  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::instantiateLexicalVariables):
(JSC::BytecodeGenerator::variable):

  • bytecompiler/BytecodeGenerator.h:

(JSC::Variable::isReadOnly const):
(JSC::Variable::setIsReadOnly):

  • bytecompiler/NodesCodegen.cpp:

(JSC::PropertyListNode::emitBytecode):

  • create_hash_table:
  • debugger/DebuggerScope.cpp:

(JSC::DebuggerScope::getOwnPropertySlot):

  • dfg/DFGOperations.cpp:
  • inspector/JSInjectedScriptHostPrototype.cpp:

(Inspector::JSInjectedScriptHostPrototype::finishCreation):

  • inspector/JSJavaScriptCallFramePrototype.cpp:

(Inspector::JSJavaScriptCallFramePrototype::finishCreation):

  • jit/Repatch.cpp:

(JSC::tryCacheGetByID):

  • jsc.cpp:

(WTF::CustomGetter::getOwnPropertySlot):
(WTF::RuntimeArray::getOwnPropertySlot):
(WTF::RuntimeArray::getOwnPropertySlotByIndex):
(WTF::DOMJITGetter::finishCreation):
(WTF::DOMJITGetterComplex::finishCreation):
(WTF::DOMJITFunctionObject::finishCreation):
(WTF::DOMJITCheckSubClassObject::finishCreation):
(GlobalObject::finishCreation):

  • runtime/ArrayConstructor.cpp:

(JSC::ArrayConstructor::finishCreation):

  • runtime/ArrayIteratorPrototype.cpp:

(JSC::ArrayIteratorPrototype::finishCreation):

  • runtime/ArrayPrototype.cpp:

(JSC::ArrayPrototype::finishCreation):

  • runtime/AsyncFromSyncIteratorPrototype.cpp:

(JSC::AsyncFromSyncIteratorPrototype::finishCreation):

  • runtime/AsyncFunctionConstructor.cpp:

(JSC::AsyncFunctionConstructor::finishCreation):

  • runtime/AsyncFunctionPrototype.cpp:

(JSC::AsyncFunctionPrototype::finishCreation):

  • runtime/AsyncGeneratorFunctionConstructor.cpp:

(JSC::AsyncGeneratorFunctionConstructor::finishCreation):

  • runtime/AsyncGeneratorFunctionPrototype.cpp:

(JSC::AsyncGeneratorFunctionPrototype::finishCreation):

  • runtime/AsyncGeneratorPrototype.cpp:

(JSC::AsyncGeneratorPrototype::finishCreation):

  • runtime/AsyncIteratorPrototype.cpp:

(JSC::AsyncIteratorPrototype::finishCreation):

  • runtime/AtomicsObject.cpp:

(JSC::AtomicsObject::finishCreation):

  • runtime/BooleanConstructor.cpp:

(JSC::BooleanConstructor::finishCreation):

  • runtime/ClonedArguments.cpp:

(JSC::ClonedArguments::createStructure):
(JSC::ClonedArguments::getOwnPropertySlot):
(JSC::ClonedArguments::materializeSpecials):

  • runtime/CommonSlowPaths.cpp:

(JSC::SLOW_PATH_DECL):

  • runtime/ConsoleObject.cpp:

(JSC::ConsoleObject::finishCreation):

  • runtime/DateConstructor.cpp:

(JSC::DateConstructor::finishCreation):

  • runtime/DatePrototype.cpp:

(JSC::DatePrototype::finishCreation):

  • runtime/DirectArguments.cpp:

(JSC::DirectArguments::overrideThings):

  • runtime/Error.cpp:

(JSC::addErrorInfo):

  • runtime/ErrorConstructor.cpp:

(JSC::ErrorConstructor::finishCreation):

  • runtime/ErrorInstance.cpp:

(JSC::ErrorInstance::finishCreation):

  • runtime/ErrorPrototype.cpp:

(JSC::ErrorPrototype::finishCreation):

  • runtime/FunctionConstructor.cpp:

(JSC::FunctionConstructor::finishCreation):

  • runtime/FunctionPrototype.cpp:

(JSC::FunctionPrototype::finishCreation):
(JSC::FunctionPrototype::addFunctionProperties):
(JSC::FunctionPrototype::initRestrictedProperties):

  • runtime/GeneratorFunctionConstructor.cpp:

(JSC::GeneratorFunctionConstructor::finishCreation):

  • runtime/GeneratorFunctionPrototype.cpp:

(JSC::GeneratorFunctionPrototype::finishCreation):

  • runtime/GeneratorPrototype.cpp:

(JSC::GeneratorPrototype::finishCreation):

  • runtime/GenericArgumentsInlines.h:

(JSC::GenericArguments<Type>::getOwnPropertySlot):
(JSC::GenericArguments<Type>::getOwnPropertySlotByIndex):

  • runtime/InternalFunction.cpp:

(JSC::InternalFunction::finishCreation):

  • runtime/IntlCollatorConstructor.cpp:

(JSC::IntlCollatorConstructor::finishCreation):

  • runtime/IntlDateTimeFormatConstructor.cpp:

(JSC::IntlDateTimeFormatConstructor::finishCreation):

  • runtime/IntlDateTimeFormatPrototype.cpp:

(JSC::IntlDateTimeFormatPrototype::finishCreation):

  • runtime/IntlNumberFormatConstructor.cpp:

(JSC::IntlNumberFormatConstructor::finishCreation):

  • runtime/IntlObject.cpp:

(JSC::IntlObject::finishCreation):

  • runtime/IteratorPrototype.cpp:

(JSC::IteratorPrototype::finishCreation):

  • runtime/JSArray.cpp:

(JSC::JSArray::getOwnPropertySlot):
(JSC::JSArray::setLengthWithArrayStorage):

  • runtime/JSArrayBufferConstructor.cpp:

(JSC::JSArrayBufferConstructor::finishCreation):

  • runtime/JSArrayBufferPrototype.cpp:

(JSC::JSArrayBufferPrototype::finishCreation):

  • runtime/JSBoundFunction.cpp:

(JSC::JSBoundFunction::finishCreation):

  • runtime/JSCJSValue.cpp:

(JSC::JSValue::putToPrimitive):

  • runtime/JSDataView.cpp:

(JSC::JSDataView::getOwnPropertySlot):

  • runtime/JSDataViewPrototype.cpp:

(JSC::JSDataViewPrototype::finishCreation):

  • runtime/JSFunction.cpp:

(JSC::JSFunction::finishCreation):
(JSC::JSFunction::getOwnPropertySlot):
(JSC::JSFunction::defineOwnProperty):
(JSC::JSFunction::reifyLength):
(JSC::JSFunction::reifyName):
(JSC::JSFunction::reifyLazyBoundNameIfNeeded):

  • runtime/JSGenericTypedArrayViewConstructorInlines.h:

(JSC::JSGenericTypedArrayViewConstructor<ViewClass>::finishCreation):

  • runtime/JSGenericTypedArrayViewInlines.h:

(JSC::JSGenericTypedArrayView<Adaptor>::getOwnPropertySlot):
(JSC::JSGenericTypedArrayView<Adaptor>::getOwnPropertySlotByIndex):

  • runtime/JSGenericTypedArrayViewPrototypeInlines.h:

(JSC::JSGenericTypedArrayViewPrototype<ViewClass>::finishCreation):

  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::init):
(JSC::JSGlobalObject::addStaticGlobals):

  • runtime/JSLexicalEnvironment.cpp:

(JSC::JSLexicalEnvironment::getOwnNonIndexPropertyNames):

  • runtime/JSModuleNamespaceObject.cpp:

(JSC::JSModuleNamespaceObject::finishCreation):
(JSC::JSModuleNamespaceObject::getOwnPropertySlotCommon):

  • runtime/JSONObject.cpp:

(JSC::JSONObject::finishCreation):

  • runtime/JSObject.cpp:

(JSC::getClassPropertyNames):
(JSC::JSObject::getOwnPropertySlotByIndex):
(JSC::ordinarySetSlow):
(JSC::JSObject::putInlineSlow):
(JSC::JSObject::putGetter):
(JSC::JSObject::putSetter):
(JSC::JSObject::putDirectAccessor):
(JSC::JSObject::putDirectCustomAccessor):
(JSC::JSObject::putDirectNonIndexAccessor):
(JSC::JSObject::deleteProperty):
(JSC::JSObject::deletePropertyByIndex):
(JSC::JSObject::getOwnPropertyNames):
(JSC::JSObject::putIndexedDescriptor):
(JSC::JSObject::defineOwnIndexedProperty):
(JSC::JSObject::attemptToInterceptPutByIndexOnHoleForPrototype):
(JSC::JSObject::putDirectIndexSlowOrBeyondVectorLength):
(JSC::JSObject::getOwnPropertyDescriptor):
(JSC::putDescriptor):
(JSC::validateAndApplyPropertyDescriptor):

  • runtime/JSObject.h:

(JSC::JSObject::putDirect):

  • runtime/JSObjectInlines.h:

(JSC::JSObject::putDirectWithoutTransition):
(JSC::JSObject::putDirectInternal):

  • runtime/JSPromiseConstructor.cpp:

(JSC::JSPromiseConstructor::finishCreation):
(JSC::JSPromiseConstructor::addOwnInternalSlots):

  • runtime/JSPromisePrototype.cpp:

(JSC::JSPromisePrototype::finishCreation):
(JSC::JSPromisePrototype::addOwnInternalSlots):

  • runtime/JSString.cpp:

(JSC::JSString::getStringPropertyDescriptor):

  • runtime/JSString.h:

(JSC::JSString::getStringPropertySlot):

  • runtime/JSSymbolTableObject.cpp:

(JSC::JSSymbolTableObject::getOwnNonIndexPropertyNames):

  • runtime/JSSymbolTableObject.h:

(JSC::symbolTableGet):

  • runtime/JSTypedArrayViewConstructor.cpp:

(JSC::JSTypedArrayViewConstructor::finishCreation):

  • runtime/JSTypedArrayViewPrototype.cpp:

(JSC::JSTypedArrayViewPrototype::finishCreation):

  • runtime/LazyClassStructure.cpp:

(JSC::LazyClassStructure::Initializer::setConstructor):

  • runtime/Lookup.cpp:

(JSC::reifyStaticAccessor):
(JSC::setUpStaticFunctionSlot):

  • runtime/Lookup.h:

(JSC::HashTableValue::intrinsic const):
(JSC::HashTableValue::builtinGenerator const):
(JSC::HashTableValue::function const):
(JSC::HashTableValue::functionLength const):
(JSC::HashTableValue::propertyGetter const):
(JSC::HashTableValue::propertyPutter const):
(JSC::HashTableValue::domJIT const):
(JSC::HashTableValue::signature const):
(JSC::HashTableValue::accessorGetter const):
(JSC::HashTableValue::accessorSetter const):
(JSC::HashTableValue::constantInteger const):
(JSC::HashTableValue::lazyCellPropertyOffset const):
(JSC::HashTableValue::lazyClassStructureOffset const):
(JSC::HashTableValue::lazyPropertyCallback const):
(JSC::HashTableValue::builtinAccessorGetterGenerator const):
(JSC::HashTableValue::builtinAccessorSetterGenerator const):
(JSC::getStaticPropertySlotFromTable):
(JSC::putEntry):
(JSC::reifyStaticProperty):

  • runtime/MapConstructor.cpp:

(JSC::MapConstructor::finishCreation):

  • runtime/MapIteratorPrototype.cpp:

(JSC::MapIteratorPrototype::finishCreation):

  • runtime/MapPrototype.cpp:

(JSC::MapPrototype::finishCreation):

  • runtime/MathObject.cpp:

(JSC::MathObject::finishCreation):

  • runtime/NativeErrorConstructor.cpp:

(JSC::NativeErrorConstructor::finishCreation):

  • runtime/NativeErrorPrototype.cpp:

(JSC::NativeErrorPrototype::finishCreation):

  • runtime/NumberConstructor.cpp:

(JSC::NumberConstructor::finishCreation):

  • runtime/NumberPrototype.cpp:

(JSC::NumberPrototype::finishCreation):

  • runtime/ObjectConstructor.cpp:

(JSC::ObjectConstructor::finishCreation):
(JSC::objectConstructorAssign):
(JSC::objectConstructorValues):
(JSC::objectConstructorDefineProperty):

  • runtime/ObjectPrototype.cpp:

(JSC::ObjectPrototype::finishCreation):
(JSC::objectProtoFuncLookupGetter):
(JSC::objectProtoFuncLookupSetter):

  • runtime/ProgramExecutable.cpp:

(JSC::ProgramExecutable::initializeGlobalProperties):

  • runtime/PropertyDescriptor.cpp:

(JSC::PropertyDescriptor::writable const):
(JSC::PropertyDescriptor::enumerable const):
(JSC::PropertyDescriptor::configurable const):
(JSC::PropertyDescriptor::setUndefined):
(JSC::PropertyDescriptor::setDescriptor):
(JSC::PropertyDescriptor::setCustomDescriptor):
(JSC::PropertyDescriptor::setAccessorDescriptor):
(JSC::PropertyDescriptor::setWritable):
(JSC::PropertyDescriptor::setEnumerable):
(JSC::PropertyDescriptor::setConfigurable):
(JSC::PropertyDescriptor::setSetter):
(JSC::PropertyDescriptor::setGetter):
(JSC::PropertyDescriptor::attributesEqual const):
(JSC::PropertyDescriptor::attributesOverridingCurrent const):

  • runtime/PropertySlot.cpp:

(JSC::PropertySlot::customGetter const):

  • runtime/PropertySlot.h:

(JSC::operator| ):
(JSC::operator&):
(JSC::operator<):
(JSC::operator~):
(JSC::operator|=):
(JSC::PropertySlot::setUndefined):

  • runtime/ProxyConstructor.cpp:

(JSC::makeRevocableProxy):
(JSC::ProxyConstructor::finishCreation):

  • runtime/ProxyObject.cpp:

(JSC::ProxyObject::performHasProperty):

  • runtime/ProxyRevoke.cpp:

(JSC::ProxyRevoke::finishCreation):

  • runtime/ReflectObject.cpp:

(JSC::ReflectObject::finishCreation):
(JSC::reflectObjectDefineProperty):

  • runtime/RegExpConstructor.cpp:

(JSC::RegExpConstructor::finishCreation):

  • runtime/RegExpObject.cpp:

(JSC::RegExpObject::getOwnPropertySlot):

  • runtime/RegExpPrototype.cpp:

(JSC::RegExpPrototype::finishCreation):

  • runtime/ScopedArguments.cpp:

(JSC::ScopedArguments::overrideThings):

  • runtime/SetConstructor.cpp:

(JSC::SetConstructor::finishCreation):

  • runtime/SetIteratorPrototype.cpp:

(JSC::SetIteratorPrototype::finishCreation):

  • runtime/SetPrototype.cpp:

(JSC::SetPrototype::finishCreation):

  • runtime/SparseArrayValueMap.cpp:

(JSC::SparseArrayValueMap::putDirect):
(JSC::SparseArrayEntry::put):

  • runtime/StringConstructor.cpp:

(JSC::StringConstructor::finishCreation):

  • runtime/StringIteratorPrototype.cpp:

(JSC::StringIteratorPrototype::finishCreation):

  • runtime/StringPrototype.cpp:

(JSC::StringPrototype::finishCreation):

  • runtime/Structure.cpp:

(JSC::Structure::nonPropertyTransition):
(JSC::Structure::isSealed):
(JSC::Structure::isFrozen):
(JSC::Structure::getPropertyNamesFromStructure):
(JSC::Structure::prototypeChainMayInterceptStoreTo):

  • runtime/StructureInlines.h:

(JSC::Structure::add):

  • runtime/SymbolConstructor.cpp:

(JSC::SymbolConstructor::finishCreation):

  • runtime/SymbolPrototype.cpp:

(JSC::SymbolPrototype::finishCreation):

  • runtime/SymbolTable.h:

(JSC::SymbolTableEntry::Fast::getAttributes const):
(JSC::SymbolTableEntry::SymbolTableEntry):
(JSC::SymbolTableEntry::setAttributes):

  • runtime/TemplateRegistry.cpp:

(JSC::TemplateRegistry::getTemplateObject):

  • runtime/WeakMapConstructor.cpp:

(JSC::WeakMapConstructor::finishCreation):

  • runtime/WeakMapPrototype.cpp:

(JSC::WeakMapPrototype::finishCreation):

  • runtime/WeakSetConstructor.cpp:

(JSC::WeakSetConstructor::finishCreation):

  • runtime/WeakSetPrototype.cpp:

(JSC::WeakSetPrototype::finishCreation):

  • tools/JSDollarVMPrototype.cpp:

(JSC::JSDollarVMPrototype::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/WebAssemblyMemoryPrototype.cpp:
  • wasm/js/WebAssemblyModuleConstructor.cpp:

(JSC::WebAssemblyModuleConstructor::finishCreation):

  • wasm/js/WebAssemblyRuntimeErrorConstructor.cpp:

(JSC::WebAssemblyRuntimeErrorConstructor::finishCreation):

  • wasm/js/WebAssemblyTableConstructor.cpp:

(JSC::WebAssemblyTableConstructor::finishCreation):

Source/WebCore:

No change in behavior.

  • bindings/js/JSDOMGlobalObject.cpp:

(WebCore::JSDOMGlobalObject::addBuiltinGlobals):

  • bindings/js/JSDOMMapLike.cpp:

(WebCore::initializeBackingMap):
(WebCore::createBackingMap):

  • bindings/js/JSDOMWindowBase.cpp:

(WebCore::JSDOMWindowBase::finishCreation):

  • bindings/js/JSDOMWindowCustom.cpp:

(WebCore::jsDOMWindowGetOwnPropertySlotRestrictedAccess):
(WebCore::JSDOMWindow::getOwnPropertySlot):
(WebCore::JSDOMWindow::getOwnPropertySlotByIndex):

  • bindings/js/JSDOMWindowProperties.cpp:

(WebCore::jsDOMWindowPropertiesGetOwnPropertySlotNamedItemGetter):

  • bindings/js/JSImageDataCustom.cpp:

(WebCore::toJSNewlyCreated):

  • bindings/js/JSLocationCustom.cpp:

(WebCore::getOwnPropertySlotCommon):

  • bindings/js/JSPluginElementFunctions.cpp:

(WebCore::pluginElementCustomGetOwnPropertySlot):

  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateIndexedGetter):
(GenerateNamedGetter):
(GetJSCAttributesForAttribute):
(GeneratePropertiesHashTable):
(addUnscopableProperties):
(GenerateImplementation):
(GenerateCallbackImplementationContent):
(GenerateHashTableValueArray):
(GenerateConstructorHelperMethods):
(ComputeFunctionSpecial):

  • bindings/scripts/test/JS/JSInterfaceName.cpp:

(WebCore::JSInterfaceNameConstructor::initializeProperties):

  • bindings/scripts/test/JS/JSMapLike.cpp:

(WebCore::JSMapLikeConstructor::initializeProperties):
(WebCore::JSMapLikePrototype::finishCreation):

  • bindings/scripts/test/JS/JSReadOnlyMapLike.cpp:

(WebCore::JSReadOnlyMapLikeConstructor::initializeProperties):
(WebCore::JSReadOnlyMapLikePrototype::finishCreation):

  • bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:

(WebCore::JSTestActiveDOMObjectConstructor::initializeProperties):

  • bindings/scripts/test/JS/JSTestCEReactions.cpp:

(WebCore::JSTestCEReactionsConstructor::initializeProperties):

  • bindings/scripts/test/JS/JSTestCEReactionsStringifier.cpp:

(WebCore::JSTestCEReactionsStringifierConstructor::initializeProperties):

  • bindings/scripts/test/JS/JSTestCallTracer.cpp:

(WebCore::JSTestCallTracerConstructor::initializeProperties):

  • bindings/scripts/test/JS/JSTestCallbackInterface.cpp:

(WebCore::JSTestCallbackInterfaceConstructor::initializeProperties):

  • bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp:

(WebCore::JSTestClassWithJSBuiltinConstructorConstructor::initializeProperties):

  • bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:

(WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::initializeProperties):
(WebCore::jsTestCustomConstructorWithNoInterfaceObjectConstructor):

  • bindings/scripts/test/JS/JSTestDOMJIT.cpp:

(WebCore::JSTestDOMJITConstructor::initializeProperties):

  • bindings/scripts/test/JS/JSTestEnabledBySetting.cpp:

(WebCore::JSTestEnabledBySettingConstructor::initializeProperties):
(WebCore::JSTestEnabledBySetting::finishCreation):

  • bindings/scripts/test/JS/JSTestEventConstructor.cpp:

(WebCore::JSTestEventConstructorConstructor::initializeProperties):

  • bindings/scripts/test/JS/JSTestEventTarget.cpp:

(WebCore::JSTestEventTargetConstructor::initializeProperties):
(WebCore::JSTestEventTarget::getOwnPropertySlot):
(WebCore::JSTestEventTarget::getOwnPropertySlotByIndex):

  • bindings/scripts/test/JS/JSTestException.cpp:

(WebCore::JSTestExceptionConstructor::initializeProperties):

  • bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:

(WebCore::JSTestGenerateIsReachableConstructor::initializeProperties):

  • bindings/scripts/test/JS/JSTestGlobalObject.cpp:

(WebCore::JSTestGlobalObjectConstructor::initializeProperties):
(WebCore::JSTestGlobalObject::finishCreation):

  • bindings/scripts/test/JS/JSTestIndexedSetterNoIdentifier.cpp:

(WebCore::JSTestIndexedSetterNoIdentifierConstructor::initializeProperties):
(WebCore::JSTestIndexedSetterNoIdentifier::getOwnPropertySlot):
(WebCore::JSTestIndexedSetterNoIdentifier::getOwnPropertySlotByIndex):

  • bindings/scripts/test/JS/JSTestIndexedSetterThrowingException.cpp:

(WebCore::JSTestIndexedSetterThrowingExceptionConstructor::initializeProperties):
(WebCore::JSTestIndexedSetterThrowingException::getOwnPropertySlot):
(WebCore::JSTestIndexedSetterThrowingException::getOwnPropertySlotByIndex):

  • bindings/scripts/test/JS/JSTestIndexedSetterWithIdentifier.cpp:

(WebCore::JSTestIndexedSetterWithIdentifierConstructor::initializeProperties):
(WebCore::JSTestIndexedSetterWithIdentifier::getOwnPropertySlot):
(WebCore::JSTestIndexedSetterWithIdentifier::getOwnPropertySlotByIndex):

  • bindings/scripts/test/JS/JSTestInterface.cpp:

(WebCore::JSTestInterfaceConstructor::initializeProperties):

  • bindings/scripts/test/JS/JSTestInterfaceLeadingUnderscore.cpp:

(WebCore::JSTestInterfaceLeadingUnderscoreConstructor::initializeProperties):

  • bindings/scripts/test/JS/JSTestIterable.cpp:

(WebCore::JSTestIterableConstructor::initializeProperties):
(WebCore::JSTestIterablePrototype::finishCreation):

  • bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp:

(WebCore::JSTestJSBuiltinConstructorConstructor::initializeProperties):

  • bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:

(WebCore::JSTestMediaQueryListListenerConstructor::initializeProperties):

  • bindings/scripts/test/JS/JSTestNamedAndIndexedSetterNoIdentifier.cpp:

(WebCore::JSTestNamedAndIndexedSetterNoIdentifierConstructor::initializeProperties):
(WebCore::JSTestNamedAndIndexedSetterNoIdentifier::getOwnPropertySlot):
(WebCore::JSTestNamedAndIndexedSetterNoIdentifier::getOwnPropertySlotByIndex):

  • bindings/scripts/test/JS/JSTestNamedAndIndexedSetterThrowingException.cpp:

(WebCore::JSTestNamedAndIndexedSetterThrowingExceptionConstructor::initializeProperties):
(WebCore::JSTestNamedAndIndexedSetterThrowingException::getOwnPropertySlot):
(WebCore::JSTestNamedAndIndexedSetterThrowingException::getOwnPropertySlotByIndex):

  • bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.cpp:

(WebCore::JSTestNamedAndIndexedSetterWithIdentifierConstructor::initializeProperties):
(WebCore::JSTestNamedAndIndexedSetterWithIdentifier::getOwnPropertySlot):
(WebCore::JSTestNamedAndIndexedSetterWithIdentifier::getOwnPropertySlotByIndex):

  • bindings/scripts/test/JS/JSTestNamedConstructor.cpp:

(WebCore::JSTestNamedConstructorConstructor::initializeProperties):
(WebCore::JSTestNamedConstructorNamedConstructor::initializeProperties):

  • bindings/scripts/test/JS/JSTestNamedDeleterNoIdentifier.cpp:

(WebCore::JSTestNamedDeleterNoIdentifierConstructor::initializeProperties):
(WebCore::JSTestNamedDeleterNoIdentifier::getOwnPropertySlot):
(WebCore::JSTestNamedDeleterNoIdentifier::getOwnPropertySlotByIndex):

  • bindings/scripts/test/JS/JSTestNamedDeleterThrowingException.cpp:

(WebCore::JSTestNamedDeleterThrowingExceptionConstructor::initializeProperties):
(WebCore::JSTestNamedDeleterThrowingException::getOwnPropertySlot):
(WebCore::JSTestNamedDeleterThrowingException::getOwnPropertySlotByIndex):

  • bindings/scripts/test/JS/JSTestNamedDeleterWithIdentifier.cpp:

(WebCore::JSTestNamedDeleterWithIdentifierConstructor::initializeProperties):
(WebCore::JSTestNamedDeleterWithIdentifier::getOwnPropertySlot):
(WebCore::JSTestNamedDeleterWithIdentifier::getOwnPropertySlotByIndex):

  • bindings/scripts/test/JS/JSTestNamedDeleterWithIndexedGetter.cpp:

(WebCore::JSTestNamedDeleterWithIndexedGetterConstructor::initializeProperties):
(WebCore::JSTestNamedDeleterWithIndexedGetter::getOwnPropertySlot):
(WebCore::JSTestNamedDeleterWithIndexedGetter::getOwnPropertySlotByIndex):

  • bindings/scripts/test/JS/JSTestNamedGetterCallWith.cpp:

(WebCore::JSTestNamedGetterCallWithConstructor::initializeProperties):
(WebCore::JSTestNamedGetterCallWith::getOwnPropertySlot):
(WebCore::JSTestNamedGetterCallWith::getOwnPropertySlotByIndex):

  • bindings/scripts/test/JS/JSTestNamedGetterNoIdentifier.cpp:

(WebCore::JSTestNamedGetterNoIdentifierConstructor::initializeProperties):
(WebCore::JSTestNamedGetterNoIdentifier::getOwnPropertySlot):
(WebCore::JSTestNamedGetterNoIdentifier::getOwnPropertySlotByIndex):

  • bindings/scripts/test/JS/JSTestNamedGetterWithIdentifier.cpp:

(WebCore::JSTestNamedGetterWithIdentifierConstructor::initializeProperties):
(WebCore::JSTestNamedGetterWithIdentifier::getOwnPropertySlot):
(WebCore::JSTestNamedGetterWithIdentifier::getOwnPropertySlotByIndex):

  • bindings/scripts/test/JS/JSTestNamedSetterNoIdentifier.cpp:

(WebCore::JSTestNamedSetterNoIdentifierConstructor::initializeProperties):
(WebCore::JSTestNamedSetterNoIdentifier::getOwnPropertySlot):
(WebCore::JSTestNamedSetterNoIdentifier::getOwnPropertySlotByIndex):

  • bindings/scripts/test/JS/JSTestNamedSetterThrowingException.cpp:

(WebCore::JSTestNamedSetterThrowingExceptionConstructor::initializeProperties):
(WebCore::JSTestNamedSetterThrowingException::getOwnPropertySlot):
(WebCore::JSTestNamedSetterThrowingException::getOwnPropertySlotByIndex):

  • bindings/scripts/test/JS/JSTestNamedSetterWithIdentifier.cpp:

(WebCore::JSTestNamedSetterWithIdentifierConstructor::initializeProperties):
(WebCore::JSTestNamedSetterWithIdentifier::getOwnPropertySlot):
(WebCore::JSTestNamedSetterWithIdentifier::getOwnPropertySlotByIndex):

  • bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetter.cpp:

(WebCore::JSTestNamedSetterWithIndexedGetterConstructor::initializeProperties):
(WebCore::JSTestNamedSetterWithIndexedGetter::getOwnPropertySlot):
(WebCore::JSTestNamedSetterWithIndexedGetter::getOwnPropertySlotByIndex):

  • bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetterAndSetter.cpp:

(WebCore::JSTestNamedSetterWithIndexedGetterAndSetterConstructor::initializeProperties):
(WebCore::JSTestNamedSetterWithIndexedGetterAndSetter::getOwnPropertySlot):
(WebCore::JSTestNamedSetterWithIndexedGetterAndSetter::getOwnPropertySlotByIndex):

  • bindings/scripts/test/JS/JSTestNamedSetterWithOverrideBuiltins.cpp:

(WebCore::JSTestNamedSetterWithOverrideBuiltinsConstructor::initializeProperties):
(WebCore::JSTestNamedSetterWithOverrideBuiltins::getOwnPropertySlot):
(WebCore::JSTestNamedSetterWithOverrideBuiltins::getOwnPropertySlotByIndex):

  • bindings/scripts/test/JS/JSTestNamedSetterWithUnforgableProperties.cpp:

(WebCore::JSTestNamedSetterWithUnforgablePropertiesConstructor::initializeProperties):
(WebCore::JSTestNamedSetterWithUnforgableProperties::getOwnPropertySlot):
(WebCore::JSTestNamedSetterWithUnforgableProperties::getOwnPropertySlotByIndex):

  • bindings/scripts/test/JS/JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins.cpp:

(WebCore::JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltinsConstructor::initializeProperties):
(WebCore::JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins::getOwnPropertySlot):
(WebCore::JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins::getOwnPropertySlotByIndex):

  • bindings/scripts/test/JS/JSTestNode.cpp:

(WebCore::JSTestNodeConstructor::initializeProperties):
(WebCore::JSTestNodePrototype::finishCreation):

  • bindings/scripts/test/JS/JSTestObj.cpp:

(WebCore::JSTestObjConstructor::initializeProperties):
(WebCore::JSTestObjPrototype::finishCreation):
(WebCore::JSTestObj::getOwnPropertySlot):
(WebCore::JSTestObj::getOwnPropertySlotByIndex):

  • bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:

(WebCore::JSTestOverloadedConstructorsConstructor::initializeProperties):

  • bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp:

(WebCore::JSTestOverloadedConstructorsWithSequenceConstructor::initializeProperties):

  • bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:

(WebCore::JSTestOverrideBuiltinsConstructor::initializeProperties):
(WebCore::JSTestOverrideBuiltins::getOwnPropertySlot):
(WebCore::JSTestOverrideBuiltins::getOwnPropertySlotByIndex):

  • bindings/scripts/test/JS/JSTestPluginInterface.cpp:

(WebCore::JSTestPluginInterfaceConstructor::initializeProperties):

  • bindings/scripts/test/JS/JSTestPromiseRejectionEvent.cpp:

(WebCore::JSTestPromiseRejectionEventConstructor::initializeProperties):

  • bindings/scripts/test/JS/JSTestSerialization.cpp:

(WebCore::JSTestSerializationConstructor::initializeProperties):

  • bindings/scripts/test/JS/JSTestSerializationIndirectInheritance.cpp:

(WebCore::JSTestSerializationIndirectInheritanceConstructor::initializeProperties):

  • bindings/scripts/test/JS/JSTestSerializationInherit.cpp:

(WebCore::JSTestSerializationInheritConstructor::initializeProperties):

  • bindings/scripts/test/JS/JSTestSerializationInheritFinal.cpp:

(WebCore::JSTestSerializationInheritFinalConstructor::initializeProperties):

  • bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:

(WebCore::JSTestSerializedScriptValueInterfaceConstructor::initializeProperties):

  • bindings/scripts/test/JS/JSTestStringifier.cpp:

(WebCore::JSTestStringifierConstructor::initializeProperties):

  • bindings/scripts/test/JS/JSTestStringifierAnonymousOperation.cpp:

(WebCore::JSTestStringifierAnonymousOperationConstructor::initializeProperties):

  • bindings/scripts/test/JS/JSTestStringifierNamedOperation.cpp:

(WebCore::JSTestStringifierNamedOperationConstructor::initializeProperties):

  • bindings/scripts/test/JS/JSTestStringifierOperationImplementedAs.cpp:

(WebCore::JSTestStringifierOperationImplementedAsConstructor::initializeProperties):

  • bindings/scripts/test/JS/JSTestStringifierOperationNamedToString.cpp:

(WebCore::JSTestStringifierOperationNamedToStringConstructor::initializeProperties):

  • bindings/scripts/test/JS/JSTestStringifierReadOnlyAttribute.cpp:

(WebCore::JSTestStringifierReadOnlyAttributeConstructor::initializeProperties):

  • bindings/scripts/test/JS/JSTestStringifierReadWriteAttribute.cpp:

(WebCore::JSTestStringifierReadWriteAttributeConstructor::initializeProperties):

  • bindings/scripts/test/JS/JSTestTypedefs.cpp:

(WebCore::JSTestTypedefsConstructor::initializeProperties):

  • bridge/runtime_array.cpp:

(JSC::RuntimeArray::getOwnPropertySlot):
(JSC::RuntimeArray::getOwnPropertySlotByIndex):

  • bridge/runtime_method.cpp:

(JSC::RuntimeMethod::getOwnPropertySlot):

  • bridge/runtime_object.cpp:

(JSC::Bindings::RuntimeObject::getOwnPropertySlot):

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::didAddUserAgentShadowRoot):

Source/WebKit:

  • WebProcess/Plugins/Netscape/JSNPObject.cpp:

(WebKit::JSNPObject::getOwnPropertySlot):

Location:
trunk/Source/JavaScriptCore
Files:
128 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/API/JSCallbackObjectFunctions.h

    r211247 r222473  
    160160                JSLock::DropAllLocks dropAllLocks(exec);
    161161                if (hasProperty(ctx, thisRef, propertyNameRef.get())) {
    162                     slot.setCustom(thisObject, ReadOnly | DontEnum, callbackGetter);
     162                    slot.setCustom(thisObject, PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum, callbackGetter);
    163163                    return true;
    164164                }
     
    174174                if (exception) {
    175175                    throwException(exec, scope, toJS(exec, exception));
    176                     slot.setValue(thisObject, ReadOnly | DontEnum, jsUndefined());
     176                    slot.setValue(thisObject, PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum, jsUndefined());
    177177                    return true;
    178178                }
    179179                if (value) {
    180                     slot.setValue(thisObject, ReadOnly | DontEnum, toJS(exec, value));
     180                    slot.setValue(thisObject, PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum, toJS(exec, value));
    181181                    return true;
    182182                }
     
    187187                    JSValue value = thisObject->getStaticValue(exec, propertyName);
    188188                    if (value) {
    189                         slot.setValue(thisObject, ReadOnly | DontEnum, value);
     189                        slot.setValue(thisObject, PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum, value);
    190190                        return true;
    191191                    }
     
    195195            if (OpaqueJSClassStaticFunctionsTable* staticFunctions = jsClass->staticFunctions(exec)) {
    196196                if (staticFunctions->contains(name)) {
    197                     slot.setCustom(thisObject, ReadOnly | DontEnum, staticFunctionGetter);
     197                    slot.setCustom(thisObject, PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum, staticFunctionGetter);
    198198                    return true;
    199199                }
  • trunk/Source/JavaScriptCore/API/JSObjectRef.cpp

    r222175 r222473  
    130130
    131131    JSCallbackConstructor* constructor = JSCallbackConstructor::create(exec, exec->lexicalGlobalObject(), exec->lexicalGlobalObject()->callbackConstructorStructure(), jsClass, callAsConstructor);
    132     constructor->putDirect(vm, vm.propertyNames->prototype, jsPrototype, DontEnum | DontDelete | ReadOnly);
     132    constructor->putDirect(vm, vm.propertyNames->prototype, jsPrototype, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly);
    133133    return toRef(constructor);
    134134}
  • trunk/Source/JavaScriptCore/ChangeLog

    r222425 r222473  
     12017-09-25  Alex Christensen  <[email protected]>
     2
     3        Make Attribute an enum class
     4        https://bugs.webkit.org/show_bug.cgi?id=177414
     5
     6        Reviewed by Yusuke Suzuki.
     7
     8        I've had enough of these naming collisions.  This is what enum classes are for.
     9        Unfortunately a lot of static_cast<unsigned> is necessary until those functions take
     10        an OptionSet<Attribute> instead of an unsigned parameter, but this is a big step
     11        towards where we ought to be.
     12
     13        * API/JSCallbackObjectFunctions.h:
     14        (JSC::JSCallbackObject<Parent>::getOwnPropertySlot):
     15        * API/JSObjectRef.cpp:
     16        (JSObjectMakeConstructor):
     17        * Scripts/builtins/builtins_generate_internals_wrapper_implementation.py:
     18        (BuiltinsInternalsWrapperImplementationGenerator.property_macro):
     19        * bytecode/GetByIdStatus.cpp:
     20        (JSC::GetByIdStatus::computeFromLLInt):
     21        (JSC::GetByIdStatus::computeForStubInfoWithoutExitSiteFeedback):
     22        (JSC::GetByIdStatus::computeFor):
     23        * bytecode/PropertyCondition.cpp:
     24        (JSC::PropertyCondition::isStillValidAssumingImpurePropertyWatchpoint const):
     25        (JSC::PropertyCondition::isValidValueForAttributes):
     26        * bytecode/PutByIdStatus.cpp:
     27        (JSC::PutByIdStatus::computeFor):
     28        * bytecompiler/BytecodeGenerator.cpp:
     29        (JSC::BytecodeGenerator::instantiateLexicalVariables):
     30        (JSC::BytecodeGenerator::variable):
     31        * bytecompiler/BytecodeGenerator.h:
     32        (JSC::Variable::isReadOnly const):
     33        (JSC::Variable::setIsReadOnly):
     34        * bytecompiler/NodesCodegen.cpp:
     35        (JSC::PropertyListNode::emitBytecode):
     36        * create_hash_table:
     37        * debugger/DebuggerScope.cpp:
     38        (JSC::DebuggerScope::getOwnPropertySlot):
     39        * dfg/DFGOperations.cpp:
     40        * inspector/JSInjectedScriptHostPrototype.cpp:
     41        (Inspector::JSInjectedScriptHostPrototype::finishCreation):
     42        * inspector/JSJavaScriptCallFramePrototype.cpp:
     43        (Inspector::JSJavaScriptCallFramePrototype::finishCreation):
     44        * jit/Repatch.cpp:
     45        (JSC::tryCacheGetByID):
     46        * jsc.cpp:
     47        (WTF::CustomGetter::getOwnPropertySlot):
     48        (WTF::RuntimeArray::getOwnPropertySlot):
     49        (WTF::RuntimeArray::getOwnPropertySlotByIndex):
     50        (WTF::DOMJITGetter::finishCreation):
     51        (WTF::DOMJITGetterComplex::finishCreation):
     52        (WTF::DOMJITFunctionObject::finishCreation):
     53        (WTF::DOMJITCheckSubClassObject::finishCreation):
     54        (GlobalObject::finishCreation):
     55        * runtime/ArrayConstructor.cpp:
     56        (JSC::ArrayConstructor::finishCreation):
     57        * runtime/ArrayIteratorPrototype.cpp:
     58        (JSC::ArrayIteratorPrototype::finishCreation):
     59        * runtime/ArrayPrototype.cpp:
     60        (JSC::ArrayPrototype::finishCreation):
     61        * runtime/AsyncFromSyncIteratorPrototype.cpp:
     62        (JSC::AsyncFromSyncIteratorPrototype::finishCreation):
     63        * runtime/AsyncFunctionConstructor.cpp:
     64        (JSC::AsyncFunctionConstructor::finishCreation):
     65        * runtime/AsyncFunctionPrototype.cpp:
     66        (JSC::AsyncFunctionPrototype::finishCreation):
     67        * runtime/AsyncGeneratorFunctionConstructor.cpp:
     68        (JSC::AsyncGeneratorFunctionConstructor::finishCreation):
     69        * runtime/AsyncGeneratorFunctionPrototype.cpp:
     70        (JSC::AsyncGeneratorFunctionPrototype::finishCreation):
     71        * runtime/AsyncGeneratorPrototype.cpp:
     72        (JSC::AsyncGeneratorPrototype::finishCreation):
     73        * runtime/AsyncIteratorPrototype.cpp:
     74        (JSC::AsyncIteratorPrototype::finishCreation):
     75        * runtime/AtomicsObject.cpp:
     76        (JSC::AtomicsObject::finishCreation):
     77        * runtime/BooleanConstructor.cpp:
     78        (JSC::BooleanConstructor::finishCreation):
     79        * runtime/ClonedArguments.cpp:
     80        (JSC::ClonedArguments::createStructure):
     81        (JSC::ClonedArguments::getOwnPropertySlot):
     82        (JSC::ClonedArguments::materializeSpecials):
     83        * runtime/CommonSlowPaths.cpp:
     84        (JSC::SLOW_PATH_DECL):
     85        * runtime/ConsoleObject.cpp:
     86        (JSC::ConsoleObject::finishCreation):
     87        * runtime/DateConstructor.cpp:
     88        (JSC::DateConstructor::finishCreation):
     89        * runtime/DatePrototype.cpp:
     90        (JSC::DatePrototype::finishCreation):
     91        * runtime/DirectArguments.cpp:
     92        (JSC::DirectArguments::overrideThings):
     93        * runtime/Error.cpp:
     94        (JSC::addErrorInfo):
     95        * runtime/ErrorConstructor.cpp:
     96        (JSC::ErrorConstructor::finishCreation):
     97        * runtime/ErrorInstance.cpp:
     98        (JSC::ErrorInstance::finishCreation):
     99        * runtime/ErrorPrototype.cpp:
     100        (JSC::ErrorPrototype::finishCreation):
     101        * runtime/FunctionConstructor.cpp:
     102        (JSC::FunctionConstructor::finishCreation):
     103        * runtime/FunctionPrototype.cpp:
     104        (JSC::FunctionPrototype::finishCreation):
     105        (JSC::FunctionPrototype::addFunctionProperties):
     106        (JSC::FunctionPrototype::initRestrictedProperties):
     107        * runtime/GeneratorFunctionConstructor.cpp:
     108        (JSC::GeneratorFunctionConstructor::finishCreation):
     109        * runtime/GeneratorFunctionPrototype.cpp:
     110        (JSC::GeneratorFunctionPrototype::finishCreation):
     111        * runtime/GeneratorPrototype.cpp:
     112        (JSC::GeneratorPrototype::finishCreation):
     113        * runtime/GenericArgumentsInlines.h:
     114        (JSC::GenericArguments<Type>::getOwnPropertySlot):
     115        (JSC::GenericArguments<Type>::getOwnPropertySlotByIndex):
     116        * runtime/InternalFunction.cpp:
     117        (JSC::InternalFunction::finishCreation):
     118        * runtime/IntlCollatorConstructor.cpp:
     119        (JSC::IntlCollatorConstructor::finishCreation):
     120        * runtime/IntlDateTimeFormatConstructor.cpp:
     121        (JSC::IntlDateTimeFormatConstructor::finishCreation):
     122        * runtime/IntlDateTimeFormatPrototype.cpp:
     123        (JSC::IntlDateTimeFormatPrototype::finishCreation):
     124        * runtime/IntlNumberFormatConstructor.cpp:
     125        (JSC::IntlNumberFormatConstructor::finishCreation):
     126        * runtime/IntlObject.cpp:
     127        (JSC::IntlObject::finishCreation):
     128        * runtime/IteratorPrototype.cpp:
     129        (JSC::IteratorPrototype::finishCreation):
     130        * runtime/JSArray.cpp:
     131        (JSC::JSArray::getOwnPropertySlot):
     132        (JSC::JSArray::setLengthWithArrayStorage):
     133        * runtime/JSArrayBufferConstructor.cpp:
     134        (JSC::JSArrayBufferConstructor::finishCreation):
     135        * runtime/JSArrayBufferPrototype.cpp:
     136        (JSC::JSArrayBufferPrototype::finishCreation):
     137        * runtime/JSBoundFunction.cpp:
     138        (JSC::JSBoundFunction::finishCreation):
     139        * runtime/JSCJSValue.cpp:
     140        (JSC::JSValue::putToPrimitive):
     141        * runtime/JSDataView.cpp:
     142        (JSC::JSDataView::getOwnPropertySlot):
     143        * runtime/JSDataViewPrototype.cpp:
     144        (JSC::JSDataViewPrototype::finishCreation):
     145        * runtime/JSFunction.cpp:
     146        (JSC::JSFunction::finishCreation):
     147        (JSC::JSFunction::getOwnPropertySlot):
     148        (JSC::JSFunction::defineOwnProperty):
     149        (JSC::JSFunction::reifyLength):
     150        (JSC::JSFunction::reifyName):
     151        (JSC::JSFunction::reifyLazyBoundNameIfNeeded):
     152        * runtime/JSGenericTypedArrayViewConstructorInlines.h:
     153        (JSC::JSGenericTypedArrayViewConstructor<ViewClass>::finishCreation):
     154        * runtime/JSGenericTypedArrayViewInlines.h:
     155        (JSC::JSGenericTypedArrayView<Adaptor>::getOwnPropertySlot):
     156        (JSC::JSGenericTypedArrayView<Adaptor>::getOwnPropertySlotByIndex):
     157        * runtime/JSGenericTypedArrayViewPrototypeInlines.h:
     158        (JSC::JSGenericTypedArrayViewPrototype<ViewClass>::finishCreation):
     159        * runtime/JSGlobalObject.cpp:
     160        (JSC::JSGlobalObject::init):
     161        (JSC::JSGlobalObject::addStaticGlobals):
     162        * runtime/JSLexicalEnvironment.cpp:
     163        (JSC::JSLexicalEnvironment::getOwnNonIndexPropertyNames):
     164        * runtime/JSModuleNamespaceObject.cpp:
     165        (JSC::JSModuleNamespaceObject::finishCreation):
     166        (JSC::JSModuleNamespaceObject::getOwnPropertySlotCommon):
     167        * runtime/JSONObject.cpp:
     168        (JSC::JSONObject::finishCreation):
     169        * runtime/JSObject.cpp:
     170        (JSC::getClassPropertyNames):
     171        (JSC::JSObject::getOwnPropertySlotByIndex):
     172        (JSC::ordinarySetSlow):
     173        (JSC::JSObject::putInlineSlow):
     174        (JSC::JSObject::putGetter):
     175        (JSC::JSObject::putSetter):
     176        (JSC::JSObject::putDirectAccessor):
     177        (JSC::JSObject::putDirectCustomAccessor):
     178        (JSC::JSObject::putDirectNonIndexAccessor):
     179        (JSC::JSObject::deleteProperty):
     180        (JSC::JSObject::deletePropertyByIndex):
     181        (JSC::JSObject::getOwnPropertyNames):
     182        (JSC::JSObject::putIndexedDescriptor):
     183        (JSC::JSObject::defineOwnIndexedProperty):
     184        (JSC::JSObject::attemptToInterceptPutByIndexOnHoleForPrototype):
     185        (JSC::JSObject::putDirectIndexSlowOrBeyondVectorLength):
     186        (JSC::JSObject::getOwnPropertyDescriptor):
     187        (JSC::putDescriptor):
     188        (JSC::validateAndApplyPropertyDescriptor):
     189        * runtime/JSObject.h:
     190        (JSC::JSObject::putDirect):
     191        * runtime/JSObjectInlines.h:
     192        (JSC::JSObject::putDirectWithoutTransition):
     193        (JSC::JSObject::putDirectInternal):
     194        * runtime/JSPromiseConstructor.cpp:
     195        (JSC::JSPromiseConstructor::finishCreation):
     196        (JSC::JSPromiseConstructor::addOwnInternalSlots):
     197        * runtime/JSPromisePrototype.cpp:
     198        (JSC::JSPromisePrototype::finishCreation):
     199        (JSC::JSPromisePrototype::addOwnInternalSlots):
     200        * runtime/JSString.cpp:
     201        (JSC::JSString::getStringPropertyDescriptor):
     202        * runtime/JSString.h:
     203        (JSC::JSString::getStringPropertySlot):
     204        * runtime/JSSymbolTableObject.cpp:
     205        (JSC::JSSymbolTableObject::getOwnNonIndexPropertyNames):
     206        * runtime/JSSymbolTableObject.h:
     207        (JSC::symbolTableGet):
     208        * runtime/JSTypedArrayViewConstructor.cpp:
     209        (JSC::JSTypedArrayViewConstructor::finishCreation):
     210        * runtime/JSTypedArrayViewPrototype.cpp:
     211        (JSC::JSTypedArrayViewPrototype::finishCreation):
     212        * runtime/LazyClassStructure.cpp:
     213        (JSC::LazyClassStructure::Initializer::setConstructor):
     214        * runtime/Lookup.cpp:
     215        (JSC::reifyStaticAccessor):
     216        (JSC::setUpStaticFunctionSlot):
     217        * runtime/Lookup.h:
     218        (JSC::HashTableValue::intrinsic const):
     219        (JSC::HashTableValue::builtinGenerator const):
     220        (JSC::HashTableValue::function const):
     221        (JSC::HashTableValue::functionLength const):
     222        (JSC::HashTableValue::propertyGetter const):
     223        (JSC::HashTableValue::propertyPutter const):
     224        (JSC::HashTableValue::domJIT const):
     225        (JSC::HashTableValue::signature const):
     226        (JSC::HashTableValue::accessorGetter const):
     227        (JSC::HashTableValue::accessorSetter const):
     228        (JSC::HashTableValue::constantInteger const):
     229        (JSC::HashTableValue::lazyCellPropertyOffset const):
     230        (JSC::HashTableValue::lazyClassStructureOffset const):
     231        (JSC::HashTableValue::lazyPropertyCallback const):
     232        (JSC::HashTableValue::builtinAccessorGetterGenerator const):
     233        (JSC::HashTableValue::builtinAccessorSetterGenerator const):
     234        (JSC::getStaticPropertySlotFromTable):
     235        (JSC::putEntry):
     236        (JSC::reifyStaticProperty):
     237        * runtime/MapConstructor.cpp:
     238        (JSC::MapConstructor::finishCreation):
     239        * runtime/MapIteratorPrototype.cpp:
     240        (JSC::MapIteratorPrototype::finishCreation):
     241        * runtime/MapPrototype.cpp:
     242        (JSC::MapPrototype::finishCreation):
     243        * runtime/MathObject.cpp:
     244        (JSC::MathObject::finishCreation):
     245        * runtime/NativeErrorConstructor.cpp:
     246        (JSC::NativeErrorConstructor::finishCreation):
     247        * runtime/NativeErrorPrototype.cpp:
     248        (JSC::NativeErrorPrototype::finishCreation):
     249        * runtime/NumberConstructor.cpp:
     250        (JSC::NumberConstructor::finishCreation):
     251        * runtime/NumberPrototype.cpp:
     252        (JSC::NumberPrototype::finishCreation):
     253        * runtime/ObjectConstructor.cpp:
     254        (JSC::ObjectConstructor::finishCreation):
     255        (JSC::objectConstructorAssign):
     256        (JSC::objectConstructorValues):
     257        (JSC::objectConstructorDefineProperty):
     258        * runtime/ObjectPrototype.cpp:
     259        (JSC::ObjectPrototype::finishCreation):
     260        (JSC::objectProtoFuncLookupGetter):
     261        (JSC::objectProtoFuncLookupSetter):
     262        * runtime/ProgramExecutable.cpp:
     263        (JSC::ProgramExecutable::initializeGlobalProperties):
     264        * runtime/PropertyDescriptor.cpp:
     265        (JSC::PropertyDescriptor::writable const):
     266        (JSC::PropertyDescriptor::enumerable const):
     267        (JSC::PropertyDescriptor::configurable const):
     268        (JSC::PropertyDescriptor::setUndefined):
     269        (JSC::PropertyDescriptor::setDescriptor):
     270        (JSC::PropertyDescriptor::setCustomDescriptor):
     271        (JSC::PropertyDescriptor::setAccessorDescriptor):
     272        (JSC::PropertyDescriptor::setWritable):
     273        (JSC::PropertyDescriptor::setEnumerable):
     274        (JSC::PropertyDescriptor::setConfigurable):
     275        (JSC::PropertyDescriptor::setSetter):
     276        (JSC::PropertyDescriptor::setGetter):
     277        (JSC::PropertyDescriptor::attributesEqual const):
     278        (JSC::PropertyDescriptor::attributesOverridingCurrent const):
     279        * runtime/PropertySlot.cpp:
     280        (JSC::PropertySlot::customGetter const):
     281        * runtime/PropertySlot.h:
     282        (JSC::operator| ):
     283        (JSC::operator&):
     284        (JSC::operator<):
     285        (JSC::operator~):
     286        (JSC::operator|=):
     287        (JSC::PropertySlot::setUndefined):
     288        * runtime/ProxyConstructor.cpp:
     289        (JSC::makeRevocableProxy):
     290        (JSC::ProxyConstructor::finishCreation):
     291        * runtime/ProxyObject.cpp:
     292        (JSC::ProxyObject::performHasProperty):
     293        * runtime/ProxyRevoke.cpp:
     294        (JSC::ProxyRevoke::finishCreation):
     295        * runtime/ReflectObject.cpp:
     296        (JSC::ReflectObject::finishCreation):
     297        (JSC::reflectObjectDefineProperty):
     298        * runtime/RegExpConstructor.cpp:
     299        (JSC::RegExpConstructor::finishCreation):
     300        * runtime/RegExpObject.cpp:
     301        (JSC::RegExpObject::getOwnPropertySlot):
     302        * runtime/RegExpPrototype.cpp:
     303        (JSC::RegExpPrototype::finishCreation):
     304        * runtime/ScopedArguments.cpp:
     305        (JSC::ScopedArguments::overrideThings):
     306        * runtime/SetConstructor.cpp:
     307        (JSC::SetConstructor::finishCreation):
     308        * runtime/SetIteratorPrototype.cpp:
     309        (JSC::SetIteratorPrototype::finishCreation):
     310        * runtime/SetPrototype.cpp:
     311        (JSC::SetPrototype::finishCreation):
     312        * runtime/SparseArrayValueMap.cpp:
     313        (JSC::SparseArrayValueMap::putDirect):
     314        (JSC::SparseArrayEntry::put):
     315        * runtime/StringConstructor.cpp:
     316        (JSC::StringConstructor::finishCreation):
     317        * runtime/StringIteratorPrototype.cpp:
     318        (JSC::StringIteratorPrototype::finishCreation):
     319        * runtime/StringPrototype.cpp:
     320        (JSC::StringPrototype::finishCreation):
     321        * runtime/Structure.cpp:
     322        (JSC::Structure::nonPropertyTransition):
     323        (JSC::Structure::isSealed):
     324        (JSC::Structure::isFrozen):
     325        (JSC::Structure::getPropertyNamesFromStructure):
     326        (JSC::Structure::prototypeChainMayInterceptStoreTo):
     327        * runtime/StructureInlines.h:
     328        (JSC::Structure::add):
     329        * runtime/SymbolConstructor.cpp:
     330        (JSC::SymbolConstructor::finishCreation):
     331        * runtime/SymbolPrototype.cpp:
     332        (JSC::SymbolPrototype::finishCreation):
     333        * runtime/SymbolTable.h:
     334        (JSC::SymbolTableEntry::Fast::getAttributes const):
     335        (JSC::SymbolTableEntry::SymbolTableEntry):
     336        (JSC::SymbolTableEntry::setAttributes):
     337        * runtime/TemplateRegistry.cpp:
     338        (JSC::TemplateRegistry::getTemplateObject):
     339        * runtime/WeakMapConstructor.cpp:
     340        (JSC::WeakMapConstructor::finishCreation):
     341        * runtime/WeakMapPrototype.cpp:
     342        (JSC::WeakMapPrototype::finishCreation):
     343        * runtime/WeakSetConstructor.cpp:
     344        (JSC::WeakSetConstructor::finishCreation):
     345        * runtime/WeakSetPrototype.cpp:
     346        (JSC::WeakSetPrototype::finishCreation):
     347        * tools/JSDollarVMPrototype.cpp:
     348        (JSC::JSDollarVMPrototype::finishCreation):
     349        * wasm/js/WebAssemblyCompileErrorConstructor.cpp:
     350        (JSC::WebAssemblyCompileErrorConstructor::finishCreation):
     351        * wasm/js/WebAssemblyInstanceConstructor.cpp:
     352        (JSC::WebAssemblyInstanceConstructor::finishCreation):
     353        * wasm/js/WebAssemblyLinkErrorConstructor.cpp:
     354        (JSC::WebAssemblyLinkErrorConstructor::finishCreation):
     355        * wasm/js/WebAssemblyMemoryConstructor.cpp:
     356        (JSC::WebAssemblyMemoryConstructor::finishCreation):
     357        * wasm/js/WebAssemblyMemoryPrototype.cpp:
     358        * wasm/js/WebAssemblyModuleConstructor.cpp:
     359        (JSC::WebAssemblyModuleConstructor::finishCreation):
     360        * wasm/js/WebAssemblyRuntimeErrorConstructor.cpp:
     361        (JSC::WebAssemblyRuntimeErrorConstructor::finishCreation):
     362        * wasm/js/WebAssemblyTableConstructor.cpp:
     363        (JSC::WebAssemblyTableConstructor::finishCreation):
     364
    13652017-09-23  Oleksandr Skachkov  <[email protected]>
    2366
  • trunk/Source/JavaScriptCore/Scripts/builtins/builtins_generate_internals_wrapper_implementation.py

    r213680 r222473  
    115115        lines.append("#define DECLARE_GLOBAL_STATIC(name) \\")
    116116        lines.append("    JSDOMGlobalObject::GlobalPropertyInfo( \\")
    117         lines.append("        clientData.builtinFunctions().%sBuiltins().name##PrivateName(), %s().m_##name##Function.get() , JSC::DontDelete | JSC::ReadOnly)," % (self.accessor_name(object), self.accessor_name(object)))
     117        lines.append("        clientData.builtinFunctions().%sBuiltins().name##PrivateName(), %s().m_##name##Function.get() , JSC::PropertyAttribute::DontDelete | JSC::PropertyAttribute::ReadOnly)," % (self.accessor_name(object), self.accessor_name(object)))
    118118        lines.append("    WEBCORE_FOREACH_%s_BUILTIN_FUNCTION_NAME(DECLARE_GLOBAL_STATIC)" % object.object_name.upper())
    119119        lines.append("#undef DECLARE_GLOBAL_STATIC")
  • trunk/Source/JavaScriptCore/bytecode/GetByIdStatus.cpp

    r219981 r222473  
    105105    if (!isValidOffset(offset))
    106106        return GetByIdStatus(NoInformation, false);
    107     if (attributes & CustomAccessor)
     107    if (attributes & PropertyAttribute::CustomAccessor)
    108108        return GetByIdStatus(NoInformation, false);
    109109   
     
    196196        if (!isValidOffset(variant.m_offset))
    197197            return GetByIdStatus(slowPathState, true);
    198         if (attributes & CustomAccessor)
     198        if (attributes & PropertyAttribute::CustomAccessor)
    199199            return GetByIdStatus(slowPathState, true);
    200200       
     
    382382        if (!isValidOffset(offset))
    383383            return GetByIdStatus(TakesSlowPath); // It's probably a prototype lookup. Give up on life for now, even though we could totally be way smarter about it.
    384         if (attributes & Accessor)
     384        if (attributes & PropertyAttribute::Accessor)
    385385            return GetByIdStatus(MakesCalls); // We could be smarter here, like strength-reducing this to a Call.
    386         if (attributes & CustomAccessor)
     386        if (attributes & PropertyAttribute::CustomAccessor)
    387387            return GetByIdStatus(TakesSlowPath);
    388388       
  • trunk/Source/JavaScriptCore/bytecode/PropertyCondition.cpp

    r221954 r222473  
    137137        PropertyOffset currentOffset = structure->getConcurrently(uid(), currentAttributes);
    138138        if (currentOffset != invalidOffset) {
    139             if (currentAttributes & (ReadOnly | Accessor | CustomAccessor)) {
     139            if (currentAttributes & (PropertyAttribute::ReadOnly | PropertyAttribute::Accessor | PropertyAttribute::CustomAccessor)) {
    140140                if (PropertyConditionInternal::verbose) {
    141141                    dataLog(
     
    320320bool PropertyCondition::isValidValueForAttributes(VM& vm, JSValue value, unsigned attributes)
    321321{
    322     bool attributesClaimAccessor = !!(attributes & Accessor);
     322    bool attributesClaimAccessor = !!(attributes & PropertyAttribute::Accessor);
    323323    bool valueClaimsAccessor = !!jsDynamicCast<GetterSetter*>(vm, value);
    324324    return attributesClaimAccessor == valueClaimsAccessor;
  • trunk/Source/JavaScriptCore/bytecode/PutByIdStatus.cpp

    r221822 r222473  
    319319        PropertyOffset offset = structure->getConcurrently(uid, attributes);
    320320        if (isValidOffset(offset)) {
    321             if (attributes & CustomAccessor)
     321            if (attributes & PropertyAttribute::CustomAccessor)
    322322                return PutByIdStatus(MakesCalls);
    323323
    324             if (attributes & (Accessor | ReadOnly))
     324            if (attributes & (PropertyAttribute::Accessor | PropertyAttribute::ReadOnly))
    325325                return PutByIdStatus(TakesSlowPath);
    326326           
  • trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp

    r222425 r222473  
    20372037            }
    20382038
    2039             SymbolTableEntry newEntry(varOffset, entry.value.isConst() ? ReadOnly : None);
     2039            SymbolTableEntry newEntry(varOffset, static_cast<unsigned>(entry.value.isConst() ? PropertyAttribute::ReadOnly : PropertyAttribute::None));
    20402040            symbolTable->add(NoLockingNecessary, entry.key.get(), newEntry);
    20412041        }
     
    23932393Variable BytecodeGenerator::variable(const Identifier& property, ThisResolutionType thisResolutionType)
    23942394{
    2395     if (property == propertyNames().thisIdentifier && thisResolutionType == ThisResolutionType::Local) {
    2396         return Variable(property, VarOffset(thisRegister()->virtualRegister()), thisRegister(),
    2397             ReadOnly, Variable::SpecialVariable, 0, false);
    2398     }
     2395    if (property == propertyNames().thisIdentifier && thisResolutionType == ThisResolutionType::Local)
     2396        return Variable(property, VarOffset(thisRegister()->virtualRegister()), thisRegister(), static_cast<unsigned>(PropertyAttribute::ReadOnly), Variable::SpecialVariable, 0, false);
    23992397   
    24002398    // We can optimize lookups if the lexical variable is found before a "with" or "catch"
  • trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h

    r222425 r222473  
    320320        RegisterID* local() const { return m_local; }
    321321
    322         bool isReadOnly() const { return m_attributes & ReadOnly; }
     322        bool isReadOnly() const { return m_attributes & PropertyAttribute::ReadOnly; }
    323323        bool isSpecial() const { return m_kind != NormalVariable; }
    324324        bool isConst() const { return isReadOnly() && m_isLexicallyScoped; }
    325         void setIsReadOnly() { m_attributes |= ReadOnly; }
     325        void setIsReadOnly() { m_attributes |= PropertyAttribute::ReadOnly; }
    326326
    327327        void dump(PrintStream&) const;
  • trunk/Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp

    r222425 r222473  
    548548                emitPutHomeObject(generator, value.get(), dst);
    549549
    550             unsigned attributes = node->isClassProperty() ? (Accessor | DontEnum) : Accessor;
     550            unsigned attributes = node->isClassProperty() ? (PropertyAttribute::Accessor | PropertyAttribute::DontEnum) : static_cast<unsigned>(PropertyAttribute::Accessor);
    551551
    552552            ASSERT(node->m_type & (PropertyNode::Getter | PropertyNode::Setter));
  • trunk/Source/JavaScriptCore/create_hash_table

    r219981 r222473  
    8585
    8686        push(@keys, $key);
    87         push(@attrs, length($att) > 0 ? $att : "0");
     87        push(@attrs, length($att) > 0 ? $att : "None");
    8888
    8989        if ($val eq "JSBuiltin") {
     
    9292
    9393        if ($att =~ m/Function/) {
    94             push(@values, { "type" => "Function", "function" => $val, "params" => (length($param) ? $param : ""), "intrinsic" => (length($intrinsic) ? $intrinsic : "NoIntrinsic") });
     94            push(@values, { "type" => "PropertyAttribute::Function", "function" => $val, "params" => (length($param) ? $param : ""), "intrinsic" => (length($intrinsic) ? $intrinsic : "NoIntrinsic") });
    9595            #printf STDERR "WARNING: Number of arguments missing for $key/$val\n" if (length($param) == 0);
    9696        } elsif ($att =~ m/Accessor/) {
     
    9898            my $put = "nullptr";
    9999            $hasSetter = "true";
    100             push(@values, { "type" => "Accessor", "get" => $get, "put" => $put });
     100            push(@values, { "type" => "PropertyAttribute::Accessor", "get" => $get, "put" => $put });
    101101        } elsif ($att =~ m/CellProperty/) {
    102102            my $property = $val;
    103             push(@values, { "type" => "CellProperty", "property" => $property });
     103            push(@values, { "type" => "PropertyAttribute::CellProperty", "property" => $property });
    104104        } elsif ($att =~ m/ClassStructure/) {
    105105            my $property = $val;
    106             push(@values, { "type" => "ClassStructure", "property" => $property });
     106            push(@values, { "type" => "PropertyAttribute::ClassStructure", "property" => $property });
    107107        } elsif ($att =~ m/PropertyCallback/) {
    108108            my $cback = $val;
    109             push(@values, { "type" => "PropertyCallback", "cback" => $cback });
     109            push(@values, { "type" => "PropertyAttribute::PropertyCallback", "cback" => $cback });
    110110        } elsif (length($att)) {
    111111            my $get = $val;
     
    115115            }
    116116            $hasSetter = "true";
    117             push(@values, { "type" => "Property", "get" => $get, "put" => $put });
     117            push(@values, { "type" => "PropertyAttribute::Property", "get" => $get, "put" => $put });
    118118        } else {
    119             push(@values, { "type" => "Lexer", "value" => $val });       
     119            push(@values, { "type" => "Lexer", "value" => $val });
    120120        }
    121121        push(@hashes, hashValue($key));
     
    305305        my $intrinsic = "NoIntrinsic";
    306306
    307         if ($values[$i]{"type"} eq "Function") {
     307        if ($values[$i]{"type"} eq "PropertyAttribute::Function") {
    308308            $firstCastStr = "static_cast<NativeFunction>";
    309309            $firstValue = $values[$i]{"function"};
    310310            $secondValue = $values[$i]{"params"};
    311311            $intrinsic = $values[$i]{"intrinsic"};
    312         } elsif ($values[$i]{"type"} eq "Accessor") {
     312        } elsif ($values[$i]{"type"} eq "PropertyAttribute::Accessor") {
    313313            $firstCastStr = "static_cast<NativeFunction>";
    314314            $secondCastStr = "static_cast<NativeFunction>";
    315315            $firstValue = $values[$i]{"get"};
    316316            $secondValue = $values[$i]{"put"};
    317         } elsif ($values[$i]{"type"} eq "Property") {
     317        } elsif ($values[$i]{"type"} eq "PropertyAttribute::Property") {
    318318            $firstCastStr = "static_cast<PropertySlot::GetValueFunc>";
    319319            $secondCastStr = "static_cast<PutPropertySlot::PutValueFunc>";
     
    323323            $firstValue = $values[$i]{"value"};
    324324            $secondValue = "0";
    325         } elsif ($values[$i]{"type"} eq "CellProperty" || $values[$i]{"type"} eq "ClassStructure") {
     325        } elsif ($values[$i]{"type"} eq "PropertyAttribute::CellProperty" || $values[$i]{"type"} eq "PropertyAttribute::ClassStructure") {
    326326            $values[$i]{"property"} =~ /\A([a-zA-Z0-9_]+)::(.*)\Z/ or die;
    327327            $firstValue = "OBJECT_OFFSETOF($1, $2)";
    328328            $secondValue = "0";
    329         } elsif ($values[$i]{"type"} eq "PropertyCallback") {
     329        } elsif ($values[$i]{"type"} eq "PropertyAttribute::PropertyCallback") {
    330330            $firstCastStr = "static_cast<LazyPropertyCallback>";
    331331            $firstValue = $values[$i]{"cback"};
     
    333333        }
    334334
    335         if ($values[$i]{"type"} eq "Function" && $firstValue eq "JSBuiltin")  {
     335        my $attributes = "PropertyAttribute::" . $attrs[$i];
     336        $attributes =~ s/\|/\|PropertyAttribute::/g;
     337        $attributes = "static_cast<unsigned>(" . $attributes . ")";
     338        if ($values[$i]{"type"} eq "PropertyAttribute::Function" && $firstValue eq "JSBuiltin")  {
    336339            my $tableHead = $name;
    337340            $tableHead =~ s/Table$//;
    338             print "   { \"$key\", (($attrs[$i]) & ~Function) | Builtin, $intrinsic, { (intptr_t)static_cast<BuiltinGenerator>(" . $tableHead . ucfirst($key) . "CodeGenerator), (intptr_t)$secondValue } },\n";
     341            print "   { \"$key\", (($attributes) & ~PropertyAttribute::Function) | PropertyAttribute::Builtin, $intrinsic, { (intptr_t)static_cast<BuiltinGenerator>(" . $tableHead . ucfirst($key) . "CodeGenerator), (intptr_t)$secondValue } },\n";
    339342        }
    340343        else {
    341             print "   { \"$key\", $attrs[$i], $intrinsic, { (intptr_t)" . $firstCastStr . "($firstValue), (intptr_t)" . $secondCastStr . "($secondValue) } },\n";
     344            print "   { \"$key\", $attributes, $intrinsic, { (intptr_t)" . $firstCastStr . "($firstValue), (intptr_t)" . $secondCastStr . "($secondValue) } },\n";
    342345        }
    343346        $i++;
  • trunk/Source/JavaScriptCore/debugger/DebuggerScope.cpp

    r217108 r222473  
    101101        // This is not ideal and we should fix it.
    102102        // https://bugs.webkit.org/show_bug.cgi?id=144977
    103         slot.setValue(slot.slotBase(), DontEnum, jsUndefined());
     103        slot.setValue(slot.slotBase(), static_cast<unsigned>(PropertyAttribute::DontEnum), jsUndefined());
    104104        return true;
    105105    }
  • trunk/Source/JavaScriptCore/dfg/DFGOperations.cpp

    r222384 r222473  
    11881188{
    11891189    PropertyDescriptor descriptor = toPropertyDescriptor(value, jsUndefined(), jsUndefined(), DefinePropertyAttributes(attributes));
    1190     ASSERT((descriptor.attributes() & Accessor) || (!descriptor.isAccessorDescriptor()));
     1190    ASSERT((descriptor.attributes() & PropertyAttribute::Accessor) || (!descriptor.isAccessorDescriptor()));
    11911191    if (base->methodTable(vm)->defineOwnProperty == JSObject::defineOwnProperty)
    11921192        JSObject::defineOwnProperty(base, exec, propertyName, descriptor, true);
     
    12361236{
    12371237    PropertyDescriptor descriptor = toPropertyDescriptor(jsUndefined(), getter, setter, DefinePropertyAttributes(attributes));
    1238     ASSERT((descriptor.attributes() & Accessor) || (!descriptor.isAccessorDescriptor()));
     1238    ASSERT((descriptor.attributes() & PropertyAttribute::Accessor) || (!descriptor.isAccessorDescriptor()));
    12391239    if (base->methodTable(vm)->defineOwnProperty == JSObject::defineOwnProperty)
    12401240        JSObject::defineOwnProperty(base, exec, propertyName, descriptor, true);
  • trunk/Source/JavaScriptCore/inspector/JSInjectedScriptHostPrototype.cpp

    r217108 r222473  
    6262    vm.prototypeMap.addPrototype(this);
    6363
    64     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("subtype", jsInjectedScriptHostPrototypeFunctionSubtype, DontEnum, 1);
    65     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("functionDetails", jsInjectedScriptHostPrototypeFunctionFunctionDetails, DontEnum, 1);
    66     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("getInternalProperties", jsInjectedScriptHostPrototypeFunctionGetInternalProperties, DontEnum, 1);
    67     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("internalConstructorName", jsInjectedScriptHostPrototypeFunctionInternalConstructorName, DontEnum, 1);
    68     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("isHTMLAllCollection", jsInjectedScriptHostPrototypeFunctionIsHTMLAllCollection, DontEnum, 1);
    69     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("proxyTargetValue", jsInjectedScriptHostPrototypeFunctionProxyTargetValue, DontEnum, 1);
    70     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("weakMapSize", jsInjectedScriptHostPrototypeFunctionWeakMapSize, DontEnum, 1);
    71     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("weakMapEntries", jsInjectedScriptHostPrototypeFunctionWeakMapEntries, DontEnum, 1);
    72     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("weakSetSize", jsInjectedScriptHostPrototypeFunctionWeakSetSize, DontEnum, 1);
    73     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("weakSetEntries", jsInjectedScriptHostPrototypeFunctionWeakSetEntries, DontEnum, 1);
    74     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("iteratorEntries", jsInjectedScriptHostPrototypeFunctionIteratorEntries, DontEnum, 1);
    75     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("evaluateWithScopeExtension", jsInjectedScriptHostPrototypeFunctionEvaluateWithScopeExtension, DontEnum, 1);
    76 
    77     JSC_NATIVE_GETTER("evaluate", jsInjectedScriptHostPrototypeAttributeEvaluate, DontEnum | Accessor);
     64    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("subtype", jsInjectedScriptHostPrototypeFunctionSubtype, static_cast<unsigned>(PropertyAttribute::DontEnum), 1);
     65    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("functionDetails", jsInjectedScriptHostPrototypeFunctionFunctionDetails, static_cast<unsigned>(PropertyAttribute::DontEnum), 1);
     66    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("getInternalProperties", jsInjectedScriptHostPrototypeFunctionGetInternalProperties, static_cast<unsigned>(PropertyAttribute::DontEnum), 1);
     67    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("internalConstructorName", jsInjectedScriptHostPrototypeFunctionInternalConstructorName, static_cast<unsigned>(PropertyAttribute::DontEnum), 1);
     68    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("isHTMLAllCollection", jsInjectedScriptHostPrototypeFunctionIsHTMLAllCollection, static_cast<unsigned>(PropertyAttribute::DontEnum), 1);
     69    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("proxyTargetValue", jsInjectedScriptHostPrototypeFunctionProxyTargetValue, static_cast<unsigned>(PropertyAttribute::DontEnum), 1);
     70    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("weakMapSize", jsInjectedScriptHostPrototypeFunctionWeakMapSize, static_cast<unsigned>(PropertyAttribute::DontEnum), 1);
     71    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("weakMapEntries", jsInjectedScriptHostPrototypeFunctionWeakMapEntries, static_cast<unsigned>(PropertyAttribute::DontEnum), 1);
     72    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("weakSetSize", jsInjectedScriptHostPrototypeFunctionWeakSetSize, static_cast<unsigned>(PropertyAttribute::DontEnum), 1);
     73    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("weakSetEntries", jsInjectedScriptHostPrototypeFunctionWeakSetEntries, static_cast<unsigned>(PropertyAttribute::DontEnum), 1);
     74    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("iteratorEntries", jsInjectedScriptHostPrototypeFunctionIteratorEntries, static_cast<unsigned>(PropertyAttribute::DontEnum), 1);
     75    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("evaluateWithScopeExtension", jsInjectedScriptHostPrototypeFunctionEvaluateWithScopeExtension, static_cast<unsigned>(PropertyAttribute::DontEnum), 1);
     76
     77    JSC_NATIVE_GETTER("evaluate", jsInjectedScriptHostPrototypeAttributeEvaluate, PropertyAttribute::DontEnum | PropertyAttribute::Accessor);
    7878}
    7979
  • trunk/Source/JavaScriptCore/inspector/JSJavaScriptCallFramePrototype.cpp

    r217108 r222473  
    6060    vm.prototypeMap.addPrototype(this);
    6161
    62     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("evaluateWithScopeExtension", jsJavaScriptCallFramePrototypeFunctionEvaluateWithScopeExtension, DontEnum, 1);
    63     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("scopeDescriptions", jsJavaScriptCallFramePrototypeFunctionScopeDescriptions, DontEnum, 0);
    64 
    65     JSC_NATIVE_GETTER("caller", jsJavaScriptCallFrameAttributeCaller, DontEnum | Accessor);
    66     JSC_NATIVE_GETTER("sourceID", jsJavaScriptCallFrameAttributeSourceID, DontEnum | Accessor);
    67     JSC_NATIVE_GETTER("line", jsJavaScriptCallFrameAttributeLine, DontEnum | Accessor);
    68     JSC_NATIVE_GETTER("column", jsJavaScriptCallFrameAttributeColumn, DontEnum | Accessor);
    69     JSC_NATIVE_GETTER("functionName", jsJavaScriptCallFrameAttributeFunctionName, DontEnum | Accessor);
    70     JSC_NATIVE_GETTER("scopeChain", jsJavaScriptCallFrameAttributeScopeChain, DontEnum | Accessor);
    71     JSC_NATIVE_GETTER("thisObject", jsJavaScriptCallFrameAttributeThisObject, DontEnum | Accessor);
    72     JSC_NATIVE_GETTER("type", jsJavaScriptCallFrameAttributeType, DontEnum | Accessor);
    73     JSC_NATIVE_GETTER("isTailDeleted", jsJavaScriptCallFrameIsTailDeleted, DontEnum | Accessor);
     62    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("evaluateWithScopeExtension", jsJavaScriptCallFramePrototypeFunctionEvaluateWithScopeExtension, static_cast<unsigned>(PropertyAttribute::DontEnum), 1);
     63    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("scopeDescriptions", jsJavaScriptCallFramePrototypeFunctionScopeDescriptions, static_cast<unsigned>(PropertyAttribute::DontEnum), 0);
     64
     65    JSC_NATIVE_GETTER("caller", jsJavaScriptCallFrameAttributeCaller, PropertyAttribute::DontEnum | PropertyAttribute::Accessor);
     66    JSC_NATIVE_GETTER("sourceID", jsJavaScriptCallFrameAttributeSourceID, PropertyAttribute::DontEnum | PropertyAttribute::Accessor);
     67    JSC_NATIVE_GETTER("line", jsJavaScriptCallFrameAttributeLine, PropertyAttribute::DontEnum | PropertyAttribute::Accessor);
     68    JSC_NATIVE_GETTER("column", jsJavaScriptCallFrameAttributeColumn, PropertyAttribute::DontEnum | PropertyAttribute::Accessor);
     69    JSC_NATIVE_GETTER("functionName", jsJavaScriptCallFrameAttributeFunctionName, PropertyAttribute::DontEnum | PropertyAttribute::Accessor);
     70    JSC_NATIVE_GETTER("scopeChain", jsJavaScriptCallFrameAttributeScopeChain, PropertyAttribute::DontEnum | PropertyAttribute::Accessor);
     71    JSC_NATIVE_GETTER("thisObject", jsJavaScriptCallFrameAttributeThisObject, PropertyAttribute::DontEnum | PropertyAttribute::Accessor);
     72    JSC_NATIVE_GETTER("type", jsJavaScriptCallFrameAttributeType, PropertyAttribute::DontEnum | PropertyAttribute::Accessor);
     73    JSC_NATIVE_GETTER("isTailDeleted", jsJavaScriptCallFrameIsTailDeleted, PropertyAttribute::DontEnum | PropertyAttribute::Accessor);
    7474}
    7575
  • trunk/Source/JavaScriptCore/jit/Repatch.cpp

    r220322 r222473  
    305305                if (slot.isCacheableGetter())
    306306                    type = AccessCase::Getter;
    307                 else if (slot.attributes() & CustomAccessor)
     307                else if (slot.attributes() & PropertyAttribute::CustomAccessor)
    308308                    type = AccessCase::CustomAccessorGetter;
    309309                else
  • trunk/Source/JavaScriptCore/jsc.cpp

    r222424 r222473  
    381381        CustomGetter* thisObject = jsCast<CustomGetter*>(object);
    382382        if (propertyName == PropertyName(Identifier::fromString(exec, "customGetter"))) {
    383             slot.setCacheableCustom(thisObject, DontDelete | ReadOnly | DontEnum, thisObject->customGetter);
     383            slot.setCacheableCustom(thisObject, PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum, thisObject->customGetter);
    384384            return true;
    385385        }
    386386       
    387387        if (propertyName == PropertyName(Identifier::fromString(exec, "customGetterAccessor"))) {
    388             slot.setCacheableCustom(thisObject, DontDelete | ReadOnly | DontEnum | CustomAccessor, thisObject->customGetterAcessor);
     388            slot.setCacheableCustom(thisObject, PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum | PropertyAttribute::CustomAccessor, thisObject->customGetterAcessor);
    389389            return true;
    390390        }
     
    455455        RuntimeArray* thisObject = jsCast<RuntimeArray*>(object);
    456456        if (propertyName == vm.propertyNames->length) {
    457             slot.setCacheableCustom(thisObject, DontDelete | ReadOnly | DontEnum, thisObject->lengthGetter);
     457            slot.setCacheableCustom(thisObject, PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum, thisObject->lengthGetter);
    458458            return true;
    459459        }
     
    461461        std::optional<uint32_t> index = parseIndex(propertyName);
    462462        if (index && index.value() < thisObject->getLength()) {
    463             slot.setValue(thisObject, DontDelete | DontEnum, jsNumber(thisObject->m_vector[index.value()]));
     463            slot.setValue(thisObject, PropertyAttribute::DontDelete | PropertyAttribute::DontEnum, jsNumber(thisObject->m_vector[index.value()]));
    464464            return true;
    465465        }
     
    472472        RuntimeArray* thisObject = jsCast<RuntimeArray*>(object);
    473473        if (index < thisObject->getLength()) {
    474             slot.setValue(thisObject, DontDelete | DontEnum, jsNumber(thisObject->m_vector[index]));
     474            slot.setValue(thisObject, PropertyAttribute::DontDelete | PropertyAttribute::DontEnum, jsNumber(thisObject->m_vector[index]));
    475475            return true;
    476476        }
     
    712712    const DOMJIT::GetterSetter* domJIT = &DOMJITGetterDOMJIT;
    713713    auto* customGetterSetter = DOMAttributeGetterSetter::create(vm, domJIT->getter(), nullptr, DOMAttributeAnnotation { DOMJITNode::info(), domJIT });
    714     putDirectCustomAccessor(vm, Identifier::fromString(&vm, "customGetter"), customGetterSetter, ReadOnly | CustomAccessor);
     714    putDirectCustomAccessor(vm, Identifier::fromString(&vm, "customGetter"), customGetterSetter, PropertyAttribute::ReadOnly | PropertyAttribute::CustomAccessor);
    715715}
    716716
     
    822822    const DOMJIT::GetterSetter* domJIT = &DOMJITGetterComplexDOMJIT;
    823823    auto* customGetterSetter = DOMAttributeGetterSetter::create(vm, domJIT->getter(), nullptr, DOMAttributeAnnotation { DOMJITGetterComplex::info(), domJIT });
    824     putDirectCustomAccessor(vm, Identifier::fromString(&vm, "customGetter"), customGetterSetter, ReadOnly | CustomAccessor);
     824    putDirectCustomAccessor(vm, Identifier::fromString(&vm, "customGetter"), customGetterSetter, PropertyAttribute::ReadOnly | PropertyAttribute::CustomAccessor);
    825825    putDirectNativeFunction(vm, globalObject, Identifier::fromString(&vm, "enableException"), 0, functionEnableException, NoIntrinsic, 0);
    826826}
     
    897897{
    898898    Base::finishCreation(vm);
    899     putDirectNativeFunction(vm, globalObject, Identifier::fromString(&vm, "func"), 0, safeFunction, NoIntrinsic, &DOMJITFunctionObjectSignature, ReadOnly);
     899    putDirectNativeFunction(vm, globalObject, Identifier::fromString(&vm, "func"), 0, safeFunction, NoIntrinsic, &DOMJITFunctionObjectSignature, static_cast<unsigned>(PropertyAttribute::ReadOnly));
    900900}
    901901
     
    951951{
    952952    Base::finishCreation(vm);
    953     putDirectNativeFunction(vm, globalObject, Identifier::fromString(&vm, "func"), 0, safeFunction, NoIntrinsic, &DOMJITCheckSubClassObjectSignature, ReadOnly);
     953    putDirectNativeFunction(vm, globalObject, Identifier::fromString(&vm, "func"), 0, safeFunction, NoIntrinsic, &DOMJITCheckSubClassObjectSignature, static_cast<unsigned>(PropertyAttribute::ReadOnly));
    954954}
    955955
     
    13621362        addFunction(vm, "setHiddenValue", functionSetHiddenValue, 2);
    13631363       
    1364         putDirectNativeFunction(vm, this, Identifier::fromString(&vm, "DFGTrue"), 0, functionFalse1, DFGTrueIntrinsic, DontEnum);
    1365         putDirectNativeFunction(vm, this, Identifier::fromString(&vm, "OSRExit"), 0, functionUndefined1, OSRExitIntrinsic, DontEnum);
    1366         putDirectNativeFunction(vm, this, Identifier::fromString(&vm, "isFinalTier"), 0, functionFalse2, IsFinalTierIntrinsic, DontEnum);
    1367         putDirectNativeFunction(vm, this, Identifier::fromString(&vm, "predictInt32"), 0, functionUndefined2, SetInt32HeapPredictionIntrinsic, DontEnum);
    1368         putDirectNativeFunction(vm, this, Identifier::fromString(&vm, "isInt32"), 0, functionIsInt32, CheckInt32Intrinsic, DontEnum);
    1369         putDirectNativeFunction(vm, this, Identifier::fromString(&vm, "fiatInt52"), 0, functionIdentity, FiatInt52Intrinsic, DontEnum);
     1364        putDirectNativeFunction(vm, this, Identifier::fromString(&vm, "DFGTrue"), 0, functionFalse1, DFGTrueIntrinsic, static_cast<unsigned>(PropertyAttribute::DontEnum));
     1365        putDirectNativeFunction(vm, this, Identifier::fromString(&vm, "OSRExit"), 0, functionUndefined1, OSRExitIntrinsic, static_cast<unsigned>(PropertyAttribute::DontEnum));
     1366        putDirectNativeFunction(vm, this, Identifier::fromString(&vm, "isFinalTier"), 0, functionFalse2, IsFinalTierIntrinsic, static_cast<unsigned>(PropertyAttribute::DontEnum));
     1367        putDirectNativeFunction(vm, this, Identifier::fromString(&vm, "predictInt32"), 0, functionUndefined2, SetInt32HeapPredictionIntrinsic, static_cast<unsigned>(PropertyAttribute::DontEnum));
     1368        putDirectNativeFunction(vm, this, Identifier::fromString(&vm, "isInt32"), 0, functionIsInt32, CheckInt32Intrinsic, static_cast<unsigned>(PropertyAttribute::DontEnum));
     1369        putDirectNativeFunction(vm, this, Identifier::fromString(&vm, "fiatInt52"), 0, functionIdentity, FiatInt52Intrinsic, static_cast<unsigned>(PropertyAttribute::DontEnum));
    13701370       
    13711371        addFunction(vm, "effectful42", functionEffectful42, 0);
  • trunk/Source/JavaScriptCore/runtime/ArrayConstructor.cpp

    r217108 r222473  
    5959{
    6060    Base::finishCreation(vm, arrayPrototype->classInfo(vm)->className);
    61     putDirectWithoutTransition(vm, vm.propertyNames->prototype, arrayPrototype, DontEnum | DontDelete | ReadOnly);
    62     putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), ReadOnly | DontEnum);
    63     putDirectNonIndexAccessor(vm, vm.propertyNames->speciesSymbol, speciesSymbol, Accessor | ReadOnly | DontEnum);
    64     JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->isArray, arrayConstructorIsArrayCodeGenerator, DontEnum);
     61    putDirectWithoutTransition(vm, vm.propertyNames->prototype, arrayPrototype, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly);
     62    putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum);
     63    putDirectNonIndexAccessor(vm, vm.propertyNames->speciesSymbol, speciesSymbol, PropertyAttribute::Accessor | PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum);
     64    JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->isArray, arrayConstructorIsArrayCodeGenerator, static_cast<unsigned>(PropertyAttribute::DontEnum));
    6565}
    6666
  • trunk/Source/JavaScriptCore/runtime/ArrayIteratorPrototype.cpp

    r217108 r222473  
    5050    Base::finishCreation(vm);
    5151    ASSERT(inherits(vm, info()));
    52     putDirectWithoutTransition(vm, vm.propertyNames->toStringTagSymbol, jsString(&vm, "Array Iterator"), DontEnum | ReadOnly);
     52    putDirectWithoutTransition(vm, vm.propertyNames->toStringTagSymbol, jsString(&vm, "Array Iterator"), PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly);
    5353    vm.prototypeMap.addPrototype(this);
    5454}
  • trunk/Source/JavaScriptCore/runtime/ArrayPrototype.cpp

    r221954 r222473  
    8585    vm.prototypeMap.addPrototype(this);
    8686
    87     putDirectWithoutTransition(vm, vm.propertyNames->toString, globalObject->arrayProtoToStringFunction(), DontEnum);
    88     putDirectWithoutTransition(vm, vm.propertyNames->builtinNames().valuesPublicName(), globalObject->arrayProtoValuesFunction(), DontEnum);
    89     putDirectWithoutTransition(vm, vm.propertyNames->iteratorSymbol, globalObject->arrayProtoValuesFunction(), DontEnum);
    90 
    91     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->toLocaleString, arrayProtoFuncToLocaleString, DontEnum, 0);
    92     JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION("concat", arrayPrototypeConcatCodeGenerator, DontEnum);
    93     JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION("fill", arrayPrototypeFillCodeGenerator, DontEnum);
    94     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->join, arrayProtoFuncJoin, DontEnum, 1);
    95     JSC_NATIVE_INTRINSIC_FUNCTION_WITHOUT_TRANSITION("pop", arrayProtoFuncPop, DontEnum, 0, ArrayPopIntrinsic);
    96     JSC_NATIVE_INTRINSIC_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->builtinNames().pushPublicName(), arrayProtoFuncPush, DontEnum, 1, ArrayPushIntrinsic);
    97     JSC_NATIVE_INTRINSIC_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->builtinNames().pushPrivateName(), arrayProtoFuncPush, DontEnum | DontDelete | ReadOnly, 1, ArrayPushIntrinsic);
    98     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("reverse", arrayProtoFuncReverse, DontEnum, 0);
    99     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->builtinNames().shiftPublicName(), arrayProtoFuncShift, DontEnum, 0);
    100     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->builtinNames().shiftPrivateName(), arrayProtoFuncShift, DontEnum | DontDelete | ReadOnly, 0);
    101     JSC_NATIVE_INTRINSIC_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->slice, arrayProtoFuncSlice, DontEnum, 2, ArraySliceIntrinsic);
    102     JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION("sort", arrayPrototypeSortCodeGenerator, DontEnum);
    103     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("splice", arrayProtoFuncSplice, DontEnum, 2);
    104     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("unshift", arrayProtoFuncUnShift, DontEnum, 1);
    105     JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION("every", arrayPrototypeEveryCodeGenerator, DontEnum);
    106     JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION("forEach", arrayPrototypeForEachCodeGenerator, DontEnum);
    107     JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION("some", arrayPrototypeSomeCodeGenerator, DontEnum);
    108     JSC_NATIVE_INTRINSIC_FUNCTION_WITHOUT_TRANSITION("indexOf", arrayProtoFuncIndexOf, DontEnum, 1, ArrayIndexOfIntrinsic);
    109     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("lastIndexOf", arrayProtoFuncLastIndexOf, DontEnum, 1);
    110     JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION("filter", arrayPrototypeFilterCodeGenerator, DontEnum);
    111     JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION("reduce", arrayPrototypeReduceCodeGenerator, DontEnum);
    112     JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION("reduceRight", arrayPrototypeReduceRightCodeGenerator, DontEnum);
    113     JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION("map", arrayPrototypeMapCodeGenerator, DontEnum);
    114     JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->builtinNames().entriesPublicName(), arrayPrototypeEntriesCodeGenerator, DontEnum);
    115     JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->builtinNames().keysPublicName(), arrayPrototypeKeysCodeGenerator, DontEnum);
    116     JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION("find", arrayPrototypeFindCodeGenerator, DontEnum);
    117     JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION("findIndex", arrayPrototypeFindIndexCodeGenerator, DontEnum);
    118     JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION("includes", arrayPrototypeIncludesCodeGenerator, DontEnum);
    119     JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION("copyWithin", arrayPrototypeCopyWithinCodeGenerator, DontEnum);
    120 
    121     putDirectWithoutTransition(vm, vm.propertyNames->builtinNames().entriesPrivateName(), getDirect(vm, vm.propertyNames->builtinNames().entriesPublicName()), ReadOnly);
    122     putDirectWithoutTransition(vm, vm.propertyNames->builtinNames().forEachPrivateName(), getDirect(vm, vm.propertyNames->builtinNames().forEachPublicName()), ReadOnly);
    123     putDirectWithoutTransition(vm, vm.propertyNames->builtinNames().keysPrivateName(), getDirect(vm, vm.propertyNames->builtinNames().keysPublicName()), ReadOnly);
    124     putDirectWithoutTransition(vm, vm.propertyNames->builtinNames().valuesPrivateName(), globalObject->arrayProtoValuesFunction(), ReadOnly);
     87    putDirectWithoutTransition(vm, vm.propertyNames->toString, globalObject->arrayProtoToStringFunction(), static_cast<unsigned>(PropertyAttribute::DontEnum));
     88    putDirectWithoutTransition(vm, vm.propertyNames->builtinNames().valuesPublicName(), globalObject->arrayProtoValuesFunction(), static_cast<unsigned>(PropertyAttribute::DontEnum));
     89    putDirectWithoutTransition(vm, vm.propertyNames->iteratorSymbol, globalObject->arrayProtoValuesFunction(), static_cast<unsigned>(PropertyAttribute::DontEnum));
     90
     91    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->toLocaleString, arrayProtoFuncToLocaleString, static_cast<unsigned>(PropertyAttribute::DontEnum), 0);
     92    JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION("concat", arrayPrototypeConcatCodeGenerator, static_cast<unsigned>(PropertyAttribute::DontEnum));
     93    JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION("fill", arrayPrototypeFillCodeGenerator, static_cast<unsigned>(PropertyAttribute::DontEnum));
     94    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->join, arrayProtoFuncJoin, static_cast<unsigned>(PropertyAttribute::DontEnum), 1);
     95    JSC_NATIVE_INTRINSIC_FUNCTION_WITHOUT_TRANSITION("pop", arrayProtoFuncPop, static_cast<unsigned>(PropertyAttribute::DontEnum), 0, ArrayPopIntrinsic);
     96    JSC_NATIVE_INTRINSIC_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->builtinNames().pushPublicName(), arrayProtoFuncPush, static_cast<unsigned>(PropertyAttribute::DontEnum), 1, ArrayPushIntrinsic);
     97    JSC_NATIVE_INTRINSIC_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->builtinNames().pushPrivateName(), arrayProtoFuncPush, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly, 1, ArrayPushIntrinsic);
     98    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("reverse", arrayProtoFuncReverse, static_cast<unsigned>(PropertyAttribute::DontEnum), 0);
     99    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->builtinNames().shiftPublicName(), arrayProtoFuncShift, static_cast<unsigned>(PropertyAttribute::DontEnum), 0);
     100    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->builtinNames().shiftPrivateName(), arrayProtoFuncShift, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly, 0);
     101    JSC_NATIVE_INTRINSIC_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->slice, arrayProtoFuncSlice, static_cast<unsigned>(PropertyAttribute::DontEnum), 2, ArraySliceIntrinsic);
     102    JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION("sort", arrayPrototypeSortCodeGenerator, static_cast<unsigned>(PropertyAttribute::DontEnum));
     103    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("splice", arrayProtoFuncSplice, static_cast<unsigned>(PropertyAttribute::DontEnum), 2);
     104    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("unshift", arrayProtoFuncUnShift, static_cast<unsigned>(PropertyAttribute::DontEnum), 1);
     105    JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION("every", arrayPrototypeEveryCodeGenerator, static_cast<unsigned>(PropertyAttribute::DontEnum));
     106    JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION("forEach", arrayPrototypeForEachCodeGenerator, static_cast<unsigned>(PropertyAttribute::DontEnum));
     107    JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION("some", arrayPrototypeSomeCodeGenerator, static_cast<unsigned>(PropertyAttribute::DontEnum));
     108    JSC_NATIVE_INTRINSIC_FUNCTION_WITHOUT_TRANSITION("indexOf", arrayProtoFuncIndexOf, static_cast<unsigned>(PropertyAttribute::DontEnum), 1, ArrayIndexOfIntrinsic);
     109    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("lastIndexOf", arrayProtoFuncLastIndexOf, static_cast<unsigned>(PropertyAttribute::DontEnum), 1);
     110    JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION("filter", arrayPrototypeFilterCodeGenerator, static_cast<unsigned>(PropertyAttribute::DontEnum));
     111    JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION("reduce", arrayPrototypeReduceCodeGenerator, static_cast<unsigned>(PropertyAttribute::DontEnum));
     112    JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION("reduceRight", arrayPrototypeReduceRightCodeGenerator, static_cast<unsigned>(PropertyAttribute::DontEnum));
     113    JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION("map", arrayPrototypeMapCodeGenerator, static_cast<unsigned>(PropertyAttribute::DontEnum));
     114    JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->builtinNames().entriesPublicName(), arrayPrototypeEntriesCodeGenerator, static_cast<unsigned>(PropertyAttribute::DontEnum));
     115    JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->builtinNames().keysPublicName(), arrayPrototypeKeysCodeGenerator, static_cast<unsigned>(PropertyAttribute::DontEnum));
     116    JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION("find", arrayPrototypeFindCodeGenerator, static_cast<unsigned>(PropertyAttribute::DontEnum));
     117    JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION("findIndex", arrayPrototypeFindIndexCodeGenerator, static_cast<unsigned>(PropertyAttribute::DontEnum));
     118    JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION("includes", arrayPrototypeIncludesCodeGenerator, static_cast<unsigned>(PropertyAttribute::DontEnum));
     119    JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION("copyWithin", arrayPrototypeCopyWithinCodeGenerator, static_cast<unsigned>(PropertyAttribute::DontEnum));
     120
     121    putDirectWithoutTransition(vm, vm.propertyNames->builtinNames().entriesPrivateName(), getDirect(vm, vm.propertyNames->builtinNames().entriesPublicName()), static_cast<unsigned>(PropertyAttribute::ReadOnly));
     122    putDirectWithoutTransition(vm, vm.propertyNames->builtinNames().forEachPrivateName(), getDirect(vm, vm.propertyNames->builtinNames().forEachPublicName()), static_cast<unsigned>(PropertyAttribute::ReadOnly));
     123    putDirectWithoutTransition(vm, vm.propertyNames->builtinNames().keysPrivateName(), getDirect(vm, vm.propertyNames->builtinNames().keysPublicName()), static_cast<unsigned>(PropertyAttribute::ReadOnly));
     124    putDirectWithoutTransition(vm, vm.propertyNames->builtinNames().valuesPrivateName(), globalObject->arrayProtoValuesFunction(), static_cast<unsigned>(PropertyAttribute::ReadOnly));
    125125
    126126    JSObject* unscopables = constructEmptyObject(globalObject->globalExec(), globalObject->nullPrototypeObjectStructure());
     
    137137    for (const char* unscopableName : unscopableNames)
    138138        unscopables->putDirect(vm, Identifier::fromString(&vm, unscopableName), jsBoolean(true));
    139     putDirectWithoutTransition(vm, vm.propertyNames->unscopablesSymbol, unscopables, DontEnum | ReadOnly);
     139    putDirectWithoutTransition(vm, vm.propertyNames->unscopablesSymbol, unscopables, PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly);
    140140}
    141141
  • trunk/Source/JavaScriptCore/runtime/AsyncFromSyncIteratorPrototype.cpp

    r221080 r222473  
    4747    vm.prototypeMap.addPrototype(this);
    4848
    49     JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION("next", asyncFromSyncIteratorPrototypeNextCodeGenerator, DontEnum);
    50     JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION("return", asyncFromSyncIteratorPrototypeReturnCodeGenerator, DontEnum);
    51     JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION("throw", asyncFromSyncIteratorPrototypeThrowCodeGenerator, DontEnum);
     49    JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION("next", asyncFromSyncIteratorPrototypeNextCodeGenerator, static_cast<unsigned>(PropertyAttribute::DontEnum));
     50    JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION("return", asyncFromSyncIteratorPrototypeReturnCodeGenerator, static_cast<unsigned>(PropertyAttribute::DontEnum));
     51    JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION("throw", asyncFromSyncIteratorPrototypeThrowCodeGenerator, static_cast<unsigned>(PropertyAttribute::DontEnum));
    5252}
    5353
  • trunk/Source/JavaScriptCore/runtime/AsyncFunctionConstructor.cpp

    r217108 r222473  
    4545{
    4646    Base::finishCreation(vm, "AsyncFunction");
    47     putDirectWithoutTransition(vm, vm.propertyNames->prototype, prototype, DontEnum | DontDelete | ReadOnly);
    48     putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), ReadOnly | DontEnum);
     47    putDirectWithoutTransition(vm, vm.propertyNames->prototype, prototype, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly);
     48    putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum);
    4949}
    5050
  • trunk/Source/JavaScriptCore/runtime/AsyncFunctionPrototype.cpp

    r217108 r222473  
    5050    Base::finishCreation(vm);
    5151    ASSERT(inherits(vm, info()));
    52     putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(0), DontDelete | ReadOnly | DontEnum);
    53     putDirectWithoutTransition(vm, vm.propertyNames->toStringTagSymbol, jsString(&vm, "AsyncFunction"), DontEnum | ReadOnly);
     52    putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(0), PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum);
     53    putDirectWithoutTransition(vm, vm.propertyNames->toStringTagSymbol, jsString(&vm, "AsyncFunction"), PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly);
    5454    vm.prototypeMap.addPrototype(this);
    5555}
  • trunk/Source/JavaScriptCore/runtime/AsyncGeneratorFunctionConstructor.cpp

    r221080 r222473  
    4545{
    4646    Base::finishCreation(vm, "AsyncGeneratorFunction");
    47     putDirectWithoutTransition(vm, vm.propertyNames->prototype, prototype, DontEnum | DontDelete | ReadOnly);
     47    putDirectWithoutTransition(vm, vm.propertyNames->prototype, prototype, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly);
    4848
    4949    // Number of arguments for constructor
    50     putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), ReadOnly | DontEnum);
     50    putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum);
    5151}
    5252
  • trunk/Source/JavaScriptCore/runtime/AsyncGeneratorFunctionPrototype.cpp

    r221080 r222473  
    5050    Base::finishCreation(vm);
    5151    ASSERT(inherits(vm, info()));
    52     putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(0), DontDelete | ReadOnly | DontEnum);
    53     putDirectWithoutTransition(vm, vm.propertyNames->toStringTagSymbol, jsString(&vm, "AsyncGeneratorFunction"), DontEnum | ReadOnly);
     52    putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(0), PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum);
     53    putDirectWithoutTransition(vm, vm.propertyNames->toStringTagSymbol, jsString(&vm, "AsyncGeneratorFunction"), PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly);
    5454    vm.prototypeMap.addPrototype(this);
    5555}
  • trunk/Source/JavaScriptCore/runtime/AsyncGeneratorPrototype.cpp

    r221080 r222473  
    4949    Base::finishCreation(vm);
    5050    ASSERT(inherits(vm, info()));
    51     putDirectWithoutTransition(vm, vm.propertyNames->toStringTagSymbol, jsString(&vm, "AsyncGenerator"), DontEnum | ReadOnly);
     51    putDirectWithoutTransition(vm, vm.propertyNames->toStringTagSymbol, jsString(&vm, "AsyncGenerator"), PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly);
    5252    vm.prototypeMap.addPrototype(this);
    5353}
  • trunk/Source/JavaScriptCore/runtime/AsyncIteratorPrototype.cpp

    r221417 r222473  
    4343
    4444    JSFunction* asyncIteratorPrototypeFunction = JSFunction::create(vm, asyncIteratorPrototypeSymbolAsyncIteratorGetterCodeGenerator(vm), globalObject);
    45     putDirectWithoutTransition(vm, vm.propertyNames->asyncIteratorSymbol, asyncIteratorPrototypeFunction, DontEnum);
     45    putDirectWithoutTransition(vm, vm.propertyNames->asyncIteratorSymbol, asyncIteratorPrototypeFunction, static_cast<unsigned>(PropertyAttribute::DontEnum));
    4646}
    4747
  • trunk/Source/JavaScriptCore/runtime/AtomicsObject.cpp

    r217722 r222473  
    8282   
    8383#define PUT_DIRECT_NATIVE_FUNC(lowerName, upperName, count) \
    84     putDirectNativeFunctionWithoutTransition(vm, globalObject, Identifier::fromString(&vm, #lowerName), count, atomicsFunc ## upperName, Atomics ## upperName ## Intrinsic, DontEnum);
     84    putDirectNativeFunctionWithoutTransition(vm, globalObject, Identifier::fromString(&vm, #lowerName), count, atomicsFunc ## upperName, Atomics ## upperName ## Intrinsic, static_cast<unsigned>(PropertyAttribute::DontEnum));
    8585    FOR_EACH_ATOMICS_FUNC(PUT_DIRECT_NATIVE_FUNC)
    8686#undef PUT_DIRECT_NATIVE_FUNC
  • trunk/Source/JavaScriptCore/runtime/BooleanConstructor.cpp

    r221822 r222473  
    4040{
    4141    Base::finishCreation(vm, booleanPrototype->classInfo()->className);
    42     putDirectWithoutTransition(vm, vm.propertyNames->prototype, booleanPrototype, DontEnum | DontDelete | ReadOnly);
    43     putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), ReadOnly | DontEnum);
     42    putDirectWithoutTransition(vm, vm.propertyNames->prototype, booleanPrototype, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly);
     43    putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum);
    4444}
    4545
  • trunk/Source/JavaScriptCore/runtime/ClonedArguments.cpp

    r221528 r222473  
    154154    Structure* structure = Structure::create(vm, globalObject, prototype, TypeInfo(ClonedArgumentsType, StructureFlags), info(), indexingType);
    155155    PropertyOffset offset;
    156     structure = structure->addPropertyTransition(vm, structure, vm.propertyNames->length, DontEnum, offset);
     156    structure = structure->addPropertyTransition(vm, structure, vm.propertyNames->length, static_cast<unsigned>(PropertyAttribute::DontEnum), offset);
    157157    ASSERT(offset == clonedArgumentsLengthPropertyOffset);
    158158    return structure;
     
    181181        if (ident == vm.propertyNames->callee) {
    182182            if (isStrictMode) {
    183                 slot.setGetterSlot(thisObject, DontDelete | DontEnum | Accessor, thisObject->globalObject()->throwTypeErrorArgumentsCalleeAndCallerGetterSetter());
     183                slot.setGetterSlot(thisObject, PropertyAttribute::DontDelete | PropertyAttribute::DontEnum | PropertyAttribute::Accessor, thisObject->globalObject()->throwTypeErrorArgumentsCalleeAndCallerGetterSetter());
    184184                return true;
    185185            }
     
    189189
    190190        if (ident == vm.propertyNames->iteratorSymbol) {
    191             slot.setValue(thisObject, DontEnum, thisObject->globalObject()->arrayProtoValuesFunction());
     191            slot.setValue(thisObject, static_cast<unsigned>(PropertyAttribute::DontEnum), thisObject->globalObject()->arrayProtoValuesFunction());
    192192            return true;
    193193        }
     
    252252   
    253253    if (isStrictMode)
    254         putDirectAccessor(exec, vm.propertyNames->callee, globalObject()->throwTypeErrorArgumentsCalleeAndCallerGetterSetter(), DontDelete | DontEnum | Accessor);
     254        putDirectAccessor(exec, vm.propertyNames->callee, globalObject()->throwTypeErrorArgumentsCalleeAndCallerGetterSetter(), PropertyAttribute::DontDelete | PropertyAttribute::DontEnum | PropertyAttribute::Accessor);
    255255    else
    256256        putDirect(vm, vm.propertyNames->callee, JSValue(m_callee.get()));
    257257
    258     putDirect(vm, vm.propertyNames->iteratorSymbol, globalObject()->arrayProtoValuesFunction(), DontEnum);
     258    putDirect(vm, vm.propertyNames->iteratorSymbol, globalObject()->arrayProtoValuesFunction(), static_cast<unsigned>(PropertyAttribute::DontEnum));
    259259   
    260260    m_callee.clear();
  • trunk/Source/JavaScriptCore/runtime/CommonSlowPaths.cpp

    r221849 r222473  
    973973    CHECK_EXCEPTION();
    974974    PropertyDescriptor descriptor = toPropertyDescriptor(value, jsUndefined(), jsUndefined(), DefinePropertyAttributes(attributes.asInt32()));
    975     ASSERT((descriptor.attributes() & Accessor) || (!descriptor.isAccessorDescriptor()));
     975    ASSERT((descriptor.attributes() & PropertyAttribute::Accessor) || (!descriptor.isAccessorDescriptor()));
    976976    base->methodTable(vm)->defineOwnProperty(base, exec, propertyName, descriptor, true);
    977977    END();
     
    991991    CHECK_EXCEPTION();
    992992    PropertyDescriptor descriptor = toPropertyDescriptor(jsUndefined(), getter, setter, DefinePropertyAttributes(attributes.asInt32()));
    993     ASSERT((descriptor.attributes() & Accessor) || (!descriptor.isAccessorDescriptor()));
     993    ASSERT((descriptor.attributes() & PropertyAttribute::Accessor) || (!descriptor.isAccessorDescriptor()));
    994994    base->methodTable(vm)->defineOwnProperty(base, exec, propertyName, descriptor, true);
    995995    END();
  • trunk/Source/JavaScriptCore/runtime/ConsoleObject.cpp

    r217108 r222473  
    7474    // and all have a length of 0. This may change if Console is standardized.
    7575
    76     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("debug", consoleProtoFuncDebug, None, 0);
    77     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("error", consoleProtoFuncError, None, 0);
    78     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("log", consoleProtoFuncLog, None, 0);
    79     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("info", consoleProtoFuncInfo, None, 0);
    80     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("warn", consoleProtoFuncWarn, None, 0);
    81 
    82     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->clear, consoleProtoFuncClear, None, 0);
    83     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("dir", consoleProtoFuncDir, None, 0);
    84     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("dirxml", consoleProtoFuncDirXML, None, 0);
    85     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("table", consoleProtoFuncTable, None, 0);
    86     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("trace", consoleProtoFuncTrace, None, 0);
    87     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("assert", consoleProtoFuncAssert, None, 0);
    88     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->count, consoleProtoFuncCount, None, 0);
    89     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("profile", consoleProtoFuncProfile, None, 0);
    90     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("profileEnd", consoleProtoFuncProfileEnd, None, 0);
    91     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("time", consoleProtoFuncTime, None, 0);
    92     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("timeEnd", consoleProtoFuncTimeEnd, None, 0);
    93     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("timeStamp", consoleProtoFuncTimeStamp, None, 0);
    94     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("takeHeapSnapshot", consoleProtoFuncTakeHeapSnapshot, None, 0);
    95     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("group", consoleProtoFuncGroup, None, 0);
    96     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("groupCollapsed", consoleProtoFuncGroupCollapsed, None, 0);
    97     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("groupEnd", consoleProtoFuncGroupEnd, None, 0);
     76    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("debug", consoleProtoFuncDebug, static_cast<unsigned>(PropertyAttribute::None), 0);
     77    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("error", consoleProtoFuncError, static_cast<unsigned>(PropertyAttribute::None), 0);
     78    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("log", consoleProtoFuncLog, static_cast<unsigned>(PropertyAttribute::None), 0);
     79    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("info", consoleProtoFuncInfo, static_cast<unsigned>(PropertyAttribute::None), 0);
     80    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("warn", consoleProtoFuncWarn, static_cast<unsigned>(PropertyAttribute::None), 0);
     81
     82    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->clear, consoleProtoFuncClear, static_cast<unsigned>(PropertyAttribute::None), 0);
     83    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("dir", consoleProtoFuncDir, static_cast<unsigned>(PropertyAttribute::None), 0);
     84    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("dirxml", consoleProtoFuncDirXML, static_cast<unsigned>(PropertyAttribute::None), 0);
     85    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("table", consoleProtoFuncTable, static_cast<unsigned>(PropertyAttribute::None), 0);
     86    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("trace", consoleProtoFuncTrace, static_cast<unsigned>(PropertyAttribute::None), 0);
     87    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("assert", consoleProtoFuncAssert, static_cast<unsigned>(PropertyAttribute::None), 0);
     88    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->count, consoleProtoFuncCount, static_cast<unsigned>(PropertyAttribute::None), 0);
     89    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("profile", consoleProtoFuncProfile, static_cast<unsigned>(PropertyAttribute::None), 0);
     90    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("profileEnd", consoleProtoFuncProfileEnd, static_cast<unsigned>(PropertyAttribute::None), 0);
     91    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("time", consoleProtoFuncTime, static_cast<unsigned>(PropertyAttribute::None), 0);
     92    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("timeEnd", consoleProtoFuncTimeEnd, static_cast<unsigned>(PropertyAttribute::None), 0);
     93    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("timeStamp", consoleProtoFuncTimeStamp, static_cast<unsigned>(PropertyAttribute::None), 0);
     94    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("takeHeapSnapshot", consoleProtoFuncTakeHeapSnapshot, static_cast<unsigned>(PropertyAttribute::None), 0);
     95    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("group", consoleProtoFuncGroup, static_cast<unsigned>(PropertyAttribute::None), 0);
     96    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("groupCollapsed", consoleProtoFuncGroupCollapsed, static_cast<unsigned>(PropertyAttribute::None), 0);
     97    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("groupEnd", consoleProtoFuncGroupEnd, static_cast<unsigned>(PropertyAttribute::None), 0);
    9898}
    9999
  • trunk/Source/JavaScriptCore/runtime/DateConstructor.cpp

    r219301 r222473  
    7777{
    7878    Base::finishCreation(vm, "Date");
    79     putDirectWithoutTransition(vm, vm.propertyNames->prototype, datePrototype, DontEnum | DontDelete | ReadOnly);
    80     putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(7), ReadOnly | DontEnum);
     79    putDirectWithoutTransition(vm, vm.propertyNames->prototype, datePrototype, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly);
     80    putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(7), PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum);
    8181}
    8282
  • trunk/Source/JavaScriptCore/runtime/DatePrototype.cpp

    r221849 r222473  
    494494    Identifier toUTCStringName = Identifier::fromString(&vm, ASCIILiteral("toUTCString"));
    495495    JSFunction* toUTCStringFunction = JSFunction::create(vm, globalObject, 0, toUTCStringName.string(), dateProtoFuncToUTCString);
    496     putDirectWithoutTransition(vm, toUTCStringName, toUTCStringFunction, DontEnum);
    497     putDirectWithoutTransition(vm, Identifier::fromString(&vm, ASCIILiteral("toGMTString")), toUTCStringFunction, DontEnum);
     496    putDirectWithoutTransition(vm, toUTCStringName, toUTCStringFunction, static_cast<unsigned>(PropertyAttribute::DontEnum));
     497    putDirectWithoutTransition(vm, Identifier::fromString(&vm, ASCIILiteral("toGMTString")), toUTCStringFunction, static_cast<unsigned>(PropertyAttribute::DontEnum));
    498498
    499499#if ENABLE(INTL)
    500     JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION("toLocaleString", datePrototypeToLocaleStringCodeGenerator, DontEnum);
    501     JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION("toLocaleDateString", datePrototypeToLocaleDateStringCodeGenerator, DontEnum);
    502     JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION("toLocaleTimeString", datePrototypeToLocaleTimeStringCodeGenerator, DontEnum);
     500    JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION("toLocaleString", datePrototypeToLocaleStringCodeGenerator, static_cast<unsigned>(PropertyAttribute::DontEnum));
     501    JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION("toLocaleDateString", datePrototypeToLocaleDateStringCodeGenerator, static_cast<unsigned>(PropertyAttribute::DontEnum));
     502    JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION("toLocaleTimeString", datePrototypeToLocaleTimeStringCodeGenerator, static_cast<unsigned>(PropertyAttribute::DontEnum));
    503503#endif
    504504
    505505    JSFunction* toPrimitiveFunction = JSFunction::create(vm, globalObject, 1, ASCIILiteral("[Symbol.toPrimitive]"), dateProtoFuncToPrimitiveSymbol, NoIntrinsic);
    506     putDirectWithoutTransition(vm, vm.propertyNames->toPrimitiveSymbol, toPrimitiveFunction, DontEnum | ReadOnly);
     506    putDirectWithoutTransition(vm, vm.propertyNames->toPrimitiveSymbol, toPrimitiveFunction, PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly);
    507507
    508508    // The constructor will be added later, after DateConstructor has been built.
  • trunk/Source/JavaScriptCore/runtime/DirectArguments.cpp

    r220352 r222473  
    115115    RELEASE_ASSERT(!m_mappedArguments);
    116116   
    117     putDirect(vm, vm.propertyNames->length, jsNumber(m_length), DontEnum);
    118     putDirect(vm, vm.propertyNames->callee, m_callee.get(), DontEnum);
    119     putDirect(vm, vm.propertyNames->iteratorSymbol, globalObject()->arrayProtoValuesFunction(), DontEnum);
     117    putDirect(vm, vm.propertyNames->length, jsNumber(m_length), static_cast<unsigned>(PropertyAttribute::DontEnum));
     118    putDirect(vm, vm.propertyNames->callee, m_callee.get(), static_cast<unsigned>(PropertyAttribute::DontEnum));
     119    putDirect(vm, vm.propertyNames->iteratorSymbol, globalObject()->arrayProtoValuesFunction(), static_cast<unsigned>(PropertyAttribute::DontEnum));
    120120   
    121121    void* backingStore = vm.gigacageAuxiliarySpace(m_mappedArguments.kind).tryAllocate(mappedArgumentsSize());
  • trunk/Source/JavaScriptCore/runtime/Error.cpp

    r221836 r222473  
    221221            obj->putDirect(vm, vm.propertyNames->sourceURL, jsString(&vm, sourceURL));
    222222
    223         obj->putDirect(vm, vm.propertyNames->stack, Interpreter::stackTraceAsString(vm, *stackTrace), DontEnum);
     223        obj->putDirect(vm, vm.propertyNames->stack, Interpreter::stackTraceAsString(vm, *stackTrace), static_cast<unsigned>(PropertyAttribute::DontEnum));
    224224
    225225        return true;
    226226    }
    227227
    228     obj->putDirect(vm, vm.propertyNames->stack, vm.smallStrings.emptyString(), DontEnum);
     228    obj->putDirect(vm, vm.propertyNames->stack, vm.smallStrings.emptyString(), static_cast<unsigned>(PropertyAttribute::DontEnum));
    229229    return false;
    230230}
  • trunk/Source/JavaScriptCore/runtime/ErrorConstructor.cpp

    r217108 r222473  
    4343    Base::finishCreation(vm, ASCIILiteral("Error"));
    4444    // ECMA 15.11.3.1 Error.prototype
    45     putDirectWithoutTransition(vm, vm.propertyNames->prototype, errorPrototype, DontEnum | DontDelete | ReadOnly);
    46     putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), DontEnum | ReadOnly);
     45    putDirectWithoutTransition(vm, vm.propertyNames->prototype, errorPrototype, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly);
     46    putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly);
    4747
    4848    unsigned defaultStackTraceLimit = Options::defaultErrorStackTraceLimit();
    4949    m_stackTraceLimit = defaultStackTraceLimit;
    50     putDirectWithoutTransition(vm, vm.propertyNames->stackTraceLimit, jsNumber(defaultStackTraceLimit), None);
     50    putDirectWithoutTransition(vm, vm.propertyNames->stackTraceLimit, jsNumber(defaultStackTraceLimit), static_cast<unsigned>(PropertyAttribute::None));
    5151}
    5252
  • trunk/Source/JavaScriptCore/runtime/ErrorInstance.cpp

    r222398 r222473  
    114114    ASSERT(inherits(vm, info()));
    115115    if (!message.isNull())
    116         putDirect(vm, vm.propertyNames->message, jsString(&vm, message), DontEnum);
     116        putDirect(vm, vm.propertyNames->message, jsString(&vm, message), static_cast<unsigned>(PropertyAttribute::DontEnum));
    117117
    118118    std::unique_ptr<Vector<StackFrame>> stackTrace = getStackTrace(exec, vm, this, useCurrentFrame);
  • trunk/Source/JavaScriptCore/runtime/ErrorPrototype.cpp

    r221849 r222473  
    5959    Base::finishCreation(vm);
    6060    ASSERT(inherits(vm, info()));
    61     putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("Error"))), DontEnum);
    62     putDirect(vm, vm.propertyNames->message, jsEmptyString(&vm), DontEnum);
     61    putDirect(vm, vm.propertyNames->name, jsNontrivialString(&vm, String(ASCIILiteral("Error"))), static_cast<unsigned>(PropertyAttribute::DontEnum));
     62    putDirect(vm, vm.propertyNames->message, jsEmptyString(&vm), static_cast<unsigned>(PropertyAttribute::DontEnum));
    6363}
    6464
  • trunk/Source/JavaScriptCore/runtime/FunctionConstructor.cpp

    r221822 r222473  
    4747{
    4848    Base::finishCreation(vm, functionPrototype->classInfo()->className);
    49     putDirectWithoutTransition(vm, vm.propertyNames->prototype, functionPrototype, DontEnum | DontDelete | ReadOnly);
    50     putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), ReadOnly | DontEnum);
     49    putDirectWithoutTransition(vm, vm.propertyNames->prototype, functionPrototype, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly);
     50    putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum);
    5151}
    5252
  • trunk/Source/JavaScriptCore/runtime/FunctionPrototype.cpp

    r221417 r222473  
    5252{
    5353    Base::finishCreation(vm, name);
    54     putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(0), DontDelete | ReadOnly | DontEnum);
     54    putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(0), PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum);
    5555}
    5656
     
    6060
    6161    JSFunction* toStringFunction = JSFunction::create(vm, globalObject, 0, vm.propertyNames->toString.string(), functionProtoFuncToString);
    62     putDirectWithoutTransition(vm, vm.propertyNames->toString, toStringFunction, DontEnum);
     62    putDirectWithoutTransition(vm, vm.propertyNames->toString, toStringFunction, static_cast<unsigned>(PropertyAttribute::DontEnum));
    6363
    64     *applyFunction = putDirectBuiltinFunctionWithoutTransition(vm, globalObject, vm.propertyNames->builtinNames().applyPublicName(), functionPrototypeApplyCodeGenerator(vm), DontEnum);
    65     *callFunction = putDirectBuiltinFunctionWithoutTransition(vm, globalObject, vm.propertyNames->builtinNames().callPublicName(), functionPrototypeCallCodeGenerator(vm), DontEnum);
    66     putDirectBuiltinFunctionWithoutTransition(vm, globalObject, vm.propertyNames->bind, functionPrototypeBindCodeGenerator(vm), DontEnum);
     64    *applyFunction = putDirectBuiltinFunctionWithoutTransition(vm, globalObject, vm.propertyNames->builtinNames().applyPublicName(), functionPrototypeApplyCodeGenerator(vm), static_cast<unsigned>(PropertyAttribute::DontEnum));
     65    *callFunction = putDirectBuiltinFunctionWithoutTransition(vm, globalObject, vm.propertyNames->builtinNames().callPublicName(), functionPrototypeCallCodeGenerator(vm), static_cast<unsigned>(PropertyAttribute::DontEnum));
     66    putDirectBuiltinFunctionWithoutTransition(vm, globalObject, vm.propertyNames->bind, functionPrototypeBindCodeGenerator(vm), static_cast<unsigned>(PropertyAttribute::DontEnum));
    6767
    6868    *hasInstanceSymbolFunction = JSFunction::create(vm, functionPrototypeSymbolHasInstanceCodeGenerator(vm), globalObject);
    69     putDirectWithoutTransition(vm, vm.propertyNames->hasInstanceSymbol, *hasInstanceSymbolFunction, DontDelete | ReadOnly | DontEnum);
     69    putDirectWithoutTransition(vm, vm.propertyNames->hasInstanceSymbol, *hasInstanceSymbolFunction, PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum);
    7070}
    7171   
     
    7474    VM& vm = exec->vm();
    7575    GetterSetter* errorGetterSetter = globalObject->throwTypeErrorArgumentsCalleeAndCallerGetterSetter();
    76     putDirectAccessor(exec, vm.propertyNames->caller, errorGetterSetter, DontEnum | Accessor);
    77     putDirectAccessor(exec, vm.propertyNames->arguments, errorGetterSetter, DontEnum | Accessor);
     76    putDirectAccessor(exec, vm.propertyNames->caller, errorGetterSetter, PropertyAttribute::DontEnum | PropertyAttribute::Accessor);
     77    putDirectAccessor(exec, vm.propertyNames->arguments, errorGetterSetter, PropertyAttribute::DontEnum | PropertyAttribute::Accessor);
    7878}
    7979
  • trunk/Source/JavaScriptCore/runtime/GeneratorFunctionConstructor.cpp

    r217108 r222473  
    4545{
    4646    Base::finishCreation(vm, "GeneratorFunction");
    47     putDirectWithoutTransition(vm, vm.propertyNames->prototype, generatorFunctionPrototype, DontEnum | DontDelete | ReadOnly);
    48     putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), ReadOnly | DontEnum);
     47    putDirectWithoutTransition(vm, vm.propertyNames->prototype, generatorFunctionPrototype, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly);
     48    putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum);
    4949}
    5050
  • trunk/Source/JavaScriptCore/runtime/GeneratorFunctionPrototype.cpp

    r217108 r222473  
    5252    Base::finishCreation(vm);
    5353    ASSERT(inherits(vm, info()));
    54     putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum);
    55     putDirectWithoutTransition(vm, vm.propertyNames->toStringTagSymbol, jsString(&vm, "GeneratorFunction"), DontEnum | ReadOnly);
     54    putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(0), PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum);
     55    putDirectWithoutTransition(vm, vm.propertyNames->toStringTagSymbol, jsString(&vm, "GeneratorFunction"), PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly);
    5656    vm.prototypeMap.addPrototype(this);
    5757}
  • trunk/Source/JavaScriptCore/runtime/GeneratorPrototype.cpp

    r217108 r222473  
    4949    Base::finishCreation(vm);
    5050    ASSERT(inherits(vm, info()));
    51     putDirectWithoutTransition(vm, vm.propertyNames->toStringTagSymbol, jsString(&vm, "Generator"), DontEnum | ReadOnly);
     51    putDirectWithoutTransition(vm, vm.propertyNames->toStringTagSymbol, jsString(&vm, "Generator"), PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly);
    5252    vm.prototypeMap.addPrototype(this);
    5353}
  • trunk/Source/JavaScriptCore/runtime/GenericArgumentsInlines.h

    r221849 r222473  
    4949    if (!thisObject->overrodeThings()) {
    5050        if (ident == vm.propertyNames->length) {
    51             slot.setValue(thisObject, DontEnum, jsNumber(thisObject->internalLength()));
     51            slot.setValue(thisObject, static_cast<unsigned>(PropertyAttribute::DontEnum), jsNumber(thisObject->internalLength()));
    5252            return true;
    5353        }
    5454        if (ident == vm.propertyNames->callee) {
    55             slot.setValue(thisObject, DontEnum, thisObject->callee().get());
     55            slot.setValue(thisObject, static_cast<unsigned>(PropertyAttribute::DontEnum), thisObject->callee().get());
    5656            return true;
    5757        }
    5858        if (ident == vm.propertyNames->iteratorSymbol) {
    59             slot.setValue(thisObject, DontEnum, thisObject->globalObject()->arrayProtoValuesFunction());
     59            slot.setValue(thisObject, static_cast<unsigned>(PropertyAttribute::DontEnum), thisObject->globalObject()->arrayProtoValuesFunction());
    6060            return true;
    6161        }
     
    7474   
    7575    if (!thisObject->isModifiedArgumentDescriptor(index) && thisObject->isMappedArgument(index)) {
    76         slot.setValue(thisObject, None, thisObject->getIndexQuickly(index));
     76        slot.setValue(thisObject, static_cast<unsigned>(PropertyAttribute::None), thisObject->getIndexQuickly(index));
    7777        return true;
    7878    }
  • trunk/Source/JavaScriptCore/runtime/InternalFunction.cpp

    r221822 r222473  
    5050    m_originalName.set(vm, this, nameString);
    5151    if (nameVisibility == NameVisibility::Visible)
    52         putDirect(vm, vm.propertyNames->name, nameString, ReadOnly | DontEnum);
     52        putDirect(vm, vm.propertyNames->name, nameString, PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum);
    5353}
    5454
  • trunk/Source/JavaScriptCore/runtime/IntlCollatorConstructor.cpp

    r217108 r222473  
    7878{
    7979    Base::finishCreation(vm, ASCIILiteral("Collator"));
    80     putDirectWithoutTransition(vm, vm.propertyNames->prototype, collatorPrototype, DontEnum | DontDelete | ReadOnly);
    81     putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum | DontDelete);
     80    putDirectWithoutTransition(vm, vm.propertyNames->prototype, collatorPrototype, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly);
     81    putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(0), PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum | PropertyAttribute::DontDelete);
    8282    m_collatorStructure.set(vm, this, collatorStructure);
    8383}
  • trunk/Source/JavaScriptCore/runtime/IntlDateTimeFormatConstructor.cpp

    r217108 r222473  
    7878{
    7979    Base::finishCreation(vm, ASCIILiteral("DateTimeFormat"));
    80     putDirectWithoutTransition(vm, vm.propertyNames->prototype, dateTimeFormatPrototype, DontEnum | DontDelete | ReadOnly);
    81     putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum | DontDelete);
     80    putDirectWithoutTransition(vm, vm.propertyNames->prototype, dateTimeFormatPrototype, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly);
     81    putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(0), PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum | PropertyAttribute::DontDelete);
    8282    m_dateTimeFormatStructure.set(vm, this, dateTimeFormatStructure);
    8383}
  • trunk/Source/JavaScriptCore/runtime/IntlDateTimeFormatPrototype.cpp

    r217108 r222473  
    8484#if JSC_ICU_HAS_UFIELDPOSITER
    8585    JSFunction* formatToPartsFunction = JSFunction::create(vm, globalObject, 0, vm.propertyNames->formatToParts.string(), IntlDateTimeFormatPrototypeFuncFormatToParts);
    86     putDirectWithoutTransition(vm, vm.propertyNames->formatToParts, formatToPartsFunction, DontEnum);
     86    putDirectWithoutTransition(vm, vm.propertyNames->formatToParts, formatToPartsFunction, static_cast<unsigned>(PropertyAttribute::DontEnum));
    8787#else
    8888    UNUSED_PARAM(globalObject);
  • trunk/Source/JavaScriptCore/runtime/IntlNumberFormatConstructor.cpp

    r217108 r222473  
    7878{
    7979    Base::finishCreation(vm, ASCIILiteral("NumberFormat"));
    80     putDirectWithoutTransition(vm, vm.propertyNames->prototype, numberFormatPrototype, DontEnum | DontDelete | ReadOnly);
    81     putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum | DontDelete);
     80    putDirectWithoutTransition(vm, vm.propertyNames->prototype, numberFormatPrototype, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly);
     81    putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(0), PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum | PropertyAttribute::DontDelete);
    8282    m_numberFormatStructure.set(vm, this, numberFormatStructure);
    8383}
  • trunk/Source/JavaScriptCore/runtime/IntlObject.cpp

    r222017 r222473  
    105105    // Constructor Properties of the Intl Object
    106106    // https://tc39.github.io/ecma402/#sec-constructor-properties-of-the-intl-object
    107     putDirectWithoutTransition(vm, vm.propertyNames->Collator, collatorConstructor, DontEnum);
    108     putDirectWithoutTransition(vm, vm.propertyNames->NumberFormat, numberFormatConstructor, DontEnum);
    109     putDirectWithoutTransition(vm, vm.propertyNames->DateTimeFormat, dateTimeFormatConstructor, DontEnum);
     107    putDirectWithoutTransition(vm, vm.propertyNames->Collator, collatorConstructor, static_cast<unsigned>(PropertyAttribute::DontEnum));
     108    putDirectWithoutTransition(vm, vm.propertyNames->NumberFormat, numberFormatConstructor, static_cast<unsigned>(PropertyAttribute::DontEnum));
     109    putDirectWithoutTransition(vm, vm.propertyNames->DateTimeFormat, dateTimeFormatConstructor, static_cast<unsigned>(PropertyAttribute::DontEnum));
    110110
    111111    // Function Properties of the Intl Object
    112112    // https://tc39.github.io/ecma402/#sec-function-properties-of-the-intl-object
    113     putDirectNativeFunction(vm, globalObject, Identifier::fromString(&vm, "getCanonicalLocales"), 1, intlObjectFuncGetCanonicalLocales, NoIntrinsic, DontEnum);
     113    putDirectNativeFunction(vm, globalObject, Identifier::fromString(&vm, "getCanonicalLocales"), 1, intlObjectFuncGetCanonicalLocales, NoIntrinsic, static_cast<unsigned>(PropertyAttribute::DontEnum));
    114114}
    115115
  • trunk/Source/JavaScriptCore/runtime/IteratorPrototype.cpp

    r221417 r222473  
    4242    vm.prototypeMap.addPrototype(this);
    4343
    44     JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->iteratorSymbol, iteratorPrototypeSymbolIteratorGetterCodeGenerator, DontEnum);
     44    JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->iteratorSymbol, iteratorPrototypeSymbolIteratorGetterCodeGenerator, static_cast<unsigned>(PropertyAttribute::DontEnum));
    4545}
    4646
  • trunk/Source/JavaScriptCore/runtime/JSArray.cpp

    r221849 r222473  
    250250    JSArray* thisObject = jsCast<JSArray*>(object);
    251251    if (propertyName == vm.propertyNames->length) {
    252         unsigned attributes = thisObject->isLengthWritable() ? DontDelete | DontEnum : DontDelete | DontEnum | ReadOnly;
     252        unsigned attributes = thisObject->isLengthWritable() ? PropertyAttribute::DontDelete | PropertyAttribute::DontEnum : PropertyAttribute::DontDelete | PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly;
    253253        slot.setValue(thisObject, attributes, jsNumber(thisObject->length()));
    254254        return true;
     
    463463                    SparseArrayValueMap::iterator it = map->find(index);
    464464                    ASSERT(it != map->notFound());
    465                     if (it->value.attributes & DontDelete) {
     465                    if (it->value.attributes & PropertyAttribute::DontDelete) {
    466466                        storage->setLength(index + 1);
    467467                        return typeError(exec, scope, throwException, ASCIILiteral(UnableToDeletePropertyError));
  • trunk/Source/JavaScriptCore/runtime/JSArrayBufferConstructor.cpp

    r218452 r222473  
    5454{
    5555    Base::finishCreation(vm, ASCIILiteral(arrayBufferSharingModeName(m_sharingMode)));
    56     putDirectWithoutTransition(vm, vm.propertyNames->prototype, prototype, DontEnum | DontDelete | ReadOnly);
    57     putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), DontEnum | ReadOnly);
    58     putDirectNonIndexAccessor(vm, vm.propertyNames->speciesSymbol, speciesSymbol, Accessor | ReadOnly | DontEnum);
     56    putDirectWithoutTransition(vm, vm.propertyNames->prototype, prototype, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly);
     57    putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly);
     58    putDirectNonIndexAccessor(vm, vm.propertyNames->speciesSymbol, speciesSymbol, PropertyAttribute::Accessor | PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum);
    5959
    6060    if (m_sharingMode == ArrayBufferSharingMode::Default) {
    6161        JSGlobalObject* globalObject = this->globalObject();
    62         JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->isView, arrayBufferFuncIsView, DontEnum, 1);
    63         JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->builtinNames().isViewPrivateName(), arrayBufferFuncIsView, DontEnum, 1);
     62        JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->isView, arrayBufferFuncIsView, static_cast<unsigned>(PropertyAttribute::DontEnum), 1);
     63        JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->builtinNames().isViewPrivateName(), arrayBufferFuncIsView, static_cast<unsigned>(PropertyAttribute::DontEnum), 1);
    6464    }
    6565}
  • trunk/Source/JavaScriptCore/runtime/JSArrayBufferPrototype.cpp

    r217108 r222473  
    125125    Base::finishCreation(vm);
    126126   
    127     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->slice, arrayBufferProtoFuncSlice, DontEnum, 2);
    128     putDirectWithoutTransition(vm, vm.propertyNames->toStringTagSymbol, jsString(&vm, arrayBufferSharingModeName(m_sharingMode)), DontEnum | ReadOnly);
     127    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->slice, arrayBufferProtoFuncSlice, static_cast<unsigned>(PropertyAttribute::DontEnum), 2);
     128    putDirectWithoutTransition(vm, vm.propertyNames->toStringTagSymbol, jsString(&vm, arrayBufferSharingModeName(m_sharingMode)), PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly);
    129129    if (m_sharingMode == ArrayBufferSharingMode::Default)
    130         JSC_NATIVE_GETTER(vm.propertyNames->byteLength, arrayBufferProtoGetterFuncByteLength, DontEnum | ReadOnly);
     130        JSC_NATIVE_GETTER(vm.propertyNames->byteLength, arrayBufferProtoGetterFuncByteLength, PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly);
    131131    else
    132         JSC_NATIVE_GETTER(vm.propertyNames->byteLength, sharedArrayBufferProtoGetterFuncByteLength, DontEnum | ReadOnly);
     132        JSC_NATIVE_GETTER(vm.propertyNames->byteLength, sharedArrayBufferProtoGetterFuncByteLength, PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly);
    133133}
    134134
  • trunk/Source/JavaScriptCore/runtime/JSBoundFunction.cpp

    r217108 r222473  
    211211    ASSERT(inherits(vm, info()));
    212212
    213     putDirectNonIndexAccessor(vm, vm.propertyNames->arguments, globalObject()->throwTypeErrorArgumentsCalleeAndCallerGetterSetter(), DontDelete | DontEnum | Accessor);
    214     putDirectNonIndexAccessor(vm, vm.propertyNames->caller, globalObject()->throwTypeErrorArgumentsCalleeAndCallerGetterSetter(), DontDelete | DontEnum | Accessor);
     213    putDirectNonIndexAccessor(vm, vm.propertyNames->arguments, globalObject()->throwTypeErrorArgumentsCalleeAndCallerGetterSetter(), PropertyAttribute::DontDelete | PropertyAttribute::DontEnum | PropertyAttribute::Accessor);
     214    putDirectNonIndexAccessor(vm, vm.propertyNames->caller, globalObject()->throwTypeErrorArgumentsCalleeAndCallerGetterSetter(), PropertyAttribute::DontDelete | PropertyAttribute::DontEnum | PropertyAttribute::Accessor);
    215215}
    216216
  • trunk/Source/JavaScriptCore/runtime/JSCJSValue.cpp

    r221849 r222473  
    176176        PropertyOffset offset = obj->structure()->get(vm, propertyName, attributes);
    177177        if (offset != invalidOffset) {
    178             if (attributes & ReadOnly)
     178            if (attributes & PropertyAttribute::ReadOnly)
    179179                return typeError(exec, scope, slot.isStrictMode(), ASCIILiteral(ReadonlyPropertyWriteError));
    180180
     
    186186
    187187            if (gs.isCustomGetterSetter())
    188                 return callCustomSetter(exec, gs, attributes & CustomAccessor, obj, slot.thisValue(), value);
     188                return callCustomSetter(exec, gs, attributes & PropertyAttribute::CustomAccessor, obj, slot.thisValue(), value);
    189189
    190190            // If there's an existing property on the object or one of its
  • trunk/Source/JavaScriptCore/runtime/JSDataView.cpp

    r221822 r222473  
    109109    JSDataView* thisObject = jsCast<JSDataView*>(object);
    110110    if (propertyName == vm.propertyNames->byteLength) {
    111         slot.setValue(thisObject, DontEnum | ReadOnly, jsNumber(thisObject->m_length));
     111        slot.setValue(thisObject, PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly, jsNumber(thisObject->m_length));
    112112        return true;
    113113    }
    114114    if (propertyName == vm.propertyNames->byteOffset) {
    115         slot.setValue(thisObject, DontEnum | ReadOnly, jsNumber(thisObject->byteOffset()));
     115        slot.setValue(thisObject, PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly, jsNumber(thisObject->byteOffset()));
    116116        return true;
    117117    }
  • trunk/Source/JavaScriptCore/runtime/JSDataViewPrototype.cpp

    r217108 r222473  
    110110{
    111111    Base::finishCreation(vm);
    112     putDirectWithoutTransition(vm, vm.propertyNames->toStringTagSymbol, jsString(&vm, "DataView"), DontEnum | ReadOnly);
     112    putDirectWithoutTransition(vm, vm.propertyNames->toStringTagSymbol, jsString(&vm, "DataView"), PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly);
    113113}
    114114
  • trunk/Source/JavaScriptCore/runtime/JSFunction.cpp

    r221822 r222473  
    110110    // Some NativeExecutable functions, like JSBoundFunction, decide to lazily allocate their name string.
    111111    if (!name.isNull())
    112         putDirect(vm, vm.propertyNames->name, jsString(&vm, name), ReadOnly | DontEnum);
    113     putDirect(vm, vm.propertyNames->length, jsNumber(length), ReadOnly | DontEnum);
     112        putDirect(vm, vm.propertyNames->name, jsString(&vm, name), PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum);
     113    putDirect(vm, vm.propertyNames->length, jsNumber(length), PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum);
    114114}
    115115
     
    365365            else {
    366366                prototype = constructEmptyObject(exec);
    367                 prototype->putDirect(vm, vm.propertyNames->constructor, thisObject, DontEnum);
     367                prototype->putDirect(vm, vm.propertyNames->constructor, thisObject, static_cast<unsigned>(PropertyAttribute::DontEnum));
    368368            }
    369369
    370             thisObject->putDirect(vm, vm.propertyNames->prototype, prototype, DontDelete | DontEnum);
     370            thisObject->putDirect(vm, vm.propertyNames->prototype, prototype, PropertyAttribute::DontDelete | PropertyAttribute::DontEnum);
    371371            offset = thisObject->getDirectOffset(vm, vm.propertyNames->prototype, attributes);
    372372            ASSERT(isValidOffset(offset));
     
    380380            return Base::getOwnPropertySlot(thisObject, exec, propertyName, slot);
    381381       
    382         slot.setCacheableCustom(thisObject, ReadOnly | DontEnum | DontDelete, argumentsGetter);
     382        slot.setCacheableCustom(thisObject, PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum | PropertyAttribute::DontDelete, argumentsGetter);
    383383        return true;
    384384    }
     
    388388            return Base::getOwnPropertySlot(thisObject, exec, propertyName, slot);
    389389
    390         slot.setCacheableCustom(thisObject, ReadOnly | DontEnum | DontDelete, callerGetter);
     390        slot.setCacheableCustom(thisObject, PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum | PropertyAttribute::DontDelete, callerGetter);
    391391        return true;
    392392    }
     
    533533            PropertySlot slot(thisObject, PropertySlot::InternalMethodType::VMInquiry);
    534534            if (!Base::getOwnPropertySlot(thisObject, exec, propertyName, slot))
    535                 thisObject->putDirectAccessor(exec, propertyName, thisObject->globalObject(vm)->throwTypeErrorArgumentsCalleeAndCallerGetterSetter(), DontDelete | DontEnum | Accessor);
     535                thisObject->putDirectAccessor(exec, propertyName, thisObject->globalObject(vm)->throwTypeErrorArgumentsCalleeAndCallerGetterSetter(), PropertyAttribute::DontDelete | PropertyAttribute::DontEnum | PropertyAttribute::Accessor);
    536536            scope.release();
    537537            return Base::defineOwnProperty(object, exec, propertyName, descriptor, throwException);
     
    547547            PropertySlot slot(thisObject, PropertySlot::InternalMethodType::VMInquiry);
    548548            if (!Base::getOwnPropertySlot(thisObject, exec, propertyName, slot))
    549                 thisObject->putDirectAccessor(exec, propertyName, thisObject->globalObject(vm)->throwTypeErrorArgumentsCalleeAndCallerGetterSetter(), DontDelete | DontEnum | Accessor);
     549                thisObject->putDirectAccessor(exec, propertyName, thisObject->globalObject(vm)->throwTypeErrorArgumentsCalleeAndCallerGetterSetter(), PropertyAttribute::DontDelete | PropertyAttribute::DontEnum | PropertyAttribute::Accessor);
    550550            scope.release();
    551551            return Base::defineOwnProperty(object, exec, propertyName, descriptor, throwException);
     
    636636    ASSERT(!isHostFunction());
    637637    JSValue initialValue = jsNumber(jsExecutable()->parameterCount());
    638     unsigned initialAttributes = DontEnum | ReadOnly;
     638    unsigned initialAttributes = PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly;
    639639    const Identifier& identifier = vm.propertyNames->length;
    640640    putDirect(vm, identifier, initialValue, initialAttributes);
     
    663663    ASSERT(!hasReifiedName());
    664664    ASSERT(!isHostFunction());
    665     unsigned initialAttributes = DontEnum | ReadOnly;
     665    unsigned initialAttributes = PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly;
    666666    const Identifier& propID = vm.propertyNames->name;
    667667
     
    729729        FunctionRareData* rareData = this->rareData(vm);
    730730        String name = makeString("bound ", static_cast<NativeExecutable*>(m_executable.get())->name());
    731         unsigned initialAttributes = DontEnum | ReadOnly;
     731        unsigned initialAttributes = PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly;
    732732        putDirect(vm, nameIdent, jsString(exec, name), initialAttributes);
    733733        rareData->setHasReifiedName();
  • trunk/Source/JavaScriptCore/runtime/JSGenericTypedArrayViewConstructorInlines.h

    r222421 r222473  
    4848{
    4949    Base::finishCreation(vm, name);
    50     putDirectWithoutTransition(vm, vm.propertyNames->prototype, prototype, DontEnum | DontDelete | ReadOnly);
    51     putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(3), DontEnum | ReadOnly);
    52     putDirectWithoutTransition(vm, vm.propertyNames->BYTES_PER_ELEMENT, jsNumber(ViewClass::elementSize), DontEnum | ReadOnly | DontDelete);
     50    putDirectWithoutTransition(vm, vm.propertyNames->prototype, prototype, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly);
     51    putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(3), PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly);
     52    putDirectWithoutTransition(vm, vm.propertyNames->BYTES_PER_ELEMENT, jsNumber(ViewClass::elementSize), PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly | PropertyAttribute::DontDelete);
    5353
    5454    if (privateAllocator)
    55         putDirectBuiltinFunction(vm, globalObject, vm.propertyNames->builtinNames().allocateTypedArrayPrivateName(), privateAllocator, DontEnum | DontDelete | ReadOnly);
     55        putDirectBuiltinFunction(vm, globalObject, vm.propertyNames->builtinNames().allocateTypedArrayPrivateName(), privateAllocator, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly);
    5656}
    5757
  • trunk/Source/JavaScriptCore/runtime/JSGenericTypedArrayViewInlines.h

    r221849 r222473  
    356356    if (std::optional<uint32_t> index = parseIndex(propertyName)) {
    357357        if (thisObject->isNeutered()) {
    358             slot.setCustom(thisObject, None, throwNeuteredTypedArrayTypeError);
     358            slot.setCustom(thisObject, static_cast<unsigned>(PropertyAttribute::None), throwNeuteredTypedArrayTypeError);
    359359            return true;
    360360        }
    361361
    362362        if (thisObject->canGetIndexQuickly(index.value()))
    363             slot.setValue(thisObject, DontDelete | ReadOnly, thisObject->getIndexQuickly(index.value()));
     363            slot.setValue(thisObject, PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly, thisObject->getIndexQuickly(index.value()));
    364364        else
    365             slot.setValue(thisObject, DontDelete | ReadOnly, jsUndefined());
     365            slot.setValue(thisObject, PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly, jsUndefined());
    366366        return true;
    367367    }
     
    447447
    448448    if (thisObject->isNeutered()) {
    449         slot.setCustom(thisObject, None, throwNeuteredTypedArrayTypeError);
     449        slot.setCustom(thisObject, static_cast<unsigned>(PropertyAttribute::None), throwNeuteredTypedArrayTypeError);
    450450        return true;
    451451    }
     
    459459        return false;
    460460   
    461     slot.setValue(thisObject, DontDelete, thisObject->getIndexQuickly(propertyName));
     461    slot.setValue(thisObject, static_cast<unsigned>(PropertyAttribute::DontDelete), thisObject->getIndexQuickly(propertyName));
    462462    return true;
    463463}
  • trunk/Source/JavaScriptCore/runtime/JSGenericTypedArrayViewPrototypeInlines.h

    r211247 r222473  
    4444    ASSERT(inherits(vm, info()));
    4545
    46     putDirect(vm, vm.propertyNames->BYTES_PER_ELEMENT, jsNumber(ViewClass::elementSize), DontEnum | ReadOnly | DontDelete);
     46    putDirect(vm, vm.propertyNames->BYTES_PER_ELEMENT, jsNumber(ViewClass::elementSize), PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly | PropertyAttribute::DontDelete);
    4747
    4848}
  • trunk/Source/JavaScriptCore/runtime/JSGlobalObject.cpp

    r222143 r222473  
    404404    m_namedFunctionStructure.initLater(
    405405        [] (const Initializer<Structure>& init) {
    406             init.set(Structure::addPropertyTransition(init.vm, init.owner->m_functionStructure.get(), init.vm.propertyNames->name, DontDelete | ReadOnly | DontEnum, init.owner->m_functionNameOffset));
     406            init.set(Structure::addPropertyTransition(init.vm, init.owner->m_functionStructure.get(), init.vm.propertyNames->name, PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum, init.owner->m_functionNameOffset));
    407407        });
    408408    JSFunction* callFunction = nullptr;
     
    452452    protoAccessor->setGetter(vm, this, JSFunction::create(vm, this, 0, makeString("get ", vm.propertyNames->underscoreProto.string()), globalFuncProtoGetter));
    453453    protoAccessor->setSetter(vm, this, JSFunction::create(vm, this, 0, makeString("set ", vm.propertyNames->underscoreProto.string()), globalFuncProtoSetter));
    454     m_objectPrototype->putDirectNonIndexAccessor(vm, vm.propertyNames->underscoreProto, protoAccessor, Accessor | DontEnum);
     454    m_objectPrototype->putDirectNonIndexAccessor(vm, vm.propertyNames->underscoreProto, protoAccessor, PropertyAttribute::Accessor | PropertyAttribute::DontEnum);
    455455    m_functionPrototype->structure()->setPrototypeWithoutTransition(vm, m_objectPrototype.get());
    456456    m_objectStructureForObjectConstructor.set(vm, this, vm.prototypeMap.emptyObjectStructureForPrototype(this, m_objectPrototype.get(), JSFinalObject::defaultInlineCapacity()));
     
    479479            JSTypedArrayViewPrototype* prototype = init.owner->m_typedArrayProto.get(init.owner);
    480480            JSTypedArrayViewConstructor* constructor = JSTypedArrayViewConstructor::create(init.vm, init.owner, JSTypedArrayViewConstructor::createStructure(init.vm, init.owner, init.owner->m_functionPrototype.get()), prototype, init.owner->m_speciesGetterSetter.get());
    481             prototype->putDirectWithoutTransition(init.vm, init.vm.propertyNames->constructor, constructor, DontEnum);
     481            prototype->putDirectWithoutTransition(init.vm, init.vm.propertyNames->constructor, constructor, static_cast<unsigned>(PropertyAttribute::DontEnum));
    482482            init.set(constructor);
    483483        });
     
    489489            init.setStructure(JS ## type ## Array::createStructure(init.vm, init.global, init.prototype)); \
    490490            init.setConstructor(JS ## type ## ArrayConstructor::create(init.vm, init.global, JS ## type ## ArrayConstructor::createStructure(init.vm, init.global, init.global->m_typedArraySuperConstructor.get(init.global)), init.prototype, ASCIILiteral(#type "Array"), typedArrayConstructorAllocate ## type ## ArrayCodeGenerator(init.vm))); \
    491             init.global->putDirectWithoutTransition(init.vm, init.vm.propertyNames->builtinNames().type ## ArrayPrivateName(), init.constructor, DontEnum); \
     491            init.global->putDirectWithoutTransition(init.vm, init.vm.propertyNames->builtinNames().type ## ArrayPrivateName(), init.constructor, static_cast<unsigned>(PropertyAttribute::DontEnum)); \
    492492        });
    493493    FOR_EACH_TYPED_ARRAY_TYPE_EXCLUDING_DATA_VIEW(INIT_TYPED_ARRAY_LATER)
     
    575575
    576576    m_parseIntFunction.set(vm, this, JSFunction::create(vm, this, 2, vm.propertyNames->parseInt.string(), globalFuncParseInt, ParseIntIntrinsic));
    577     putDirectWithoutTransition(vm, vm.propertyNames->parseInt, m_parseIntFunction.get(), DontEnum);
     577    putDirectWithoutTransition(vm, vm.propertyNames->parseInt, m_parseIntFunction.get(), static_cast<unsigned>(PropertyAttribute::DontEnum));
    578578    m_parseFloatFunction.set(vm, this, JSFunction::create(vm, this, 1, vm.propertyNames->parseFloat.string(), globalFuncParseFloat, NoIntrinsic));
    579     putDirectWithoutTransition(vm, vm.propertyNames->parseFloat, m_parseFloatFunction.get(), DontEnum);
     579    putDirectWithoutTransition(vm, vm.propertyNames->parseFloat, m_parseFloatFunction.get(), static_cast<unsigned>(PropertyAttribute::DontEnum));
    580580   
    581581    m_arrayBufferPrototype.set(vm, this, JSArrayBufferPrototype::create(vm, this, JSArrayBufferPrototype::createStructure(vm, this, m_objectPrototype.get()), ArrayBufferSharingMode::Default));
     
    629629   
    630630    JSArrayBufferConstructor* arrayBufferConstructor = JSArrayBufferConstructor::create(vm, JSArrayBufferConstructor::createStructure(vm, this, m_functionPrototype.get()), m_arrayBufferPrototype.get(), m_speciesGetterSetter.get(), ArrayBufferSharingMode::Default);
    631     m_arrayBufferPrototype->putDirectWithoutTransition(vm, vm.propertyNames->constructor, arrayBufferConstructor, DontEnum);
     631    m_arrayBufferPrototype->putDirectWithoutTransition(vm, vm.propertyNames->constructor, arrayBufferConstructor, static_cast<unsigned>(PropertyAttribute::DontEnum));
    632632    JSArrayBufferConstructor* sharedArrayBufferConstructor = nullptr;
    633633    sharedArrayBufferConstructor = JSArrayBufferConstructor::create(vm, JSArrayBufferConstructor::createStructure(vm, this, m_functionPrototype.get()), m_sharedArrayBufferPrototype.get(), m_speciesGetterSetter.get(), ArrayBufferSharingMode::Shared);
    634     m_sharedArrayBufferPrototype->putDirectWithoutTransition(vm, vm.propertyNames->constructor, sharedArrayBufferConstructor, DontEnum);
     634    m_sharedArrayBufferPrototype->putDirectWithoutTransition(vm, vm.propertyNames->constructor, sharedArrayBufferConstructor, static_cast<unsigned>(PropertyAttribute::DontEnum));
    635635   
    636636#define CREATE_CONSTRUCTOR_FOR_SIMPLE_TYPE(capitalName, lowerName, properName, instanceType, jsName, prototypeBase) \
    637637capitalName ## Constructor* lowerName ## Constructor = capitalName ## Constructor::create(vm, capitalName ## Constructor::createStructure(vm, this, m_functionPrototype.get()), m_ ## lowerName ## Prototype.get(), m_speciesGetterSetter.get()); \
    638 m_ ## lowerName ## Prototype->putDirectWithoutTransition(vm, vm.propertyNames->constructor, lowerName ## Constructor, DontEnum); \
     638m_ ## lowerName ## Prototype->putDirectWithoutTransition(vm, vm.propertyNames->constructor, lowerName ## Constructor, static_cast<unsigned>(PropertyAttribute::DontEnum)); \
    639639
    640640    FOR_EACH_SIMPLE_BUILTIN_TYPE(CREATE_CONSTRUCTOR_FOR_SIMPLE_TYPE)
     
    669669    m_generatorFunctionPrototype.set(vm, this, GeneratorFunctionPrototype::create(vm, GeneratorFunctionPrototype::createStructure(vm, this, m_functionPrototype.get())));
    670670    GeneratorFunctionConstructor* generatorFunctionConstructor = GeneratorFunctionConstructor::create(vm, GeneratorFunctionConstructor::createStructure(vm, this, functionConstructor), m_generatorFunctionPrototype.get());
    671     m_generatorFunctionPrototype->putDirectWithoutTransition(vm, vm.propertyNames->constructor, generatorFunctionConstructor, DontEnum | ReadOnly);
     671    m_generatorFunctionPrototype->putDirectWithoutTransition(vm, vm.propertyNames->constructor, generatorFunctionConstructor, PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly);
    672672    m_generatorFunctionStructure.set(vm, this, JSGeneratorFunction::createStructure(vm, this, m_generatorFunctionPrototype.get()));
    673673
    674     m_generatorPrototype->putDirectWithoutTransition(vm, vm.propertyNames->constructor, m_generatorFunctionPrototype.get(), DontEnum | ReadOnly);
    675     m_generatorFunctionPrototype->putDirectWithoutTransition(vm, vm.propertyNames->prototype, m_generatorPrototype.get(), DontEnum | ReadOnly);
     674    m_generatorPrototype->putDirectWithoutTransition(vm, vm.propertyNames->constructor, m_generatorFunctionPrototype.get(), PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly);
     675    m_generatorFunctionPrototype->putDirectWithoutTransition(vm, vm.propertyNames->prototype, m_generatorPrototype.get(), PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly);
    676676
    677677    m_asyncFunctionPrototype.set(vm, this, AsyncFunctionPrototype::create(vm, AsyncFunctionPrototype::createStructure(vm, this, m_functionPrototype.get())));
    678678    AsyncFunctionConstructor* asyncFunctionConstructor = AsyncFunctionConstructor::create(vm, AsyncFunctionConstructor::createStructure(vm, this, functionConstructor), m_asyncFunctionPrototype.get());
    679     m_asyncFunctionPrototype->putDirectWithoutTransition(vm, vm.propertyNames->constructor, asyncFunctionConstructor, DontEnum | ReadOnly);
     679    m_asyncFunctionPrototype->putDirectWithoutTransition(vm, vm.propertyNames->constructor, asyncFunctionConstructor, PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly);
    680680    m_asyncFunctionStructure.set(vm, this, JSAsyncFunction::createStructure(vm, this, m_asyncFunctionPrototype.get()));
    681681
    682682    m_asyncGeneratorFunctionPrototype.set(vm, this, AsyncGeneratorFunctionPrototype::create(vm, AsyncGeneratorFunctionPrototype::createStructure(vm, this, m_functionPrototype.get())));
    683683    AsyncGeneratorFunctionConstructor* asyncGeneratorFunctionConstructor = AsyncGeneratorFunctionConstructor::create(vm, AsyncGeneratorFunctionConstructor::createStructure(vm, this, functionConstructor), m_asyncGeneratorFunctionPrototype.get());
    684     m_asyncGeneratorFunctionPrototype->putDirectWithoutTransition(vm, vm.propertyNames->constructor, asyncGeneratorFunctionConstructor, DontEnum | ReadOnly);
     684    m_asyncGeneratorFunctionPrototype->putDirectWithoutTransition(vm, vm.propertyNames->constructor, asyncGeneratorFunctionConstructor, PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly);
    685685    m_asyncGeneratorFunctionStructure.set(vm, this, JSAsyncGeneratorFunction::createStructure(vm, this, m_asyncGeneratorFunctionPrototype.get()));
    686686
    687     m_asyncGeneratorPrototype->putDirectWithoutTransition(vm, vm.propertyNames->constructor, m_asyncGeneratorFunctionPrototype.get(), DontEnum | ReadOnly);
    688     m_asyncGeneratorFunctionPrototype->putDirectWithoutTransition(vm, vm.propertyNames->prototype, m_asyncGeneratorPrototype.get(), DontEnum | ReadOnly);
    689    
    690    
    691     m_objectPrototype->putDirectWithoutTransition(vm, vm.propertyNames->constructor, objectConstructor, DontEnum);
    692     m_functionPrototype->putDirectWithoutTransition(vm, vm.propertyNames->constructor, functionConstructor, DontEnum);
    693     m_arrayPrototype->putDirectWithoutTransition(vm, vm.propertyNames->constructor, arrayConstructor, DontEnum);
    694     m_regExpPrototype->putDirectWithoutTransition(vm, vm.propertyNames->constructor, m_regExpConstructor.get(), DontEnum);
    695    
    696     putDirectWithoutTransition(vm, vm.propertyNames->Object, objectConstructor, DontEnum);
    697     putDirectWithoutTransition(vm, vm.propertyNames->Function, functionConstructor, DontEnum);
    698     putDirectWithoutTransition(vm, vm.propertyNames->Array, arrayConstructor, DontEnum);
    699     putDirectWithoutTransition(vm, vm.propertyNames->RegExp, m_regExpConstructor.get(), DontEnum);
    700     putDirectWithoutTransition(vm, vm.propertyNames->RangeError, m_rangeErrorConstructor.get(), DontEnum);
    701     putDirectWithoutTransition(vm, vm.propertyNames->TypeError, m_typeErrorConstructor.get(), DontEnum);
    702 
    703     putDirectWithoutTransition(vm, vm.propertyNames->builtinNames().ObjectPrivateName(), objectConstructor, DontEnum | DontDelete | ReadOnly);
    704     putDirectWithoutTransition(vm, vm.propertyNames->builtinNames().ArrayPrivateName(), arrayConstructor, DontEnum | DontDelete | ReadOnly);
    705 
    706     putDirectWithoutTransition(vm, vm.propertyNames->ArrayBuffer, arrayBufferConstructor, DontEnum);
    707     putDirectWithoutTransition(vm, vm.propertyNames->SharedArrayBuffer, sharedArrayBufferConstructor, DontEnum);
     687    m_asyncGeneratorPrototype->putDirectWithoutTransition(vm, vm.propertyNames->constructor, m_asyncGeneratorFunctionPrototype.get(), PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly);
     688    m_asyncGeneratorFunctionPrototype->putDirectWithoutTransition(vm, vm.propertyNames->prototype, m_asyncGeneratorPrototype.get(), PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly);
     689   
     690   
     691    m_objectPrototype->putDirectWithoutTransition(vm, vm.propertyNames->constructor, objectConstructor, static_cast<unsigned>(PropertyAttribute::DontEnum));
     692    m_functionPrototype->putDirectWithoutTransition(vm, vm.propertyNames->constructor, functionConstructor, static_cast<unsigned>(PropertyAttribute::DontEnum));
     693    m_arrayPrototype->putDirectWithoutTransition(vm, vm.propertyNames->constructor, arrayConstructor, static_cast<unsigned>(PropertyAttribute::DontEnum));
     694    m_regExpPrototype->putDirectWithoutTransition(vm, vm.propertyNames->constructor, m_regExpConstructor.get(), static_cast<unsigned>(PropertyAttribute::DontEnum));
     695   
     696    putDirectWithoutTransition(vm, vm.propertyNames->Object, objectConstructor, static_cast<unsigned>(PropertyAttribute::DontEnum));
     697    putDirectWithoutTransition(vm, vm.propertyNames->Function, functionConstructor, static_cast<unsigned>(PropertyAttribute::DontEnum));
     698    putDirectWithoutTransition(vm, vm.propertyNames->Array, arrayConstructor, static_cast<unsigned>(PropertyAttribute::DontEnum));
     699    putDirectWithoutTransition(vm, vm.propertyNames->RegExp, m_regExpConstructor.get(), static_cast<unsigned>(PropertyAttribute::DontEnum));
     700    putDirectWithoutTransition(vm, vm.propertyNames->RangeError, m_rangeErrorConstructor.get(), static_cast<unsigned>(PropertyAttribute::DontEnum));
     701    putDirectWithoutTransition(vm, vm.propertyNames->TypeError, m_typeErrorConstructor.get(), static_cast<unsigned>(PropertyAttribute::DontEnum));
     702
     703    putDirectWithoutTransition(vm, vm.propertyNames->builtinNames().ObjectPrivateName(), objectConstructor, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly);
     704    putDirectWithoutTransition(vm, vm.propertyNames->builtinNames().ArrayPrivateName(), arrayConstructor, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly);
     705
     706    putDirectWithoutTransition(vm, vm.propertyNames->ArrayBuffer, arrayBufferConstructor, static_cast<unsigned>(PropertyAttribute::DontEnum));
     707    putDirectWithoutTransition(vm, vm.propertyNames->SharedArrayBuffer, sharedArrayBufferConstructor, static_cast<unsigned>(PropertyAttribute::DontEnum));
    708708
    709709#define PUT_CONSTRUCTOR_FOR_SIMPLE_TYPE(capitalName, lowerName, properName, instanceType, jsName, prototypeBase) \
    710 putDirectWithoutTransition(vm, vm.propertyNames-> jsName, lowerName ## Constructor, DontEnum); \
     710putDirectWithoutTransition(vm, vm.propertyNames-> jsName, lowerName ## Constructor, static_cast<unsigned>(PropertyAttribute::DontEnum)); \
    711711
    712712    FOR_EACH_SIMPLE_BUILTIN_TYPE_WITH_CONSTRUCTOR(PUT_CONSTRUCTOR_FOR_SIMPLE_TYPE)
     
    716716   
    717717    m_evalFunction.set(vm, this, JSFunction::create(vm, this, 1, vm.propertyNames->eval.string(), globalFuncEval));
    718     putDirectWithoutTransition(vm, vm.propertyNames->eval, m_evalFunction.get(), DontEnum);
     718    putDirectWithoutTransition(vm, vm.propertyNames->eval, m_evalFunction.get(), static_cast<unsigned>(PropertyAttribute::DontEnum));
    719719   
    720720#if ENABLE(INTL)
    721721    IntlObject* intl = IntlObject::create(vm, this, IntlObject::createStructure(vm, this, m_objectPrototype.get()));
    722     putDirectWithoutTransition(vm, vm.propertyNames->Intl, intl, DontEnum);
     722    putDirectWithoutTransition(vm, vm.propertyNames->Intl, intl, static_cast<unsigned>(PropertyAttribute::DontEnum));
    723723#endif // ENABLE(INTL)
    724724    ReflectObject* reflectObject = ReflectObject::create(vm, this, ReflectObject::createStructure(vm, this, m_objectPrototype.get()));
    725     putDirectWithoutTransition(vm, vm.propertyNames->Reflect, reflectObject, DontEnum);
     725    putDirectWithoutTransition(vm, vm.propertyNames->Reflect, reflectObject, static_cast<unsigned>(PropertyAttribute::DontEnum));
    726726
    727727    m_moduleLoaderStructure.set(vm, this, JSModuleLoader::createStructure(vm, this, m_moduleLoaderPrototype.get()));
    728728    m_moduleLoader.set(vm, this, JSModuleLoader::create(globalExec(), vm, this, m_moduleLoaderStructure.get()));
    729729    if (Options::exposeInternalModuleLoader())
    730         putDirectWithoutTransition(vm, vm.propertyNames->Loader, m_moduleLoader.get(), DontEnum);
     730        putDirectWithoutTransition(vm, vm.propertyNames->Loader, m_moduleLoader.get(), static_cast<unsigned>(PropertyAttribute::DontEnum));
    731731
    732732    JSFunction* builtinLog = JSFunction::create(vm, this, 1, vm.propertyNames->emptyIdentifier.string(), globalFuncBuiltinLog);
     
    799799
    800800    GlobalPropertyInfo staticGlobals[] = {
    801 #define INIT_PRIVATE_GLOBAL(name, code) GlobalPropertyInfo(vm.propertyNames->builtinNames().name ## PrivateName(), name ## PrivateFunction, DontEnum | DontDelete | ReadOnly),
     801#define INIT_PRIVATE_GLOBAL(name, code) GlobalPropertyInfo(vm.propertyNames->builtinNames().name ## PrivateName(), name ## PrivateFunction, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly),
    802802        JSC_FOREACH_BUILTIN_FUNCTION_PRIVATE_GLOBAL_NAME(INIT_PRIVATE_GLOBAL)
    803803#undef INIT_PRIVATE_GLOBAL
    804         GlobalPropertyInfo(vm.propertyNames->NaN, jsNaN(), DontEnum | DontDelete | ReadOnly),
    805         GlobalPropertyInfo(vm.propertyNames->Infinity, jsNumber(std::numeric_limits<double>::infinity()), DontEnum | DontDelete | ReadOnly),
    806         GlobalPropertyInfo(vm.propertyNames->undefinedKeyword, jsUndefined(), DontEnum | DontDelete | ReadOnly),
    807         GlobalPropertyInfo(vm.propertyNames->builtinNames().getOwnPropertyNamesPrivateName(), privateFuncGetOwnPropertyNames, DontEnum | DontDelete | ReadOnly),
    808         GlobalPropertyInfo(vm.propertyNames->builtinNames().propertyIsEnumerablePrivateName(), privateFuncPropertyIsEnumerable, DontEnum | DontDelete | ReadOnly),
    809         GlobalPropertyInfo(vm.propertyNames->builtinNames().importModulePrivateName(), privateFuncImportModule, DontEnum | DontDelete | ReadOnly),
    810         GlobalPropertyInfo(vm.propertyNames->builtinNames().enqueueJobPrivateName(), JSFunction::create(vm, this, 0, String(), enqueueJob), DontEnum | DontDelete | ReadOnly),
    811         GlobalPropertyInfo(vm.propertyNames->builtinNames().ErrorPrivateName(), m_errorConstructor.get(), DontEnum | DontDelete | ReadOnly),
    812         GlobalPropertyInfo(vm.propertyNames->builtinNames().RangeErrorPrivateName(), m_rangeErrorConstructor.get(), DontEnum | DontDelete | ReadOnly),
    813         GlobalPropertyInfo(vm.propertyNames->builtinNames().TypeErrorPrivateName(), m_typeErrorConstructor.get(), DontEnum | DontDelete | ReadOnly),
    814         GlobalPropertyInfo(vm.propertyNames->builtinNames().typedArrayLengthPrivateName(), privateFuncTypedArrayLength, DontEnum | DontDelete | ReadOnly),
    815         GlobalPropertyInfo(vm.propertyNames->builtinNames().typedArrayGetOriginalConstructorPrivateName(), privateFuncTypedArrayGetOriginalConstructor, DontEnum | DontDelete | ReadOnly),
    816         GlobalPropertyInfo(vm.propertyNames->builtinNames().typedArraySortPrivateName(), privateFuncTypedArraySort, DontEnum | DontDelete | ReadOnly),
    817         GlobalPropertyInfo(vm.propertyNames->builtinNames().isTypedArrayViewPrivateName(), privateFuncIsTypedArrayView, DontEnum | DontDelete | ReadOnly),
    818         GlobalPropertyInfo(vm.propertyNames->builtinNames().typedArraySubarrayCreatePrivateName(), privateFuncTypedArraySubarrayCreate, DontEnum | DontDelete | ReadOnly),
    819         GlobalPropertyInfo(vm.propertyNames->builtinNames().isBoundFunctionPrivateName(), privateFuncIsBoundFunction, DontEnum | DontDelete | ReadOnly),
    820         GlobalPropertyInfo(vm.propertyNames->builtinNames().hasInstanceBoundFunctionPrivateName(), privateFuncHasInstanceBoundFunction, DontEnum | DontDelete | ReadOnly),
    821         GlobalPropertyInfo(vm.propertyNames->builtinNames().instanceOfPrivateName(), privateFuncInstanceOf, DontEnum | DontDelete | ReadOnly),
    822         GlobalPropertyInfo(vm.propertyNames->builtinNames().BuiltinLogPrivateName(), builtinLog, DontEnum | DontDelete | ReadOnly),
    823         GlobalPropertyInfo(vm.propertyNames->builtinNames().NumberPrivateName(), numberConstructor, DontEnum | DontDelete | ReadOnly),
    824         GlobalPropertyInfo(vm.propertyNames->builtinNames().RegExpPrivateName(), m_regExpConstructor.get(), DontEnum | DontDelete | ReadOnly),
    825         GlobalPropertyInfo(vm.propertyNames->builtinNames().StringPrivateName(), stringConstructor, DontEnum | DontDelete | ReadOnly),
    826         GlobalPropertyInfo(vm.propertyNames->builtinNames().absPrivateName(), privateFuncAbs, DontEnum | DontDelete | ReadOnly),
    827         GlobalPropertyInfo(vm.propertyNames->builtinNames().floorPrivateName(), privateFuncFloor, DontEnum | DontDelete | ReadOnly),
    828         GlobalPropertyInfo(vm.propertyNames->builtinNames().truncPrivateName(), privateFuncTrunc, DontEnum | DontDelete | ReadOnly),
    829         GlobalPropertyInfo(vm.propertyNames->builtinNames().PromisePrivateName(), promiseConstructor, DontEnum | DontDelete | ReadOnly),
    830         GlobalPropertyInfo(vm.propertyNames->builtinNames().ReflectPrivateName(), reflectObject, DontEnum | DontDelete | ReadOnly),
    831         GlobalPropertyInfo(vm.propertyNames->builtinNames().InternalPromisePrivateName(), internalPromiseConstructor, DontEnum | DontDelete | ReadOnly),
    832 
    833         GlobalPropertyInfo(vm.propertyNames->builtinNames().repeatCharacterPrivateName(), JSFunction::create(vm, this, 2, String(), stringProtoFuncRepeatCharacter), DontEnum | DontDelete | ReadOnly),
    834         GlobalPropertyInfo(vm.propertyNames->builtinNames().isArrayPrivateName(), arrayConstructor->getDirect(vm, vm.propertyNames->isArray), DontEnum | DontDelete | ReadOnly),
    835         GlobalPropertyInfo(vm.propertyNames->builtinNames().isArraySlowPrivateName(), privateFuncIsArraySlow, DontEnum | DontDelete | ReadOnly),
    836         GlobalPropertyInfo(vm.propertyNames->builtinNames().isArrayConstructorPrivateName(), privateFuncIsArrayConstructor, DontEnum | DontDelete | ReadOnly),
    837         GlobalPropertyInfo(vm.propertyNames->builtinNames().concatMemcpyPrivateName(), privateFuncConcatMemcpy, DontEnum | DontDelete | ReadOnly),
    838         GlobalPropertyInfo(vm.propertyNames->builtinNames().appendMemcpyPrivateName(), privateFuncAppendMemcpy, DontEnum | DontDelete | ReadOnly),
    839 
    840         GlobalPropertyInfo(vm.propertyNames->builtinNames().hostPromiseRejectionTrackerPrivateName(), JSFunction::create(vm, this, 2, String(), globalFuncHostPromiseRejectionTracker), DontEnum | DontDelete | ReadOnly),
    841         GlobalPropertyInfo(vm.propertyNames->builtinNames().InspectorInstrumentationPrivateName(), InspectorInstrumentationObject::create(vm, this, InspectorInstrumentationObject::createStructure(vm, this, m_objectPrototype.get())), DontEnum | DontDelete | ReadOnly),
    842         GlobalPropertyInfo(vm.propertyNames->builtinNames().MapPrivateName(), mapConstructor, DontEnum | DontDelete | ReadOnly),
    843         GlobalPropertyInfo(vm.propertyNames->builtinNames().SetPrivateName(), setConstructor, DontEnum | DontDelete | ReadOnly),
    844         GlobalPropertyInfo(vm.propertyNames->builtinNames().thisTimeValuePrivateName(), privateFuncThisTimeValue, DontEnum | DontDelete | ReadOnly),
    845         GlobalPropertyInfo(vm.propertyNames->builtinNames().thisNumberValuePrivateName(), privateFuncThisNumberValue, DontEnum | DontDelete | ReadOnly),
     804        GlobalPropertyInfo(vm.propertyNames->NaN, jsNaN(), PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly),
     805        GlobalPropertyInfo(vm.propertyNames->Infinity, jsNumber(std::numeric_limits<double>::infinity()), PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly),
     806        GlobalPropertyInfo(vm.propertyNames->undefinedKeyword, jsUndefined(), PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly),
     807        GlobalPropertyInfo(vm.propertyNames->builtinNames().getOwnPropertyNamesPrivateName(), privateFuncGetOwnPropertyNames, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly),
     808        GlobalPropertyInfo(vm.propertyNames->builtinNames().propertyIsEnumerablePrivateName(), privateFuncPropertyIsEnumerable, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly),
     809        GlobalPropertyInfo(vm.propertyNames->builtinNames().importModulePrivateName(), privateFuncImportModule, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly),
     810        GlobalPropertyInfo(vm.propertyNames->builtinNames().enqueueJobPrivateName(), JSFunction::create(vm, this, 0, String(), enqueueJob), PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly),
     811        GlobalPropertyInfo(vm.propertyNames->builtinNames().ErrorPrivateName(), m_errorConstructor.get(), PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly),
     812        GlobalPropertyInfo(vm.propertyNames->builtinNames().RangeErrorPrivateName(), m_rangeErrorConstructor.get(), PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly),
     813        GlobalPropertyInfo(vm.propertyNames->builtinNames().TypeErrorPrivateName(), m_typeErrorConstructor.get(), PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly),
     814        GlobalPropertyInfo(vm.propertyNames->builtinNames().typedArrayLengthPrivateName(), privateFuncTypedArrayLength, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly),
     815        GlobalPropertyInfo(vm.propertyNames->builtinNames().typedArrayGetOriginalConstructorPrivateName(), privateFuncTypedArrayGetOriginalConstructor, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly),
     816        GlobalPropertyInfo(vm.propertyNames->builtinNames().typedArraySortPrivateName(), privateFuncTypedArraySort, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly),
     817        GlobalPropertyInfo(vm.propertyNames->builtinNames().isTypedArrayViewPrivateName(), privateFuncIsTypedArrayView, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly),
     818        GlobalPropertyInfo(vm.propertyNames->builtinNames().typedArraySubarrayCreatePrivateName(), privateFuncTypedArraySubarrayCreate, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly),
     819        GlobalPropertyInfo(vm.propertyNames->builtinNames().isBoundFunctionPrivateName(), privateFuncIsBoundFunction, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly),
     820        GlobalPropertyInfo(vm.propertyNames->builtinNames().hasInstanceBoundFunctionPrivateName(), privateFuncHasInstanceBoundFunction, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly),
     821        GlobalPropertyInfo(vm.propertyNames->builtinNames().instanceOfPrivateName(), privateFuncInstanceOf, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly),
     822        GlobalPropertyInfo(vm.propertyNames->builtinNames().BuiltinLogPrivateName(), builtinLog, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly),
     823        GlobalPropertyInfo(vm.propertyNames->builtinNames().NumberPrivateName(), numberConstructor, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly),
     824        GlobalPropertyInfo(vm.propertyNames->builtinNames().RegExpPrivateName(), m_regExpConstructor.get(), PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly),
     825        GlobalPropertyInfo(vm.propertyNames->builtinNames().StringPrivateName(), stringConstructor, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly),
     826        GlobalPropertyInfo(vm.propertyNames->builtinNames().absPrivateName(), privateFuncAbs, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly),
     827        GlobalPropertyInfo(vm.propertyNames->builtinNames().floorPrivateName(), privateFuncFloor, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly),
     828        GlobalPropertyInfo(vm.propertyNames->builtinNames().truncPrivateName(), privateFuncTrunc, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly),
     829        GlobalPropertyInfo(vm.propertyNames->builtinNames().PromisePrivateName(), promiseConstructor, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly),
     830        GlobalPropertyInfo(vm.propertyNames->builtinNames().ReflectPrivateName(), reflectObject, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly),
     831        GlobalPropertyInfo(vm.propertyNames->builtinNames().InternalPromisePrivateName(), internalPromiseConstructor, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly),
     832
     833        GlobalPropertyInfo(vm.propertyNames->builtinNames().repeatCharacterPrivateName(), JSFunction::create(vm, this, 2, String(), stringProtoFuncRepeatCharacter), PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly),
     834        GlobalPropertyInfo(vm.propertyNames->builtinNames().isArrayPrivateName(), arrayConstructor->getDirect(vm, vm.propertyNames->isArray), PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly),
     835        GlobalPropertyInfo(vm.propertyNames->builtinNames().isArraySlowPrivateName(), privateFuncIsArraySlow, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly),
     836        GlobalPropertyInfo(vm.propertyNames->builtinNames().isArrayConstructorPrivateName(), privateFuncIsArrayConstructor, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly),
     837        GlobalPropertyInfo(vm.propertyNames->builtinNames().concatMemcpyPrivateName(), privateFuncConcatMemcpy, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly),
     838        GlobalPropertyInfo(vm.propertyNames->builtinNames().appendMemcpyPrivateName(), privateFuncAppendMemcpy, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly),
     839
     840        GlobalPropertyInfo(vm.propertyNames->builtinNames().hostPromiseRejectionTrackerPrivateName(), JSFunction::create(vm, this, 2, String(), globalFuncHostPromiseRejectionTracker), PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly),
     841        GlobalPropertyInfo(vm.propertyNames->builtinNames().InspectorInstrumentationPrivateName(), InspectorInstrumentationObject::create(vm, this, InspectorInstrumentationObject::createStructure(vm, this, m_objectPrototype.get())), PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly),
     842        GlobalPropertyInfo(vm.propertyNames->builtinNames().MapPrivateName(), mapConstructor, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly),
     843        GlobalPropertyInfo(vm.propertyNames->builtinNames().SetPrivateName(), setConstructor, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly),
     844        GlobalPropertyInfo(vm.propertyNames->builtinNames().thisTimeValuePrivateName(), privateFuncThisTimeValue, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly),
     845        GlobalPropertyInfo(vm.propertyNames->builtinNames().thisNumberValuePrivateName(), privateFuncThisNumberValue, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly),
    846846#if ENABLE(INTL)
    847         GlobalPropertyInfo(vm.propertyNames->builtinNames().CollatorPrivateName(), intl->getDirect(vm, vm.propertyNames->Collator), DontEnum | DontDelete | ReadOnly),
    848         GlobalPropertyInfo(vm.propertyNames->builtinNames().DateTimeFormatPrivateName(), intl->getDirect(vm, vm.propertyNames->DateTimeFormat), DontEnum | DontDelete | ReadOnly),
    849         GlobalPropertyInfo(vm.propertyNames->builtinNames().NumberFormatPrivateName(), intl->getDirect(vm, vm.propertyNames->NumberFormat), DontEnum | DontDelete | ReadOnly),
     847        GlobalPropertyInfo(vm.propertyNames->builtinNames().CollatorPrivateName(), intl->getDirect(vm, vm.propertyNames->Collator), PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly),
     848        GlobalPropertyInfo(vm.propertyNames->builtinNames().DateTimeFormatPrivateName(), intl->getDirect(vm, vm.propertyNames->DateTimeFormat), PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly),
     849        GlobalPropertyInfo(vm.propertyNames->builtinNames().NumberFormatPrivateName(), intl->getDirect(vm, vm.propertyNames->NumberFormat), PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly),
    850850#endif // ENABLE(INTL)
    851851
    852         GlobalPropertyInfo(vm.propertyNames->builtinNames().isConstructorPrivateName(), JSFunction::create(vm, this, 1, String(), esSpecIsConstructor, NoIntrinsic), DontEnum | DontDelete | ReadOnly),
    853 
    854         GlobalPropertyInfo(vm.propertyNames->builtinNames().regExpProtoFlagsGetterPrivateName(), regExpProtoFlagsGetterObject, DontEnum | DontDelete | ReadOnly),
    855         GlobalPropertyInfo(vm.propertyNames->builtinNames().regExpProtoGlobalGetterPrivateName(), regExpProtoGlobalGetterObject, DontEnum | DontDelete | ReadOnly),
    856         GlobalPropertyInfo(vm.propertyNames->builtinNames().regExpProtoIgnoreCaseGetterPrivateName(), regExpProtoIgnoreCaseGetterObject, DontEnum | DontDelete | ReadOnly),
    857         GlobalPropertyInfo(vm.propertyNames->builtinNames().regExpProtoMultilineGetterPrivateName(), regExpProtoMultilineGetterObject, DontEnum | DontDelete | ReadOnly),
    858         GlobalPropertyInfo(vm.propertyNames->builtinNames().regExpProtoSourceGetterPrivateName(), regExpProtoSourceGetterObject, DontEnum | DontDelete | ReadOnly),
    859         GlobalPropertyInfo(vm.propertyNames->builtinNames().regExpProtoStickyGetterPrivateName(), regExpProtoStickyGetterObject, DontEnum | DontDelete | ReadOnly),
    860         GlobalPropertyInfo(vm.propertyNames->builtinNames().regExpProtoUnicodeGetterPrivateName(), regExpProtoUnicodeGetterObject, DontEnum | DontDelete | ReadOnly),
     852        GlobalPropertyInfo(vm.propertyNames->builtinNames().isConstructorPrivateName(), JSFunction::create(vm, this, 1, String(), esSpecIsConstructor, NoIntrinsic), PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly),
     853
     854        GlobalPropertyInfo(vm.propertyNames->builtinNames().regExpProtoFlagsGetterPrivateName(), regExpProtoFlagsGetterObject, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly),
     855        GlobalPropertyInfo(vm.propertyNames->builtinNames().regExpProtoGlobalGetterPrivateName(), regExpProtoGlobalGetterObject, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly),
     856        GlobalPropertyInfo(vm.propertyNames->builtinNames().regExpProtoIgnoreCaseGetterPrivateName(), regExpProtoIgnoreCaseGetterObject, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly),
     857        GlobalPropertyInfo(vm.propertyNames->builtinNames().regExpProtoMultilineGetterPrivateName(), regExpProtoMultilineGetterObject, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly),
     858        GlobalPropertyInfo(vm.propertyNames->builtinNames().regExpProtoSourceGetterPrivateName(), regExpProtoSourceGetterObject, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly),
     859        GlobalPropertyInfo(vm.propertyNames->builtinNames().regExpProtoStickyGetterPrivateName(), regExpProtoStickyGetterObject, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly),
     860        GlobalPropertyInfo(vm.propertyNames->builtinNames().regExpProtoUnicodeGetterPrivateName(), regExpProtoUnicodeGetterObject, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly),
    861861
    862862        // RegExp.prototype helpers.
    863         GlobalPropertyInfo(vm.propertyNames->builtinNames().regExpBuiltinExecPrivateName(), builtinRegExpExec, DontEnum | DontDelete | ReadOnly),
    864         GlobalPropertyInfo(vm.propertyNames->builtinNames().regExpCreatePrivateName(), JSFunction::create(vm, this, 2, String(), esSpecRegExpCreate, NoIntrinsic), DontEnum | DontDelete | ReadOnly),
    865         GlobalPropertyInfo(vm.propertyNames->builtinNames().regExpMatchFastPrivateName(), JSFunction::create(vm, this, 1, String(), regExpProtoFuncMatchFast), DontEnum | DontDelete | ReadOnly),
    866         GlobalPropertyInfo(vm.propertyNames->builtinNames().regExpSearchFastPrivateName(), JSFunction::create(vm, this, 1, String(), regExpProtoFuncSearchFast), DontEnum | DontDelete | ReadOnly),
    867         GlobalPropertyInfo(vm.propertyNames->builtinNames().regExpSplitFastPrivateName(), JSFunction::create(vm, this, 2, String(), regExpProtoFuncSplitFast), DontEnum | DontDelete | ReadOnly),
    868         GlobalPropertyInfo(vm.propertyNames->builtinNames().regExpPrototypeSymbolReplacePrivateName(), m_regExpPrototype->getDirect(vm, vm.propertyNames->replaceSymbol), DontEnum | DontDelete | ReadOnly),
    869         GlobalPropertyInfo(vm.propertyNames->builtinNames().regExpTestFastPrivateName(), JSFunction::create(vm, this, 1, String(), regExpProtoFuncTestFast, RegExpTestFastIntrinsic), DontEnum | DontDelete | ReadOnly),
     863        GlobalPropertyInfo(vm.propertyNames->builtinNames().regExpBuiltinExecPrivateName(), builtinRegExpExec, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly),
     864        GlobalPropertyInfo(vm.propertyNames->builtinNames().regExpCreatePrivateName(), JSFunction::create(vm, this, 2, String(), esSpecRegExpCreate, NoIntrinsic), PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly),
     865        GlobalPropertyInfo(vm.propertyNames->builtinNames().regExpMatchFastPrivateName(), JSFunction::create(vm, this, 1, String(), regExpProtoFuncMatchFast), PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly),
     866        GlobalPropertyInfo(vm.propertyNames->builtinNames().regExpSearchFastPrivateName(), JSFunction::create(vm, this, 1, String(), regExpProtoFuncSearchFast), PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly),
     867        GlobalPropertyInfo(vm.propertyNames->builtinNames().regExpSplitFastPrivateName(), JSFunction::create(vm, this, 2, String(), regExpProtoFuncSplitFast), PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly),
     868        GlobalPropertyInfo(vm.propertyNames->builtinNames().regExpPrototypeSymbolReplacePrivateName(), m_regExpPrototype->getDirect(vm, vm.propertyNames->replaceSymbol), PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly),
     869        GlobalPropertyInfo(vm.propertyNames->builtinNames().regExpTestFastPrivateName(), JSFunction::create(vm, this, 1, String(), regExpProtoFuncTestFast, RegExpTestFastIntrinsic), PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly),
    870870
    871871        // String.prototype helpers.
    872         GlobalPropertyInfo(vm.propertyNames->builtinNames().stringIncludesInternalPrivateName(), JSFunction::create(vm, this, 1, String(), builtinStringIncludesInternal), DontEnum | DontDelete | ReadOnly),
    873         GlobalPropertyInfo(vm.propertyNames->builtinNames().stringSplitFastPrivateName(), JSFunction::create(vm, this, 2, String(), stringProtoFuncSplitFast), DontEnum | DontDelete | ReadOnly),
    874         GlobalPropertyInfo(vm.propertyNames->builtinNames().stringSubstrInternalPrivateName(), JSFunction::create(vm, this, 2, String(), builtinStringSubstrInternal), DontEnum | DontDelete | ReadOnly),
     872        GlobalPropertyInfo(vm.propertyNames->builtinNames().stringIncludesInternalPrivateName(), JSFunction::create(vm, this, 1, String(), builtinStringIncludesInternal), PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly),
     873        GlobalPropertyInfo(vm.propertyNames->builtinNames().stringSplitFastPrivateName(), JSFunction::create(vm, this, 2, String(), stringProtoFuncSplitFast), PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly),
     874        GlobalPropertyInfo(vm.propertyNames->builtinNames().stringSubstrInternalPrivateName(), JSFunction::create(vm, this, 2, String(), builtinStringSubstrInternal), PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly),
    875875
    876876        // Function prototype helpers.
    877         GlobalPropertyInfo(vm.propertyNames->builtinNames().makeBoundFunctionPrivateName(), JSFunction::create(vm, this, 5, String(), makeBoundFunction), DontEnum | DontDelete | ReadOnly),
    878         GlobalPropertyInfo(vm.propertyNames->builtinNames().hasOwnLengthPropertyPrivateName(), JSFunction::create(vm, this, 1, String(), hasOwnLengthProperty), DontEnum | DontDelete | ReadOnly),
     877        GlobalPropertyInfo(vm.propertyNames->builtinNames().makeBoundFunctionPrivateName(), JSFunction::create(vm, this, 5, String(), makeBoundFunction), PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly),
     878        GlobalPropertyInfo(vm.propertyNames->builtinNames().hasOwnLengthPropertyPrivateName(), JSFunction::create(vm, this, 1, String(), hasOwnLengthProperty), PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly),
    879879
    880880        // Map and Set helpers.
    881         GlobalPropertyInfo(vm.propertyNames->builtinNames().mapBucketHeadPrivateName(), privateFuncMapBucketHead, DontEnum | DontDelete | ReadOnly),
    882         GlobalPropertyInfo(vm.propertyNames->builtinNames().mapBucketNextPrivateName(), privateFuncMapBucketNext, DontEnum | DontDelete | ReadOnly),
    883         GlobalPropertyInfo(vm.propertyNames->builtinNames().mapBucketKeyPrivateName(), privateFuncMapBucketKey, DontEnum | DontDelete | ReadOnly),
    884         GlobalPropertyInfo(vm.propertyNames->builtinNames().mapBucketValuePrivateName(), privateFuncMapBucketValue, DontEnum | DontDelete | ReadOnly),
    885         GlobalPropertyInfo(vm.propertyNames->builtinNames().setBucketHeadPrivateName(), privateFuncSetBucketHead, DontEnum | DontDelete | ReadOnly),
    886         GlobalPropertyInfo(vm.propertyNames->builtinNames().setBucketNextPrivateName(), privateFuncSetBucketNext, DontEnum | DontDelete | ReadOnly),
    887         GlobalPropertyInfo(vm.propertyNames->builtinNames().setBucketKeyPrivateName(), privateFuncSetBucketKey, DontEnum | DontDelete | ReadOnly),
     881        GlobalPropertyInfo(vm.propertyNames->builtinNames().mapBucketHeadPrivateName(), privateFuncMapBucketHead, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly),
     882        GlobalPropertyInfo(vm.propertyNames->builtinNames().mapBucketNextPrivateName(), privateFuncMapBucketNext, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly),
     883        GlobalPropertyInfo(vm.propertyNames->builtinNames().mapBucketKeyPrivateName(), privateFuncMapBucketKey, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly),
     884        GlobalPropertyInfo(vm.propertyNames->builtinNames().mapBucketValuePrivateName(), privateFuncMapBucketValue, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly),
     885        GlobalPropertyInfo(vm.propertyNames->builtinNames().setBucketHeadPrivateName(), privateFuncSetBucketHead, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly),
     886        GlobalPropertyInfo(vm.propertyNames->builtinNames().setBucketNextPrivateName(), privateFuncSetBucketNext, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly),
     887        GlobalPropertyInfo(vm.propertyNames->builtinNames().setBucketKeyPrivateName(), privateFuncSetBucketKey, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly),
    888888    };
    889889    addStaticGlobals(staticGlobals, WTF_ARRAY_LENGTH(staticGlobals));
     
    902902
    903903        GlobalPropertyInfo extraStaticGlobals[] = {
    904             GlobalPropertyInfo(vm.propertyNames->builtinNames().dollarVMPrivateName(), dollarVM, DontEnum | DontDelete | ReadOnly),
     904            GlobalPropertyInfo(vm.propertyNames->builtinNames().dollarVMPrivateName(), dollarVM, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly),
    905905        };
    906906        addStaticGlobals(extraStaticGlobals, WTF_ARRAY_LENGTH(extraStaticGlobals));
    907907
    908         putDirectWithoutTransition(vm, Identifier::fromString(exec, "$vm"), dollarVM, DontEnum);
     908        putDirectWithoutTransition(vm, Identifier::fromString(exec, "$vm"), dollarVM, static_cast<unsigned>(PropertyAttribute::DontEnum));
    909909    }
    910910
     
    918918        m_webAssemblyToJSCalleeStructure.set(vm, this, WebAssemblyToJSCallee::createStructure(vm, this, jsNull()));
    919919        auto* webAssembly = JSWebAssembly::create(vm, this, m_webAssemblyStructure.get());
    920         putDirectWithoutTransition(vm, Identifier::fromString(exec, "WebAssembly"), webAssembly, DontEnum);
     920        putDirectWithoutTransition(vm, Identifier::fromString(exec, "WebAssembly"), webAssembly, static_cast<unsigned>(PropertyAttribute::DontEnum));
    921921
    922922#define CREATE_WEBASSEMBLY_CONSTRUCTOR(capitalName, lowerName, properName, instanceType, jsName, prototypeBase) do { \
     
    928928        auto* structure = JSObj::createStructure(vm, this, prototype); \
    929929        auto* constructor = Constructor::create(vm, Constructor::createStructure(vm, this, this->functionPrototype()), prototype); \
    930         prototype->putDirectWithoutTransition(vm, vm.propertyNames->constructor, constructor, DontEnum); \
     930        prototype->putDirectWithoutTransition(vm, vm.propertyNames->constructor, constructor, static_cast<unsigned>(PropertyAttribute::DontEnum)); \
    931931        m_ ## lowerName ## Prototype.set(vm, this, prototype); \
    932932        m_ ## properName ## Structure.set(vm, this, structure); \
    933         webAssembly->putDirectWithoutTransition(vm, Identifier::fromString(this->globalExec(), #jsName), constructor, DontEnum); \
     933        webAssembly->putDirectWithoutTransition(vm, Identifier::fromString(this->globalExec(), #jsName), constructor, static_cast<unsigned>(PropertyAttribute::DontEnum)); \
    934934    } while (0);
    935935
     
    13901390    for (int i = 0; i < count; ++i) {
    13911391        GlobalPropertyInfo& global = globals[i];
    1392         ASSERT(global.attributes & DontDelete);
     1392        ASSERT(global.attributes & PropertyAttribute::DontDelete);
    13931393       
    13941394        WatchpointSet* watchpointSet = nullptr;
  • trunk/Source/JavaScriptCore/runtime/JSLexicalEnvironment.cpp

    r222143 r222473  
    7777        SymbolTable::Map::iterator end = thisObject->symbolTable()->end(locker);
    7878        for (SymbolTable::Map::iterator it = thisObject->symbolTable()->begin(locker); it != end; ++it) {
    79             if (it->value.getAttributes() & DontEnum && !mode.includeDontEnumProperties())
     79            if (it->value.getAttributes() & PropertyAttribute::DontEnum && !mode.includeDontEnumProperties())
    8080                continue;
    8181            if (!thisObject->isValidScopeOffset(it->value.scopeOffset()))
  • trunk/Source/JavaScriptCore/runtime/JSModuleNamespaceObject.cpp

    r217108 r222473  
    7474    }
    7575
    76     putDirect(vm, vm.propertyNames->toStringTagSymbol, jsString(&vm, "Module"), DontEnum | DontDelete | ReadOnly);
     76    putDirect(vm, vm.propertyNames->toStringTagSymbol, jsString(&vm, "Module"), PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly);
    7777
    7878    // http://www.ecma-international.org/ecma-262/6.0/#sec-module-namespace-exotic-objects-getprototypeof
     
    146146        }
    147147
    148         slot.setValueModuleNamespace(this, DontDelete, value, environment, scopeOffset);
     148        slot.setValueModuleNamespace(this, static_cast<unsigned>(PropertyAttribute::DontDelete), value, environment, scopeOffset);
    149149        return true;
    150150    }
     
    154154        // [[Get]] / [[GetOwnProperty]] onto namespace object could throw an error while [[HasProperty]] just returns true here.
    155155        // https://tc39.github.io/ecma262/#sec-module-namespace-exotic-objects-hasproperty-p
    156         slot.setValue(this, DontDelete, jsUndefined());
     156        slot.setValue(this, static_cast<unsigned>(PropertyAttribute::DontDelete), jsUndefined());
    157157        return true;
    158158    }
  • trunk/Source/JavaScriptCore/runtime/JSONObject.cpp

    r222017 r222473  
    6666    ASSERT(inherits(vm, info()));
    6767
    68     putDirectWithoutTransition(vm, vm.propertyNames->toStringTagSymbol, jsString(&vm, "JSON"), DontEnum | ReadOnly);
     68    putDirectWithoutTransition(vm, vm.propertyNames->toStringTagSymbol, jsString(&vm, "JSON"), PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly);
    6969}
    7070
  • trunk/Source/JavaScriptCore/runtime/JSObject.cpp

    r221849 r222473  
    8686
    8787        for (auto iter = table->begin(); iter != table->end(); ++iter) {
    88             if (!(iter->attributes() & DontEnum) || mode.includeDontEnumProperties())
     88            if (!(iter->attributes() & PropertyAttribute::DontEnum) || mode.includeDontEnumProperties())
    8989                propertyNames.add(Identifier::fromString(&vm, iter.key()));
    9090        }
     
    593593        JSValue value = butterfly->contiguous()[i].get();
    594594        if (value) {
    595             slot.setValue(thisObject, None, value);
     595            slot.setValue(thisObject, static_cast<unsigned>(PropertyAttribute::None), value);
    596596            return true;
    597597        }
     
    607607        double value = butterfly->contiguousDouble()[i];
    608608        if (value == value) {
    609             slot.setValue(thisObject, None, JSValue(JSValue::EncodeAsDouble, value));
     609            slot.setValue(thisObject, static_cast<unsigned>(PropertyAttribute::None), JSValue(JSValue::EncodeAsDouble, value));
    610610            return true;
    611611        }
     
    622622            JSValue value = storage->m_vector[i].get();
    623623            if (value) {
    624                 slot.setValue(thisObject, None, value);
     624                slot.setValue(thisObject, static_cast<unsigned>(PropertyAttribute::None), value);
    625625                return true;
    626626            }
     
    680680            }
    681681            // 9.1.9.1-3-c-i Let ownDesc be the PropertyDescriptor{[[Value]]: undefined, [[Writable]]: true, [[Enumerable]]: true, [[Configurable]]: true}.
    682             ownDescriptor = PropertyDescriptor(jsUndefined(), None);
     682            ownDescriptor = PropertyDescriptor(jsUndefined(), static_cast<unsigned>(PropertyAttribute::None));
    683683        }
    684684        break;
     
    726726        // 9.1.9.1-4-e-i Return ? CreateDataProperty(Receiver, P, V).
    727727        scope.release();
    728         return receiverObject->methodTable(vm)->defineOwnProperty(receiverObject, exec, propertyName, PropertyDescriptor(value, None), shouldThrow);
     728        return receiverObject->methodTable(vm)->defineOwnProperty(receiverObject, exec, propertyName, PropertyDescriptor(value, static_cast<unsigned>(PropertyAttribute::None)), shouldThrow);
    729729    }
    730730
     
    770770        PropertyOffset offset = obj->structure(vm)->get(vm, propertyName, attributes);
    771771        if (isValidOffset(offset)) {
    772             if (attributes & ReadOnly) {
     772            if (attributes & PropertyAttribute::ReadOnly) {
    773773                ASSERT(structure(vm)->prototypeChainMayInterceptStoreTo(vm, propertyName) || obj == this);
    774774                return typeError(exec, scope, slot.isStrictMode(), ASCIILiteral(ReadonlyPropertyWriteError));
     
    784784            }
    785785            if (gs.isCustomGetterSetter()) {
    786                 bool result = callCustomSetter(exec, gs, attributes & CustomAccessor, obj, slot.thisValue(), value);
    787                 if (attributes & CustomAccessor)
     786                bool result = callCustomSetter(exec, gs, attributes & PropertyAttribute::CustomAccessor, obj, slot.thisValue(), value);
     787                if (attributes & PropertyAttribute::CustomAccessor)
    788788                    slot.setCustomAccessor(obj, jsCast<CustomGetterSetter*>(gs.asCell())->setter());
    789789                else
     
    791791                return result;
    792792            }
    793             ASSERT(!(attributes & Accessor));
     793            ASSERT(!(attributes & PropertyAttribute::Accessor));
    794794
    795795            // If there's an existing property on the object or one of its
     
    17131713    descriptor.setGetter(getter);
    17141714
    1715     ASSERT(attributes & Accessor);
    1716     if (!(attributes & ReadOnly))
     1715    ASSERT(attributes & PropertyAttribute::Accessor);
     1716    if (!(attributes & PropertyAttribute::ReadOnly))
    17171717        descriptor.setConfigurable(true);
    1718     if (!(attributes & DontEnum))
     1718    if (!(attributes & PropertyAttribute::DontEnum))
    17191719        descriptor.setEnumerable(true);
    17201720
     
    17271727    descriptor.setSetter(setter);
    17281728
    1729     ASSERT(attributes & Accessor);
    1730     if (!(attributes & ReadOnly))
     1729    ASSERT(attributes & PropertyAttribute::Accessor);
     1730    if (!(attributes & PropertyAttribute::ReadOnly))
    17311731        descriptor.setConfigurable(true);
    1732     if (!(attributes & DontEnum))
     1732    if (!(attributes & PropertyAttribute::DontEnum))
    17331733        descriptor.setEnumerable(true);
    17341734
     
    17381738bool JSObject::putDirectAccessor(ExecState* exec, PropertyName propertyName, JSValue value, unsigned attributes)
    17391739{
    1740     ASSERT(value.isGetterSetter() && (attributes & Accessor));
     1740    ASSERT(value.isGetterSetter() && (attributes & PropertyAttribute::Accessor));
    17411741
    17421742    if (std::optional<uint32_t> index = parseIndex(propertyName))
     
    17561756
    17571757    Structure* structure = this->structure(vm);
    1758     if (attributes & ReadOnly)
     1758    if (attributes & PropertyAttribute::ReadOnly)
    17591759        structure->setContainsReadOnlyProperties();
    17601760    structure->setHasCustomGetterSetterPropertiesWithProtoCheck(propertyName == vm.propertyNames->underscoreProto);
     
    17681768
    17691769    Structure* structure = this->structure(vm);
    1770     if (attributes & ReadOnly)
     1770    if (attributes & PropertyAttribute::ReadOnly)
    17711771        structure->setContainsReadOnlyProperties();
    17721772
     
    18151815            // if there is a property in the storage array it too must be non-configurable (the language does
    18161816            // not allow repacement of a non-configurable property with a configurable one).
    1817             if (entry->value->attributes() & DontDelete && vm.deletePropertyMode() != VM::DeletePropertyMode::IgnoreConfigurable) {
    1818                 ASSERT(!isValidOffset(thisObject->structure(vm)->get(vm, propertyName, attributes)) || attributes & DontDelete);
     1817            if (entry->value->attributes() & PropertyAttribute::DontDelete && vm.deletePropertyMode() != VM::DeletePropertyMode::IgnoreConfigurable) {
     1818                ASSERT(!isValidOffset(thisObject->structure(vm)->get(vm, propertyName, attributes)) || attributes & PropertyAttribute::DontDelete);
    18191819                return false;
    18201820            }
     
    18271827    bool propertyIsPresent = isValidOffset(structure->get(vm, propertyName, attributes));
    18281828    if (propertyIsPresent) {
    1829         if (attributes & DontDelete && vm.deletePropertyMode() != VM::DeletePropertyMode::IgnoreConfigurable)
     1829        if (attributes & PropertyAttribute::DontDelete && vm.deletePropertyMode() != VM::DeletePropertyMode::IgnoreConfigurable)
    18301830            return false;
    18311831
     
    18841884            SparseArrayValueMap::iterator it = map->find(i);
    18851885            if (it != map->notFound()) {
    1886                 if (it->value.attributes & DontDelete)
     1886                if (it->value.attributes & PropertyAttribute::DontDelete)
    18871887                    return false;
    18881888                map->remove(it);
     
    22002200                SparseArrayValueMap::const_iterator end = map->end();
    22012201                for (SparseArrayValueMap::const_iterator it = map->begin(); it != end; ++it) {
    2202                     if (mode.includeDontEnumProperties() || !(it->value.attributes & DontEnum))
     2202                    if (mode.includeDontEnumProperties() || !(it->value.attributes & PropertyAttribute::DontEnum))
    22032203                        keys.uncheckedAppend(static_cast<unsigned>(it->key));
    22042204                }
     
    23512351        else if (oldDescriptor.isAccessorDescriptor())
    23522352            entryInMap->set(vm, map, jsUndefined());
    2353         entryInMap->attributes = descriptor.attributesOverridingCurrent(oldDescriptor) & ~Accessor;
     2353        entryInMap->attributes = descriptor.attributesOverridingCurrent(oldDescriptor) & ~PropertyAttribute::Accessor;
    23542354        return true;
    23552355    }
     
    23742374
    23752375        entryInMap->set(vm, map, accessor);
    2376         entryInMap->attributes = descriptor.attributesOverridingCurrent(oldDescriptor) & ~ReadOnly;
     2376        entryInMap->attributes = descriptor.attributesOverridingCurrent(oldDescriptor) & ~PropertyAttribute::ReadOnly;
    23772377        return true;
    23782378    }
     
    24122412    }
    24132413
    2414     if (descriptor.attributes() & (ReadOnly | Accessor))
     2414    if (descriptor.attributes() & (PropertyAttribute::ReadOnly | PropertyAttribute::Accessor))
    24152415        notifyPresenceOfIndexedAccessors(vm);
    24162416
     
    24432443        PropertyDescriptor defaults;
    24442444        entryInMap->setWithoutWriteBarrier(jsUndefined());
    2445         entryInMap->attributes = DontDelete | DontEnum | ReadOnly;
     2445        entryInMap->attributes = PropertyAttribute::DontDelete | PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly;
    24462446        entryInMap->get(defaults);
    24472447
     
    25432543        if (storage && storage->m_sparseMap) {
    25442544            SparseArrayValueMap::iterator iter = storage->m_sparseMap->find(i);
    2545             if (iter != storage->m_sparseMap->notFound() && (iter->value.attributes & (Accessor | ReadOnly))) {
     2545            if (iter != storage->m_sparseMap->notFound() && (iter->value.attributes & (PropertyAttribute::Accessor | PropertyAttribute::ReadOnly))) {
    25462546                putResult = iter->value.put(exec, thisValue, storage->m_sparseMap.get(), value, shouldThrow);
    25472547                return true;
     
    28652865    ASSERT(i <= MAX_ARRAY_INDEX);
    28662866   
    2867     if (attributes & (ReadOnly | Accessor))
     2867    if (attributes & (PropertyAttribute::ReadOnly | PropertyAttribute::Accessor))
    28682868        notifyPresenceOfIndexedAccessors(vm);
    28692869   
     
    32723272    if (slot.isAccessor())
    32733273        descriptor.setAccessorDescriptor(slot.getterSetter(), slot.attributes());
    3274     else if (slot.attributes() & CustomAccessor) {
     3274    else if (slot.attributes() & PropertyAttribute::CustomAccessor) {
    32753275        descriptor.setCustomDescriptor(slot.attributes());
    32763276
     
    33153315            if (oldDescriptor.setterPresent())
    33163316                accessor->setSetter(vm, exec->lexicalGlobalObject(), oldDescriptor.setterObject());
    3317             target->putDirectAccessor(exec, propertyName, accessor, attributes | Accessor);
     3317            target->putDirectAccessor(exec, propertyName, accessor, attributes | PropertyAttribute::Accessor);
    33183318            return true;
    33193319        }
     
    33233323        else if (oldDescriptor.value())
    33243324            newValue = oldDescriptor.value();
    3325         target->putDirect(vm, propertyName, newValue, attributes & ~Accessor);
    3326         if (attributes & ReadOnly)
     3325        target->putDirect(vm, propertyName, newValue, attributes & ~PropertyAttribute::Accessor);
     3326        if (attributes & PropertyAttribute::ReadOnly)
    33273327            target->structure(vm)->setContainsReadOnlyProperties();
    33283328        return true;
    33293329    }
    3330     attributes &= ~ReadOnly;
     3330    attributes &= ~PropertyAttribute::ReadOnly;
    33313331    GetterSetter* accessor = GetterSetter::create(vm, exec->lexicalGlobalObject());
    33323332
     
    33403340        accessor->setSetter(vm, exec->lexicalGlobalObject(), oldDescriptor.setterObject());
    33413341
    3342     target->putDirectAccessor(exec, propertyName, accessor, attributes | Accessor);
     3342    target->putDirectAccessor(exec, propertyName, accessor, attributes | PropertyAttribute::Accessor);
    33433343    return true;
    33443344}
     
    34453445        if (descriptor.getterPresent() && !(current.getterPresent() && JSValue::strictEqual(exec, current.getter(), descriptor.getter())))
    34463446            return typeError(exec, scope, throwException, ASCIILiteral("Attempting to change the getter of an unconfigurable property."));
    3447         if (current.attributes() & CustomAccessor)
     3447        if (current.attributes() & PropertyAttribute::CustomAccessor)
    34483448            return typeError(exec, scope, throwException, ASCIILiteral(UnconfigurablePropertyChangeAccessMechanismError));
    34493449    }
     
    34813481    RETURN_IF_EXCEPTION(scope, false);
    34823482    unsigned attrs = descriptor.attributesOverridingCurrent(current);
    3483     object->putDirectAccessor(exec, propertyName, getterSetter, attrs | Accessor);
     3483    object->putDirectAccessor(exec, propertyName, getterSetter, attrs | PropertyAttribute::Accessor);
    34843484    return true;
    34853485}
  • trunk/Source/JavaScriptCore/runtime/JSObject.h

    r222136 r222473  
    8080extern JS_EXPORTDATA const char* const UnconfigurablePropertyChangeWritabilityError;
    8181
    82 COMPILE_ASSERT(None < FirstInternalAttribute, None_is_below_FirstInternalAttribute);
    83 COMPILE_ASSERT(ReadOnly < FirstInternalAttribute, ReadOnly_is_below_FirstInternalAttribute);
    84 COMPILE_ASSERT(DontEnum < FirstInternalAttribute, DontEnum_is_below_FirstInternalAttribute);
    85 COMPILE_ASSERT(DontDelete < FirstInternalAttribute, DontDelete_is_below_FirstInternalAttribute);
    86 COMPILE_ASSERT(Accessor < FirstInternalAttribute, Accessor_is_below_FirstInternalAttribute);
     82COMPILE_ASSERT(PropertyAttribute::None < FirstInternalAttribute, None_is_below_FirstInternalAttribute);
     83COMPILE_ASSERT(PropertyAttribute::ReadOnly < FirstInternalAttribute, ReadOnly_is_below_FirstInternalAttribute);
     84COMPILE_ASSERT(PropertyAttribute::DontEnum < FirstInternalAttribute, DontEnum_is_below_FirstInternalAttribute);
     85COMPILE_ASSERT(PropertyAttribute::DontDelete < FirstInternalAttribute, DontDelete_is_below_FirstInternalAttribute);
     86COMPILE_ASSERT(PropertyAttribute::Accessor < FirstInternalAttribute, Accessor_is_below_FirstInternalAttribute);
    8787
    8888class JSFinalObject;
     
    14651465inline bool JSObject::putDirect(VM& vm, PropertyName propertyName, JSValue value, unsigned attributes)
    14661466{
    1467     ASSERT(!value.isGetterSetter() && !(attributes & Accessor));
     1467    ASSERT(!value.isGetterSetter() && !(attributes & PropertyAttribute::Accessor));
    14681468    ASSERT(!value.isCustomGetterSetter());
    14691469    PutPropertySlot slot(this);
     
    16051605    putDirectNativeIntrinsicGetter(\
    16061606        vm, globalObject, makeIdentifier(vm, (jsName)), (cppName), \
    1607         (intrinsic), ((attributes) | Accessor))
     1607        (intrinsic), ((attributes) | PropertyAttribute::Accessor))
    16081608
    16091609#define JSC_NATIVE_GETTER(jsName, cppName, attributes) \
  • trunk/Source/JavaScriptCore/runtime/JSObjectInlines.h

    r221849 r222473  
    164164inline void JSObject::putDirectWithoutTransition(VM& vm, PropertyName propertyName, JSValue value, unsigned attributes)
    165165{
    166     ASSERT(!value.isGetterSetter() && !(attributes & Accessor));
     166    ASSERT(!value.isGetterSetter() && !(attributes & PropertyAttribute::Accessor));
    167167    ASSERT(!value.isCustomGetterSetter());
    168168    StructureID structureID = this->structureID();
     
    172172    structure->willStoreValueForNewTransition(vm, propertyName, value, shouldOptimize);
    173173    putDirect(vm, offset, value);
    174     if (attributes & ReadOnly)
     174    if (attributes & PropertyAttribute::ReadOnly)
    175175        structure->setContainsReadOnlyProperties();
    176176}
     
    257257{
    258258    ASSERT(value);
    259     ASSERT(value.isGetterSetter() == !!(attributes & Accessor));
     259    ASSERT(value.isGetterSetter() == !!(attributes & PropertyAttribute::Accessor));
    260260    ASSERT(!Heap::heap(value) || Heap::heap(value) == Heap::heap(this));
    261261    ASSERT(!parseIndex(propertyName));
     
    269269        PropertyOffset offset = structure->get(vm, propertyName, currentAttributes);
    270270        if (offset != invalidOffset) {
    271             if ((mode == PutModePut) && currentAttributes & ReadOnly)
     271            if ((mode == PutModePut) && currentAttributes & PropertyAttribute::ReadOnly)
    272272                return false;
    273273
     
    276276            slot.setExistingProperty(this, offset);
    277277
    278             if ((attributes & Accessor) != (currentAttributes & Accessor) || (attributes & CustomAccessor) != (currentAttributes & CustomAccessor)) {
    279                 ASSERT(!(attributes & ReadOnly));
     278            if ((attributes & PropertyAttribute::Accessor) != (currentAttributes & PropertyAttribute::Accessor) || (attributes & PropertyAttribute::CustomAccessor) != (currentAttributes & PropertyAttribute::CustomAccessor)) {
     279                ASSERT(!(attributes & PropertyAttribute::ReadOnly));
    280280                setStructure(vm, Structure::attributeChangeTransition(vm, structure, propertyName, attributes));
    281281            }
     
    290290        putDirect(vm, offset, value);
    291291        slot.setNewProperty(this, offset);
    292         if (attributes & ReadOnly)
     292        if (attributes & PropertyAttribute::ReadOnly)
    293293            this->structure()->setContainsReadOnlyProperties();
    294294        return true;
     
    322322    offset = structure->get(vm, propertyName, currentAttributes, hasInferredType);
    323323    if (offset != invalidOffset) {
    324         if ((mode == PutModePut) && currentAttributes & ReadOnly)
     324        if ((mode == PutModePut) && currentAttributes & PropertyAttribute::ReadOnly)
    325325            return false;
    326326
     
    334334        putDirect(vm, offset, value);
    335335
    336         if ((attributes & Accessor) != (currentAttributes & Accessor) || (attributes & CustomAccessor) != (currentAttributes & CustomAccessor)) {
    337             ASSERT(!(attributes & ReadOnly));
     336        if ((attributes & PropertyAttribute::Accessor) != (currentAttributes & PropertyAttribute::Accessor) || (attributes & PropertyAttribute::CustomAccessor) != (currentAttributes & PropertyAttribute::CustomAccessor)) {
     337            ASSERT(!(attributes & PropertyAttribute::ReadOnly));
    338338            setStructure(vm, Structure::attributeChangeTransition(vm, structure, propertyName, attributes));
    339339        }
     
    366366    setStructure(vm, newStructure);
    367367    slot.setNewProperty(this, offset);
    368     if (attributes & ReadOnly)
     368    if (attributes & PropertyAttribute::ReadOnly)
    369369        newStructure->setContainsReadOnlyProperties();
    370370    return true;
  • trunk/Source/JavaScriptCore/runtime/JSPromiseConstructor.cpp

    r221849 r222473  
    8282{
    8383    Base::finishCreation(vm, ASCIILiteral("Promise"));
    84     putDirectWithoutTransition(vm, vm.propertyNames->prototype, promisePrototype, DontEnum | DontDelete | ReadOnly);
    85     putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), DontEnum | ReadOnly);
    86     putDirectNonIndexAccessor(vm, vm.propertyNames->speciesSymbol, speciesSymbol, Accessor | ReadOnly | DontEnum);
     84    putDirectWithoutTransition(vm, vm.propertyNames->prototype, promisePrototype, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly);
     85    putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly);
     86    putDirectNonIndexAccessor(vm, vm.propertyNames->speciesSymbol, speciesSymbol, PropertyAttribute::Accessor | PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum);
    8787}
    8888
    8989void JSPromiseConstructor::addOwnInternalSlots(VM& vm, JSGlobalObject* globalObject)
    9090{
    91     JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->builtinNames().resolvePrivateName(), promiseConstructorResolveCodeGenerator, DontEnum | DontDelete | ReadOnly);
    92     JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->builtinNames().rejectPrivateName(), promiseConstructorRejectCodeGenerator, DontEnum | DontDelete | ReadOnly);
     91    JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->builtinNames().resolvePrivateName(), promiseConstructorResolveCodeGenerator, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly);
     92    JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->builtinNames().rejectPrivateName(), promiseConstructorRejectCodeGenerator, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly);
    9393}
    9494
  • trunk/Source/JavaScriptCore/runtime/JSPromisePrototype.cpp

    r219989 r222473  
    7777{
    7878    Base::finishCreation(vm);
    79     putDirectWithoutTransition(vm, vm.propertyNames->toStringTagSymbol, jsString(&vm, "Promise"), DontEnum | ReadOnly);
     79    putDirectWithoutTransition(vm, vm.propertyNames->toStringTagSymbol, jsString(&vm, "Promise"), PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly);
    8080}
    8181
    8282void JSPromisePrototype::addOwnInternalSlots(VM& vm, JSGlobalObject* globalObject)
    8383{
    84     JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->builtinNames().thenPrivateName(), promisePrototypeThenCodeGenerator, DontEnum | DontDelete | ReadOnly);
     84    JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->builtinNames().thenPrivateName(), promisePrototypeThenCodeGenerator, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly);
    8585}
    8686
  • trunk/Source/JavaScriptCore/runtime/JSString.cpp

    r221822 r222473  
    445445    VM& vm = exec->vm();
    446446    if (propertyName == vm.propertyNames->length) {
    447         descriptor.setDescriptor(jsNumber(length()), DontEnum | DontDelete | ReadOnly);
     447        descriptor.setDescriptor(jsNumber(length()), PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly);
    448448        return true;
    449449    }
     
    451451    std::optional<uint32_t> index = parseIndex(propertyName);
    452452    if (index && index.value() < length()) {
    453         descriptor.setDescriptor(getIndex(exec, index.value()), DontDelete | ReadOnly);
     453        descriptor.setDescriptor(getIndex(exec, index.value()), PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly);
    454454        return true;
    455455    }
  • trunk/Source/JavaScriptCore/runtime/JSString.h

    r221822 r222473  
    672672    VM& vm = exec->vm();
    673673    if (propertyName == vm.propertyNames->length) {
    674         slot.setValue(this, DontEnum | DontDelete | ReadOnly, jsNumber(length()));
     674        slot.setValue(this, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly, jsNumber(length()));
    675675        return true;
    676676    }
     
    678678    std::optional<uint32_t> index = parseIndex(propertyName);
    679679    if (index && index.value() < length()) {
    680         slot.setValue(this, DontDelete | ReadOnly, getIndex(exec, index.value()));
     680        slot.setValue(this, PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly, getIndex(exec, index.value()));
    681681        return true;
    682682    }
     
    688688{
    689689    if (propertyName < length()) {
    690         slot.setValue(this, DontDelete | ReadOnly, getIndex(exec, propertyName));
     690        slot.setValue(this, PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly, getIndex(exec, propertyName));
    691691        return true;
    692692    }
  • trunk/Source/JavaScriptCore/runtime/JSSymbolTableObject.cpp

    r217108 r222473  
    6161        SymbolTable::Map::iterator end = thisObject->symbolTable()->end(locker);
    6262        for (SymbolTable::Map::iterator it = thisObject->symbolTable()->begin(locker); it != end; ++it) {
    63             if (!(it->value.getAttributes() & DontEnum) || mode.includeDontEnumProperties()) {
     63            if (!(it->value.getAttributes() & PropertyAttribute::DontEnum) || mode.includeDontEnumProperties()) {
    6464                if (it->key->isSymbol() && !propertyNames.includeSymbolProperties())
    6565                    continue;
  • trunk/Source/JavaScriptCore/runtime/JSSymbolTableObject.h

    r208761 r222473  
    9494        return false;
    9595
    96     slot.setValue(object, entry.getAttributes() | DontDelete, object->variableAt(offset).get());
     96    slot.setValue(object, entry.getAttributes() | PropertyAttribute::DontDelete, object->variableAt(offset).get());
    9797    return true;
    9898}
     
    115115        return false;
    116116
    117     descriptor.setDescriptor(object->variableAt(offset).get(), entry.getAttributes() | DontDelete);
     117    descriptor.setDescriptor(object->variableAt(offset).get(), entry.getAttributes() | PropertyAttribute::DontDelete);
    118118    return true;
    119119}
     
    137137        return false;
    138138
    139     slot.setValue(object, entry.getAttributes() | DontDelete, object->variableAt(offset).get());
     139    slot.setValue(object, entry.getAttributes() | PropertyAttribute::DontDelete, object->variableAt(offset).get());
    140140    slotIsWriteable = !entry.isReadOnly();
    141141    return true;
  • trunk/Source/JavaScriptCore/runtime/JSTypedArrayViewConstructor.cpp

    r217108 r222473  
    4848{
    4949    Base::finishCreation(vm, "TypedArray");
    50     putDirectWithoutTransition(vm, vm.propertyNames->prototype, prototype, DontEnum | DontDelete | ReadOnly);
    51     putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(0), DontEnum | ReadOnly);
    52     putDirectNonIndexAccessor(vm, vm.propertyNames->speciesSymbol, speciesSymbol, Accessor | ReadOnly | DontEnum);
     50    putDirectWithoutTransition(vm, vm.propertyNames->prototype, prototype, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly);
     51    putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(0), PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly);
     52    putDirectNonIndexAccessor(vm, vm.propertyNames->speciesSymbol, speciesSymbol, PropertyAttribute::Accessor | PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum);
    5353
    54     JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->of, typedArrayConstructorOfCodeGenerator, DontEnum);
    55     JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->from, typedArrayConstructorFromCodeGenerator, DontEnum);
     54    JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->of, typedArrayConstructorOfCodeGenerator, static_cast<unsigned>(PropertyAttribute::DontEnum));
     55    JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->from, typedArrayConstructorFromCodeGenerator, static_cast<unsigned>(PropertyAttribute::DontEnum));
    5656}
    5757
  • trunk/Source/JavaScriptCore/runtime/JSTypedArrayViewPrototype.cpp

    r221417 r222473  
    296296    ASSERT(inherits(vm, info()));
    297297
    298     putDirectWithoutTransition(vm, vm.propertyNames->toString, globalObject->arrayProtoToStringFunction(), DontEnum);
    299 
    300     JSC_NATIVE_GETTER(vm.propertyNames->buffer, typedArrayViewProtoGetterFuncBuffer, DontEnum | ReadOnly);
    301     JSC_NATIVE_INTRINSIC_GETTER(vm.propertyNames->byteLength, typedArrayViewProtoGetterFuncByteLength, DontEnum | ReadOnly, TypedArrayByteLengthIntrinsic);
    302     JSC_NATIVE_INTRINSIC_GETTER(vm.propertyNames->byteOffset, typedArrayViewProtoGetterFuncByteOffset, DontEnum | ReadOnly, TypedArrayByteOffsetIntrinsic);
    303     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("copyWithin", typedArrayViewProtoFuncCopyWithin, DontEnum, 2);
    304     JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION("every", typedArrayPrototypeEveryCodeGenerator, DontEnum);
    305     JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION("filter", typedArrayPrototypeFilterCodeGenerator, DontEnum);
    306     JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION("sort", typedArrayPrototypeSortCodeGenerator, DontEnum);
    307     JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->builtinNames().entriesPublicName(), typedArrayPrototypeEntriesCodeGenerator, DontEnum);
    308     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("includes", typedArrayViewProtoFuncIncludes, DontEnum, 1);
    309     JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION("fill", typedArrayPrototypeFillCodeGenerator, DontEnum);
    310     JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION("find", typedArrayPrototypeFindCodeGenerator, DontEnum);
    311     JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION("findIndex", typedArrayPrototypeFindIndexCodeGenerator, DontEnum);
    312     JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->forEach, typedArrayPrototypeForEachCodeGenerator, DontEnum);
    313     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("indexOf", typedArrayViewProtoFuncIndexOf, DontEnum, 1);
    314     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->join, typedArrayViewProtoFuncJoin, DontEnum, 1);
    315     JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->builtinNames().keysPublicName(), typedArrayPrototypeKeysCodeGenerator, DontEnum);
    316     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("lastIndexOf", typedArrayViewProtoFuncLastIndexOf, DontEnum, 1);
    317     JSC_NATIVE_INTRINSIC_GETTER(vm.propertyNames->length, typedArrayViewProtoGetterFuncLength, DontEnum | ReadOnly, TypedArrayLengthIntrinsic);
    318     JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION("map", typedArrayPrototypeMapCodeGenerator, DontEnum);
    319     JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION("reduce", typedArrayPrototypeReduceCodeGenerator, DontEnum);
    320     JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION("reduceRight", typedArrayPrototypeReduceRightCodeGenerator, DontEnum);
    321     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("reverse", typedArrayViewProtoFuncReverse, DontEnum, 0);
    322     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->set, typedArrayViewProtoFuncSet, DontEnum, 1);
    323     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->slice, typedArrayViewProtoFuncSlice, DontEnum, 2);
    324     JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION("some", typedArrayPrototypeSomeCodeGenerator, DontEnum);
    325     JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->subarray, typedArrayPrototypeSubarrayCodeGenerator, DontEnum);
    326     JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->toLocaleString, typedArrayPrototypeToLocaleStringCodeGenerator, DontEnum);
     298    putDirectWithoutTransition(vm, vm.propertyNames->toString, globalObject->arrayProtoToStringFunction(), static_cast<unsigned>(PropertyAttribute::DontEnum));
     299
     300    JSC_NATIVE_GETTER(vm.propertyNames->buffer, typedArrayViewProtoGetterFuncBuffer, PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly);
     301    JSC_NATIVE_INTRINSIC_GETTER(vm.propertyNames->byteLength, typedArrayViewProtoGetterFuncByteLength, PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly, TypedArrayByteLengthIntrinsic);
     302    JSC_NATIVE_INTRINSIC_GETTER(vm.propertyNames->byteOffset, typedArrayViewProtoGetterFuncByteOffset, PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly, TypedArrayByteOffsetIntrinsic);
     303    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("copyWithin", typedArrayViewProtoFuncCopyWithin, static_cast<unsigned>(PropertyAttribute::DontEnum), 2);
     304    JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION("every", typedArrayPrototypeEveryCodeGenerator, static_cast<unsigned>(PropertyAttribute::DontEnum));
     305    JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION("filter", typedArrayPrototypeFilterCodeGenerator, static_cast<unsigned>(PropertyAttribute::DontEnum));
     306    JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION("sort", typedArrayPrototypeSortCodeGenerator, static_cast<unsigned>(PropertyAttribute::DontEnum));
     307    JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->builtinNames().entriesPublicName(), typedArrayPrototypeEntriesCodeGenerator, static_cast<unsigned>(PropertyAttribute::DontEnum));
     308    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("includes", typedArrayViewProtoFuncIncludes, static_cast<unsigned>(PropertyAttribute::DontEnum), 1);
     309    JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION("fill", typedArrayPrototypeFillCodeGenerator, static_cast<unsigned>(PropertyAttribute::DontEnum));
     310    JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION("find", typedArrayPrototypeFindCodeGenerator, static_cast<unsigned>(PropertyAttribute::DontEnum));
     311    JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION("findIndex", typedArrayPrototypeFindIndexCodeGenerator, static_cast<unsigned>(PropertyAttribute::DontEnum));
     312    JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->forEach, typedArrayPrototypeForEachCodeGenerator, static_cast<unsigned>(PropertyAttribute::DontEnum));
     313    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("indexOf", typedArrayViewProtoFuncIndexOf, static_cast<unsigned>(PropertyAttribute::DontEnum), 1);
     314    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->join, typedArrayViewProtoFuncJoin, static_cast<unsigned>(PropertyAttribute::DontEnum), 1);
     315    JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->builtinNames().keysPublicName(), typedArrayPrototypeKeysCodeGenerator, static_cast<unsigned>(PropertyAttribute::DontEnum));
     316    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("lastIndexOf", typedArrayViewProtoFuncLastIndexOf, static_cast<unsigned>(PropertyAttribute::DontEnum), 1);
     317    JSC_NATIVE_INTRINSIC_GETTER(vm.propertyNames->length, typedArrayViewProtoGetterFuncLength, static_cast<unsigned>(PropertyAttribute::DontEnum) | PropertyAttribute::ReadOnly, TypedArrayLengthIntrinsic);
     318    JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION("map", typedArrayPrototypeMapCodeGenerator, static_cast<unsigned>(PropertyAttribute::DontEnum));
     319    JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION("reduce", typedArrayPrototypeReduceCodeGenerator, static_cast<unsigned>(PropertyAttribute::DontEnum));
     320    JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION("reduceRight", typedArrayPrototypeReduceRightCodeGenerator, static_cast<unsigned>(PropertyAttribute::DontEnum));
     321    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("reverse", typedArrayViewProtoFuncReverse, static_cast<unsigned>(PropertyAttribute::DontEnum), 0);
     322    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->set, typedArrayViewProtoFuncSet, static_cast<unsigned>(PropertyAttribute::DontEnum), 1);
     323    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->slice, typedArrayViewProtoFuncSlice, static_cast<unsigned>(PropertyAttribute::DontEnum), 2);
     324    JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION("some", typedArrayPrototypeSomeCodeGenerator, static_cast<unsigned>(PropertyAttribute::DontEnum));
     325    JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->subarray, typedArrayPrototypeSubarrayCodeGenerator, static_cast<unsigned>(PropertyAttribute::DontEnum));
     326    JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->toLocaleString, typedArrayPrototypeToLocaleStringCodeGenerator, static_cast<unsigned>(PropertyAttribute::DontEnum));
    327327
    328328    JSFunction* toStringTagFunction = JSFunction::create(vm, globalObject, 0, ASCIILiteral("get [Symbol.toStringTag]"), typedArrayViewProtoGetterFuncToStringTag, NoIntrinsic);
    329329    GetterSetter* toStringTagAccessor = GetterSetter::create(vm, globalObject);
    330330    toStringTagAccessor->setGetter(vm, globalObject, toStringTagFunction);
    331     putDirectNonIndexAccessor(vm, vm.propertyNames->toStringTagSymbol, toStringTagAccessor, DontEnum | ReadOnly | Accessor);
     331    putDirectNonIndexAccessor(vm, vm.propertyNames->toStringTagSymbol, toStringTagAccessor, PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly | PropertyAttribute::Accessor);
    332332
    333333    JSFunction* valuesFunction = JSFunction::create(vm, typedArrayPrototypeValuesCodeGenerator(vm), globalObject);
    334334
    335     putDirectWithoutTransition(vm, vm.propertyNames->builtinNames().valuesPublicName(), valuesFunction, DontEnum);
    336     putDirectWithoutTransition(vm, vm.propertyNames->iteratorSymbol, valuesFunction, DontEnum);
     335    putDirectWithoutTransition(vm, vm.propertyNames->builtinNames().valuesPublicName(), valuesFunction, static_cast<unsigned>(PropertyAttribute::DontEnum));
     336    putDirectWithoutTransition(vm, vm.propertyNames->iteratorSymbol, valuesFunction, static_cast<unsigned>(PropertyAttribute::DontEnum));
    337337
    338338}
  • trunk/Source/JavaScriptCore/runtime/LazyClassStructure.cpp

    r211247 r222473  
    6969    this->constructor = constructor;
    7070
    71     prototype->putDirectWithoutTransition(vm, vm.propertyNames->constructor, constructor, DontEnum);
     71    prototype->putDirectWithoutTransition(vm, vm.propertyNames->constructor, constructor, static_cast<unsigned>(PropertyAttribute::DontEnum));
    7272    if (!propertyName.isNull())
    73         global->putDirect(vm, propertyName, constructor, DontEnum);
     73        global->putDirect(vm, propertyName, constructor, static_cast<unsigned>(PropertyAttribute::DontEnum));
    7474    classStructure.m_constructor.set(vm, global, constructor);
    7575}
  • trunk/Source/JavaScriptCore/runtime/Lookup.cpp

    r221417 r222473  
    3333    if (value.accessorGetter()) {
    3434        JSFunction* function = nullptr;
    35         if (value.attributes() & Builtin)
     35        if (value.attributes() & PropertyAttribute::Builtin)
    3636            function = JSFunction::create(vm, value.builtinAccessorGetterGenerator()(vm), globalObject);
    3737        else {
     
    4949{
    5050    ASSERT(thisObject->globalObject());
    51     ASSERT(entry->attributes() & BuiltinOrFunctionOrAccessorOrLazyProperty);
     51    ASSERT(entry->attributes() & PropertyAttribute::BuiltinOrFunctionOrAccessorOrLazyProperty);
    5252    unsigned attributes;
    53     bool isAccessor = entry->attributes() & Accessor;
     53    bool isAccessor = entry->attributes() & PropertyAttribute::Accessor;
    5454    PropertyOffset offset = thisObject->getDirectOffset(vm, propertyName, attributes);
    5555
  • trunk/Source/JavaScriptCore/runtime/Lookup.h

    r221849 r222473  
    7474    unsigned attributes() const { return m_attributes; }
    7575
    76     Intrinsic intrinsic() const { ASSERT(m_attributes & Function); return m_intrinsic; }
    77     BuiltinGenerator builtinGenerator() const { ASSERT(m_attributes & Builtin); return reinterpret_cast<BuiltinGenerator>(m_values.value1); }
    78     NativeFunction function() const { ASSERT(m_attributes & Function); return reinterpret_cast<NativeFunction>(m_values.value1); }
     76    Intrinsic intrinsic() const { ASSERT(m_attributes & PropertyAttribute::Function); return m_intrinsic; }
     77    BuiltinGenerator builtinGenerator() const { ASSERT(m_attributes & PropertyAttribute::Builtin); return reinterpret_cast<BuiltinGenerator>(m_values.value1); }
     78    NativeFunction function() const { ASSERT(m_attributes & PropertyAttribute::Function); return reinterpret_cast<NativeFunction>(m_values.value1); }
    7979    unsigned char functionLength() const
    8080    {
    81         ASSERT(m_attributes & Function);
    82         if (m_attributes & DOMJITFunction)
     81        ASSERT(m_attributes & PropertyAttribute::Function);
     82        if (m_attributes & PropertyAttribute::DOMJITFunction)
    8383            return signature()->argumentCount;
    8484        return static_cast<unsigned char>(m_values.value2);
    8585    }
    8686
    87     GetFunction propertyGetter() const { ASSERT(!(m_attributes & BuiltinOrFunctionOrAccessorOrLazyPropertyOrConstant)); return reinterpret_cast<GetFunction>(m_values.value1); }
    88     PutFunction propertyPutter() const { ASSERT(!(m_attributes & BuiltinOrFunctionOrAccessorOrLazyPropertyOrConstant)); return reinterpret_cast<PutFunction>(m_values.value2); }
    89 
    90     const DOMJIT::GetterSetter* domJIT() const { ASSERT(m_attributes & DOMJITAttribute); return reinterpret_cast<const DOMJIT::GetterSetter*>(m_values.value1); }
    91     const DOMJIT::Signature* signature() const { ASSERT(m_attributes & DOMJITFunction); return reinterpret_cast<const DOMJIT::Signature*>(m_values.value2); }
    92 
    93     NativeFunction accessorGetter() const { ASSERT(m_attributes & Accessor); return reinterpret_cast<NativeFunction>(m_values.value1); }
    94     NativeFunction accessorSetter() const { ASSERT(m_attributes & Accessor); return reinterpret_cast<NativeFunction>(m_values.value2); }
     87    GetFunction propertyGetter() const { ASSERT(!(m_attributes & PropertyAttribute::BuiltinOrFunctionOrAccessorOrLazyPropertyOrConstant)); return reinterpret_cast<GetFunction>(m_values.value1); }
     88    PutFunction propertyPutter() const { ASSERT(!(m_attributes & PropertyAttribute::BuiltinOrFunctionOrAccessorOrLazyPropertyOrConstant)); return reinterpret_cast<PutFunction>(m_values.value2); }
     89
     90    const DOMJIT::GetterSetter* domJIT() const { ASSERT(m_attributes & PropertyAttribute::DOMJITAttribute); return reinterpret_cast<const DOMJIT::GetterSetter*>(m_values.value1); }
     91    const DOMJIT::Signature* signature() const { ASSERT(m_attributes & PropertyAttribute::DOMJITFunction); return reinterpret_cast<const DOMJIT::Signature*>(m_values.value2); }
     92
     93    NativeFunction accessorGetter() const { ASSERT(m_attributes & PropertyAttribute::Accessor); return reinterpret_cast<NativeFunction>(m_values.value1); }
     94    NativeFunction accessorSetter() const { ASSERT(m_attributes & PropertyAttribute::Accessor); return reinterpret_cast<NativeFunction>(m_values.value2); }
    9595    BuiltinGenerator builtinAccessorGetterGenerator() const;
    9696    BuiltinGenerator builtinAccessorSetterGenerator() const;
    9797
    98     long long constantInteger() const { ASSERT(m_attributes & ConstantInteger); return m_values.constant; }
     98    long long constantInteger() const { ASSERT(m_attributes & PropertyAttribute::ConstantInteger); return m_values.constant; }
    9999
    100100    intptr_t lexerValue() const { ASSERT(!m_attributes); return m_values.value1; }
    101101   
    102     ptrdiff_t lazyCellPropertyOffset() const { ASSERT(m_attributes & CellProperty); return m_values.value1; }
    103     ptrdiff_t lazyClassStructureOffset() const { ASSERT(m_attributes & ClassStructure); return m_values.value1; }
    104     LazyPropertyCallback lazyPropertyCallback() const { ASSERT(m_attributes & PropertyCallback); return reinterpret_cast<LazyPropertyCallback>(m_values.value1); }
     102    ptrdiff_t lazyCellPropertyOffset() const { ASSERT(m_attributes & PropertyAttribute::CellProperty); return m_values.value1; }
     103    ptrdiff_t lazyClassStructureOffset() const { ASSERT(m_attributes & PropertyAttribute::ClassStructure); return m_values.value1; }
     104    LazyPropertyCallback lazyPropertyCallback() const { ASSERT(m_attributes & PropertyAttribute::PropertyCallback); return reinterpret_cast<LazyPropertyCallback>(m_values.value1); }
    105105};
    106106
     
    209209inline BuiltinGenerator HashTableValue::builtinAccessorGetterGenerator() const
    210210{
    211     ASSERT(m_attributes & Accessor);
    212     ASSERT(m_attributes & Builtin);
     211    ASSERT(m_attributes & PropertyAttribute::Accessor);
     212    ASSERT(m_attributes & PropertyAttribute::Builtin);
    213213    return reinterpret_cast<BuiltinGenerator>(m_values.value1);
    214214}
     
    216216inline BuiltinGenerator HashTableValue::builtinAccessorSetterGenerator() const
    217217{
    218     ASSERT(m_attributes & Accessor);
    219     ASSERT(m_attributes & Builtin);
     218    ASSERT(m_attributes & PropertyAttribute::Accessor);
     219    ASSERT(m_attributes & PropertyAttribute::Builtin);
    220220    return reinterpret_cast<BuiltinGenerator>(m_values.value2);
    221221}
     
    230230        return false;
    231231
    232     if (entry->attributes() & BuiltinOrFunctionOrAccessorOrLazyProperty)
     232    if (entry->attributes() & PropertyAttribute::BuiltinOrFunctionOrAccessorOrLazyProperty)
    233233        return setUpStaticFunctionSlot(vm, classInfo, entry, thisObject, propertyName, slot);
    234234
    235     if (entry->attributes() & ConstantInteger) {
     235    if (entry->attributes() & PropertyAttribute::ConstantInteger) {
    236236        slot.setValue(thisObject, attributesForStructure(entry->attributes()), jsNumber(entry->constantInteger()));
    237237        return true;
    238238    }
    239239
    240     if (entry->attributes() & DOMJITAttribute) {
     240    if (entry->attributes() & PropertyAttribute::DOMJITAttribute) {
    241241        const DOMJIT::GetterSetter* domJIT = entry->domJIT();
    242242        slot.setCacheableCustom(thisObject, attributesForStructure(entry->attributes()), domJIT->getter(), DOMAttributeAnnotation { classInfo, domJIT });
     
    244244    }
    245245
    246     if (entry->attributes() & DOMAttribute) {
     246    if (entry->attributes() & PropertyAttribute::DOMAttribute) {
    247247        slot.setCacheableCustom(thisObject, attributesForStructure(entry->attributes()), entry->propertyGetter(), DOMAttributeAnnotation { classInfo, nullptr });
    248248        return true;
     
    272272    auto scope = DECLARE_THROW_SCOPE(vm);
    273273
    274     if (entry->attributes() & BuiltinOrFunctionOrLazyProperty) {
    275         if (!(entry->attributes() & ReadOnly)) {
     274    if (entry->attributes() & PropertyAttribute::BuiltinOrFunctionOrLazyProperty) {
     275        if (!(entry->attributes() & PropertyAttribute::ReadOnly)) {
    276276            // If this is a function or lazy property put then we just do the put because
    277277            // logically the object already had the property, so this is just a replace.
     
    283283    }
    284284
    285     if (entry->attributes() & Accessor)
     285    if (entry->attributes() & PropertyAttribute::Accessor)
    286286        return typeError(exec, scope, slot.isStrictMode(), ASCIILiteral(ReadonlyPropertyWriteError));
    287287
    288     if (!(entry->attributes() & ReadOnly)) {
    289         ASSERT_WITH_MESSAGE(!(entry->attributes() & DOMJITAttribute), "DOMJITAttribute supports readonly attributes currently.");
    290         bool isAccessor = entry->attributes() & CustomAccessor;
    291         JSValue updateThisValue = entry->attributes() & CustomAccessor ? slot.thisValue() : JSValue(base);
     288    if (!(entry->attributes() & PropertyAttribute::ReadOnly)) {
     289        ASSERT_WITH_MESSAGE(!(entry->attributes() & PropertyAttribute::DOMJITAttribute), "DOMJITAttribute supports readonly attributes currently.");
     290        bool isAccessor = entry->attributes() & PropertyAttribute::CustomAccessor;
     291        JSValue updateThisValue = entry->attributes() & PropertyAttribute::CustomAccessor ? slot.thisValue() : JSValue(base);
    292292        bool result = callCustomSetter(exec, entry->propertyPutter(), isAccessor, updateThisValue, value);
    293293        RETURN_IF_EXCEPTION(scope, false);
     
    320320inline void reifyStaticProperty(VM& vm, const ClassInfo* classInfo, const PropertyName& propertyName, const HashTableValue& value, JSObject& thisObj)
    321321{
    322     if (value.attributes() & Builtin) {
    323         if (value.attributes() & Accessor)
     322    if (value.attributes() & PropertyAttribute::Builtin) {
     323        if (value.attributes() & PropertyAttribute::Accessor)
    324324            reifyStaticAccessor(vm, value, thisObj, propertyName);
    325325        else
     
    328328    }
    329329
    330     if (value.attributes() & Function) {
    331         if (value.attributes() & DOMJITFunction) {
     330    if (value.attributes() & PropertyAttribute::Function) {
     331        if (value.attributes() & PropertyAttribute::DOMJITFunction) {
    332332            thisObj.putDirectNativeFunction(
    333333                vm, thisObj.globalObject(), propertyName, value.functionLength(),
     
    341341    }
    342342
    343     if (value.attributes() & ConstantInteger) {
     343    if (value.attributes() & PropertyAttribute::ConstantInteger) {
    344344        thisObj.putDirect(vm, propertyName, jsNumber(value.constantInteger()), attributesForStructure(value.attributes()));
    345345        return;
    346346    }
    347347
    348     if (value.attributes() & Accessor) {
     348    if (value.attributes() & PropertyAttribute::Accessor) {
    349349        reifyStaticAccessor(vm, value, thisObj, propertyName);
    350350        return;
    351351    }
    352352   
    353     if (value.attributes() & CellProperty) {
     353    if (value.attributes() & PropertyAttribute::CellProperty) {
    354354        LazyCellProperty* property = bitwise_cast<LazyCellProperty*>(
    355355            bitwise_cast<char*>(&thisObj) + value.lazyCellPropertyOffset());
     
    359359    }
    360360   
    361     if (value.attributes() & ClassStructure) {
     361    if (value.attributes() & PropertyAttribute::ClassStructure) {
    362362        LazyClassStructure* structure = bitwise_cast<LazyClassStructure*>(
    363363            bitwise_cast<char*>(&thisObj) + value.lazyClassStructureOffset());
     
    366366    }
    367367   
    368     if (value.attributes() & PropertyCallback) {
     368    if (value.attributes() & PropertyAttribute::PropertyCallback) {
    369369        JSValue result = value.lazyPropertyCallback()(vm, &thisObj);
    370370        thisObj.putDirect(vm, propertyName, result, attributesForStructure(value.attributes()));
     
    372372    }
    373373
    374     if (value.attributes() & DOMJITAttribute) {
     374    if (value.attributes() & PropertyAttribute::DOMJITAttribute) {
    375375        ASSERT_WITH_MESSAGE(classInfo, "DOMJITAttribute should have class info for type checking.");
    376376        const DOMJIT::GetterSetter* domJIT = value.domJIT();
     
    380380    }
    381381
    382     if (value.attributes() & DOMAttribute) {
     382    if (value.attributes() & PropertyAttribute::DOMAttribute) {
    383383        ASSERT_WITH_MESSAGE(classInfo, "DOMAttribute should have class info for type checking.");
    384384        auto* customGetterSetter = DOMAttributeGetterSetter::create(vm, value.propertyGetter(), value.propertyPutter(), DOMAttributeAnnotation { classInfo, nullptr });
  • trunk/Source/JavaScriptCore/runtime/MapConstructor.cpp

    r221849 r222473  
    4343{
    4444    Base::finishCreation(vm, mapPrototype->classInfo(vm)->className);
    45     putDirectWithoutTransition(vm, vm.propertyNames->prototype, mapPrototype, DontEnum | DontDelete | ReadOnly);
    46     putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(0), DontEnum | ReadOnly);
    47     putDirectNonIndexAccessor(vm, vm.propertyNames->speciesSymbol, speciesSymbol, Accessor | ReadOnly | DontEnum);
     45    putDirectWithoutTransition(vm, vm.propertyNames->prototype, mapPrototype, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly);
     46    putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(0), PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly);
     47    putDirectNonIndexAccessor(vm, vm.propertyNames->speciesSymbol, speciesSymbol, PropertyAttribute::Accessor | PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum);
    4848}
    4949
  • trunk/Source/JavaScriptCore/runtime/MapIteratorPrototype.cpp

    r221110 r222473  
    4040    vm.prototypeMap.addPrototype(this);
    4141
    42     JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION("next", mapIteratorPrototypeNextCodeGenerator, DontEnum);
    43     putDirectWithoutTransition(vm, vm.propertyNames->toStringTagSymbol, jsString(&vm, "Map Iterator"), DontEnum | ReadOnly);
     42    JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION("next", mapIteratorPrototypeNextCodeGenerator, static_cast<unsigned>(PropertyAttribute::DontEnum));
     43    putDirectWithoutTransition(vm, vm.propertyNames->toStringTagSymbol, jsString(&vm, "Map Iterator"), PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly);
    4444}
    4545
  • trunk/Source/JavaScriptCore/runtime/MapPrototype.cpp

    r221417 r222473  
    6363    vm.prototypeMap.addPrototype(this);
    6464
    65     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->clear, mapProtoFuncClear, DontEnum, 0);
    66     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->deleteKeyword, mapProtoFuncDelete, DontEnum, 1);
    67     JSC_NATIVE_INTRINSIC_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->get, mapProtoFuncGet, DontEnum, 1, JSMapGetIntrinsic);
    68     JSC_NATIVE_INTRINSIC_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->has, mapProtoFuncHas, DontEnum, 1, JSMapHasIntrinsic);
    69     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->set, mapProtoFuncSet, DontEnum, 2);
     65    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->clear, mapProtoFuncClear, static_cast<unsigned>(PropertyAttribute::DontEnum), 0);
     66    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->deleteKeyword, mapProtoFuncDelete, static_cast<unsigned>(PropertyAttribute::DontEnum), 1);
     67    JSC_NATIVE_INTRINSIC_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->get, mapProtoFuncGet, static_cast<unsigned>(PropertyAttribute::DontEnum), 1, JSMapGetIntrinsic);
     68    JSC_NATIVE_INTRINSIC_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->has, mapProtoFuncHas, static_cast<unsigned>(PropertyAttribute::DontEnum), 1, JSMapHasIntrinsic);
     69    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->set, mapProtoFuncSet, static_cast<unsigned>(PropertyAttribute::DontEnum), 2);
    7070
    71     JSC_NATIVE_INTRINSIC_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->builtinNames().getPrivateName(), mapProtoFuncGet, DontEnum, 1, JSMapGetIntrinsic);
    72     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->builtinNames().setPrivateName(), mapProtoFuncSet, DontEnum, 2);
     71    JSC_NATIVE_INTRINSIC_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->builtinNames().getPrivateName(), mapProtoFuncGet, static_cast<unsigned>(PropertyAttribute::DontEnum), 1, JSMapGetIntrinsic);
     72    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->builtinNames().setPrivateName(), mapProtoFuncSet, static_cast<unsigned>(PropertyAttribute::DontEnum), 2);
    7373
    7474    JSFunction* entries = JSFunction::create(vm, mapPrototypeEntriesCodeGenerator(vm), globalObject);
    75     putDirectWithoutTransition(vm, vm.propertyNames->builtinNames().entriesPublicName(), entries, DontEnum);
    76     putDirectWithoutTransition(vm, vm.propertyNames->iteratorSymbol, entries, DontEnum);
    77     putDirectWithoutTransition(vm, vm.propertyNames->toStringTagSymbol, jsString(&vm, "Map"), DontEnum | ReadOnly);
     75    putDirectWithoutTransition(vm, vm.propertyNames->builtinNames().entriesPublicName(), entries, static_cast<unsigned>(PropertyAttribute::DontEnum));
     76    putDirectWithoutTransition(vm, vm.propertyNames->iteratorSymbol, entries, static_cast<unsigned>(PropertyAttribute::DontEnum));
     77    putDirectWithoutTransition(vm, vm.propertyNames->toStringTagSymbol, jsString(&vm, "Map"), PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly);
    7878
    79     JSC_NATIVE_GETTER(vm.propertyNames->size, mapProtoFuncSize, DontEnum | Accessor);
     79    JSC_NATIVE_GETTER(vm.propertyNames->size, mapProtoFuncSize, PropertyAttribute::DontEnum | PropertyAttribute::Accessor);
    8080}
    8181
  • trunk/Source/JavaScriptCore/runtime/MathObject.cpp

    r217108 r222473  
    7979    ASSERT(inherits(vm, info()));
    8080
    81     putDirectWithoutTransition(vm, Identifier::fromString(&vm, "E"), jsNumber(Math::exp(1.0)), DontDelete | DontEnum | ReadOnly);
    82     putDirectWithoutTransition(vm, Identifier::fromString(&vm, "LN2"), jsNumber(Math::log(2.0)), DontDelete | DontEnum | ReadOnly);
    83     putDirectWithoutTransition(vm, Identifier::fromString(&vm, "LN10"), jsNumber(Math::log(10.0)), DontDelete | DontEnum | ReadOnly);
    84     putDirectWithoutTransition(vm, Identifier::fromString(&vm, "LOG2E"), jsNumber(1.0 / Math::log(2.0)), DontDelete | DontEnum | ReadOnly);
    85     putDirectWithoutTransition(vm, Identifier::fromString(&vm, "LOG10E"), jsNumber(0.4342944819032518), DontDelete | DontEnum | ReadOnly);
    86     putDirectWithoutTransition(vm, Identifier::fromString(&vm, "PI"), jsNumber(piDouble), DontDelete | DontEnum | ReadOnly);
    87     putDirectWithoutTransition(vm, Identifier::fromString(&vm, "SQRT1_2"), jsNumber(sqrt(0.5)), DontDelete | DontEnum | ReadOnly);
    88     putDirectWithoutTransition(vm, Identifier::fromString(&vm, "SQRT2"), jsNumber(sqrt(2.0)), DontDelete | DontEnum | ReadOnly);
    89     putDirectWithoutTransition(vm, vm.propertyNames->toStringTagSymbol, jsString(&vm, "Math"), DontEnum | ReadOnly);
    90 
    91     putDirectNativeFunctionWithoutTransition(vm, globalObject, Identifier::fromString(&vm, "abs"), 1, mathProtoFuncAbs, AbsIntrinsic, DontEnum);
    92     putDirectNativeFunctionWithoutTransition(vm, globalObject, Identifier::fromString(&vm, "acos"), 1, mathProtoFuncACos, ACosIntrinsic, DontEnum);
    93     putDirectNativeFunctionWithoutTransition(vm, globalObject, Identifier::fromString(&vm, "asin"), 1, mathProtoFuncASin, ASinIntrinsic, DontEnum);
    94     putDirectNativeFunctionWithoutTransition(vm, globalObject, Identifier::fromString(&vm, "atan"), 1, mathProtoFuncATan, ATanIntrinsic, DontEnum);
    95     putDirectNativeFunctionWithoutTransition(vm, globalObject, Identifier::fromString(&vm, "acosh"), 1, mathProtoFuncACosh, ACoshIntrinsic, DontEnum);
    96     putDirectNativeFunctionWithoutTransition(vm, globalObject, Identifier::fromString(&vm, "asinh"), 1, mathProtoFuncASinh, ASinhIntrinsic, DontEnum);
    97     putDirectNativeFunctionWithoutTransition(vm, globalObject, Identifier::fromString(&vm, "atanh"), 1, mathProtoFuncATanh, ATanhIntrinsic, DontEnum);
    98     putDirectNativeFunctionWithoutTransition(vm, globalObject, Identifier::fromString(&vm, "atan2"), 2, mathProtoFuncATan2, NoIntrinsic, DontEnum);
    99     putDirectNativeFunctionWithoutTransition(vm, globalObject, Identifier::fromString(&vm, "cbrt"), 1, mathProtoFuncCbrt, CbrtIntrinsic, DontEnum);
    100     putDirectNativeFunctionWithoutTransition(vm, globalObject, Identifier::fromString(&vm, "ceil"), 1, mathProtoFuncCeil, CeilIntrinsic, DontEnum);
    101     putDirectNativeFunctionWithoutTransition(vm, globalObject, Identifier::fromString(&vm, "clz32"), 1, mathProtoFuncClz32, Clz32Intrinsic, DontEnum);
    102     putDirectNativeFunctionWithoutTransition(vm, globalObject, Identifier::fromString(&vm, "cos"), 1, mathProtoFuncCos, CosIntrinsic, DontEnum);
    103     putDirectNativeFunctionWithoutTransition(vm, globalObject, Identifier::fromString(&vm, "cosh"), 1, mathProtoFuncCosh, CoshIntrinsic, DontEnum);
    104     putDirectNativeFunctionWithoutTransition(vm, globalObject, Identifier::fromString(&vm, "exp"), 1, mathProtoFuncExp, ExpIntrinsic, DontEnum);
    105     putDirectNativeFunctionWithoutTransition(vm, globalObject, Identifier::fromString(&vm, "expm1"), 1, mathProtoFuncExpm1, Expm1Intrinsic, DontEnum);
    106     putDirectNativeFunctionWithoutTransition(vm, globalObject, Identifier::fromString(&vm, "floor"), 1, mathProtoFuncFloor, FloorIntrinsic, DontEnum);
    107     putDirectNativeFunctionWithoutTransition(vm, globalObject, Identifier::fromString(&vm, "fround"), 1, mathProtoFuncFround, FRoundIntrinsic, DontEnum);
    108     putDirectNativeFunctionWithoutTransition(vm, globalObject, Identifier::fromString(&vm, "hypot"), 2, mathProtoFuncHypot, NoIntrinsic, DontEnum);
    109     putDirectNativeFunctionWithoutTransition(vm, globalObject, Identifier::fromString(&vm, "log"), 1, mathProtoFuncLog, LogIntrinsic, DontEnum);
    110     putDirectNativeFunctionWithoutTransition(vm, globalObject, Identifier::fromString(&vm, "log10"), 1, mathProtoFuncLog10, Log10Intrinsic, DontEnum);
    111     putDirectNativeFunctionWithoutTransition(vm, globalObject, Identifier::fromString(&vm, "log1p"), 1, mathProtoFuncLog1p, Log1pIntrinsic, DontEnum);
    112     putDirectNativeFunctionWithoutTransition(vm, globalObject, Identifier::fromString(&vm, "log2"), 1, mathProtoFuncLog2, Log2Intrinsic, DontEnum);
    113     putDirectNativeFunctionWithoutTransition(vm, globalObject, Identifier::fromString(&vm, "max"), 2, mathProtoFuncMax, MaxIntrinsic, DontEnum);
    114     putDirectNativeFunctionWithoutTransition(vm, globalObject, Identifier::fromString(&vm, "min"), 2, mathProtoFuncMin, MinIntrinsic, DontEnum);
    115     putDirectNativeFunctionWithoutTransition(vm, globalObject, Identifier::fromString(&vm, "pow"), 2, mathProtoFuncPow, PowIntrinsic, DontEnum);
    116     putDirectNativeFunctionWithoutTransition(vm, globalObject, Identifier::fromString(&vm, "random"), 0, mathProtoFuncRandom, RandomIntrinsic, DontEnum);
    117     putDirectNativeFunctionWithoutTransition(vm, globalObject, Identifier::fromString(&vm, "round"), 1, mathProtoFuncRound, RoundIntrinsic, DontEnum);
    118     putDirectNativeFunctionWithoutTransition(vm, globalObject, Identifier::fromString(&vm, "sign"), 1, mathProtoFuncSign, NoIntrinsic, DontEnum);
    119     putDirectNativeFunctionWithoutTransition(vm, globalObject, Identifier::fromString(&vm, "sin"), 1, mathProtoFuncSin, SinIntrinsic, DontEnum);
    120     putDirectNativeFunctionWithoutTransition(vm, globalObject, Identifier::fromString(&vm, "sinh"), 1, mathProtoFuncSinh, SinhIntrinsic, DontEnum);
    121     putDirectNativeFunctionWithoutTransition(vm, globalObject, Identifier::fromString(&vm, "sqrt"), 1, mathProtoFuncSqrt, SqrtIntrinsic, DontEnum);
    122     putDirectNativeFunctionWithoutTransition(vm, globalObject, Identifier::fromString(&vm, "tan"), 1, mathProtoFuncTan, TanIntrinsic, DontEnum);
    123     putDirectNativeFunctionWithoutTransition(vm, globalObject, Identifier::fromString(&vm, "tanh"), 1, mathProtoFuncTanh, TanhIntrinsic, DontEnum);
    124     putDirectNativeFunctionWithoutTransition(vm, globalObject, Identifier::fromString(&vm, "trunc"), 1, mathProtoFuncTrunc, TruncIntrinsic, DontEnum);
    125     putDirectNativeFunctionWithoutTransition(vm, globalObject, Identifier::fromString(&vm, "imul"), 2, mathProtoFuncIMul, IMulIntrinsic, DontEnum);
     81    putDirectWithoutTransition(vm, Identifier::fromString(&vm, "E"), jsNumber(Math::exp(1.0)), PropertyAttribute::DontDelete | PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly);
     82    putDirectWithoutTransition(vm, Identifier::fromString(&vm, "LN2"), jsNumber(Math::log(2.0)), PropertyAttribute::DontDelete | PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly);
     83    putDirectWithoutTransition(vm, Identifier::fromString(&vm, "LN10"), jsNumber(Math::log(10.0)), PropertyAttribute::DontDelete | PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly);
     84    putDirectWithoutTransition(vm, Identifier::fromString(&vm, "LOG2E"), jsNumber(1.0 / Math::log(2.0)), PropertyAttribute::DontDelete | PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly);
     85    putDirectWithoutTransition(vm, Identifier::fromString(&vm, "LOG10E"), jsNumber(0.4342944819032518), PropertyAttribute::DontDelete | PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly);
     86    putDirectWithoutTransition(vm, Identifier::fromString(&vm, "PI"), jsNumber(piDouble), PropertyAttribute::DontDelete | PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly);
     87    putDirectWithoutTransition(vm, Identifier::fromString(&vm, "SQRT1_2"), jsNumber(sqrt(0.5)), PropertyAttribute::DontDelete | PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly);
     88    putDirectWithoutTransition(vm, Identifier::fromString(&vm, "SQRT2"), jsNumber(sqrt(2.0)), PropertyAttribute::DontDelete | PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly);
     89    putDirectWithoutTransition(vm, vm.propertyNames->toStringTagSymbol, jsString(&vm, "Math"), PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly);
     90
     91    putDirectNativeFunctionWithoutTransition(vm, globalObject, Identifier::fromString(&vm, "abs"), 1, mathProtoFuncAbs, AbsIntrinsic, static_cast<unsigned>(PropertyAttribute::DontEnum));
     92    putDirectNativeFunctionWithoutTransition(vm, globalObject, Identifier::fromString(&vm, "acos"), 1, mathProtoFuncACos, ACosIntrinsic, static_cast<unsigned>(PropertyAttribute::DontEnum));
     93    putDirectNativeFunctionWithoutTransition(vm, globalObject, Identifier::fromString(&vm, "asin"), 1, mathProtoFuncASin, ASinIntrinsic, static_cast<unsigned>(PropertyAttribute::DontEnum));
     94    putDirectNativeFunctionWithoutTransition(vm, globalObject, Identifier::fromString(&vm, "atan"), 1, mathProtoFuncATan, ATanIntrinsic, static_cast<unsigned>(PropertyAttribute::DontEnum));
     95    putDirectNativeFunctionWithoutTransition(vm, globalObject, Identifier::fromString(&vm, "acosh"), 1, mathProtoFuncACosh, ACoshIntrinsic, static_cast<unsigned>(PropertyAttribute::DontEnum));
     96    putDirectNativeFunctionWithoutTransition(vm, globalObject, Identifier::fromString(&vm, "asinh"), 1, mathProtoFuncASinh, ASinhIntrinsic, static_cast<unsigned>(PropertyAttribute::DontEnum));
     97    putDirectNativeFunctionWithoutTransition(vm, globalObject, Identifier::fromString(&vm, "atanh"), 1, mathProtoFuncATanh, ATanhIntrinsic, static_cast<unsigned>(PropertyAttribute::DontEnum));
     98    putDirectNativeFunctionWithoutTransition(vm, globalObject, Identifier::fromString(&vm, "atan2"), 2, mathProtoFuncATan2, NoIntrinsic, static_cast<unsigned>(PropertyAttribute::DontEnum));
     99    putDirectNativeFunctionWithoutTransition(vm, globalObject, Identifier::fromString(&vm, "cbrt"), 1, mathProtoFuncCbrt, CbrtIntrinsic, static_cast<unsigned>(PropertyAttribute::DontEnum));
     100    putDirectNativeFunctionWithoutTransition(vm, globalObject, Identifier::fromString(&vm, "ceil"), 1, mathProtoFuncCeil, CeilIntrinsic, static_cast<unsigned>(PropertyAttribute::DontEnum));
     101    putDirectNativeFunctionWithoutTransition(vm, globalObject, Identifier::fromString(&vm, "clz32"), 1, mathProtoFuncClz32, Clz32Intrinsic, static_cast<unsigned>(PropertyAttribute::DontEnum));
     102    putDirectNativeFunctionWithoutTransition(vm, globalObject, Identifier::fromString(&vm, "cos"), 1, mathProtoFuncCos, CosIntrinsic, static_cast<unsigned>(PropertyAttribute::DontEnum));
     103    putDirectNativeFunctionWithoutTransition(vm, globalObject, Identifier::fromString(&vm, "cosh"), 1, mathProtoFuncCosh, CoshIntrinsic, static_cast<unsigned>(PropertyAttribute::DontEnum));
     104    putDirectNativeFunctionWithoutTransition(vm, globalObject, Identifier::fromString(&vm, "exp"), 1, mathProtoFuncExp, ExpIntrinsic, static_cast<unsigned>(PropertyAttribute::DontEnum));
     105    putDirectNativeFunctionWithoutTransition(vm, globalObject, Identifier::fromString(&vm, "expm1"), 1, mathProtoFuncExpm1, Expm1Intrinsic, static_cast<unsigned>(PropertyAttribute::DontEnum));
     106    putDirectNativeFunctionWithoutTransition(vm, globalObject, Identifier::fromString(&vm, "floor"), 1, mathProtoFuncFloor, FloorIntrinsic, static_cast<unsigned>(PropertyAttribute::DontEnum));
     107    putDirectNativeFunctionWithoutTransition(vm, globalObject, Identifier::fromString(&vm, "fround"), 1, mathProtoFuncFround, FRoundIntrinsic, static_cast<unsigned>(PropertyAttribute::DontEnum));
     108    putDirectNativeFunctionWithoutTransition(vm, globalObject, Identifier::fromString(&vm, "hypot"), 2, mathProtoFuncHypot, NoIntrinsic, static_cast<unsigned>(PropertyAttribute::DontEnum));
     109    putDirectNativeFunctionWithoutTransition(vm, globalObject, Identifier::fromString(&vm, "log"), 1, mathProtoFuncLog, LogIntrinsic, static_cast<unsigned>(PropertyAttribute::DontEnum));
     110    putDirectNativeFunctionWithoutTransition(vm, globalObject, Identifier::fromString(&vm, "log10"), 1, mathProtoFuncLog10, Log10Intrinsic, static_cast<unsigned>(PropertyAttribute::DontEnum));
     111    putDirectNativeFunctionWithoutTransition(vm, globalObject, Identifier::fromString(&vm, "log1p"), 1, mathProtoFuncLog1p, Log1pIntrinsic, static_cast<unsigned>(PropertyAttribute::DontEnum));
     112    putDirectNativeFunctionWithoutTransition(vm, globalObject, Identifier::fromString(&vm, "log2"), 1, mathProtoFuncLog2, Log2Intrinsic, static_cast<unsigned>(PropertyAttribute::DontEnum));
     113    putDirectNativeFunctionWithoutTransition(vm, globalObject, Identifier::fromString(&vm, "max"), 2, mathProtoFuncMax, MaxIntrinsic, static_cast<unsigned>(PropertyAttribute::DontEnum));
     114    putDirectNativeFunctionWithoutTransition(vm, globalObject, Identifier::fromString(&vm, "min"), 2, mathProtoFuncMin, MinIntrinsic, static_cast<unsigned>(PropertyAttribute::DontEnum));
     115    putDirectNativeFunctionWithoutTransition(vm, globalObject, Identifier::fromString(&vm, "pow"), 2, mathProtoFuncPow, PowIntrinsic, static_cast<unsigned>(PropertyAttribute::DontEnum));
     116    putDirectNativeFunctionWithoutTransition(vm, globalObject, Identifier::fromString(&vm, "random"), 0, mathProtoFuncRandom, RandomIntrinsic, static_cast<unsigned>(PropertyAttribute::DontEnum));
     117    putDirectNativeFunctionWithoutTransition(vm, globalObject, Identifier::fromString(&vm, "round"), 1, mathProtoFuncRound, RoundIntrinsic, static_cast<unsigned>(PropertyAttribute::DontEnum));
     118    putDirectNativeFunctionWithoutTransition(vm, globalObject, Identifier::fromString(&vm, "sign"), 1, mathProtoFuncSign, NoIntrinsic, static_cast<unsigned>(PropertyAttribute::DontEnum));
     119    putDirectNativeFunctionWithoutTransition(vm, globalObject, Identifier::fromString(&vm, "sin"), 1, mathProtoFuncSin, SinIntrinsic, static_cast<unsigned>(PropertyAttribute::DontEnum));
     120    putDirectNativeFunctionWithoutTransition(vm, globalObject, Identifier::fromString(&vm, "sinh"), 1, mathProtoFuncSinh, SinhIntrinsic, static_cast<unsigned>(PropertyAttribute::DontEnum));
     121    putDirectNativeFunctionWithoutTransition(vm, globalObject, Identifier::fromString(&vm, "sqrt"), 1, mathProtoFuncSqrt, SqrtIntrinsic, static_cast<unsigned>(PropertyAttribute::DontEnum));
     122    putDirectNativeFunctionWithoutTransition(vm, globalObject, Identifier::fromString(&vm, "tan"), 1, mathProtoFuncTan, TanIntrinsic, static_cast<unsigned>(PropertyAttribute::DontEnum));
     123    putDirectNativeFunctionWithoutTransition(vm, globalObject, Identifier::fromString(&vm, "tanh"), 1, mathProtoFuncTanh, TanhIntrinsic, static_cast<unsigned>(PropertyAttribute::DontEnum));
     124    putDirectNativeFunctionWithoutTransition(vm, globalObject, Identifier::fromString(&vm, "trunc"), 1, mathProtoFuncTrunc, TruncIntrinsic, static_cast<unsigned>(PropertyAttribute::DontEnum));
     125    putDirectNativeFunctionWithoutTransition(vm, globalObject, Identifier::fromString(&vm, "imul"), 2, mathProtoFuncIMul, IMulIntrinsic, static_cast<unsigned>(PropertyAttribute::DontEnum));
    126126}
    127127
  • trunk/Source/JavaScriptCore/runtime/NativeErrorConstructor.cpp

    r217108 r222473  
    4747    NativeErrorPrototype* prototype = NativeErrorPrototype::create(vm, prototypeStructure, name, this);
    4848   
    49     putDirect(vm, vm.propertyNames->length, jsNumber(1), DontEnum | ReadOnly);
    50     putDirect(vm, vm.propertyNames->prototype, prototype, DontDelete | ReadOnly | DontEnum);
     49    putDirect(vm, vm.propertyNames->length, jsNumber(1), PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly);
     50    putDirect(vm, vm.propertyNames->prototype, prototype, PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum);
    5151    m_errorStructure.set(vm, this, ErrorInstance::createStructure(vm, globalObject, prototype));
    5252    ASSERT(m_errorStructure);
  • trunk/Source/JavaScriptCore/runtime/NativeErrorPrototype.cpp

    r198469 r222473  
    3737{
    3838    Base::finishCreation(vm);
    39     putDirect(vm, vm.propertyNames->name, jsString(&vm, nameAndMessage), DontEnum);
    40     putDirect(vm, vm.propertyNames->message, jsEmptyString(&vm), DontEnum);
    41     putDirect(vm, vm.propertyNames->constructor, constructor, DontEnum);
     39    putDirect(vm, vm.propertyNames->name, jsString(&vm, nameAndMessage), static_cast<unsigned>(PropertyAttribute::DontEnum));
     40    putDirect(vm, vm.propertyNames->message, jsEmptyString(&vm), static_cast<unsigned>(PropertyAttribute::DontEnum));
     41    putDirect(vm, vm.propertyNames->constructor, constructor, static_cast<unsigned>(PropertyAttribute::DontEnum));
    4242}
    4343
  • trunk/Source/JavaScriptCore/runtime/NumberConstructor.cpp

    r218449 r222473  
    6464    ASSERT(inherits(vm, info()));
    6565
    66     putDirectWithoutTransition(vm, vm.propertyNames->prototype, numberPrototype, DontEnum | DontDelete | ReadOnly);
    67     putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), ReadOnly | DontEnum);
     66    putDirectWithoutTransition(vm, vm.propertyNames->prototype, numberPrototype, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly);
     67    putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum);
    6868
    69     putDirectWithoutTransition(vm, Identifier::fromString(&vm, "EPSILON"), jsDoubleNumber(std::numeric_limits<double>::epsilon()), DontDelete | DontEnum | ReadOnly);
    70     putDirectWithoutTransition(vm, Identifier::fromString(&vm, "MAX_VALUE"), jsDoubleNumber(1.7976931348623157E+308), DontDelete | DontEnum | ReadOnly);
    71     putDirectWithoutTransition(vm, Identifier::fromString(&vm, "MIN_VALUE"), jsDoubleNumber(5E-324), DontDelete | DontEnum | ReadOnly);
    72     putDirectWithoutTransition(vm, Identifier::fromString(&vm, "MAX_SAFE_INTEGER"), jsDoubleNumber(maxSafeInteger()), DontDelete | DontEnum | ReadOnly);
    73     putDirectWithoutTransition(vm, Identifier::fromString(&vm, "MIN_SAFE_INTEGER"), jsDoubleNumber(minSafeInteger()), DontDelete | DontEnum | ReadOnly);
    74     putDirectWithoutTransition(vm, Identifier::fromString(&vm, "NEGATIVE_INFINITY"), jsDoubleNumber(-std::numeric_limits<double>::infinity()), DontDelete | DontEnum | ReadOnly);
    75     putDirectWithoutTransition(vm, Identifier::fromString(&vm, "POSITIVE_INFINITY"), jsDoubleNumber(std::numeric_limits<double>::infinity()), DontDelete | DontEnum | ReadOnly);
    76     putDirectWithoutTransition(vm, vm.propertyNames->NaN, jsNaN(), DontDelete | DontEnum | ReadOnly);
     69    putDirectWithoutTransition(vm, Identifier::fromString(&vm, "EPSILON"), jsDoubleNumber(std::numeric_limits<double>::epsilon()), PropertyAttribute::DontDelete | PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly);
     70    putDirectWithoutTransition(vm, Identifier::fromString(&vm, "MAX_VALUE"), jsDoubleNumber(1.7976931348623157E+308), PropertyAttribute::DontDelete | PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly);
     71    putDirectWithoutTransition(vm, Identifier::fromString(&vm, "MIN_VALUE"), jsDoubleNumber(5E-324), PropertyAttribute::DontDelete | PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly);
     72    putDirectWithoutTransition(vm, Identifier::fromString(&vm, "MAX_SAFE_INTEGER"), jsDoubleNumber(maxSafeInteger()), PropertyAttribute::DontDelete | PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly);
     73    putDirectWithoutTransition(vm, Identifier::fromString(&vm, "MIN_SAFE_INTEGER"), jsDoubleNumber(minSafeInteger()), PropertyAttribute::DontDelete | PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly);
     74    putDirectWithoutTransition(vm, Identifier::fromString(&vm, "NEGATIVE_INFINITY"), jsDoubleNumber(-std::numeric_limits<double>::infinity()), PropertyAttribute::DontDelete | PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly);
     75    putDirectWithoutTransition(vm, Identifier::fromString(&vm, "POSITIVE_INFINITY"), jsDoubleNumber(std::numeric_limits<double>::infinity()), PropertyAttribute::DontDelete | PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly);
     76    putDirectWithoutTransition(vm, vm.propertyNames->NaN, jsNaN(), PropertyAttribute::DontDelete | PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly);
    7777
    78     putDirectWithoutTransition(vm, vm.propertyNames->parseInt, numberPrototype->globalObject()->parseIntFunction(), DontEnum);
    79     putDirectWithoutTransition(vm, vm.propertyNames->parseFloat, numberPrototype->globalObject()->parseFloatFunction(), DontEnum);
     78    putDirectWithoutTransition(vm, vm.propertyNames->parseInt, numberPrototype->globalObject()->parseIntFunction(), static_cast<unsigned>(PropertyAttribute::DontEnum));
     79    putDirectWithoutTransition(vm, vm.propertyNames->parseFloat, numberPrototype->globalObject()->parseFloatFunction(), static_cast<unsigned>(PropertyAttribute::DontEnum));
    8080}
    8181
  • trunk/Source/JavaScriptCore/runtime/NumberPrototype.cpp

    r221954 r222473  
    7979    setInternalValue(vm, jsNumber(0));
    8080
    81     JSC_NATIVE_INTRINSIC_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->toString, numberProtoFuncToString, DontEnum, 1, NumberPrototypeToStringIntrinsic);
     81    JSC_NATIVE_INTRINSIC_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->toString, numberProtoFuncToString, static_cast<unsigned>(PropertyAttribute::DontEnum), 1, NumberPrototypeToStringIntrinsic);
    8282#if ENABLE(INTL)
    83     JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION("toLocaleString", numberPrototypeToLocaleStringCodeGenerator, DontEnum);
     83    JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION("toLocaleString", numberPrototypeToLocaleStringCodeGenerator, static_cast<unsigned>(PropertyAttribute::DontEnum));
    8484#endif // ENABLE(INTL)
    8585
  • trunk/Source/JavaScriptCore/runtime/ObjectConstructor.cpp

    r222017 r222473  
    100100    Base::finishCreation(vm, objectPrototype->classInfo(vm)->className);
    101101
    102     putDirectWithoutTransition(vm, vm.propertyNames->prototype, objectPrototype, DontEnum | DontDelete | ReadOnly);
    103     putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), ReadOnly | DontEnum);
    104 
    105     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->builtinNames().createPrivateName(), objectConstructorCreate, DontEnum, 2);
    106     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->builtinNames().definePropertyPrivateName(), objectConstructorDefineProperty, DontEnum, 3);
    107     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->builtinNames().getPrototypeOfPrivateName(), objectConstructorGetPrototypeOf, DontEnum, 1);
    108     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->builtinNames().getOwnPropertyNamesPrivateName(), objectConstructorGetOwnPropertyNames, DontEnum, 1);
     102    putDirectWithoutTransition(vm, vm.propertyNames->prototype, objectPrototype, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly);
     103    putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum);
     104
     105    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->builtinNames().createPrivateName(), objectConstructorCreate, static_cast<unsigned>(PropertyAttribute::DontEnum), 2);
     106    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->builtinNames().definePropertyPrivateName(), objectConstructorDefineProperty, static_cast<unsigned>(PropertyAttribute::DontEnum), 3);
     107    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->builtinNames().getPrototypeOfPrivateName(), objectConstructorGetPrototypeOf, static_cast<unsigned>(PropertyAttribute::DontEnum), 1);
     108    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->builtinNames().getOwnPropertyNamesPrivateName(), objectConstructorGetOwnPropertyNames, static_cast<unsigned>(PropertyAttribute::DontEnum), 1);
    109109}
    110110
     
    327327            if (!hasProperty)
    328328                return;
    329             if (slot.attributes() & DontEnum)
     329            if (slot.attributes() & PropertyAttribute::DontEnum)
    330330                return;
    331331
     
    395395        if (!hasProperty)
    396396            return;
    397         if (slot.attributes() & DontEnum)
     397        if (slot.attributes() & PropertyAttribute::DontEnum)
    398398            return;
    399399
     
    533533    if (!success)
    534534        return JSValue::encode(jsNull());
    535     ASSERT((descriptor.attributes() & Accessor) || (!descriptor.isAccessorDescriptor()));
     535    ASSERT((descriptor.attributes() & PropertyAttribute::Accessor) || (!descriptor.isAccessorDescriptor()));
    536536    scope.assertNoException();
    537537    obj->methodTable(vm)->defineOwnProperty(obj, exec, propertyName, descriptor, true);
  • trunk/Source/JavaScriptCore/runtime/ObjectPrototype.cpp

    r221849 r222473  
    5959    vm.prototypeMap.addPrototype(this);
    6060   
    61     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->toString, objectProtoFuncToString, DontEnum, 0);
    62     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->toLocaleString, objectProtoFuncToLocaleString, DontEnum, 0);
    63     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->valueOf, objectProtoFuncValueOf, DontEnum, 0);
    64     JSC_NATIVE_INTRINSIC_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->hasOwnProperty, objectProtoFuncHasOwnProperty, DontEnum, 1, HasOwnPropertyIntrinsic);
    65     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->propertyIsEnumerable, objectProtoFuncPropertyIsEnumerable, DontEnum, 1);
    66     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->isPrototypeOf, objectProtoFuncIsPrototypeOf, DontEnum, 1);
    67     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->__defineGetter__, objectProtoFuncDefineGetter, DontEnum, 2);
    68     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->__defineSetter__, objectProtoFuncDefineSetter, DontEnum, 2);
    69     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->__lookupGetter__, objectProtoFuncLookupGetter, DontEnum, 1);
    70     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->__lookupSetter__, objectProtoFuncLookupSetter, DontEnum, 1);
     61    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->toString, objectProtoFuncToString, static_cast<unsigned>(PropertyAttribute::DontEnum), 0);
     62    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->toLocaleString, objectProtoFuncToLocaleString, static_cast<unsigned>(PropertyAttribute::DontEnum), 0);
     63    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->valueOf, objectProtoFuncValueOf, static_cast<unsigned>(PropertyAttribute::DontEnum), 0);
     64    JSC_NATIVE_INTRINSIC_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->hasOwnProperty, objectProtoFuncHasOwnProperty, static_cast<unsigned>(PropertyAttribute::DontEnum), 1, HasOwnPropertyIntrinsic);
     65    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->propertyIsEnumerable, objectProtoFuncPropertyIsEnumerable, static_cast<unsigned>(PropertyAttribute::DontEnum), 1);
     66    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->isPrototypeOf, objectProtoFuncIsPrototypeOf, static_cast<unsigned>(PropertyAttribute::DontEnum), 1);
     67    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->__defineGetter__, objectProtoFuncDefineGetter, static_cast<unsigned>(PropertyAttribute::DontEnum), 2);
     68    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->__defineSetter__, objectProtoFuncDefineSetter, static_cast<unsigned>(PropertyAttribute::DontEnum), 2);
     69    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->__lookupGetter__, objectProtoFuncLookupGetter, static_cast<unsigned>(PropertyAttribute::DontEnum), 1);
     70    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->__lookupSetter__, objectProtoFuncLookupSetter, static_cast<unsigned>(PropertyAttribute::DontEnum), 1);
    7171}
    7272
     
    220220            return getterSetter->isGetterNull() ? JSValue::encode(jsUndefined()) : JSValue::encode(getterSetter->getter());
    221221        }
    222         if (slot.attributes() & CustomAccessor) {
     222        if (slot.attributes() & PropertyAttribute::CustomAccessor) {
    223223            PropertyDescriptor descriptor;
    224224            ASSERT(slot.slotBase());
     
    250250            return getterSetter->isSetterNull() ? JSValue::encode(jsUndefined()) : JSValue::encode(getterSetter->setter());
    251251        }
    252         if (slot.attributes() & CustomAccessor) {
     252        if (slot.attributes() & PropertyAttribute::CustomAccessor) {
    253253            PropertyDescriptor descriptor;
    254254            ASSERT(slot.slotBase());
  • trunk/Source/JavaScriptCore/runtime/ProgramExecutable.cpp

    r219981 r222473  
    191191            }
    192192            ScopeOffset offset = symbolTable->takeNextScopeOffset(locker);
    193             SymbolTableEntry newEntry(VarOffset(offset), entry.value.isConst() ? ReadOnly : None);
     193            SymbolTableEntry newEntry(VarOffset(offset), static_cast<unsigned>(entry.value.isConst() ? PropertyAttribute::ReadOnly : PropertyAttribute::None));
    194194            newEntry.prepareToWatch();
    195195            symbolTable->add(locker, entry.key.get(), newEntry);
  • trunk/Source/JavaScriptCore/runtime/PropertyDescriptor.cpp

    r206386 r222473  
    3434
    3535namespace JSC {
    36 unsigned PropertyDescriptor::defaultAttributes = DontDelete | DontEnum | ReadOnly;
     36unsigned PropertyDescriptor::defaultAttributes = PropertyAttribute::DontDelete | PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly;
    3737
    3838bool PropertyDescriptor::writable() const
    3939{
    4040    ASSERT(!isAccessorDescriptor());
    41     return !(m_attributes & ReadOnly);
     41    return !(m_attributes & PropertyAttribute::ReadOnly);
    4242}
    4343
    4444bool PropertyDescriptor::enumerable() const
    4545{
    46     return !(m_attributes & DontEnum);
     46    return !(m_attributes & PropertyAttribute::DontEnum);
    4747}
    4848
    4949bool PropertyDescriptor::configurable() const
    5050{
    51     return !(m_attributes & DontDelete);
     51    return !(m_attributes & PropertyAttribute::DontDelete);
    5252}
    5353
     
    7070{
    7171    m_value = jsUndefined();
    72     m_attributes = ReadOnly | DontDelete | DontEnum;
     72    m_attributes = PropertyAttribute::ReadOnly | PropertyAttribute::DontDelete | PropertyAttribute::DontEnum;
    7373}
    7474
     
    119119    m_attributes = attributes;
    120120    if (value.isGetterSetter()) {
    121         m_attributes &= ~ReadOnly; // FIXME: we should be able to ASSERT this!
     121        m_attributes &= ~PropertyAttribute::ReadOnly; // FIXME: we should be able to ASSERT this!
    122122
    123123        GetterSetter* accessor = asGetterSetter(value);
     
    133133void PropertyDescriptor::setCustomDescriptor(unsigned attributes)
    134134{
    135     m_attributes = attributes | Accessor | CustomAccessor;
    136     m_attributes &= ~ReadOnly;
     135    m_attributes = attributes | PropertyAttribute::Accessor | PropertyAttribute::CustomAccessor;
     136    m_attributes &= ~PropertyAttribute::ReadOnly;
    137137    m_seenAttributes = EnumerablePresent | ConfigurablePresent;
    138138    setGetter(jsUndefined());
     
    143143void PropertyDescriptor::setAccessorDescriptor(GetterSetter* accessor, unsigned attributes)
    144144{
    145     ASSERT(attributes & Accessor);
    146     attributes &= ~ReadOnly; // FIXME: we should be able to ASSERT this!
     145    ASSERT(attributes & PropertyAttribute::Accessor);
     146    attributes &= ~PropertyAttribute::ReadOnly; // FIXME: we should be able to ASSERT this!
    147147
    148148    m_attributes = attributes;
     
    155155{
    156156    if (writable)
    157         m_attributes &= ~ReadOnly;
     157        m_attributes &= ~PropertyAttribute::ReadOnly;
    158158    else
    159         m_attributes |= ReadOnly;
     159        m_attributes |= PropertyAttribute::ReadOnly;
    160160    m_seenAttributes |= WritablePresent;
    161161}
     
    164164{
    165165    if (enumerable)
    166         m_attributes &= ~DontEnum;
     166        m_attributes &= ~PropertyAttribute::DontEnum;
    167167    else
    168         m_attributes |= DontEnum;
     168        m_attributes |= PropertyAttribute::DontEnum;
    169169    m_seenAttributes |= EnumerablePresent;
    170170}
     
    173173{
    174174    if (configurable)
    175         m_attributes &= ~DontDelete;
     175        m_attributes &= ~PropertyAttribute::DontDelete;
    176176    else
    177         m_attributes |= DontDelete;
     177        m_attributes |= PropertyAttribute::DontDelete;
    178178    m_seenAttributes |= ConfigurablePresent;
    179179}
     
    182182{
    183183    m_setter = setter;
    184     m_attributes |= Accessor;
    185     m_attributes &= ~ReadOnly;
     184    m_attributes |= PropertyAttribute::Accessor;
     185    m_attributes &= ~PropertyAttribute::ReadOnly;
    186186}
    187187
     
    189189{
    190190    m_getter = getter;
    191     m_attributes |= Accessor;
    192     m_attributes &= ~ReadOnly;
     191    m_attributes |= PropertyAttribute::Accessor;
     192    m_attributes &= ~PropertyAttribute::ReadOnly;
    193193}
    194194
     
    209209    unsigned mismatch = other.m_attributes ^ m_attributes;
    210210    unsigned sharedSeen = other.m_seenAttributes & m_seenAttributes;
    211     if (sharedSeen & WritablePresent && mismatch & ReadOnly)
    212         return false;
    213     if (sharedSeen & ConfigurablePresent && mismatch & DontDelete)
    214         return false;
    215     if (sharedSeen & EnumerablePresent && mismatch & DontEnum)
     211    if (sharedSeen & WritablePresent && mismatch & PropertyAttribute::ReadOnly)
     212        return false;
     213    if (sharedSeen & ConfigurablePresent && mismatch & PropertyAttribute::DontDelete)
     214        return false;
     215    if (sharedSeen & EnumerablePresent && mismatch & PropertyAttribute::DontEnum)
    216216        return false;
    217217    return true;
     
    222222    unsigned currentAttributes = current.m_attributes;
    223223    if (isDataDescriptor() && current.isAccessorDescriptor())
    224         currentAttributes |= ReadOnly;
     224        currentAttributes |= PropertyAttribute::ReadOnly;
    225225    unsigned overrideMask = 0;
    226226    if (writablePresent())
    227         overrideMask |= ReadOnly;
     227        overrideMask |= PropertyAttribute::ReadOnly;
    228228    if (enumerablePresent())
    229         overrideMask |= DontEnum;
     229        overrideMask |= PropertyAttribute::DontEnum;
    230230    if (configurablePresent())
    231         overrideMask |= DontDelete;
     231        overrideMask |= PropertyAttribute::DontDelete;
    232232    if (isAccessorDescriptor())
    233         overrideMask |= Accessor;
    234     return (m_attributes & overrideMask) | (currentAttributes & ~overrideMask & ~CustomAccessor);
    235 }
    236 
    237 }
     233        overrideMask |= PropertyAttribute::Accessor;
     234    return (m_attributes & overrideMask) | (currentAttributes & ~overrideMask & ~PropertyAttribute::CustomAccessor);
     235}
     236
     237}
  • trunk/Source/JavaScriptCore/runtime/PropertySlot.cpp

    r219981 r222473  
    4040    // FIXME: Remove this differences in custom values and custom accessors.
    4141    // https://bugs.webkit.org/show_bug.cgi?id=158014
    42     JSValue thisValue = m_attributes & CustomAccessor ? m_thisValue : JSValue(slotBase());
     42    JSValue thisValue = m_attributes & PropertyAttribute::CustomAccessor ? m_thisValue : JSValue(slotBase());
    4343    if (auto domAttribute = this->domAttribute()) {
    4444        VM& vm = exec->vm();
  • trunk/Source/JavaScriptCore/runtime/PropertySlot.h

    r219981 r222473  
    3636// ECMA 262-3 8.6.1
    3737// Property attributes
    38 enum Attribute : unsigned {
     38enum class PropertyAttribute : unsigned {
    3939    None              = 0,
    4040    ReadOnly          = 1 << 1,  // property can be only read, not written
     
    6060};
    6161
     62static constexpr unsigned operator| (PropertyAttribute a, PropertyAttribute b) { return static_cast<unsigned>(a) | static_cast<unsigned>(b); }
     63static constexpr unsigned operator| (unsigned a, PropertyAttribute b) { return a | static_cast<unsigned>(b); }
     64static constexpr unsigned operator| (PropertyAttribute a, unsigned b) { return static_cast<unsigned>(a) | b; }
     65static constexpr unsigned operator&(unsigned a, PropertyAttribute b) { return a & static_cast<unsigned>(b); }
     66static constexpr bool operator<(PropertyAttribute a, PropertyAttribute b) { return static_cast<unsigned>(a) < static_cast<unsigned>(b); }
     67static constexpr unsigned operator~(PropertyAttribute a) { return ~static_cast<unsigned>(a); }
     68static constexpr bool operator<(PropertyAttribute a, unsigned b) { return static_cast<unsigned>(a) < b; }
     69static inline unsigned& operator|=(unsigned& a, PropertyAttribute b) { return a |= static_cast<unsigned>(b); }
     70
    6271enum CacheabilityType : uint8_t {
    6372    CachingDisallowed,
     
    334343    {
    335344        m_data.value = JSValue::encode(jsUndefined());
    336         m_attributes = ReadOnly | DontDelete | DontEnum;
     345        m_attributes = PropertyAttribute::ReadOnly | PropertyAttribute::DontDelete | PropertyAttribute::DontEnum;
    337346
    338347        m_slotBase = 0;
  • trunk/Source/JavaScriptCore/runtime/ProxyConstructor.cpp

    r217108 r222473  
    7171    JSObject* result = constructEmptyObject(exec);
    7272    RETURN_IF_EXCEPTION(scope, encodedJSValue());
    73     result->putDirect(vm, makeIdentifier(vm, "proxy"), proxy, None);
    74     result->putDirect(vm, makeIdentifier(vm, "revoke"), revoke, None);
     73    result->putDirect(vm, makeIdentifier(vm, "proxy"), proxy, static_cast<unsigned>(PropertyAttribute::None));
     74    result->putDirect(vm, makeIdentifier(vm, "revoke"), revoke, static_cast<unsigned>(PropertyAttribute::None));
    7575
    7676    return JSValue::encode(result);
     
    8787    Base::finishCreation(vm, name);
    8888
    89     putDirect(vm, vm.propertyNames->length, jsNumber(2), DontEnum | ReadOnly);
     89    putDirect(vm, vm.propertyNames->length, jsNumber(2), PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly);
    9090    putDirect(vm, makeIdentifier(vm, "revocable"), JSFunction::create(vm, globalObject, 2, ASCIILiteral("revocable"), makeRevocableProxy, NoIntrinsic, proxyRevocableConstructorThrowError));
    9191}
  • trunk/Source/JavaScriptCore/runtime/ProxyObject.cpp

    r222071 r222473  
    313313    }
    314314    JSObject* target = this->target();
    315     slot.setValue(this, None, jsUndefined()); // Nobody should rely on our value, but be safe and protect against any bad actors reading our value.
     315    slot.setValue(this, static_cast<unsigned>(PropertyAttribute::None), jsUndefined()); // Nobody should rely on our value, but be safe and protect against any bad actors reading our value.
    316316
    317317    auto performDefaultHasProperty = [&] {
  • trunk/Source/JavaScriptCore/runtime/ProxyRevoke.cpp

    r221475 r222473  
    5353    m_proxy.set(vm, this, proxy);
    5454
    55     putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum);
     55    putDirect(vm, vm.propertyNames->length, jsNumber(0), PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum);
    5656}
    5757
  • trunk/Source/JavaScriptCore/runtime/ReflectObject.cpp

    r221849 r222473  
    8484    ASSERT(inherits(vm, info()));
    8585
    86     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->builtinNames().ownKeysPrivateName(), reflectObjectOwnKeys, DontEnum | DontDelete | ReadOnly, 1);
    87     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->builtinNames().getOwnPropertyDescriptorPrivateName(), reflectObjectGetOwnPropertyDescriptor, DontEnum | DontDelete | ReadOnly, 2);
     86    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->builtinNames().ownKeysPrivateName(), reflectObjectOwnKeys, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly, 1);
     87    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->builtinNames().getOwnPropertyDescriptorPrivateName(), reflectObjectGetOwnPropertyDescriptor, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly, 2);
    8888}
    8989
     
    144144    if (UNLIKELY(!success))
    145145        return encodedJSValue();
    146     ASSERT((descriptor.attributes() & Accessor) || (!descriptor.isAccessorDescriptor()));
     146    ASSERT((descriptor.attributes() & PropertyAttribute::Accessor) || (!descriptor.isAccessorDescriptor()));
    147147    scope.assertNoException();
    148148
  • trunk/Source/JavaScriptCore/runtime/RegExpConstructor.cpp

    r221849 r222473  
    8989    ASSERT(inherits(vm, info()));
    9090
    91     putDirectWithoutTransition(vm, vm.propertyNames->prototype, regExpPrototype, DontEnum | DontDelete | ReadOnly);
    92     putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(2), ReadOnly | DontEnum);
    93 
    94     putDirectNonIndexAccessor(vm, vm.propertyNames->speciesSymbol, speciesSymbol, Accessor | ReadOnly | DontEnum);
     91    putDirectWithoutTransition(vm, vm.propertyNames->prototype, regExpPrototype, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly);
     92    putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(2), PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum);
     93
     94    putDirectNonIndexAccessor(vm, vm.propertyNames->speciesSymbol, speciesSymbol, PropertyAttribute::Accessor | PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum);
    9595}
    9696
  • trunk/Source/JavaScriptCore/runtime/RegExpObject.cpp

    r221849 r222473  
    6666    if (propertyName == vm.propertyNames->lastIndex) {
    6767        RegExpObject* regExp = asRegExpObject(object);
    68         unsigned attributes = regExp->m_lastIndexIsWritable ? DontDelete | DontEnum : DontDelete | DontEnum | ReadOnly;
     68        unsigned attributes = regExp->m_lastIndexIsWritable ? PropertyAttribute::DontDelete | PropertyAttribute::DontEnum : PropertyAttribute::DontDelete | PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly;
    6969        slot.setValue(regExp, attributes, regExp->getLastIndex());
    7070        return true;
  • trunk/Source/JavaScriptCore/runtime/RegExpPrototype.cpp

    r222336 r222473  
    6868    Base::finishCreation(vm);
    6969    ASSERT(inherits(vm, info()));
    70     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->compile, regExpProtoFuncCompile, DontEnum, 2);
    71     JSC_NATIVE_INTRINSIC_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->exec, regExpProtoFuncExec, DontEnum, 1, RegExpExecIntrinsic);
    72     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->toString, regExpProtoFuncToString, DontEnum, 0);
    73     JSC_NATIVE_GETTER(vm.propertyNames->global, regExpProtoGetterGlobal, DontEnum | Accessor);
    74     JSC_NATIVE_GETTER(vm.propertyNames->dotAll, regExpProtoGetterDotAll, DontEnum | Accessor);
    75     JSC_NATIVE_GETTER(vm.propertyNames->ignoreCase, regExpProtoGetterIgnoreCase, DontEnum | Accessor);
    76     JSC_NATIVE_GETTER(vm.propertyNames->multiline, regExpProtoGetterMultiline, DontEnum | Accessor);
    77     JSC_NATIVE_GETTER(vm.propertyNames->sticky, regExpProtoGetterSticky, DontEnum | Accessor);
    78     JSC_NATIVE_GETTER(vm.propertyNames->unicode, regExpProtoGetterUnicode, DontEnum | Accessor);
    79     JSC_NATIVE_GETTER(vm.propertyNames->source, regExpProtoGetterSource, DontEnum | Accessor);
    80     JSC_NATIVE_GETTER(vm.propertyNames->flags, regExpProtoGetterFlags, DontEnum | Accessor);
    81     JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->matchSymbol, regExpPrototypeMatchCodeGenerator, DontEnum);
    82     JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->replaceSymbol, regExpPrototypeReplaceCodeGenerator, DontEnum);
    83     JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->searchSymbol, regExpPrototypeSearchCodeGenerator, DontEnum);
    84     JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->splitSymbol, regExpPrototypeSplitCodeGenerator, DontEnum);
    85     JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->test, regExpPrototypeTestCodeGenerator, DontEnum);
     70    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->compile, regExpProtoFuncCompile, static_cast<unsigned>(PropertyAttribute::DontEnum), 2);
     71    JSC_NATIVE_INTRINSIC_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->exec, regExpProtoFuncExec, static_cast<unsigned>(PropertyAttribute::DontEnum), 1, RegExpExecIntrinsic);
     72    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->toString, regExpProtoFuncToString, static_cast<unsigned>(PropertyAttribute::DontEnum), 0);
     73    JSC_NATIVE_GETTER(vm.propertyNames->global, regExpProtoGetterGlobal, PropertyAttribute::DontEnum | PropertyAttribute::Accessor);
     74    JSC_NATIVE_GETTER(vm.propertyNames->dotAll, regExpProtoGetterDotAll, PropertyAttribute::DontEnum | PropertyAttribute::Accessor);
     75    JSC_NATIVE_GETTER(vm.propertyNames->ignoreCase, regExpProtoGetterIgnoreCase, PropertyAttribute::DontEnum | PropertyAttribute::Accessor);
     76    JSC_NATIVE_GETTER(vm.propertyNames->multiline, regExpProtoGetterMultiline, PropertyAttribute::DontEnum | PropertyAttribute::Accessor);
     77    JSC_NATIVE_GETTER(vm.propertyNames->sticky, regExpProtoGetterSticky, PropertyAttribute::DontEnum | PropertyAttribute::Accessor);
     78    JSC_NATIVE_GETTER(vm.propertyNames->unicode, regExpProtoGetterUnicode, PropertyAttribute::DontEnum | PropertyAttribute::Accessor);
     79    JSC_NATIVE_GETTER(vm.propertyNames->source, regExpProtoGetterSource, PropertyAttribute::DontEnum | PropertyAttribute::Accessor);
     80    JSC_NATIVE_GETTER(vm.propertyNames->flags, regExpProtoGetterFlags, PropertyAttribute::DontEnum | PropertyAttribute::Accessor);
     81    JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->matchSymbol, regExpPrototypeMatchCodeGenerator, static_cast<unsigned>(PropertyAttribute::DontEnum));
     82    JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->replaceSymbol, regExpPrototypeReplaceCodeGenerator, static_cast<unsigned>(PropertyAttribute::DontEnum));
     83    JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->searchSymbol, regExpPrototypeSearchCodeGenerator, static_cast<unsigned>(PropertyAttribute::DontEnum));
     84    JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->splitSymbol, regExpPrototypeSplitCodeGenerator, static_cast<unsigned>(PropertyAttribute::DontEnum));
     85    JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->test, regExpPrototypeTestCodeGenerator, static_cast<unsigned>(PropertyAttribute::DontEnum));
    8686
    8787    m_emptyRegExp.set(vm, this, RegExp::create(vm, "", NoFlags));
  • trunk/Source/JavaScriptCore/runtime/ScopedArguments.cpp

    r217108 r222473  
    125125    RELEASE_ASSERT(!m_overrodeThings);
    126126   
    127     putDirect(vm, vm.propertyNames->length, jsNumber(m_table->length()), DontEnum);
    128     putDirect(vm, vm.propertyNames->callee, m_callee.get(), DontEnum);
    129     putDirect(vm, vm.propertyNames->iteratorSymbol, globalObject()->arrayProtoValuesFunction(), DontEnum);
     127    putDirect(vm, vm.propertyNames->length, jsNumber(m_table->length()), static_cast<unsigned>(PropertyAttribute::DontEnum));
     128    putDirect(vm, vm.propertyNames->callee, m_callee.get(), static_cast<unsigned>(PropertyAttribute::DontEnum));
     129    putDirect(vm, vm.propertyNames->iteratorSymbol, globalObject()->arrayProtoValuesFunction(), static_cast<unsigned>(PropertyAttribute::DontEnum));
    130130   
    131131    m_overrodeThings = true;
  • trunk/Source/JavaScriptCore/runtime/SetConstructor.cpp

    r221849 r222473  
    4343{
    4444    Base::finishCreation(vm, setPrototype->classInfo(vm)->className);
    45     putDirectWithoutTransition(vm, vm.propertyNames->prototype, setPrototype, DontEnum | DontDelete | ReadOnly);
    46     putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(0), DontEnum | ReadOnly);
    47     putDirectNonIndexAccessor(vm, vm.propertyNames->speciesSymbol, speciesSymbol, Accessor | ReadOnly | DontEnum);
     45    putDirectWithoutTransition(vm, vm.propertyNames->prototype, setPrototype, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly);
     46    putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(0), PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly);
     47    putDirectNonIndexAccessor(vm, vm.propertyNames->speciesSymbol, speciesSymbol, PropertyAttribute::Accessor | PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum);
    4848}
    4949
  • trunk/Source/JavaScriptCore/runtime/SetIteratorPrototype.cpp

    r221110 r222473  
    4040    vm.prototypeMap.addPrototype(this);
    4141
    42     JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION("next", setIteratorPrototypeNextCodeGenerator, DontEnum);
    43     putDirectWithoutTransition(vm, vm.propertyNames->toStringTagSymbol, jsString(&vm, "Set Iterator"), DontEnum | ReadOnly);
     42    JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION("next", setIteratorPrototypeNextCodeGenerator, static_cast<unsigned>(PropertyAttribute::DontEnum));
     43    putDirectWithoutTransition(vm, vm.propertyNames->toStringTagSymbol, jsString(&vm, "Set Iterator"), PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly);
    4444}
    4545
  • trunk/Source/JavaScriptCore/runtime/SetPrototype.cpp

    r221417 r222473  
    6262    vm.prototypeMap.addPrototype(this);
    6363
    64     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->add, setProtoFuncAdd, DontEnum, 1);
    65     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->clear, setProtoFuncClear, DontEnum, 0);
    66     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->deleteKeyword, setProtoFuncDelete, DontEnum, 1);
    67     JSC_NATIVE_INTRINSIC_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->has, setProtoFuncHas, DontEnum, 1, JSSetHasIntrinsic);
    68     JSC_NATIVE_INTRINSIC_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->builtinNames().hasPrivateName(), setProtoFuncHas, DontEnum, 1, JSSetHasIntrinsic);
    69     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->builtinNames().addPrivateName(), setProtoFuncAdd, DontEnum, 1);
     64    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->add, setProtoFuncAdd, static_cast<unsigned>(PropertyAttribute::DontEnum), 1);
     65    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->clear, setProtoFuncClear, static_cast<unsigned>(PropertyAttribute::DontEnum), 0);
     66    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->deleteKeyword, setProtoFuncDelete, static_cast<unsigned>(PropertyAttribute::DontEnum), 1);
     67    JSC_NATIVE_INTRINSIC_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->has, setProtoFuncHas, static_cast<unsigned>(PropertyAttribute::DontEnum), 1, JSSetHasIntrinsic);
     68    JSC_NATIVE_INTRINSIC_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->builtinNames().hasPrivateName(), setProtoFuncHas, static_cast<unsigned>(PropertyAttribute::DontEnum), 1, JSSetHasIntrinsic);
     69    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->builtinNames().addPrivateName(), setProtoFuncAdd, static_cast<unsigned>(PropertyAttribute::DontEnum), 1);
    7070
    7171    JSFunction* values = JSFunction::create(vm, setPrototypeValuesCodeGenerator(vm), globalObject);
    72     putDirectWithoutTransition(vm, vm.propertyNames->builtinNames().valuesPublicName(), values, DontEnum);
    73     putDirectWithoutTransition(vm, vm.propertyNames->builtinNames().keysPublicName(), values, DontEnum);
    74     putDirectWithoutTransition(vm, vm.propertyNames->iteratorSymbol, values, DontEnum);
    75     putDirectWithoutTransition(vm, vm.propertyNames->toStringTagSymbol, jsString(&vm, "Set"), DontEnum | ReadOnly);
     72    putDirectWithoutTransition(vm, vm.propertyNames->builtinNames().valuesPublicName(), values, static_cast<unsigned>(PropertyAttribute::DontEnum));
     73    putDirectWithoutTransition(vm, vm.propertyNames->builtinNames().keysPublicName(), values, static_cast<unsigned>(PropertyAttribute::DontEnum));
     74    putDirectWithoutTransition(vm, vm.propertyNames->iteratorSymbol, values, static_cast<unsigned>(PropertyAttribute::DontEnum));
     75    putDirectWithoutTransition(vm, vm.propertyNames->toStringTagSymbol, jsString(&vm, "Set"), PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly);
    7676
    77     JSC_NATIVE_GETTER(vm.propertyNames->size, setProtoFuncSize, DontEnum | Accessor);
     77    JSC_NATIVE_GETTER(vm.propertyNames->size, setProtoFuncSize, PropertyAttribute::DontEnum | PropertyAttribute::Accessor);
    7878}
    7979
  • trunk/Source/JavaScriptCore/runtime/SparseArrayValueMap.cpp

    r217108 r222473  
    146146    }
    147147
    148     if (entry.attributes & ReadOnly)
     148    if (entry.attributes & PropertyAttribute::ReadOnly)
    149149        return typeError(exec, scope, shouldThrow, ASCIILiteral(ReadonlyPropertyWriteError));
    150150
     
    177177    auto scope = DECLARE_THROW_SCOPE(vm);
    178178
    179     if (!(attributes & Accessor)) {
    180         if (attributes & ReadOnly)
     179    if (!(attributes & PropertyAttribute::Accessor)) {
     180        if (attributes & PropertyAttribute::ReadOnly)
    181181            return typeError(exec, scope, shouldThrow, ASCIILiteral(ReadonlyPropertyWriteError));
    182182
  • trunk/Source/JavaScriptCore/runtime/StringConstructor.cpp

    r217108 r222473  
    6161{
    6262    Base::finishCreation(vm, stringPrototype->classInfo()->className);
    63     putDirectWithoutTransition(vm, vm.propertyNames->prototype, stringPrototype, ReadOnly | DontEnum | DontDelete);
    64     putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), ReadOnly | DontEnum);
     63    putDirectWithoutTransition(vm, vm.propertyNames->prototype, stringPrototype, PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum | PropertyAttribute::DontDelete);
     64    putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum);
    6565}
    6666
  • trunk/Source/JavaScriptCore/runtime/StringIteratorPrototype.cpp

    r217108 r222473  
    4949    Base::finishCreation(vm);
    5050    ASSERT(inherits(vm, info()));
    51     putDirectWithoutTransition(vm, vm.propertyNames->toStringTagSymbol, jsString(&vm, "String Iterator"), DontEnum | ReadOnly);
     51    putDirectWithoutTransition(vm, vm.propertyNames->toStringTagSymbol, jsString(&vm, "String Iterator"), PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly);
    5252    vm.prototypeMap.addPrototype(this);
    5353}
  • trunk/Source/JavaScriptCore/runtime/StringPrototype.cpp

    r222136 r222473  
    131131    ASSERT(inherits(vm, info()));
    132132
    133     JSC_NATIVE_INTRINSIC_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->toString, stringProtoFuncToString, DontEnum, 0, StringPrototypeValueOfIntrinsic);
    134     JSC_NATIVE_INTRINSIC_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->valueOf, stringProtoFuncToString, DontEnum, 0, StringPrototypeValueOfIntrinsic);
    135     JSC_NATIVE_INTRINSIC_FUNCTION_WITHOUT_TRANSITION("charAt", stringProtoFuncCharAt, DontEnum, 1, CharAtIntrinsic);
    136     JSC_NATIVE_INTRINSIC_FUNCTION_WITHOUT_TRANSITION("charCodeAt", stringProtoFuncCharCodeAt, DontEnum, 1, CharCodeAtIntrinsic);
    137     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("codePointAt", stringProtoFuncCodePointAt, DontEnum, 1);
    138     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("indexOf", stringProtoFuncIndexOf, DontEnum, 1);
    139     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("lastIndexOf", stringProtoFuncLastIndexOf, DontEnum, 1);
    140     JSC_NATIVE_INTRINSIC_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->builtinNames().replaceUsingRegExpPrivateName(), stringProtoFuncReplaceUsingRegExp, DontEnum, 2, StringPrototypeReplaceRegExpIntrinsic);
    141     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->builtinNames().replaceUsingStringSearchPrivateName(), stringProtoFuncReplaceUsingStringSearch, DontEnum, 2);
    142     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("slice", stringProtoFuncSlice, DontEnum, 2);
    143     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("substr", stringProtoFuncSubstr, DontEnum, 2);
    144     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("substring", stringProtoFuncSubstring, DontEnum, 2);
    145     JSC_NATIVE_INTRINSIC_FUNCTION_WITHOUT_TRANSITION("toLowerCase", stringProtoFuncToLowerCase, DontEnum, 0, StringPrototypeToLowerCaseIntrinsic);
    146     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("toUpperCase", stringProtoFuncToUpperCase, DontEnum, 0);
     133    JSC_NATIVE_INTRINSIC_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->toString, stringProtoFuncToString, static_cast<unsigned>(PropertyAttribute::DontEnum), 0, StringPrototypeValueOfIntrinsic);
     134    JSC_NATIVE_INTRINSIC_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->valueOf, stringProtoFuncToString, static_cast<unsigned>(PropertyAttribute::DontEnum), 0, StringPrototypeValueOfIntrinsic);
     135    JSC_NATIVE_INTRINSIC_FUNCTION_WITHOUT_TRANSITION("charAt", stringProtoFuncCharAt, static_cast<unsigned>(PropertyAttribute::DontEnum), 1, CharAtIntrinsic);
     136    JSC_NATIVE_INTRINSIC_FUNCTION_WITHOUT_TRANSITION("charCodeAt", stringProtoFuncCharCodeAt, static_cast<unsigned>(PropertyAttribute::DontEnum), 1, CharCodeAtIntrinsic);
     137    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("codePointAt", stringProtoFuncCodePointAt, static_cast<unsigned>(PropertyAttribute::DontEnum), 1);
     138    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("indexOf", stringProtoFuncIndexOf, static_cast<unsigned>(PropertyAttribute::DontEnum), 1);
     139    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("lastIndexOf", stringProtoFuncLastIndexOf, static_cast<unsigned>(PropertyAttribute::DontEnum), 1);
     140    JSC_NATIVE_INTRINSIC_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->builtinNames().replaceUsingRegExpPrivateName(), stringProtoFuncReplaceUsingRegExp, static_cast<unsigned>(PropertyAttribute::DontEnum), 2, StringPrototypeReplaceRegExpIntrinsic);
     141    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->builtinNames().replaceUsingStringSearchPrivateName(), stringProtoFuncReplaceUsingStringSearch, static_cast<unsigned>(PropertyAttribute::DontEnum), 2);
     142    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("slice", stringProtoFuncSlice, static_cast<unsigned>(PropertyAttribute::DontEnum), 2);
     143    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("substr", stringProtoFuncSubstr, static_cast<unsigned>(PropertyAttribute::DontEnum), 2);
     144    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("substring", stringProtoFuncSubstring, static_cast<unsigned>(PropertyAttribute::DontEnum), 2);
     145    JSC_NATIVE_INTRINSIC_FUNCTION_WITHOUT_TRANSITION("toLowerCase", stringProtoFuncToLowerCase, static_cast<unsigned>(PropertyAttribute::DontEnum), 0, StringPrototypeToLowerCaseIntrinsic);
     146    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("toUpperCase", stringProtoFuncToUpperCase, static_cast<unsigned>(PropertyAttribute::DontEnum), 0);
    147147#if ENABLE(INTL)
    148     JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION("localeCompare", stringPrototypeLocaleCompareCodeGenerator, DontEnum);
    149     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("toLocaleLowerCase", stringProtoFuncToLocaleLowerCase, DontEnum, 0);
    150     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("toLocaleUpperCase", stringProtoFuncToLocaleUpperCase, DontEnum, 0);
     148    JSC_BUILTIN_FUNCTION_WITHOUT_TRANSITION("localeCompare", stringPrototypeLocaleCompareCodeGenerator, static_cast<unsigned>(PropertyAttribute::DontEnum));
     149    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("toLocaleLowerCase", stringProtoFuncToLocaleLowerCase, static_cast<unsigned>(PropertyAttribute::DontEnum), 0);
     150    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("toLocaleUpperCase", stringProtoFuncToLocaleUpperCase, static_cast<unsigned>(PropertyAttribute::DontEnum), 0);
    151151#else
    152     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("localeCompare", stringProtoFuncLocaleCompare, DontEnum, 1);
    153     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("toLocaleLowerCase", stringProtoFuncToLowerCase, DontEnum, 0);
    154     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("toLocaleUpperCase", stringProtoFuncToUpperCase, DontEnum, 0);
     152    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("localeCompare", stringProtoFuncLocaleCompare, static_cast<unsigned>(PropertyAttribute::DontEnum), 1);
     153    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("toLocaleLowerCase", stringProtoFuncToLowerCase, static_cast<unsigned>(PropertyAttribute::DontEnum), 0);
     154    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("toLocaleUpperCase", stringProtoFuncToUpperCase, static_cast<unsigned>(PropertyAttribute::DontEnum), 0);
    155155#endif
    156     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("trim", stringProtoFuncTrim, DontEnum, 0);
    157     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("trimLeft", stringProtoFuncTrimLeft, DontEnum, 0);
    158     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("trimRight", stringProtoFuncTrimRight, DontEnum, 0);
    159     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("startsWith", stringProtoFuncStartsWith, DontEnum, 1);
    160     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("endsWith", stringProtoFuncEndsWith, DontEnum, 1);
    161     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("includes", stringProtoFuncIncludes, DontEnum, 1);
    162     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("normalize", stringProtoFuncNormalize, DontEnum, 0);
    163     JSC_NATIVE_INTRINSIC_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->builtinNames().charCodeAtPrivateName(), stringProtoFuncCharCodeAt, DontEnum, 1, CharCodeAtIntrinsic);
     156    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("trim", stringProtoFuncTrim, static_cast<unsigned>(PropertyAttribute::DontEnum), 0);
     157    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("trimLeft", stringProtoFuncTrimLeft, static_cast<unsigned>(PropertyAttribute::DontEnum), 0);
     158    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("trimRight", stringProtoFuncTrimRight, static_cast<unsigned>(PropertyAttribute::DontEnum), 0);
     159    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("startsWith", stringProtoFuncStartsWith, static_cast<unsigned>(PropertyAttribute::DontEnum), 1);
     160    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("endsWith", stringProtoFuncEndsWith, static_cast<unsigned>(PropertyAttribute::DontEnum), 1);
     161    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("includes", stringProtoFuncIncludes, static_cast<unsigned>(PropertyAttribute::DontEnum), 1);
     162    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION("normalize", stringProtoFuncNormalize, static_cast<unsigned>(PropertyAttribute::DontEnum), 0);
     163    JSC_NATIVE_INTRINSIC_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->builtinNames().charCodeAtPrivateName(), stringProtoFuncCharCodeAt, static_cast<unsigned>(PropertyAttribute::DontEnum), 1, CharCodeAtIntrinsic);
    164164
    165165    JSFunction* iteratorFunction = JSFunction::create(vm, globalObject, 0, ASCIILiteral("[Symbol.iterator]"), stringProtoFuncIterator, NoIntrinsic);
    166     putDirectWithoutTransition(vm, vm.propertyNames->iteratorSymbol, iteratorFunction, DontEnum);
     166    putDirectWithoutTransition(vm, vm.propertyNames->iteratorSymbol, iteratorFunction, static_cast<unsigned>(PropertyAttribute::DontEnum));
    167167
    168168    // The constructor will be added later, after StringConstructor has been built
    169     putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(0), DontDelete | ReadOnly | DontEnum);
     169    putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(0), PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum);
    170170}
    171171
  • trunk/Source/JavaScriptCore/runtime/Structure.cpp

    r218070 r222473  
    690690        for (auto& entry : *table) {
    691691            if (setsDontDeleteOnAllProperties(transitionKind))
    692                 entry.attributes |= DontDelete;
    693             if (setsReadOnlyOnNonAccessorProperties(transitionKind) && !(entry.attributes & Accessor))
    694                 entry.attributes |= ReadOnly;
     692                entry.attributes |= static_cast<unsigned>(PropertyAttribute::DontDelete);
     693            if (setsReadOnlyOnNonAccessorProperties(transitionKind) && !(entry.attributes & PropertyAttribute::Accessor))
     694                entry.attributes |= static_cast<unsigned>(PropertyAttribute::ReadOnly);
    695695        }
    696696    } else {
     
    728728    PropertyTable::iterator end = table->end();
    729729    for (PropertyTable::iterator iter = table->begin(); iter != end; ++iter) {
    730         if ((iter->attributes & DontDelete) != DontDelete)
     730        if ((iter->attributes & PropertyAttribute::DontDelete) != static_cast<unsigned>(PropertyAttribute::DontDelete))
    731731            return false;
    732732    }
     
    746746    PropertyTable::iterator end = table->end();
    747747    for (PropertyTable::iterator iter = table->begin(); iter != end; ++iter) {
    748         if (!(iter->attributes & DontDelete))
     748        if (!(iter->attributes & PropertyAttribute::DontDelete))
    749749            return false;
    750         if (!(iter->attributes & (ReadOnly | Accessor)))
     750        if (!(iter->attributes & (PropertyAttribute::ReadOnly | PropertyAttribute::Accessor)))
    751751            return false;
    752752    }
     
    10181018    PropertyTable::iterator end = table->end();
    10191019    for (PropertyTable::iterator iter = table->begin(); iter != end; ++iter) {
    1020         ASSERT(!isQuickPropertyAccessAllowedForEnumeration() || !(iter->attributes & DontEnum));
     1020        ASSERT(!isQuickPropertyAccessAllowedForEnumeration() || !(iter->attributes & PropertyAttribute::DontEnum));
    10211021        ASSERT(!isQuickPropertyAccessAllowedForEnumeration() || !iter->key->isSymbol());
    1022         if (!(iter->attributes & DontEnum) || mode.includeDontEnumProperties()) {
     1022        if (!(iter->attributes & PropertyAttribute::DontEnum) || mode.includeDontEnumProperties()) {
    10231023            if (iter->key->isSymbol() && !propertyNames.includeSymbolProperties())
    10241024                continue;
     
    11391139            continue;
    11401140       
    1141         if (attributes & (ReadOnly | Accessor))
     1141        if (attributes & (PropertyAttribute::ReadOnly | PropertyAttribute::Accessor))
    11421142            return true;
    11431143       
  • trunk/Source/JavaScriptCore/runtime/StructureInlines.h

    r210947 r222473  
    336336
    337337    checkConsistency();
    338     if (attributes & DontEnum || propertyName.isSymbol())
     338    if (attributes & PropertyAttribute::DontEnum || propertyName.isSymbol())
    339339        setIsQuickPropertyAccessAllowedForEnumeration(false);
    340340
  • trunk/Source/JavaScriptCore/runtime/SymbolConstructor.cpp

    r219042 r222473  
    6363
    6464#define INITIALIZE_WELL_KNOWN_SYMBOLS(name) \
    65     putDirectWithoutTransition(vm, Identifier::fromString(&vm, #name), Symbol::create(vm, static_cast<SymbolImpl&>(*vm.propertyNames->name##Symbol.impl())), DontEnum | DontDelete | ReadOnly);
     65putDirectWithoutTransition(vm, Identifier::fromString(&vm, #name), Symbol::create(vm, static_cast<SymbolImpl&>(*vm.propertyNames->name##Symbol.impl())), PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly);
    6666
    6767void SymbolConstructor::finishCreation(VM& vm, SymbolPrototype* prototype)
    6868{
    6969    Base::finishCreation(vm, prototype->classInfo(vm)->className);
    70     putDirectWithoutTransition(vm, vm.propertyNames->prototype, prototype, DontEnum | DontDelete | ReadOnly);
    71     putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(0), ReadOnly | DontEnum);
     70    putDirectWithoutTransition(vm, vm.propertyNames->prototype, prototype, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly);
     71    putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(0), PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum);
    7272
    7373    JSC_COMMON_PRIVATE_IDENTIFIERS_EACH_WELL_KNOWN_SYMBOL(INITIALIZE_WELL_KNOWN_SYMBOLS)
  • trunk/Source/JavaScriptCore/runtime/SymbolPrototype.cpp

    r218794 r222473  
    6161{
    6262    Base::finishCreation(vm);
    63     putDirectWithoutTransition(vm, vm.propertyNames->toStringTagSymbol, jsString(&vm, "Symbol"), DontEnum | ReadOnly);
     63    putDirectWithoutTransition(vm, vm.propertyNames->toStringTagSymbol, jsString(&vm, "Symbol"), PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly);
    6464    ASSERT(inherits(vm, info()));
    6565
    6666    JSFunction* toPrimitiveFunction = JSFunction::create(vm, globalObject, 1, ASCIILiteral("[Symbol.toPrimitive]"), symbolProtoFuncValueOf, NoIntrinsic);
    67     putDirectWithoutTransition(vm, vm.propertyNames->toPrimitiveSymbol, toPrimitiveFunction, DontEnum | ReadOnly);
     67    putDirectWithoutTransition(vm, vm.propertyNames->toPrimitiveSymbol, toPrimitiveFunction, PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly);
    6868}
    6969
  • trunk/Source/JavaScriptCore/runtime/SymbolTable.h

    r208761 r222473  
    144144            unsigned attributes = 0;
    145145            if (isReadOnly())
    146                 attributes |= ReadOnly;
     146                attributes |= PropertyAttribute::ReadOnly;
    147147            if (isDontEnum())
    148                 attributes |= DontEnum;
     148                attributes |= PropertyAttribute::DontEnum;
    149149            return attributes;
    150150        }
     
    176176    {
    177177        ASSERT(isValidVarOffset(offset));
    178         pack(offset, true, attributes & ReadOnly, attributes & DontEnum);
     178        pack(offset, true, attributes & PropertyAttribute::ReadOnly, attributes & PropertyAttribute::DontEnum);
    179179    }
    180180   
     
    262262    void setAttributes(unsigned attributes)
    263263    {
    264         pack(varOffset(), isWatchable(), attributes & ReadOnly, attributes & DontEnum);
     264        pack(varOffset(), isWatchable(), attributes & PropertyAttribute::ReadOnly, attributes & PropertyAttribute::DontEnum);
    265265    }
    266266
  • trunk/Source/JavaScriptCore/runtime/TemplateRegistry.cpp

    r216428 r222473  
    6161        auto cooked = templateKey.cookedStrings()[index];
    6262        if (cooked)
    63             templateObject->putDirectIndex(exec, index, jsString(exec, cooked.value()), ReadOnly | DontDelete, PutDirectIndexLikePutDirect);
     63            templateObject->putDirectIndex(exec, index, jsString(exec, cooked.value()), PropertyAttribute::ReadOnly | PropertyAttribute::DontDelete, PutDirectIndexLikePutDirect);
    6464        else
    65             templateObject->putDirectIndex(exec, index, jsUndefined(), ReadOnly | DontDelete, PutDirectIndexLikePutDirect);
     65            templateObject->putDirectIndex(exec, index, jsUndefined(), PropertyAttribute::ReadOnly | PropertyAttribute::DontDelete, PutDirectIndexLikePutDirect);
    6666        RETURN_IF_EXCEPTION(scope, nullptr);
    6767
    68         rawObject->putDirectIndex(exec, index, jsString(exec, templateKey.rawStrings()[index]), ReadOnly | DontDelete, PutDirectIndexLikePutDirect);
     68        rawObject->putDirectIndex(exec, index, jsString(exec, templateKey.rawStrings()[index]), PropertyAttribute::ReadOnly | PropertyAttribute::DontDelete, PutDirectIndexLikePutDirect);
    6969        RETURN_IF_EXCEPTION(scope, nullptr);
    7070    }
     
    7373    scope.assertNoException();
    7474
    75     templateObject->putDirect(vm, vm.propertyNames->raw, rawObject, ReadOnly | DontEnum | DontDelete);
     75    templateObject->putDirect(vm, vm.propertyNames->raw, rawObject, PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum | PropertyAttribute::DontDelete);
    7676
    7777    // Template JSArray hold the reference to JSTemplateRegistryKey to make TemplateRegistryKey pointer live until this JSArray is collected.
    7878    // TemplateRegistryKey pointer is used for TemplateRegistry's key.
    79     templateObject->putDirect(vm, vm.propertyNames->builtinNames().templateRegistryKeyPrivateName(), templateKeyObject, ReadOnly | DontEnum | DontDelete);
     79    templateObject->putDirect(vm, vm.propertyNames->builtinNames().templateRegistryKeyPrivateName(), templateKeyObject, PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum | PropertyAttribute::DontDelete);
    8080
    8181    objectConstructorFreeze(exec, templateObject);
  • trunk/Source/JavaScriptCore/runtime/WeakMapConstructor.cpp

    r217108 r222473  
    4242{
    4343    Base::finishCreation(vm, prototype->classInfo(vm)->className);
    44     putDirectWithoutTransition(vm, vm.propertyNames->prototype, prototype, DontEnum | DontDelete | ReadOnly);
    45     putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(0), DontEnum | ReadOnly);
     44    putDirectWithoutTransition(vm, vm.propertyNames->prototype, prototype, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly);
     45    putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(0), PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly);
    4646}
    4747
  • trunk/Source/JavaScriptCore/runtime/WeakMapPrototype.cpp

    r221959 r222473  
    4646    vm.prototypeMap.addPrototype(this);
    4747
    48     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->deleteKeyword, protoFuncWeakMapDelete, DontEnum, 1);
    49     JSC_NATIVE_INTRINSIC_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->get, protoFuncWeakMapGet, DontEnum, 1, JSWeakMapGetIntrinsic);
    50     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->has, protoFuncWeakMapHas, DontEnum, 1);
    51     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->set, protoFuncWeakMapSet, DontEnum, 2);
     48    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->deleteKeyword, protoFuncWeakMapDelete, static_cast<unsigned>(PropertyAttribute::DontEnum), 1);
     49    JSC_NATIVE_INTRINSIC_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->get, protoFuncWeakMapGet, static_cast<unsigned>(PropertyAttribute::DontEnum), 1, JSWeakMapGetIntrinsic);
     50    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->has, protoFuncWeakMapHas, static_cast<unsigned>(PropertyAttribute::DontEnum), 1);
     51    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->set, protoFuncWeakMapSet, static_cast<unsigned>(PropertyAttribute::DontEnum), 2);
    5252
    53     putDirectWithoutTransition(vm, vm.propertyNames->toStringTagSymbol, jsString(&vm, "WeakMap"), DontEnum | ReadOnly);
     53    putDirectWithoutTransition(vm, vm.propertyNames->toStringTagSymbol, jsString(&vm, "WeakMap"), PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly);
    5454}
    5555
  • trunk/Source/JavaScriptCore/runtime/WeakSetConstructor.cpp

    r217108 r222473  
    4242{
    4343    Base::finishCreation(vm, prototype->classInfo(vm)->className);
    44     putDirectWithoutTransition(vm, vm.propertyNames->prototype, prototype, DontEnum | DontDelete | ReadOnly);
    45     putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(0), DontEnum | ReadOnly);
     44    putDirectWithoutTransition(vm, vm.propertyNames->prototype, prototype, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly);
     45    putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(0), PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly);
    4646}
    4747
  • trunk/Source/JavaScriptCore/runtime/WeakSetPrototype.cpp

    r221959 r222473  
    4545    vm.prototypeMap.addPrototype(this);
    4646
    47     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->deleteKeyword, protoFuncWeakSetDelete, DontEnum, 1);
    48     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->has, protoFuncWeakSetHas, DontEnum, 1);
    49     JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->add, protoFuncWeakSetAdd, DontEnum, 1);
     47    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->deleteKeyword, protoFuncWeakSetDelete, static_cast<unsigned>(PropertyAttribute::DontEnum), 1);
     48    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->has, protoFuncWeakSetHas, static_cast<unsigned>(PropertyAttribute::DontEnum), 1);
     49    JSC_NATIVE_FUNCTION_WITHOUT_TRANSITION(vm.propertyNames->add, protoFuncWeakSetAdd, static_cast<unsigned>(PropertyAttribute::DontEnum), 1);
    5050
    51     putDirectWithoutTransition(vm, vm.propertyNames->toStringTagSymbol, jsString(&vm, "WeakSet"), DontEnum | ReadOnly);
     51    putDirectWithoutTransition(vm, vm.propertyNames->toStringTagSymbol, jsString(&vm, "WeakSet"), PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly);
    5252}
    5353
  • trunk/Source/JavaScriptCore/tools/JSDollarVMPrototype.cpp

    r221822 r222473  
    453453    addFunction(vm, globalObject, "crash", functionCrash, 0);
    454454   
    455     putDirectNativeFunction(vm, globalObject, Identifier::fromString(&vm, "dfgTrue"), 0, functionDFGTrue, DFGTrueIntrinsic, DontEnum);
     455    putDirectNativeFunction(vm, globalObject, Identifier::fromString(&vm, "dfgTrue"), 0, functionDFGTrue, DFGTrueIntrinsic, static_cast<unsigned>(PropertyAttribute::DontEnum));
    456456   
    457457    addFunction(vm, globalObject, "llintTrue", functionLLintTrue, 0);
  • trunk/Source/JavaScriptCore/wasm/js/WebAssemblyCompileErrorConstructor.cpp

    r217108 r222473  
    7777{
    7878    Base::finishCreation(vm, ASCIILiteral("CompileError"));
    79     putDirectWithoutTransition(vm, vm.propertyNames->prototype, prototype, ReadOnly | DontEnum | DontDelete);
    80     putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), ReadOnly | DontEnum | DontDelete);
     79    putDirectWithoutTransition(vm, vm.propertyNames->prototype, prototype, PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum | PropertyAttribute::DontDelete);
     80    putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum | PropertyAttribute::DontDelete);
    8181}
    8282
  • trunk/Source/JavaScriptCore/wasm/js/WebAssemblyInstanceConstructor.cpp

    r217645 r222473  
    106106{
    107107    Base::finishCreation(vm, ASCIILiteral("Instance"));
    108     putDirectWithoutTransition(vm, vm.propertyNames->prototype, prototype, DontEnum | DontDelete | ReadOnly);
    109     putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), ReadOnly | DontEnum | DontDelete);
     108    putDirectWithoutTransition(vm, vm.propertyNames->prototype, prototype, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly);
     109    putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum | PropertyAttribute::DontDelete);
    110110}
    111111
  • trunk/Source/JavaScriptCore/wasm/js/WebAssemblyLinkErrorConstructor.cpp

    r217108 r222473  
    7777{
    7878    Base::finishCreation(vm, ASCIILiteral("LinkError"));
    79     putDirectWithoutTransition(vm, vm.propertyNames->prototype, prototype, ReadOnly | DontEnum | DontDelete);
    80     putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), ReadOnly | DontEnum | DontDelete);
     79    putDirectWithoutTransition(vm, vm.propertyNames->prototype, prototype, PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum | PropertyAttribute::DontDelete);
     80    putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum | PropertyAttribute::DontDelete);
    8181}
    8282
  • trunk/Source/JavaScriptCore/wasm/js/WebAssemblyMemoryConstructor.cpp

    r218951 r222473  
    129129{
    130130    Base::finishCreation(vm, ASCIILiteral("Memory"));
    131     putDirectWithoutTransition(vm, vm.propertyNames->prototype, prototype, DontEnum | DontDelete | ReadOnly);
    132     putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), ReadOnly | DontEnum | DontDelete);
     131    putDirectWithoutTransition(vm, vm.propertyNames->prototype, prototype, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly);
     132    putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum | PropertyAttribute::DontDelete);
    133133}
    134134
  • trunk/Source/JavaScriptCore/wasm/js/WebAssemblyModuleConstructor.cpp

    r221849 r222473  
    203203{
    204204    Base::finishCreation(vm, ASCIILiteral("Module"));
    205     putDirectWithoutTransition(vm, vm.propertyNames->prototype, prototype, DontEnum | DontDelete | ReadOnly);
    206     putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), ReadOnly | DontEnum | DontDelete);
     205    putDirectWithoutTransition(vm, vm.propertyNames->prototype, prototype, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly);
     206    putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum | PropertyAttribute::DontDelete);
    207207}
    208208
  • trunk/Source/JavaScriptCore/wasm/js/WebAssemblyRuntimeErrorConstructor.cpp

    r217108 r222473  
    7777{
    7878    Base::finishCreation(vm, ASCIILiteral("RuntimeError"));
    79     putDirectWithoutTransition(vm, vm.propertyNames->prototype, prototype, ReadOnly | DontEnum | DontDelete);
    80     putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), ReadOnly | DontEnum | DontDelete);
     79    putDirectWithoutTransition(vm, vm.propertyNames->prototype, prototype, PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum | PropertyAttribute::DontDelete);
     80    putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum | PropertyAttribute::DontDelete);
    8181}
    8282
  • trunk/Source/JavaScriptCore/wasm/js/WebAssemblyTableConstructor.cpp

    r217645 r222473  
    117117{
    118118    Base::finishCreation(vm, ASCIILiteral("Table"));
    119     putDirectWithoutTransition(vm, vm.propertyNames->prototype, prototype, DontEnum | DontDelete | ReadOnly);
    120     putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), ReadOnly | DontEnum | DontDelete);
     119    putDirectWithoutTransition(vm, vm.propertyNames->prototype, prototype, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly);
     120    putDirectWithoutTransition(vm, vm.propertyNames->length, jsNumber(1), PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum | PropertyAttribute::DontDelete);
    121121}
    122122
Note: See TracChangeset for help on using the changeset viewer.