Changeset 222473 in webkit for trunk/Source/JavaScriptCore
- Timestamp:
- Sep 25, 2017, 3:37:03 PM (8 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 128 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/API/JSCallbackObjectFunctions.h
r211247 r222473 160 160 JSLock::DropAllLocks dropAllLocks(exec); 161 161 if (hasProperty(ctx, thisRef, propertyNameRef.get())) { 162 slot.setCustom(thisObject, ReadOnly |DontEnum, callbackGetter);162 slot.setCustom(thisObject, PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum, callbackGetter); 163 163 return true; 164 164 } … … 174 174 if (exception) { 175 175 throwException(exec, scope, toJS(exec, exception)); 176 slot.setValue(thisObject, ReadOnly |DontEnum, jsUndefined());176 slot.setValue(thisObject, PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum, jsUndefined()); 177 177 return true; 178 178 } 179 179 if (value) { 180 slot.setValue(thisObject, ReadOnly |DontEnum, toJS(exec, value));180 slot.setValue(thisObject, PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum, toJS(exec, value)); 181 181 return true; 182 182 } … … 187 187 JSValue value = thisObject->getStaticValue(exec, propertyName); 188 188 if (value) { 189 slot.setValue(thisObject, ReadOnly |DontEnum, value);189 slot.setValue(thisObject, PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum, value); 190 190 return true; 191 191 } … … 195 195 if (OpaqueJSClassStaticFunctionsTable* staticFunctions = jsClass->staticFunctions(exec)) { 196 196 if (staticFunctions->contains(name)) { 197 slot.setCustom(thisObject, ReadOnly |DontEnum, staticFunctionGetter);197 slot.setCustom(thisObject, PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum, staticFunctionGetter); 198 198 return true; 199 199 } -
trunk/Source/JavaScriptCore/API/JSObjectRef.cpp
r222175 r222473 130 130 131 131 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); 133 133 return toRef(constructor); 134 134 } -
trunk/Source/JavaScriptCore/ChangeLog
r222425 r222473 1 2017-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 1 365 2017-09-23 Oleksandr Skachkov <[email protected]> 2 366 -
trunk/Source/JavaScriptCore/Scripts/builtins/builtins_generate_internals_wrapper_implementation.py
r213680 r222473 115 115 lines.append("#define DECLARE_GLOBAL_STATIC(name) \\") 116 116 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))) 118 118 lines.append(" WEBCORE_FOREACH_%s_BUILTIN_FUNCTION_NAME(DECLARE_GLOBAL_STATIC)" % object.object_name.upper()) 119 119 lines.append("#undef DECLARE_GLOBAL_STATIC") -
trunk/Source/JavaScriptCore/bytecode/GetByIdStatus.cpp
r219981 r222473 105 105 if (!isValidOffset(offset)) 106 106 return GetByIdStatus(NoInformation, false); 107 if (attributes & CustomAccessor)107 if (attributes & PropertyAttribute::CustomAccessor) 108 108 return GetByIdStatus(NoInformation, false); 109 109 … … 196 196 if (!isValidOffset(variant.m_offset)) 197 197 return GetByIdStatus(slowPathState, true); 198 if (attributes & CustomAccessor)198 if (attributes & PropertyAttribute::CustomAccessor) 199 199 return GetByIdStatus(slowPathState, true); 200 200 … … 382 382 if (!isValidOffset(offset)) 383 383 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) 385 385 return GetByIdStatus(MakesCalls); // We could be smarter here, like strength-reducing this to a Call. 386 if (attributes & CustomAccessor)386 if (attributes & PropertyAttribute::CustomAccessor) 387 387 return GetByIdStatus(TakesSlowPath); 388 388 -
trunk/Source/JavaScriptCore/bytecode/PropertyCondition.cpp
r221954 r222473 137 137 PropertyOffset currentOffset = structure->getConcurrently(uid(), currentAttributes); 138 138 if (currentOffset != invalidOffset) { 139 if (currentAttributes & ( ReadOnly | Accessor |CustomAccessor)) {139 if (currentAttributes & (PropertyAttribute::ReadOnly | PropertyAttribute::Accessor | PropertyAttribute::CustomAccessor)) { 140 140 if (PropertyConditionInternal::verbose) { 141 141 dataLog( … … 320 320 bool PropertyCondition::isValidValueForAttributes(VM& vm, JSValue value, unsigned attributes) 321 321 { 322 bool attributesClaimAccessor = !!(attributes & Accessor);322 bool attributesClaimAccessor = !!(attributes & PropertyAttribute::Accessor); 323 323 bool valueClaimsAccessor = !!jsDynamicCast<GetterSetter*>(vm, value); 324 324 return attributesClaimAccessor == valueClaimsAccessor; -
trunk/Source/JavaScriptCore/bytecode/PutByIdStatus.cpp
r221822 r222473 319 319 PropertyOffset offset = structure->getConcurrently(uid, attributes); 320 320 if (isValidOffset(offset)) { 321 if (attributes & CustomAccessor)321 if (attributes & PropertyAttribute::CustomAccessor) 322 322 return PutByIdStatus(MakesCalls); 323 323 324 if (attributes & ( Accessor |ReadOnly))324 if (attributes & (PropertyAttribute::Accessor | PropertyAttribute::ReadOnly)) 325 325 return PutByIdStatus(TakesSlowPath); 326 326 -
trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp
r222425 r222473 2037 2037 } 2038 2038 2039 SymbolTableEntry newEntry(varOffset, entry.value.isConst() ? ReadOnly : None);2039 SymbolTableEntry newEntry(varOffset, static_cast<unsigned>(entry.value.isConst() ? PropertyAttribute::ReadOnly : PropertyAttribute::None)); 2040 2040 symbolTable->add(NoLockingNecessary, entry.key.get(), newEntry); 2041 2041 } … … 2393 2393 Variable BytecodeGenerator::variable(const Identifier& property, ThisResolutionType thisResolutionType) 2394 2394 { 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); 2399 2397 2400 2398 // We can optimize lookups if the lexical variable is found before a "with" or "catch" -
trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h
r222425 r222473 320 320 RegisterID* local() const { return m_local; } 321 321 322 bool isReadOnly() const { return m_attributes & ReadOnly; }322 bool isReadOnly() const { return m_attributes & PropertyAttribute::ReadOnly; } 323 323 bool isSpecial() const { return m_kind != NormalVariable; } 324 324 bool isConst() const { return isReadOnly() && m_isLexicallyScoped; } 325 void setIsReadOnly() { m_attributes |= ReadOnly; }325 void setIsReadOnly() { m_attributes |= PropertyAttribute::ReadOnly; } 326 326 327 327 void dump(PrintStream&) const; -
trunk/Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp
r222425 r222473 548 548 emitPutHomeObject(generator, value.get(), dst); 549 549 550 unsigned attributes = node->isClassProperty() ? ( Accessor | DontEnum) : Accessor;550 unsigned attributes = node->isClassProperty() ? (PropertyAttribute::Accessor | PropertyAttribute::DontEnum) : static_cast<unsigned>(PropertyAttribute::Accessor); 551 551 552 552 ASSERT(node->m_type & (PropertyNode::Getter | PropertyNode::Setter)); -
trunk/Source/JavaScriptCore/create_hash_table
r219981 r222473 85 85 86 86 push(@keys, $key); 87 push(@attrs, length($att) > 0 ? $att : " 0");87 push(@attrs, length($att) > 0 ? $att : "None"); 88 88 89 89 if ($val eq "JSBuiltin") { … … 92 92 93 93 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") }); 95 95 #printf STDERR "WARNING: Number of arguments missing for $key/$val\n" if (length($param) == 0); 96 96 } elsif ($att =~ m/Accessor/) { … … 98 98 my $put = "nullptr"; 99 99 $hasSetter = "true"; 100 push(@values, { "type" => " Accessor", "get" => $get, "put" => $put });100 push(@values, { "type" => "PropertyAttribute::Accessor", "get" => $get, "put" => $put }); 101 101 } elsif ($att =~ m/CellProperty/) { 102 102 my $property = $val; 103 push(@values, { "type" => " CellProperty", "property" => $property });103 push(@values, { "type" => "PropertyAttribute::CellProperty", "property" => $property }); 104 104 } elsif ($att =~ m/ClassStructure/) { 105 105 my $property = $val; 106 push(@values, { "type" => " ClassStructure", "property" => $property });106 push(@values, { "type" => "PropertyAttribute::ClassStructure", "property" => $property }); 107 107 } elsif ($att =~ m/PropertyCallback/) { 108 108 my $cback = $val; 109 push(@values, { "type" => "Property Callback", "cback" => $cback });109 push(@values, { "type" => "PropertyAttribute::PropertyCallback", "cback" => $cback }); 110 110 } elsif (length($att)) { 111 111 my $get = $val; … … 115 115 } 116 116 $hasSetter = "true"; 117 push(@values, { "type" => "Property ", "get" => $get, "put" => $put });117 push(@values, { "type" => "PropertyAttribute::Property", "get" => $get, "put" => $put }); 118 118 } else { 119 push(@values, { "type" => "Lexer", "value" => $val }); 119 push(@values, { "type" => "Lexer", "value" => $val }); 120 120 } 121 121 push(@hashes, hashValue($key)); … … 305 305 my $intrinsic = "NoIntrinsic"; 306 306 307 if ($values[$i]{"type"} eq " Function") {307 if ($values[$i]{"type"} eq "PropertyAttribute::Function") { 308 308 $firstCastStr = "static_cast<NativeFunction>"; 309 309 $firstValue = $values[$i]{"function"}; 310 310 $secondValue = $values[$i]{"params"}; 311 311 $intrinsic = $values[$i]{"intrinsic"}; 312 } elsif ($values[$i]{"type"} eq " Accessor") {312 } elsif ($values[$i]{"type"} eq "PropertyAttribute::Accessor") { 313 313 $firstCastStr = "static_cast<NativeFunction>"; 314 314 $secondCastStr = "static_cast<NativeFunction>"; 315 315 $firstValue = $values[$i]{"get"}; 316 316 $secondValue = $values[$i]{"put"}; 317 } elsif ($values[$i]{"type"} eq "Property ") {317 } elsif ($values[$i]{"type"} eq "PropertyAttribute::Property") { 318 318 $firstCastStr = "static_cast<PropertySlot::GetValueFunc>"; 319 319 $secondCastStr = "static_cast<PutPropertySlot::PutValueFunc>"; … … 323 323 $firstValue = $values[$i]{"value"}; 324 324 $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") { 326 326 $values[$i]{"property"} =~ /\A([a-zA-Z0-9_]+)::(.*)\Z/ or die; 327 327 $firstValue = "OBJECT_OFFSETOF($1, $2)"; 328 328 $secondValue = "0"; 329 } elsif ($values[$i]{"type"} eq "Property Callback") {329 } elsif ($values[$i]{"type"} eq "PropertyAttribute::PropertyCallback") { 330 330 $firstCastStr = "static_cast<LazyPropertyCallback>"; 331 331 $firstValue = $values[$i]{"cback"}; … … 333 333 } 334 334 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") { 336 339 my $tableHead = $name; 337 340 $tableHead =~ s/Table$//; 338 print " { \"$key\", (($attr s[$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"; 339 342 } 340 343 else { 341 print " { \"$key\", $attr s[$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"; 342 345 } 343 346 $i++; -
trunk/Source/JavaScriptCore/debugger/DebuggerScope.cpp
r217108 r222473 101 101 // This is not ideal and we should fix it. 102 102 // 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()); 104 104 return true; 105 105 } -
trunk/Source/JavaScriptCore/dfg/DFGOperations.cpp
r222384 r222473 1188 1188 { 1189 1189 PropertyDescriptor descriptor = toPropertyDescriptor(value, jsUndefined(), jsUndefined(), DefinePropertyAttributes(attributes)); 1190 ASSERT((descriptor.attributes() & Accessor) || (!descriptor.isAccessorDescriptor()));1190 ASSERT((descriptor.attributes() & PropertyAttribute::Accessor) || (!descriptor.isAccessorDescriptor())); 1191 1191 if (base->methodTable(vm)->defineOwnProperty == JSObject::defineOwnProperty) 1192 1192 JSObject::defineOwnProperty(base, exec, propertyName, descriptor, true); … … 1236 1236 { 1237 1237 PropertyDescriptor descriptor = toPropertyDescriptor(jsUndefined(), getter, setter, DefinePropertyAttributes(attributes)); 1238 ASSERT((descriptor.attributes() & Accessor) || (!descriptor.isAccessorDescriptor()));1238 ASSERT((descriptor.attributes() & PropertyAttribute::Accessor) || (!descriptor.isAccessorDescriptor())); 1239 1239 if (base->methodTable(vm)->defineOwnProperty == JSObject::defineOwnProperty) 1240 1240 JSObject::defineOwnProperty(base, exec, propertyName, descriptor, true); -
trunk/Source/JavaScriptCore/inspector/JSInjectedScriptHostPrototype.cpp
r217108 r222473 62 62 vm.prototypeMap.addPrototype(this); 63 63 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); 78 78 } 79 79 -
trunk/Source/JavaScriptCore/inspector/JSJavaScriptCallFramePrototype.cpp
r217108 r222473 60 60 vm.prototypeMap.addPrototype(this); 61 61 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); 74 74 } 75 75 -
trunk/Source/JavaScriptCore/jit/Repatch.cpp
r220322 r222473 305 305 if (slot.isCacheableGetter()) 306 306 type = AccessCase::Getter; 307 else if (slot.attributes() & CustomAccessor)307 else if (slot.attributes() & PropertyAttribute::CustomAccessor) 308 308 type = AccessCase::CustomAccessorGetter; 309 309 else -
trunk/Source/JavaScriptCore/jsc.cpp
r222424 r222473 381 381 CustomGetter* thisObject = jsCast<CustomGetter*>(object); 382 382 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); 384 384 return true; 385 385 } 386 386 387 387 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); 389 389 return true; 390 390 } … … 455 455 RuntimeArray* thisObject = jsCast<RuntimeArray*>(object); 456 456 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); 458 458 return true; 459 459 } … … 461 461 std::optional<uint32_t> index = parseIndex(propertyName); 462 462 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()])); 464 464 return true; 465 465 } … … 472 472 RuntimeArray* thisObject = jsCast<RuntimeArray*>(object); 473 473 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])); 475 475 return true; 476 476 } … … 712 712 const DOMJIT::GetterSetter* domJIT = &DOMJITGetterDOMJIT; 713 713 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); 715 715 } 716 716 … … 822 822 const DOMJIT::GetterSetter* domJIT = &DOMJITGetterComplexDOMJIT; 823 823 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); 825 825 putDirectNativeFunction(vm, globalObject, Identifier::fromString(&vm, "enableException"), 0, functionEnableException, NoIntrinsic, 0); 826 826 } … … 897 897 { 898 898 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)); 900 900 } 901 901 … … 951 951 { 952 952 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)); 954 954 } 955 955 … … 1362 1362 addFunction(vm, "setHiddenValue", functionSetHiddenValue, 2); 1363 1363 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)); 1370 1370 1371 1371 addFunction(vm, "effectful42", functionEffectful42, 0); -
trunk/Source/JavaScriptCore/runtime/ArrayConstructor.cpp
r217108 r222473 59 59 { 60 60 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)); 65 65 } 66 66 -
trunk/Source/JavaScriptCore/runtime/ArrayIteratorPrototype.cpp
r217108 r222473 50 50 Base::finishCreation(vm); 51 51 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); 53 53 vm.prototypeMap.addPrototype(this); 54 54 } -
trunk/Source/JavaScriptCore/runtime/ArrayPrototype.cpp
r221954 r222473 85 85 vm.prototypeMap.addPrototype(this); 86 86 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)); 125 125 126 126 JSObject* unscopables = constructEmptyObject(globalObject->globalExec(), globalObject->nullPrototypeObjectStructure()); … … 137 137 for (const char* unscopableName : unscopableNames) 138 138 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); 140 140 } 141 141 -
trunk/Source/JavaScriptCore/runtime/AsyncFromSyncIteratorPrototype.cpp
r221080 r222473 47 47 vm.prototypeMap.addPrototype(this); 48 48 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)); 52 52 } 53 53 -
trunk/Source/JavaScriptCore/runtime/AsyncFunctionConstructor.cpp
r217108 r222473 45 45 { 46 46 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); 49 49 } 50 50 -
trunk/Source/JavaScriptCore/runtime/AsyncFunctionPrototype.cpp
r217108 r222473 50 50 Base::finishCreation(vm); 51 51 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); 54 54 vm.prototypeMap.addPrototype(this); 55 55 } -
trunk/Source/JavaScriptCore/runtime/AsyncGeneratorFunctionConstructor.cpp
r221080 r222473 45 45 { 46 46 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); 48 48 49 49 // 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); 51 51 } 52 52 -
trunk/Source/JavaScriptCore/runtime/AsyncGeneratorFunctionPrototype.cpp
r221080 r222473 50 50 Base::finishCreation(vm); 51 51 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); 54 54 vm.prototypeMap.addPrototype(this); 55 55 } -
trunk/Source/JavaScriptCore/runtime/AsyncGeneratorPrototype.cpp
r221080 r222473 49 49 Base::finishCreation(vm); 50 50 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); 52 52 vm.prototypeMap.addPrototype(this); 53 53 } -
trunk/Source/JavaScriptCore/runtime/AsyncIteratorPrototype.cpp
r221417 r222473 43 43 44 44 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)); 46 46 } 47 47 -
trunk/Source/JavaScriptCore/runtime/AtomicsObject.cpp
r217722 r222473 82 82 83 83 #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)); 85 85 FOR_EACH_ATOMICS_FUNC(PUT_DIRECT_NATIVE_FUNC) 86 86 #undef PUT_DIRECT_NATIVE_FUNC -
trunk/Source/JavaScriptCore/runtime/BooleanConstructor.cpp
r221822 r222473 40 40 { 41 41 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); 44 44 } 45 45 -
trunk/Source/JavaScriptCore/runtime/ClonedArguments.cpp
r221528 r222473 154 154 Structure* structure = Structure::create(vm, globalObject, prototype, TypeInfo(ClonedArgumentsType, StructureFlags), info(), indexingType); 155 155 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); 157 157 ASSERT(offset == clonedArgumentsLengthPropertyOffset); 158 158 return structure; … … 181 181 if (ident == vm.propertyNames->callee) { 182 182 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()); 184 184 return true; 185 185 } … … 189 189 190 190 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()); 192 192 return true; 193 193 } … … 252 252 253 253 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); 255 255 else 256 256 putDirect(vm, vm.propertyNames->callee, JSValue(m_callee.get())); 257 257 258 putDirect(vm, vm.propertyNames->iteratorSymbol, globalObject()->arrayProtoValuesFunction(), DontEnum);258 putDirect(vm, vm.propertyNames->iteratorSymbol, globalObject()->arrayProtoValuesFunction(), static_cast<unsigned>(PropertyAttribute::DontEnum)); 259 259 260 260 m_callee.clear(); -
trunk/Source/JavaScriptCore/runtime/CommonSlowPaths.cpp
r221849 r222473 973 973 CHECK_EXCEPTION(); 974 974 PropertyDescriptor descriptor = toPropertyDescriptor(value, jsUndefined(), jsUndefined(), DefinePropertyAttributes(attributes.asInt32())); 975 ASSERT((descriptor.attributes() & Accessor) || (!descriptor.isAccessorDescriptor()));975 ASSERT((descriptor.attributes() & PropertyAttribute::Accessor) || (!descriptor.isAccessorDescriptor())); 976 976 base->methodTable(vm)->defineOwnProperty(base, exec, propertyName, descriptor, true); 977 977 END(); … … 991 991 CHECK_EXCEPTION(); 992 992 PropertyDescriptor descriptor = toPropertyDescriptor(jsUndefined(), getter, setter, DefinePropertyAttributes(attributes.asInt32())); 993 ASSERT((descriptor.attributes() & Accessor) || (!descriptor.isAccessorDescriptor()));993 ASSERT((descriptor.attributes() & PropertyAttribute::Accessor) || (!descriptor.isAccessorDescriptor())); 994 994 base->methodTable(vm)->defineOwnProperty(base, exec, propertyName, descriptor, true); 995 995 END(); -
trunk/Source/JavaScriptCore/runtime/ConsoleObject.cpp
r217108 r222473 74 74 // and all have a length of 0. This may change if Console is standardized. 75 75 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); 98 98 } 99 99 -
trunk/Source/JavaScriptCore/runtime/DateConstructor.cpp
r219301 r222473 77 77 { 78 78 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); 81 81 } 82 82 -
trunk/Source/JavaScriptCore/runtime/DatePrototype.cpp
r221849 r222473 494 494 Identifier toUTCStringName = Identifier::fromString(&vm, ASCIILiteral("toUTCString")); 495 495 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)); 498 498 499 499 #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)); 503 503 #endif 504 504 505 505 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); 507 507 508 508 // The constructor will be added later, after DateConstructor has been built. -
trunk/Source/JavaScriptCore/runtime/DirectArguments.cpp
r220352 r222473 115 115 RELEASE_ASSERT(!m_mappedArguments); 116 116 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)); 120 120 121 121 void* backingStore = vm.gigacageAuxiliarySpace(m_mappedArguments.kind).tryAllocate(mappedArgumentsSize()); -
trunk/Source/JavaScriptCore/runtime/Error.cpp
r221836 r222473 221 221 obj->putDirect(vm, vm.propertyNames->sourceURL, jsString(&vm, sourceURL)); 222 222 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)); 224 224 225 225 return true; 226 226 } 227 227 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)); 229 229 return false; 230 230 } -
trunk/Source/JavaScriptCore/runtime/ErrorConstructor.cpp
r217108 r222473 43 43 Base::finishCreation(vm, ASCIILiteral("Error")); 44 44 // 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); 47 47 48 48 unsigned defaultStackTraceLimit = Options::defaultErrorStackTraceLimit(); 49 49 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)); 51 51 } 52 52 -
trunk/Source/JavaScriptCore/runtime/ErrorInstance.cpp
r222398 r222473 114 114 ASSERT(inherits(vm, info())); 115 115 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)); 117 117 118 118 std::unique_ptr<Vector<StackFrame>> stackTrace = getStackTrace(exec, vm, this, useCurrentFrame); -
trunk/Source/JavaScriptCore/runtime/ErrorPrototype.cpp
r221849 r222473 59 59 Base::finishCreation(vm); 60 60 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)); 63 63 } 64 64 -
trunk/Source/JavaScriptCore/runtime/FunctionConstructor.cpp
r221822 r222473 47 47 { 48 48 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); 51 51 } 52 52 -
trunk/Source/JavaScriptCore/runtime/FunctionPrototype.cpp
r221417 r222473 52 52 { 53 53 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); 55 55 } 56 56 … … 60 60 61 61 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)); 63 63 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)); 67 67 68 68 *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); 70 70 } 71 71 … … 74 74 VM& vm = exec->vm(); 75 75 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); 78 78 } 79 79 -
trunk/Source/JavaScriptCore/runtime/GeneratorFunctionConstructor.cpp
r217108 r222473 45 45 { 46 46 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); 49 49 } 50 50 -
trunk/Source/JavaScriptCore/runtime/GeneratorFunctionPrototype.cpp
r217108 r222473 52 52 Base::finishCreation(vm); 53 53 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); 56 56 vm.prototypeMap.addPrototype(this); 57 57 } -
trunk/Source/JavaScriptCore/runtime/GeneratorPrototype.cpp
r217108 r222473 49 49 Base::finishCreation(vm); 50 50 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); 52 52 vm.prototypeMap.addPrototype(this); 53 53 } -
trunk/Source/JavaScriptCore/runtime/GenericArgumentsInlines.h
r221849 r222473 49 49 if (!thisObject->overrodeThings()) { 50 50 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())); 52 52 return true; 53 53 } 54 54 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()); 56 56 return true; 57 57 } 58 58 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()); 60 60 return true; 61 61 } … … 74 74 75 75 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)); 77 77 return true; 78 78 } -
trunk/Source/JavaScriptCore/runtime/InternalFunction.cpp
r221822 r222473 50 50 m_originalName.set(vm, this, nameString); 51 51 if (nameVisibility == NameVisibility::Visible) 52 putDirect(vm, vm.propertyNames->name, nameString, ReadOnly |DontEnum);52 putDirect(vm, vm.propertyNames->name, nameString, PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum); 53 53 } 54 54 -
trunk/Source/JavaScriptCore/runtime/IntlCollatorConstructor.cpp
r217108 r222473 78 78 { 79 79 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); 82 82 m_collatorStructure.set(vm, this, collatorStructure); 83 83 } -
trunk/Source/JavaScriptCore/runtime/IntlDateTimeFormatConstructor.cpp
r217108 r222473 78 78 { 79 79 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); 82 82 m_dateTimeFormatStructure.set(vm, this, dateTimeFormatStructure); 83 83 } -
trunk/Source/JavaScriptCore/runtime/IntlDateTimeFormatPrototype.cpp
r217108 r222473 84 84 #if JSC_ICU_HAS_UFIELDPOSITER 85 85 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)); 87 87 #else 88 88 UNUSED_PARAM(globalObject); -
trunk/Source/JavaScriptCore/runtime/IntlNumberFormatConstructor.cpp
r217108 r222473 78 78 { 79 79 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); 82 82 m_numberFormatStructure.set(vm, this, numberFormatStructure); 83 83 } -
trunk/Source/JavaScriptCore/runtime/IntlObject.cpp
r222017 r222473 105 105 // Constructor Properties of the Intl Object 106 106 // 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)); 110 110 111 111 // Function Properties of the Intl Object 112 112 // 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)); 114 114 } 115 115 -
trunk/Source/JavaScriptCore/runtime/IteratorPrototype.cpp
r221417 r222473 42 42 vm.prototypeMap.addPrototype(this); 43 43 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)); 45 45 } 46 46 -
trunk/Source/JavaScriptCore/runtime/JSArray.cpp
r221849 r222473 250 250 JSArray* thisObject = jsCast<JSArray*>(object); 251 251 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; 253 253 slot.setValue(thisObject, attributes, jsNumber(thisObject->length())); 254 254 return true; … … 463 463 SparseArrayValueMap::iterator it = map->find(index); 464 464 ASSERT(it != map->notFound()); 465 if (it->value.attributes & DontDelete) {465 if (it->value.attributes & PropertyAttribute::DontDelete) { 466 466 storage->setLength(index + 1); 467 467 return typeError(exec, scope, throwException, ASCIILiteral(UnableToDeletePropertyError)); -
trunk/Source/JavaScriptCore/runtime/JSArrayBufferConstructor.cpp
r218452 r222473 54 54 { 55 55 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); 59 59 60 60 if (m_sharingMode == ArrayBufferSharingMode::Default) { 61 61 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); 64 64 } 65 65 } -
trunk/Source/JavaScriptCore/runtime/JSArrayBufferPrototype.cpp
r217108 r222473 125 125 Base::finishCreation(vm); 126 126 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); 129 129 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); 131 131 else 132 JSC_NATIVE_GETTER(vm.propertyNames->byteLength, sharedArrayBufferProtoGetterFuncByteLength, DontEnum |ReadOnly);132 JSC_NATIVE_GETTER(vm.propertyNames->byteLength, sharedArrayBufferProtoGetterFuncByteLength, PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly); 133 133 } 134 134 -
trunk/Source/JavaScriptCore/runtime/JSBoundFunction.cpp
r217108 r222473 211 211 ASSERT(inherits(vm, info())); 212 212 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); 215 215 } 216 216 -
trunk/Source/JavaScriptCore/runtime/JSCJSValue.cpp
r221849 r222473 176 176 PropertyOffset offset = obj->structure()->get(vm, propertyName, attributes); 177 177 if (offset != invalidOffset) { 178 if (attributes & ReadOnly)178 if (attributes & PropertyAttribute::ReadOnly) 179 179 return typeError(exec, scope, slot.isStrictMode(), ASCIILiteral(ReadonlyPropertyWriteError)); 180 180 … … 186 186 187 187 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); 189 189 190 190 // If there's an existing property on the object or one of its -
trunk/Source/JavaScriptCore/runtime/JSDataView.cpp
r221822 r222473 109 109 JSDataView* thisObject = jsCast<JSDataView*>(object); 110 110 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)); 112 112 return true; 113 113 } 114 114 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())); 116 116 return true; 117 117 } -
trunk/Source/JavaScriptCore/runtime/JSDataViewPrototype.cpp
r217108 r222473 110 110 { 111 111 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); 113 113 } 114 114 -
trunk/Source/JavaScriptCore/runtime/JSFunction.cpp
r221822 r222473 110 110 // Some NativeExecutable functions, like JSBoundFunction, decide to lazily allocate their name string. 111 111 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); 114 114 } 115 115 … … 365 365 else { 366 366 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)); 368 368 } 369 369 370 thisObject->putDirect(vm, vm.propertyNames->prototype, prototype, DontDelete |DontEnum);370 thisObject->putDirect(vm, vm.propertyNames->prototype, prototype, PropertyAttribute::DontDelete | PropertyAttribute::DontEnum); 371 371 offset = thisObject->getDirectOffset(vm, vm.propertyNames->prototype, attributes); 372 372 ASSERT(isValidOffset(offset)); … … 380 380 return Base::getOwnPropertySlot(thisObject, exec, propertyName, slot); 381 381 382 slot.setCacheableCustom(thisObject, ReadOnly | DontEnum |DontDelete, argumentsGetter);382 slot.setCacheableCustom(thisObject, PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum | PropertyAttribute::DontDelete, argumentsGetter); 383 383 return true; 384 384 } … … 388 388 return Base::getOwnPropertySlot(thisObject, exec, propertyName, slot); 389 389 390 slot.setCacheableCustom(thisObject, ReadOnly | DontEnum |DontDelete, callerGetter);390 slot.setCacheableCustom(thisObject, PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum | PropertyAttribute::DontDelete, callerGetter); 391 391 return true; 392 392 } … … 533 533 PropertySlot slot(thisObject, PropertySlot::InternalMethodType::VMInquiry); 534 534 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); 536 536 scope.release(); 537 537 return Base::defineOwnProperty(object, exec, propertyName, descriptor, throwException); … … 547 547 PropertySlot slot(thisObject, PropertySlot::InternalMethodType::VMInquiry); 548 548 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); 550 550 scope.release(); 551 551 return Base::defineOwnProperty(object, exec, propertyName, descriptor, throwException); … … 636 636 ASSERT(!isHostFunction()); 637 637 JSValue initialValue = jsNumber(jsExecutable()->parameterCount()); 638 unsigned initialAttributes = DontEnum |ReadOnly;638 unsigned initialAttributes = PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly; 639 639 const Identifier& identifier = vm.propertyNames->length; 640 640 putDirect(vm, identifier, initialValue, initialAttributes); … … 663 663 ASSERT(!hasReifiedName()); 664 664 ASSERT(!isHostFunction()); 665 unsigned initialAttributes = DontEnum |ReadOnly;665 unsigned initialAttributes = PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly; 666 666 const Identifier& propID = vm.propertyNames->name; 667 667 … … 729 729 FunctionRareData* rareData = this->rareData(vm); 730 730 String name = makeString("bound ", static_cast<NativeExecutable*>(m_executable.get())->name()); 731 unsigned initialAttributes = DontEnum |ReadOnly;731 unsigned initialAttributes = PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly; 732 732 putDirect(vm, nameIdent, jsString(exec, name), initialAttributes); 733 733 rareData->setHasReifiedName(); -
trunk/Source/JavaScriptCore/runtime/JSGenericTypedArrayViewConstructorInlines.h
r222421 r222473 48 48 { 49 49 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); 53 53 54 54 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); 56 56 } 57 57 -
trunk/Source/JavaScriptCore/runtime/JSGenericTypedArrayViewInlines.h
r221849 r222473 356 356 if (std::optional<uint32_t> index = parseIndex(propertyName)) { 357 357 if (thisObject->isNeutered()) { 358 slot.setCustom(thisObject, None, throwNeuteredTypedArrayTypeError);358 slot.setCustom(thisObject, static_cast<unsigned>(PropertyAttribute::None), throwNeuteredTypedArrayTypeError); 359 359 return true; 360 360 } 361 361 362 362 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())); 364 364 else 365 slot.setValue(thisObject, DontDelete |ReadOnly, jsUndefined());365 slot.setValue(thisObject, PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly, jsUndefined()); 366 366 return true; 367 367 } … … 447 447 448 448 if (thisObject->isNeutered()) { 449 slot.setCustom(thisObject, None, throwNeuteredTypedArrayTypeError);449 slot.setCustom(thisObject, static_cast<unsigned>(PropertyAttribute::None), throwNeuteredTypedArrayTypeError); 450 450 return true; 451 451 } … … 459 459 return false; 460 460 461 slot.setValue(thisObject, DontDelete, thisObject->getIndexQuickly(propertyName));461 slot.setValue(thisObject, static_cast<unsigned>(PropertyAttribute::DontDelete), thisObject->getIndexQuickly(propertyName)); 462 462 return true; 463 463 } -
trunk/Source/JavaScriptCore/runtime/JSGenericTypedArrayViewPrototypeInlines.h
r211247 r222473 44 44 ASSERT(inherits(vm, info())); 45 45 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); 47 47 48 48 } -
trunk/Source/JavaScriptCore/runtime/JSGlobalObject.cpp
r222143 r222473 404 404 m_namedFunctionStructure.initLater( 405 405 [] (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)); 407 407 }); 408 408 JSFunction* callFunction = nullptr; … … 452 452 protoAccessor->setGetter(vm, this, JSFunction::create(vm, this, 0, makeString("get ", vm.propertyNames->underscoreProto.string()), globalFuncProtoGetter)); 453 453 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); 455 455 m_functionPrototype->structure()->setPrototypeWithoutTransition(vm, m_objectPrototype.get()); 456 456 m_objectStructureForObjectConstructor.set(vm, this, vm.prototypeMap.emptyObjectStructureForPrototype(this, m_objectPrototype.get(), JSFinalObject::defaultInlineCapacity())); … … 479 479 JSTypedArrayViewPrototype* prototype = init.owner->m_typedArrayProto.get(init.owner); 480 480 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)); 482 482 init.set(constructor); 483 483 }); … … 489 489 init.setStructure(JS ## type ## Array::createStructure(init.vm, init.global, init.prototype)); \ 490 490 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)); \ 492 492 }); 493 493 FOR_EACH_TYPED_ARRAY_TYPE_EXCLUDING_DATA_VIEW(INIT_TYPED_ARRAY_LATER) … … 575 575 576 576 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)); 578 578 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)); 580 580 581 581 m_arrayBufferPrototype.set(vm, this, JSArrayBufferPrototype::create(vm, this, JSArrayBufferPrototype::createStructure(vm, this, m_objectPrototype.get()), ArrayBufferSharingMode::Default)); … … 629 629 630 630 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)); 632 632 JSArrayBufferConstructor* sharedArrayBufferConstructor = nullptr; 633 633 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)); 635 635 636 636 #define CREATE_CONSTRUCTOR_FOR_SIMPLE_TYPE(capitalName, lowerName, properName, instanceType, jsName, prototypeBase) \ 637 637 capitalName ## 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); \638 m_ ## lowerName ## Prototype->putDirectWithoutTransition(vm, vm.propertyNames->constructor, lowerName ## Constructor, static_cast<unsigned>(PropertyAttribute::DontEnum)); \ 639 639 640 640 FOR_EACH_SIMPLE_BUILTIN_TYPE(CREATE_CONSTRUCTOR_FOR_SIMPLE_TYPE) … … 669 669 m_generatorFunctionPrototype.set(vm, this, GeneratorFunctionPrototype::create(vm, GeneratorFunctionPrototype::createStructure(vm, this, m_functionPrototype.get()))); 670 670 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); 672 672 m_generatorFunctionStructure.set(vm, this, JSGeneratorFunction::createStructure(vm, this, m_generatorFunctionPrototype.get())); 673 673 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); 676 676 677 677 m_asyncFunctionPrototype.set(vm, this, AsyncFunctionPrototype::create(vm, AsyncFunctionPrototype::createStructure(vm, this, m_functionPrototype.get()))); 678 678 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); 680 680 m_asyncFunctionStructure.set(vm, this, JSAsyncFunction::createStructure(vm, this, m_asyncFunctionPrototype.get())); 681 681 682 682 m_asyncGeneratorFunctionPrototype.set(vm, this, AsyncGeneratorFunctionPrototype::create(vm, AsyncGeneratorFunctionPrototype::createStructure(vm, this, m_functionPrototype.get()))); 683 683 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); 685 685 m_asyncGeneratorFunctionStructure.set(vm, this, JSAsyncGeneratorFunction::createStructure(vm, this, m_asyncGeneratorFunctionPrototype.get())); 686 686 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)); 708 708 709 709 #define PUT_CONSTRUCTOR_FOR_SIMPLE_TYPE(capitalName, lowerName, properName, instanceType, jsName, prototypeBase) \ 710 putDirectWithoutTransition(vm, vm.propertyNames-> jsName, lowerName ## Constructor, DontEnum); \710 putDirectWithoutTransition(vm, vm.propertyNames-> jsName, lowerName ## Constructor, static_cast<unsigned>(PropertyAttribute::DontEnum)); \ 711 711 712 712 FOR_EACH_SIMPLE_BUILTIN_TYPE_WITH_CONSTRUCTOR(PUT_CONSTRUCTOR_FOR_SIMPLE_TYPE) … … 716 716 717 717 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)); 719 719 720 720 #if ENABLE(INTL) 721 721 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)); 723 723 #endif // ENABLE(INTL) 724 724 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)); 726 726 727 727 m_moduleLoaderStructure.set(vm, this, JSModuleLoader::createStructure(vm, this, m_moduleLoaderPrototype.get())); 728 728 m_moduleLoader.set(vm, this, JSModuleLoader::create(globalExec(), vm, this, m_moduleLoaderStructure.get())); 729 729 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)); 731 731 732 732 JSFunction* builtinLog = JSFunction::create(vm, this, 1, vm.propertyNames->emptyIdentifier.string(), globalFuncBuiltinLog); … … 799 799 800 800 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), 802 802 JSC_FOREACH_BUILTIN_FUNCTION_PRIVATE_GLOBAL_NAME(INIT_PRIVATE_GLOBAL) 803 803 #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), 846 846 #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), 850 850 #endif // ENABLE(INTL) 851 851 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), 861 861 862 862 // 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), 870 870 871 871 // 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), 875 875 876 876 // 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), 879 879 880 880 // 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), 888 888 }; 889 889 addStaticGlobals(staticGlobals, WTF_ARRAY_LENGTH(staticGlobals)); … … 902 902 903 903 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), 905 905 }; 906 906 addStaticGlobals(extraStaticGlobals, WTF_ARRAY_LENGTH(extraStaticGlobals)); 907 907 908 putDirectWithoutTransition(vm, Identifier::fromString(exec, "$vm"), dollarVM, DontEnum);908 putDirectWithoutTransition(vm, Identifier::fromString(exec, "$vm"), dollarVM, static_cast<unsigned>(PropertyAttribute::DontEnum)); 909 909 } 910 910 … … 918 918 m_webAssemblyToJSCalleeStructure.set(vm, this, WebAssemblyToJSCallee::createStructure(vm, this, jsNull())); 919 919 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)); 921 921 922 922 #define CREATE_WEBASSEMBLY_CONSTRUCTOR(capitalName, lowerName, properName, instanceType, jsName, prototypeBase) do { \ … … 928 928 auto* structure = JSObj::createStructure(vm, this, prototype); \ 929 929 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)); \ 931 931 m_ ## lowerName ## Prototype.set(vm, this, prototype); \ 932 932 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)); \ 934 934 } while (0); 935 935 … … 1390 1390 for (int i = 0; i < count; ++i) { 1391 1391 GlobalPropertyInfo& global = globals[i]; 1392 ASSERT(global.attributes & DontDelete);1392 ASSERT(global.attributes & PropertyAttribute::DontDelete); 1393 1393 1394 1394 WatchpointSet* watchpointSet = nullptr; -
trunk/Source/JavaScriptCore/runtime/JSLexicalEnvironment.cpp
r222143 r222473 77 77 SymbolTable::Map::iterator end = thisObject->symbolTable()->end(locker); 78 78 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()) 80 80 continue; 81 81 if (!thisObject->isValidScopeOffset(it->value.scopeOffset())) -
trunk/Source/JavaScriptCore/runtime/JSModuleNamespaceObject.cpp
r217108 r222473 74 74 } 75 75 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); 77 77 78 78 // http://www.ecma-international.org/ecma-262/6.0/#sec-module-namespace-exotic-objects-getprototypeof … … 146 146 } 147 147 148 slot.setValueModuleNamespace(this, DontDelete, value, environment, scopeOffset);148 slot.setValueModuleNamespace(this, static_cast<unsigned>(PropertyAttribute::DontDelete), value, environment, scopeOffset); 149 149 return true; 150 150 } … … 154 154 // [[Get]] / [[GetOwnProperty]] onto namespace object could throw an error while [[HasProperty]] just returns true here. 155 155 // 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()); 157 157 return true; 158 158 } -
trunk/Source/JavaScriptCore/runtime/JSONObject.cpp
r222017 r222473 66 66 ASSERT(inherits(vm, info())); 67 67 68 putDirectWithoutTransition(vm, vm.propertyNames->toStringTagSymbol, jsString(&vm, "JSON"), DontEnum |ReadOnly);68 putDirectWithoutTransition(vm, vm.propertyNames->toStringTagSymbol, jsString(&vm, "JSON"), PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly); 69 69 } 70 70 -
trunk/Source/JavaScriptCore/runtime/JSObject.cpp
r221849 r222473 86 86 87 87 for (auto iter = table->begin(); iter != table->end(); ++iter) { 88 if (!(iter->attributes() & DontEnum) || mode.includeDontEnumProperties())88 if (!(iter->attributes() & PropertyAttribute::DontEnum) || mode.includeDontEnumProperties()) 89 89 propertyNames.add(Identifier::fromString(&vm, iter.key())); 90 90 } … … 593 593 JSValue value = butterfly->contiguous()[i].get(); 594 594 if (value) { 595 slot.setValue(thisObject, None, value);595 slot.setValue(thisObject, static_cast<unsigned>(PropertyAttribute::None), value); 596 596 return true; 597 597 } … … 607 607 double value = butterfly->contiguousDouble()[i]; 608 608 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)); 610 610 return true; 611 611 } … … 622 622 JSValue value = storage->m_vector[i].get(); 623 623 if (value) { 624 slot.setValue(thisObject, None, value);624 slot.setValue(thisObject, static_cast<unsigned>(PropertyAttribute::None), value); 625 625 return true; 626 626 } … … 680 680 } 681 681 // 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)); 683 683 } 684 684 break; … … 726 726 // 9.1.9.1-4-e-i Return ? CreateDataProperty(Receiver, P, V). 727 727 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); 729 729 } 730 730 … … 770 770 PropertyOffset offset = obj->structure(vm)->get(vm, propertyName, attributes); 771 771 if (isValidOffset(offset)) { 772 if (attributes & ReadOnly) {772 if (attributes & PropertyAttribute::ReadOnly) { 773 773 ASSERT(structure(vm)->prototypeChainMayInterceptStoreTo(vm, propertyName) || obj == this); 774 774 return typeError(exec, scope, slot.isStrictMode(), ASCIILiteral(ReadonlyPropertyWriteError)); … … 784 784 } 785 785 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) 788 788 slot.setCustomAccessor(obj, jsCast<CustomGetterSetter*>(gs.asCell())->setter()); 789 789 else … … 791 791 return result; 792 792 } 793 ASSERT(!(attributes & Accessor));793 ASSERT(!(attributes & PropertyAttribute::Accessor)); 794 794 795 795 // If there's an existing property on the object or one of its … … 1713 1713 descriptor.setGetter(getter); 1714 1714 1715 ASSERT(attributes & Accessor);1716 if (!(attributes & ReadOnly))1715 ASSERT(attributes & PropertyAttribute::Accessor); 1716 if (!(attributes & PropertyAttribute::ReadOnly)) 1717 1717 descriptor.setConfigurable(true); 1718 if (!(attributes & DontEnum))1718 if (!(attributes & PropertyAttribute::DontEnum)) 1719 1719 descriptor.setEnumerable(true); 1720 1720 … … 1727 1727 descriptor.setSetter(setter); 1728 1728 1729 ASSERT(attributes & Accessor);1730 if (!(attributes & ReadOnly))1729 ASSERT(attributes & PropertyAttribute::Accessor); 1730 if (!(attributes & PropertyAttribute::ReadOnly)) 1731 1731 descriptor.setConfigurable(true); 1732 if (!(attributes & DontEnum))1732 if (!(attributes & PropertyAttribute::DontEnum)) 1733 1733 descriptor.setEnumerable(true); 1734 1734 … … 1738 1738 bool JSObject::putDirectAccessor(ExecState* exec, PropertyName propertyName, JSValue value, unsigned attributes) 1739 1739 { 1740 ASSERT(value.isGetterSetter() && (attributes & Accessor));1740 ASSERT(value.isGetterSetter() && (attributes & PropertyAttribute::Accessor)); 1741 1741 1742 1742 if (std::optional<uint32_t> index = parseIndex(propertyName)) … … 1756 1756 1757 1757 Structure* structure = this->structure(vm); 1758 if (attributes & ReadOnly)1758 if (attributes & PropertyAttribute::ReadOnly) 1759 1759 structure->setContainsReadOnlyProperties(); 1760 1760 structure->setHasCustomGetterSetterPropertiesWithProtoCheck(propertyName == vm.propertyNames->underscoreProto); … … 1768 1768 1769 1769 Structure* structure = this->structure(vm); 1770 if (attributes & ReadOnly)1770 if (attributes & PropertyAttribute::ReadOnly) 1771 1771 structure->setContainsReadOnlyProperties(); 1772 1772 … … 1815 1815 // if there is a property in the storage array it too must be non-configurable (the language does 1816 1816 // 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); 1819 1819 return false; 1820 1820 } … … 1827 1827 bool propertyIsPresent = isValidOffset(structure->get(vm, propertyName, attributes)); 1828 1828 if (propertyIsPresent) { 1829 if (attributes & DontDelete && vm.deletePropertyMode() != VM::DeletePropertyMode::IgnoreConfigurable)1829 if (attributes & PropertyAttribute::DontDelete && vm.deletePropertyMode() != VM::DeletePropertyMode::IgnoreConfigurable) 1830 1830 return false; 1831 1831 … … 1884 1884 SparseArrayValueMap::iterator it = map->find(i); 1885 1885 if (it != map->notFound()) { 1886 if (it->value.attributes & DontDelete)1886 if (it->value.attributes & PropertyAttribute::DontDelete) 1887 1887 return false; 1888 1888 map->remove(it); … … 2200 2200 SparseArrayValueMap::const_iterator end = map->end(); 2201 2201 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)) 2203 2203 keys.uncheckedAppend(static_cast<unsigned>(it->key)); 2204 2204 } … … 2351 2351 else if (oldDescriptor.isAccessorDescriptor()) 2352 2352 entryInMap->set(vm, map, jsUndefined()); 2353 entryInMap->attributes = descriptor.attributesOverridingCurrent(oldDescriptor) & ~ Accessor;2353 entryInMap->attributes = descriptor.attributesOverridingCurrent(oldDescriptor) & ~PropertyAttribute::Accessor; 2354 2354 return true; 2355 2355 } … … 2374 2374 2375 2375 entryInMap->set(vm, map, accessor); 2376 entryInMap->attributes = descriptor.attributesOverridingCurrent(oldDescriptor) & ~ ReadOnly;2376 entryInMap->attributes = descriptor.attributesOverridingCurrent(oldDescriptor) & ~PropertyAttribute::ReadOnly; 2377 2377 return true; 2378 2378 } … … 2412 2412 } 2413 2413 2414 if (descriptor.attributes() & ( ReadOnly |Accessor))2414 if (descriptor.attributes() & (PropertyAttribute::ReadOnly | PropertyAttribute::Accessor)) 2415 2415 notifyPresenceOfIndexedAccessors(vm); 2416 2416 … … 2443 2443 PropertyDescriptor defaults; 2444 2444 entryInMap->setWithoutWriteBarrier(jsUndefined()); 2445 entryInMap->attributes = DontDelete | DontEnum |ReadOnly;2445 entryInMap->attributes = PropertyAttribute::DontDelete | PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly; 2446 2446 entryInMap->get(defaults); 2447 2447 … … 2543 2543 if (storage && storage->m_sparseMap) { 2544 2544 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))) { 2546 2546 putResult = iter->value.put(exec, thisValue, storage->m_sparseMap.get(), value, shouldThrow); 2547 2547 return true; … … 2865 2865 ASSERT(i <= MAX_ARRAY_INDEX); 2866 2866 2867 if (attributes & ( ReadOnly |Accessor))2867 if (attributes & (PropertyAttribute::ReadOnly | PropertyAttribute::Accessor)) 2868 2868 notifyPresenceOfIndexedAccessors(vm); 2869 2869 … … 3272 3272 if (slot.isAccessor()) 3273 3273 descriptor.setAccessorDescriptor(slot.getterSetter(), slot.attributes()); 3274 else if (slot.attributes() & CustomAccessor) {3274 else if (slot.attributes() & PropertyAttribute::CustomAccessor) { 3275 3275 descriptor.setCustomDescriptor(slot.attributes()); 3276 3276 … … 3315 3315 if (oldDescriptor.setterPresent()) 3316 3316 accessor->setSetter(vm, exec->lexicalGlobalObject(), oldDescriptor.setterObject()); 3317 target->putDirectAccessor(exec, propertyName, accessor, attributes | Accessor);3317 target->putDirectAccessor(exec, propertyName, accessor, attributes | PropertyAttribute::Accessor); 3318 3318 return true; 3319 3319 } … … 3323 3323 else if (oldDescriptor.value()) 3324 3324 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) 3327 3327 target->structure(vm)->setContainsReadOnlyProperties(); 3328 3328 return true; 3329 3329 } 3330 attributes &= ~ ReadOnly;3330 attributes &= ~PropertyAttribute::ReadOnly; 3331 3331 GetterSetter* accessor = GetterSetter::create(vm, exec->lexicalGlobalObject()); 3332 3332 … … 3340 3340 accessor->setSetter(vm, exec->lexicalGlobalObject(), oldDescriptor.setterObject()); 3341 3341 3342 target->putDirectAccessor(exec, propertyName, accessor, attributes | Accessor);3342 target->putDirectAccessor(exec, propertyName, accessor, attributes | PropertyAttribute::Accessor); 3343 3343 return true; 3344 3344 } … … 3445 3445 if (descriptor.getterPresent() && !(current.getterPresent() && JSValue::strictEqual(exec, current.getter(), descriptor.getter()))) 3446 3446 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) 3448 3448 return typeError(exec, scope, throwException, ASCIILiteral(UnconfigurablePropertyChangeAccessMechanismError)); 3449 3449 } … … 3481 3481 RETURN_IF_EXCEPTION(scope, false); 3482 3482 unsigned attrs = descriptor.attributesOverridingCurrent(current); 3483 object->putDirectAccessor(exec, propertyName, getterSetter, attrs | Accessor);3483 object->putDirectAccessor(exec, propertyName, getterSetter, attrs | PropertyAttribute::Accessor); 3484 3484 return true; 3485 3485 } -
trunk/Source/JavaScriptCore/runtime/JSObject.h
r222136 r222473 80 80 extern JS_EXPORTDATA const char* const UnconfigurablePropertyChangeWritabilityError; 81 81 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);82 COMPILE_ASSERT(PropertyAttribute::None < FirstInternalAttribute, None_is_below_FirstInternalAttribute); 83 COMPILE_ASSERT(PropertyAttribute::ReadOnly < FirstInternalAttribute, ReadOnly_is_below_FirstInternalAttribute); 84 COMPILE_ASSERT(PropertyAttribute::DontEnum < FirstInternalAttribute, DontEnum_is_below_FirstInternalAttribute); 85 COMPILE_ASSERT(PropertyAttribute::DontDelete < FirstInternalAttribute, DontDelete_is_below_FirstInternalAttribute); 86 COMPILE_ASSERT(PropertyAttribute::Accessor < FirstInternalAttribute, Accessor_is_below_FirstInternalAttribute); 87 87 88 88 class JSFinalObject; … … 1465 1465 inline bool JSObject::putDirect(VM& vm, PropertyName propertyName, JSValue value, unsigned attributes) 1466 1466 { 1467 ASSERT(!value.isGetterSetter() && !(attributes & Accessor));1467 ASSERT(!value.isGetterSetter() && !(attributes & PropertyAttribute::Accessor)); 1468 1468 ASSERT(!value.isCustomGetterSetter()); 1469 1469 PutPropertySlot slot(this); … … 1605 1605 putDirectNativeIntrinsicGetter(\ 1606 1606 vm, globalObject, makeIdentifier(vm, (jsName)), (cppName), \ 1607 (intrinsic), ((attributes) | Accessor))1607 (intrinsic), ((attributes) | PropertyAttribute::Accessor)) 1608 1608 1609 1609 #define JSC_NATIVE_GETTER(jsName, cppName, attributes) \ -
trunk/Source/JavaScriptCore/runtime/JSObjectInlines.h
r221849 r222473 164 164 inline void JSObject::putDirectWithoutTransition(VM& vm, PropertyName propertyName, JSValue value, unsigned attributes) 165 165 { 166 ASSERT(!value.isGetterSetter() && !(attributes & Accessor));166 ASSERT(!value.isGetterSetter() && !(attributes & PropertyAttribute::Accessor)); 167 167 ASSERT(!value.isCustomGetterSetter()); 168 168 StructureID structureID = this->structureID(); … … 172 172 structure->willStoreValueForNewTransition(vm, propertyName, value, shouldOptimize); 173 173 putDirect(vm, offset, value); 174 if (attributes & ReadOnly)174 if (attributes & PropertyAttribute::ReadOnly) 175 175 structure->setContainsReadOnlyProperties(); 176 176 } … … 257 257 { 258 258 ASSERT(value); 259 ASSERT(value.isGetterSetter() == !!(attributes & Accessor));259 ASSERT(value.isGetterSetter() == !!(attributes & PropertyAttribute::Accessor)); 260 260 ASSERT(!Heap::heap(value) || Heap::heap(value) == Heap::heap(this)); 261 261 ASSERT(!parseIndex(propertyName)); … … 269 269 PropertyOffset offset = structure->get(vm, propertyName, currentAttributes); 270 270 if (offset != invalidOffset) { 271 if ((mode == PutModePut) && currentAttributes & ReadOnly)271 if ((mode == PutModePut) && currentAttributes & PropertyAttribute::ReadOnly) 272 272 return false; 273 273 … … 276 276 slot.setExistingProperty(this, offset); 277 277 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)); 280 280 setStructure(vm, Structure::attributeChangeTransition(vm, structure, propertyName, attributes)); 281 281 } … … 290 290 putDirect(vm, offset, value); 291 291 slot.setNewProperty(this, offset); 292 if (attributes & ReadOnly)292 if (attributes & PropertyAttribute::ReadOnly) 293 293 this->structure()->setContainsReadOnlyProperties(); 294 294 return true; … … 322 322 offset = structure->get(vm, propertyName, currentAttributes, hasInferredType); 323 323 if (offset != invalidOffset) { 324 if ((mode == PutModePut) && currentAttributes & ReadOnly)324 if ((mode == PutModePut) && currentAttributes & PropertyAttribute::ReadOnly) 325 325 return false; 326 326 … … 334 334 putDirect(vm, offset, value); 335 335 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)); 338 338 setStructure(vm, Structure::attributeChangeTransition(vm, structure, propertyName, attributes)); 339 339 } … … 366 366 setStructure(vm, newStructure); 367 367 slot.setNewProperty(this, offset); 368 if (attributes & ReadOnly)368 if (attributes & PropertyAttribute::ReadOnly) 369 369 newStructure->setContainsReadOnlyProperties(); 370 370 return true; -
trunk/Source/JavaScriptCore/runtime/JSPromiseConstructor.cpp
r221849 r222473 82 82 { 83 83 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); 87 87 } 88 88 89 89 void JSPromiseConstructor::addOwnInternalSlots(VM& vm, JSGlobalObject* globalObject) 90 90 { 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); 93 93 } 94 94 -
trunk/Source/JavaScriptCore/runtime/JSPromisePrototype.cpp
r219989 r222473 77 77 { 78 78 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); 80 80 } 81 81 82 82 void JSPromisePrototype::addOwnInternalSlots(VM& vm, JSGlobalObject* globalObject) 83 83 { 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); 85 85 } 86 86 -
trunk/Source/JavaScriptCore/runtime/JSString.cpp
r221822 r222473 445 445 VM& vm = exec->vm(); 446 446 if (propertyName == vm.propertyNames->length) { 447 descriptor.setDescriptor(jsNumber(length()), DontEnum | DontDelete |ReadOnly);447 descriptor.setDescriptor(jsNumber(length()), PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly); 448 448 return true; 449 449 } … … 451 451 std::optional<uint32_t> index = parseIndex(propertyName); 452 452 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); 454 454 return true; 455 455 } -
trunk/Source/JavaScriptCore/runtime/JSString.h
r221822 r222473 672 672 VM& vm = exec->vm(); 673 673 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())); 675 675 return true; 676 676 } … … 678 678 std::optional<uint32_t> index = parseIndex(propertyName); 679 679 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())); 681 681 return true; 682 682 } … … 688 688 { 689 689 if (propertyName < length()) { 690 slot.setValue(this, DontDelete |ReadOnly, getIndex(exec, propertyName));690 slot.setValue(this, PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly, getIndex(exec, propertyName)); 691 691 return true; 692 692 } -
trunk/Source/JavaScriptCore/runtime/JSSymbolTableObject.cpp
r217108 r222473 61 61 SymbolTable::Map::iterator end = thisObject->symbolTable()->end(locker); 62 62 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()) { 64 64 if (it->key->isSymbol() && !propertyNames.includeSymbolProperties()) 65 65 continue; -
trunk/Source/JavaScriptCore/runtime/JSSymbolTableObject.h
r208761 r222473 94 94 return false; 95 95 96 slot.setValue(object, entry.getAttributes() | DontDelete, object->variableAt(offset).get());96 slot.setValue(object, entry.getAttributes() | PropertyAttribute::DontDelete, object->variableAt(offset).get()); 97 97 return true; 98 98 } … … 115 115 return false; 116 116 117 descriptor.setDescriptor(object->variableAt(offset).get(), entry.getAttributes() | DontDelete);117 descriptor.setDescriptor(object->variableAt(offset).get(), entry.getAttributes() | PropertyAttribute::DontDelete); 118 118 return true; 119 119 } … … 137 137 return false; 138 138 139 slot.setValue(object, entry.getAttributes() | DontDelete, object->variableAt(offset).get());139 slot.setValue(object, entry.getAttributes() | PropertyAttribute::DontDelete, object->variableAt(offset).get()); 140 140 slotIsWriteable = !entry.isReadOnly(); 141 141 return true; -
trunk/Source/JavaScriptCore/runtime/JSTypedArrayViewConstructor.cpp
r217108 r222473 48 48 { 49 49 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); 53 53 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)); 56 56 } 57 57 -
trunk/Source/JavaScriptCore/runtime/JSTypedArrayViewPrototype.cpp
r221417 r222473 296 296 ASSERT(inherits(vm, info())); 297 297 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)); 327 327 328 328 JSFunction* toStringTagFunction = JSFunction::create(vm, globalObject, 0, ASCIILiteral("get [Symbol.toStringTag]"), typedArrayViewProtoGetterFuncToStringTag, NoIntrinsic); 329 329 GetterSetter* toStringTagAccessor = GetterSetter::create(vm, globalObject); 330 330 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); 332 332 333 333 JSFunction* valuesFunction = JSFunction::create(vm, typedArrayPrototypeValuesCodeGenerator(vm), globalObject); 334 334 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)); 337 337 338 338 } -
trunk/Source/JavaScriptCore/runtime/LazyClassStructure.cpp
r211247 r222473 69 69 this->constructor = constructor; 70 70 71 prototype->putDirectWithoutTransition(vm, vm.propertyNames->constructor, constructor, DontEnum);71 prototype->putDirectWithoutTransition(vm, vm.propertyNames->constructor, constructor, static_cast<unsigned>(PropertyAttribute::DontEnum)); 72 72 if (!propertyName.isNull()) 73 global->putDirect(vm, propertyName, constructor, DontEnum);73 global->putDirect(vm, propertyName, constructor, static_cast<unsigned>(PropertyAttribute::DontEnum)); 74 74 classStructure.m_constructor.set(vm, global, constructor); 75 75 } -
trunk/Source/JavaScriptCore/runtime/Lookup.cpp
r221417 r222473 33 33 if (value.accessorGetter()) { 34 34 JSFunction* function = nullptr; 35 if (value.attributes() & Builtin)35 if (value.attributes() & PropertyAttribute::Builtin) 36 36 function = JSFunction::create(vm, value.builtinAccessorGetterGenerator()(vm), globalObject); 37 37 else { … … 49 49 { 50 50 ASSERT(thisObject->globalObject()); 51 ASSERT(entry->attributes() & BuiltinOrFunctionOrAccessorOrLazyProperty);51 ASSERT(entry->attributes() & PropertyAttribute::BuiltinOrFunctionOrAccessorOrLazyProperty); 52 52 unsigned attributes; 53 bool isAccessor = entry->attributes() & Accessor;53 bool isAccessor = entry->attributes() & PropertyAttribute::Accessor; 54 54 PropertyOffset offset = thisObject->getDirectOffset(vm, propertyName, attributes); 55 55 -
trunk/Source/JavaScriptCore/runtime/Lookup.h
r221849 r222473 74 74 unsigned attributes() const { return m_attributes; } 75 75 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); } 79 79 unsigned char functionLength() const 80 80 { 81 ASSERT(m_attributes & Function);82 if (m_attributes & DOMJITFunction)81 ASSERT(m_attributes & PropertyAttribute::Function); 82 if (m_attributes & PropertyAttribute::DOMJITFunction) 83 83 return signature()->argumentCount; 84 84 return static_cast<unsigned char>(m_values.value2); 85 85 } 86 86 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); } 95 95 BuiltinGenerator builtinAccessorGetterGenerator() const; 96 96 BuiltinGenerator builtinAccessorSetterGenerator() const; 97 97 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; } 99 99 100 100 intptr_t lexerValue() const { ASSERT(!m_attributes); return m_values.value1; } 101 101 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 & Property Callback); 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); } 105 105 }; 106 106 … … 209 209 inline BuiltinGenerator HashTableValue::builtinAccessorGetterGenerator() const 210 210 { 211 ASSERT(m_attributes & Accessor);212 ASSERT(m_attributes & Builtin);211 ASSERT(m_attributes & PropertyAttribute::Accessor); 212 ASSERT(m_attributes & PropertyAttribute::Builtin); 213 213 return reinterpret_cast<BuiltinGenerator>(m_values.value1); 214 214 } … … 216 216 inline BuiltinGenerator HashTableValue::builtinAccessorSetterGenerator() const 217 217 { 218 ASSERT(m_attributes & Accessor);219 ASSERT(m_attributes & Builtin);218 ASSERT(m_attributes & PropertyAttribute::Accessor); 219 ASSERT(m_attributes & PropertyAttribute::Builtin); 220 220 return reinterpret_cast<BuiltinGenerator>(m_values.value2); 221 221 } … … 230 230 return false; 231 231 232 if (entry->attributes() & BuiltinOrFunctionOrAccessorOrLazyProperty)232 if (entry->attributes() & PropertyAttribute::BuiltinOrFunctionOrAccessorOrLazyProperty) 233 233 return setUpStaticFunctionSlot(vm, classInfo, entry, thisObject, propertyName, slot); 234 234 235 if (entry->attributes() & ConstantInteger) {235 if (entry->attributes() & PropertyAttribute::ConstantInteger) { 236 236 slot.setValue(thisObject, attributesForStructure(entry->attributes()), jsNumber(entry->constantInteger())); 237 237 return true; 238 238 } 239 239 240 if (entry->attributes() & DOMJITAttribute) {240 if (entry->attributes() & PropertyAttribute::DOMJITAttribute) { 241 241 const DOMJIT::GetterSetter* domJIT = entry->domJIT(); 242 242 slot.setCacheableCustom(thisObject, attributesForStructure(entry->attributes()), domJIT->getter(), DOMAttributeAnnotation { classInfo, domJIT }); … … 244 244 } 245 245 246 if (entry->attributes() & DOMAttribute) {246 if (entry->attributes() & PropertyAttribute::DOMAttribute) { 247 247 slot.setCacheableCustom(thisObject, attributesForStructure(entry->attributes()), entry->propertyGetter(), DOMAttributeAnnotation { classInfo, nullptr }); 248 248 return true; … … 272 272 auto scope = DECLARE_THROW_SCOPE(vm); 273 273 274 if (entry->attributes() & BuiltinOrFunctionOrLazyProperty) {275 if (!(entry->attributes() & ReadOnly)) {274 if (entry->attributes() & PropertyAttribute::BuiltinOrFunctionOrLazyProperty) { 275 if (!(entry->attributes() & PropertyAttribute::ReadOnly)) { 276 276 // If this is a function or lazy property put then we just do the put because 277 277 // logically the object already had the property, so this is just a replace. … … 283 283 } 284 284 285 if (entry->attributes() & Accessor)285 if (entry->attributes() & PropertyAttribute::Accessor) 286 286 return typeError(exec, scope, slot.isStrictMode(), ASCIILiteral(ReadonlyPropertyWriteError)); 287 287 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); 292 292 bool result = callCustomSetter(exec, entry->propertyPutter(), isAccessor, updateThisValue, value); 293 293 RETURN_IF_EXCEPTION(scope, false); … … 320 320 inline void reifyStaticProperty(VM& vm, const ClassInfo* classInfo, const PropertyName& propertyName, const HashTableValue& value, JSObject& thisObj) 321 321 { 322 if (value.attributes() & Builtin) {323 if (value.attributes() & Accessor)322 if (value.attributes() & PropertyAttribute::Builtin) { 323 if (value.attributes() & PropertyAttribute::Accessor) 324 324 reifyStaticAccessor(vm, value, thisObj, propertyName); 325 325 else … … 328 328 } 329 329 330 if (value.attributes() & Function) {331 if (value.attributes() & DOMJITFunction) {330 if (value.attributes() & PropertyAttribute::Function) { 331 if (value.attributes() & PropertyAttribute::DOMJITFunction) { 332 332 thisObj.putDirectNativeFunction( 333 333 vm, thisObj.globalObject(), propertyName, value.functionLength(), … … 341 341 } 342 342 343 if (value.attributes() & ConstantInteger) {343 if (value.attributes() & PropertyAttribute::ConstantInteger) { 344 344 thisObj.putDirect(vm, propertyName, jsNumber(value.constantInteger()), attributesForStructure(value.attributes())); 345 345 return; 346 346 } 347 347 348 if (value.attributes() & Accessor) {348 if (value.attributes() & PropertyAttribute::Accessor) { 349 349 reifyStaticAccessor(vm, value, thisObj, propertyName); 350 350 return; 351 351 } 352 352 353 if (value.attributes() & CellProperty) {353 if (value.attributes() & PropertyAttribute::CellProperty) { 354 354 LazyCellProperty* property = bitwise_cast<LazyCellProperty*>( 355 355 bitwise_cast<char*>(&thisObj) + value.lazyCellPropertyOffset()); … … 359 359 } 360 360 361 if (value.attributes() & ClassStructure) {361 if (value.attributes() & PropertyAttribute::ClassStructure) { 362 362 LazyClassStructure* structure = bitwise_cast<LazyClassStructure*>( 363 363 bitwise_cast<char*>(&thisObj) + value.lazyClassStructureOffset()); … … 366 366 } 367 367 368 if (value.attributes() & Property Callback) {368 if (value.attributes() & PropertyAttribute::PropertyCallback) { 369 369 JSValue result = value.lazyPropertyCallback()(vm, &thisObj); 370 370 thisObj.putDirect(vm, propertyName, result, attributesForStructure(value.attributes())); … … 372 372 } 373 373 374 if (value.attributes() & DOMJITAttribute) {374 if (value.attributes() & PropertyAttribute::DOMJITAttribute) { 375 375 ASSERT_WITH_MESSAGE(classInfo, "DOMJITAttribute should have class info for type checking."); 376 376 const DOMJIT::GetterSetter* domJIT = value.domJIT(); … … 380 380 } 381 381 382 if (value.attributes() & DOMAttribute) {382 if (value.attributes() & PropertyAttribute::DOMAttribute) { 383 383 ASSERT_WITH_MESSAGE(classInfo, "DOMAttribute should have class info for type checking."); 384 384 auto* customGetterSetter = DOMAttributeGetterSetter::create(vm, value.propertyGetter(), value.propertyPutter(), DOMAttributeAnnotation { classInfo, nullptr }); -
trunk/Source/JavaScriptCore/runtime/MapConstructor.cpp
r221849 r222473 43 43 { 44 44 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); 48 48 } 49 49 -
trunk/Source/JavaScriptCore/runtime/MapIteratorPrototype.cpp
r221110 r222473 40 40 vm.prototypeMap.addPrototype(this); 41 41 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); 44 44 } 45 45 -
trunk/Source/JavaScriptCore/runtime/MapPrototype.cpp
r221417 r222473 63 63 vm.prototypeMap.addPrototype(this); 64 64 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); 70 70 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); 73 73 74 74 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); 78 78 79 JSC_NATIVE_GETTER(vm.propertyNames->size, mapProtoFuncSize, DontEnum |Accessor);79 JSC_NATIVE_GETTER(vm.propertyNames->size, mapProtoFuncSize, PropertyAttribute::DontEnum | PropertyAttribute::Accessor); 80 80 } 81 81 -
trunk/Source/JavaScriptCore/runtime/MathObject.cpp
r217108 r222473 79 79 ASSERT(inherits(vm, info())); 80 80 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)); 126 126 } 127 127 -
trunk/Source/JavaScriptCore/runtime/NativeErrorConstructor.cpp
r217108 r222473 47 47 NativeErrorPrototype* prototype = NativeErrorPrototype::create(vm, prototypeStructure, name, this); 48 48 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); 51 51 m_errorStructure.set(vm, this, ErrorInstance::createStructure(vm, globalObject, prototype)); 52 52 ASSERT(m_errorStructure); -
trunk/Source/JavaScriptCore/runtime/NativeErrorPrototype.cpp
r198469 r222473 37 37 { 38 38 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)); 42 42 } 43 43 -
trunk/Source/JavaScriptCore/runtime/NumberConstructor.cpp
r218449 r222473 64 64 ASSERT(inherits(vm, info())); 65 65 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); 68 68 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); 77 77 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)); 80 80 } 81 81 -
trunk/Source/JavaScriptCore/runtime/NumberPrototype.cpp
r221954 r222473 79 79 setInternalValue(vm, jsNumber(0)); 80 80 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); 82 82 #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)); 84 84 #endif // ENABLE(INTL) 85 85 -
trunk/Source/JavaScriptCore/runtime/ObjectConstructor.cpp
r222017 r222473 100 100 Base::finishCreation(vm, objectPrototype->classInfo(vm)->className); 101 101 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); 109 109 } 110 110 … … 327 327 if (!hasProperty) 328 328 return; 329 if (slot.attributes() & DontEnum)329 if (slot.attributes() & PropertyAttribute::DontEnum) 330 330 return; 331 331 … … 395 395 if (!hasProperty) 396 396 return; 397 if (slot.attributes() & DontEnum)397 if (slot.attributes() & PropertyAttribute::DontEnum) 398 398 return; 399 399 … … 533 533 if (!success) 534 534 return JSValue::encode(jsNull()); 535 ASSERT((descriptor.attributes() & Accessor) || (!descriptor.isAccessorDescriptor()));535 ASSERT((descriptor.attributes() & PropertyAttribute::Accessor) || (!descriptor.isAccessorDescriptor())); 536 536 scope.assertNoException(); 537 537 obj->methodTable(vm)->defineOwnProperty(obj, exec, propertyName, descriptor, true); -
trunk/Source/JavaScriptCore/runtime/ObjectPrototype.cpp
r221849 r222473 59 59 vm.prototypeMap.addPrototype(this); 60 60 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); 71 71 } 72 72 … … 220 220 return getterSetter->isGetterNull() ? JSValue::encode(jsUndefined()) : JSValue::encode(getterSetter->getter()); 221 221 } 222 if (slot.attributes() & CustomAccessor) {222 if (slot.attributes() & PropertyAttribute::CustomAccessor) { 223 223 PropertyDescriptor descriptor; 224 224 ASSERT(slot.slotBase()); … … 250 250 return getterSetter->isSetterNull() ? JSValue::encode(jsUndefined()) : JSValue::encode(getterSetter->setter()); 251 251 } 252 if (slot.attributes() & CustomAccessor) {252 if (slot.attributes() & PropertyAttribute::CustomAccessor) { 253 253 PropertyDescriptor descriptor; 254 254 ASSERT(slot.slotBase()); -
trunk/Source/JavaScriptCore/runtime/ProgramExecutable.cpp
r219981 r222473 191 191 } 192 192 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)); 194 194 newEntry.prepareToWatch(); 195 195 symbolTable->add(locker, entry.key.get(), newEntry); -
trunk/Source/JavaScriptCore/runtime/PropertyDescriptor.cpp
r206386 r222473 34 34 35 35 namespace JSC { 36 unsigned PropertyDescriptor::defaultAttributes = DontDelete | DontEnum |ReadOnly;36 unsigned PropertyDescriptor::defaultAttributes = PropertyAttribute::DontDelete | PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly; 37 37 38 38 bool PropertyDescriptor::writable() const 39 39 { 40 40 ASSERT(!isAccessorDescriptor()); 41 return !(m_attributes & ReadOnly);41 return !(m_attributes & PropertyAttribute::ReadOnly); 42 42 } 43 43 44 44 bool PropertyDescriptor::enumerable() const 45 45 { 46 return !(m_attributes & DontEnum);46 return !(m_attributes & PropertyAttribute::DontEnum); 47 47 } 48 48 49 49 bool PropertyDescriptor::configurable() const 50 50 { 51 return !(m_attributes & DontDelete);51 return !(m_attributes & PropertyAttribute::DontDelete); 52 52 } 53 53 … … 70 70 { 71 71 m_value = jsUndefined(); 72 m_attributes = ReadOnly | DontDelete |DontEnum;72 m_attributes = PropertyAttribute::ReadOnly | PropertyAttribute::DontDelete | PropertyAttribute::DontEnum; 73 73 } 74 74 … … 119 119 m_attributes = attributes; 120 120 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! 122 122 123 123 GetterSetter* accessor = asGetterSetter(value); … … 133 133 void PropertyDescriptor::setCustomDescriptor(unsigned attributes) 134 134 { 135 m_attributes = attributes | Accessor |CustomAccessor;136 m_attributes &= ~ ReadOnly;135 m_attributes = attributes | PropertyAttribute::Accessor | PropertyAttribute::CustomAccessor; 136 m_attributes &= ~PropertyAttribute::ReadOnly; 137 137 m_seenAttributes = EnumerablePresent | ConfigurablePresent; 138 138 setGetter(jsUndefined()); … … 143 143 void PropertyDescriptor::setAccessorDescriptor(GetterSetter* accessor, unsigned attributes) 144 144 { 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! 147 147 148 148 m_attributes = attributes; … … 155 155 { 156 156 if (writable) 157 m_attributes &= ~ ReadOnly;157 m_attributes &= ~PropertyAttribute::ReadOnly; 158 158 else 159 m_attributes |= ReadOnly;159 m_attributes |= PropertyAttribute::ReadOnly; 160 160 m_seenAttributes |= WritablePresent; 161 161 } … … 164 164 { 165 165 if (enumerable) 166 m_attributes &= ~ DontEnum;166 m_attributes &= ~PropertyAttribute::DontEnum; 167 167 else 168 m_attributes |= DontEnum;168 m_attributes |= PropertyAttribute::DontEnum; 169 169 m_seenAttributes |= EnumerablePresent; 170 170 } … … 173 173 { 174 174 if (configurable) 175 m_attributes &= ~ DontDelete;175 m_attributes &= ~PropertyAttribute::DontDelete; 176 176 else 177 m_attributes |= DontDelete;177 m_attributes |= PropertyAttribute::DontDelete; 178 178 m_seenAttributes |= ConfigurablePresent; 179 179 } … … 182 182 { 183 183 m_setter = setter; 184 m_attributes |= Accessor;185 m_attributes &= ~ ReadOnly;184 m_attributes |= PropertyAttribute::Accessor; 185 m_attributes &= ~PropertyAttribute::ReadOnly; 186 186 } 187 187 … … 189 189 { 190 190 m_getter = getter; 191 m_attributes |= Accessor;192 m_attributes &= ~ ReadOnly;191 m_attributes |= PropertyAttribute::Accessor; 192 m_attributes &= ~PropertyAttribute::ReadOnly; 193 193 } 194 194 … … 209 209 unsigned mismatch = other.m_attributes ^ m_attributes; 210 210 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) 216 216 return false; 217 217 return true; … … 222 222 unsigned currentAttributes = current.m_attributes; 223 223 if (isDataDescriptor() && current.isAccessorDescriptor()) 224 currentAttributes |= ReadOnly;224 currentAttributes |= PropertyAttribute::ReadOnly; 225 225 unsigned overrideMask = 0; 226 226 if (writablePresent()) 227 overrideMask |= ReadOnly;227 overrideMask |= PropertyAttribute::ReadOnly; 228 228 if (enumerablePresent()) 229 overrideMask |= DontEnum;229 overrideMask |= PropertyAttribute::DontEnum; 230 230 if (configurablePresent()) 231 overrideMask |= DontDelete;231 overrideMask |= PropertyAttribute::DontDelete; 232 232 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 40 40 // FIXME: Remove this differences in custom values and custom accessors. 41 41 // 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()); 43 43 if (auto domAttribute = this->domAttribute()) { 44 44 VM& vm = exec->vm(); -
trunk/Source/JavaScriptCore/runtime/PropertySlot.h
r219981 r222473 36 36 // ECMA 262-3 8.6.1 37 37 // Property attributes 38 enum Attribute : unsigned {38 enum class PropertyAttribute : unsigned { 39 39 None = 0, 40 40 ReadOnly = 1 << 1, // property can be only read, not written … … 60 60 }; 61 61 62 static constexpr unsigned operator| (PropertyAttribute a, PropertyAttribute b) { return static_cast<unsigned>(a) | static_cast<unsigned>(b); } 63 static constexpr unsigned operator| (unsigned a, PropertyAttribute b) { return a | static_cast<unsigned>(b); } 64 static constexpr unsigned operator| (PropertyAttribute a, unsigned b) { return static_cast<unsigned>(a) | b; } 65 static constexpr unsigned operator&(unsigned a, PropertyAttribute b) { return a & static_cast<unsigned>(b); } 66 static constexpr bool operator<(PropertyAttribute a, PropertyAttribute b) { return static_cast<unsigned>(a) < static_cast<unsigned>(b); } 67 static constexpr unsigned operator~(PropertyAttribute a) { return ~static_cast<unsigned>(a); } 68 static constexpr bool operator<(PropertyAttribute a, unsigned b) { return static_cast<unsigned>(a) < b; } 69 static inline unsigned& operator|=(unsigned& a, PropertyAttribute b) { return a |= static_cast<unsigned>(b); } 70 62 71 enum CacheabilityType : uint8_t { 63 72 CachingDisallowed, … … 334 343 { 335 344 m_data.value = JSValue::encode(jsUndefined()); 336 m_attributes = ReadOnly | DontDelete |DontEnum;345 m_attributes = PropertyAttribute::ReadOnly | PropertyAttribute::DontDelete | PropertyAttribute::DontEnum; 337 346 338 347 m_slotBase = 0; -
trunk/Source/JavaScriptCore/runtime/ProxyConstructor.cpp
r217108 r222473 71 71 JSObject* result = constructEmptyObject(exec); 72 72 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)); 75 75 76 76 return JSValue::encode(result); … … 87 87 Base::finishCreation(vm, name); 88 88 89 putDirect(vm, vm.propertyNames->length, jsNumber(2), DontEnum |ReadOnly);89 putDirect(vm, vm.propertyNames->length, jsNumber(2), PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly); 90 90 putDirect(vm, makeIdentifier(vm, "revocable"), JSFunction::create(vm, globalObject, 2, ASCIILiteral("revocable"), makeRevocableProxy, NoIntrinsic, proxyRevocableConstructorThrowError)); 91 91 } -
trunk/Source/JavaScriptCore/runtime/ProxyObject.cpp
r222071 r222473 313 313 } 314 314 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. 316 316 317 317 auto performDefaultHasProperty = [&] { -
trunk/Source/JavaScriptCore/runtime/ProxyRevoke.cpp
r221475 r222473 53 53 m_proxy.set(vm, this, proxy); 54 54 55 putDirect(vm, vm.propertyNames->length, jsNumber(0), ReadOnly |DontEnum);55 putDirect(vm, vm.propertyNames->length, jsNumber(0), PropertyAttribute::ReadOnly | PropertyAttribute::DontEnum); 56 56 } 57 57 -
trunk/Source/JavaScriptCore/runtime/ReflectObject.cpp
r221849 r222473 84 84 ASSERT(inherits(vm, info())); 85 85 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); 88 88 } 89 89 … … 144 144 if (UNLIKELY(!success)) 145 145 return encodedJSValue(); 146 ASSERT((descriptor.attributes() & Accessor) || (!descriptor.isAccessorDescriptor()));146 ASSERT((descriptor.attributes() & PropertyAttribute::Accessor) || (!descriptor.isAccessorDescriptor())); 147 147 scope.assertNoException(); 148 148 -
trunk/Source/JavaScriptCore/runtime/RegExpConstructor.cpp
r221849 r222473 89 89 ASSERT(inherits(vm, info())); 90 90 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); 95 95 } 96 96 -
trunk/Source/JavaScriptCore/runtime/RegExpObject.cpp
r221849 r222473 66 66 if (propertyName == vm.propertyNames->lastIndex) { 67 67 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; 69 69 slot.setValue(regExp, attributes, regExp->getLastIndex()); 70 70 return true; -
trunk/Source/JavaScriptCore/runtime/RegExpPrototype.cpp
r222336 r222473 68 68 Base::finishCreation(vm); 69 69 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)); 86 86 87 87 m_emptyRegExp.set(vm, this, RegExp::create(vm, "", NoFlags)); -
trunk/Source/JavaScriptCore/runtime/ScopedArguments.cpp
r217108 r222473 125 125 RELEASE_ASSERT(!m_overrodeThings); 126 126 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)); 130 130 131 131 m_overrodeThings = true; -
trunk/Source/JavaScriptCore/runtime/SetConstructor.cpp
r221849 r222473 43 43 { 44 44 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); 48 48 } 49 49 -
trunk/Source/JavaScriptCore/runtime/SetIteratorPrototype.cpp
r221110 r222473 40 40 vm.prototypeMap.addPrototype(this); 41 41 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); 44 44 } 45 45 -
trunk/Source/JavaScriptCore/runtime/SetPrototype.cpp
r221417 r222473 62 62 vm.prototypeMap.addPrototype(this); 63 63 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); 70 70 71 71 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); 76 76 77 JSC_NATIVE_GETTER(vm.propertyNames->size, setProtoFuncSize, DontEnum |Accessor);77 JSC_NATIVE_GETTER(vm.propertyNames->size, setProtoFuncSize, PropertyAttribute::DontEnum | PropertyAttribute::Accessor); 78 78 } 79 79 -
trunk/Source/JavaScriptCore/runtime/SparseArrayValueMap.cpp
r217108 r222473 146 146 } 147 147 148 if (entry.attributes & ReadOnly)148 if (entry.attributes & PropertyAttribute::ReadOnly) 149 149 return typeError(exec, scope, shouldThrow, ASCIILiteral(ReadonlyPropertyWriteError)); 150 150 … … 177 177 auto scope = DECLARE_THROW_SCOPE(vm); 178 178 179 if (!(attributes & Accessor)) {180 if (attributes & ReadOnly)179 if (!(attributes & PropertyAttribute::Accessor)) { 180 if (attributes & PropertyAttribute::ReadOnly) 181 181 return typeError(exec, scope, shouldThrow, ASCIILiteral(ReadonlyPropertyWriteError)); 182 182 -
trunk/Source/JavaScriptCore/runtime/StringConstructor.cpp
r217108 r222473 61 61 { 62 62 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); 65 65 } 66 66 -
trunk/Source/JavaScriptCore/runtime/StringIteratorPrototype.cpp
r217108 r222473 49 49 Base::finishCreation(vm); 50 50 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); 52 52 vm.prototypeMap.addPrototype(this); 53 53 } -
trunk/Source/JavaScriptCore/runtime/StringPrototype.cpp
r222136 r222473 131 131 ASSERT(inherits(vm, info())); 132 132 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); 147 147 #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); 151 151 #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); 155 155 #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); 164 164 165 165 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)); 167 167 168 168 // 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); 170 170 } 171 171 -
trunk/Source/JavaScriptCore/runtime/Structure.cpp
r218070 r222473 690 690 for (auto& entry : *table) { 691 691 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); 695 695 } 696 696 } else { … … 728 728 PropertyTable::iterator end = table->end(); 729 729 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)) 731 731 return false; 732 732 } … … 746 746 PropertyTable::iterator end = table->end(); 747 747 for (PropertyTable::iterator iter = table->begin(); iter != end; ++iter) { 748 if (!(iter->attributes & DontDelete))748 if (!(iter->attributes & PropertyAttribute::DontDelete)) 749 749 return false; 750 if (!(iter->attributes & ( ReadOnly |Accessor)))750 if (!(iter->attributes & (PropertyAttribute::ReadOnly | PropertyAttribute::Accessor))) 751 751 return false; 752 752 } … … 1018 1018 PropertyTable::iterator end = table->end(); 1019 1019 for (PropertyTable::iterator iter = table->begin(); iter != end; ++iter) { 1020 ASSERT(!isQuickPropertyAccessAllowedForEnumeration() || !(iter->attributes & DontEnum));1020 ASSERT(!isQuickPropertyAccessAllowedForEnumeration() || !(iter->attributes & PropertyAttribute::DontEnum)); 1021 1021 ASSERT(!isQuickPropertyAccessAllowedForEnumeration() || !iter->key->isSymbol()); 1022 if (!(iter->attributes & DontEnum) || mode.includeDontEnumProperties()) {1022 if (!(iter->attributes & PropertyAttribute::DontEnum) || mode.includeDontEnumProperties()) { 1023 1023 if (iter->key->isSymbol() && !propertyNames.includeSymbolProperties()) 1024 1024 continue; … … 1139 1139 continue; 1140 1140 1141 if (attributes & ( ReadOnly |Accessor))1141 if (attributes & (PropertyAttribute::ReadOnly | PropertyAttribute::Accessor)) 1142 1142 return true; 1143 1143 -
trunk/Source/JavaScriptCore/runtime/StructureInlines.h
r210947 r222473 336 336 337 337 checkConsistency(); 338 if (attributes & DontEnum || propertyName.isSymbol())338 if (attributes & PropertyAttribute::DontEnum || propertyName.isSymbol()) 339 339 setIsQuickPropertyAccessAllowedForEnumeration(false); 340 340 -
trunk/Source/JavaScriptCore/runtime/SymbolConstructor.cpp
r219042 r222473 63 63 64 64 #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);65 putDirectWithoutTransition(vm, Identifier::fromString(&vm, #name), Symbol::create(vm, static_cast<SymbolImpl&>(*vm.propertyNames->name##Symbol.impl())), PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly); 66 66 67 67 void SymbolConstructor::finishCreation(VM& vm, SymbolPrototype* prototype) 68 68 { 69 69 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); 72 72 73 73 JSC_COMMON_PRIVATE_IDENTIFIERS_EACH_WELL_KNOWN_SYMBOL(INITIALIZE_WELL_KNOWN_SYMBOLS) -
trunk/Source/JavaScriptCore/runtime/SymbolPrototype.cpp
r218794 r222473 61 61 { 62 62 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); 64 64 ASSERT(inherits(vm, info())); 65 65 66 66 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); 68 68 } 69 69 -
trunk/Source/JavaScriptCore/runtime/SymbolTable.h
r208761 r222473 144 144 unsigned attributes = 0; 145 145 if (isReadOnly()) 146 attributes |= ReadOnly;146 attributes |= PropertyAttribute::ReadOnly; 147 147 if (isDontEnum()) 148 attributes |= DontEnum;148 attributes |= PropertyAttribute::DontEnum; 149 149 return attributes; 150 150 } … … 176 176 { 177 177 ASSERT(isValidVarOffset(offset)); 178 pack(offset, true, attributes & ReadOnly, attributes &DontEnum);178 pack(offset, true, attributes & PropertyAttribute::ReadOnly, attributes & PropertyAttribute::DontEnum); 179 179 } 180 180 … … 262 262 void setAttributes(unsigned attributes) 263 263 { 264 pack(varOffset(), isWatchable(), attributes & ReadOnly, attributes &DontEnum);264 pack(varOffset(), isWatchable(), attributes & PropertyAttribute::ReadOnly, attributes & PropertyAttribute::DontEnum); 265 265 } 266 266 -
trunk/Source/JavaScriptCore/runtime/TemplateRegistry.cpp
r216428 r222473 61 61 auto cooked = templateKey.cookedStrings()[index]; 62 62 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); 64 64 else 65 templateObject->putDirectIndex(exec, index, jsUndefined(), ReadOnly |DontDelete, PutDirectIndexLikePutDirect);65 templateObject->putDirectIndex(exec, index, jsUndefined(), PropertyAttribute::ReadOnly | PropertyAttribute::DontDelete, PutDirectIndexLikePutDirect); 66 66 RETURN_IF_EXCEPTION(scope, nullptr); 67 67 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); 69 69 RETURN_IF_EXCEPTION(scope, nullptr); 70 70 } … … 73 73 scope.assertNoException(); 74 74 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); 76 76 77 77 // Template JSArray hold the reference to JSTemplateRegistryKey to make TemplateRegistryKey pointer live until this JSArray is collected. 78 78 // 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); 80 80 81 81 objectConstructorFreeze(exec, templateObject); -
trunk/Source/JavaScriptCore/runtime/WeakMapConstructor.cpp
r217108 r222473 42 42 { 43 43 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); 46 46 } 47 47 -
trunk/Source/JavaScriptCore/runtime/WeakMapPrototype.cpp
r221959 r222473 46 46 vm.prototypeMap.addPrototype(this); 47 47 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); 52 52 53 putDirectWithoutTransition(vm, vm.propertyNames->toStringTagSymbol, jsString(&vm, "WeakMap"), DontEnum |ReadOnly);53 putDirectWithoutTransition(vm, vm.propertyNames->toStringTagSymbol, jsString(&vm, "WeakMap"), PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly); 54 54 } 55 55 -
trunk/Source/JavaScriptCore/runtime/WeakSetConstructor.cpp
r217108 r222473 42 42 { 43 43 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); 46 46 } 47 47 -
trunk/Source/JavaScriptCore/runtime/WeakSetPrototype.cpp
r221959 r222473 45 45 vm.prototypeMap.addPrototype(this); 46 46 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); 50 50 51 putDirectWithoutTransition(vm, vm.propertyNames->toStringTagSymbol, jsString(&vm, "WeakSet"), DontEnum |ReadOnly);51 putDirectWithoutTransition(vm, vm.propertyNames->toStringTagSymbol, jsString(&vm, "WeakSet"), PropertyAttribute::DontEnum | PropertyAttribute::ReadOnly); 52 52 } 53 53 -
trunk/Source/JavaScriptCore/tools/JSDollarVMPrototype.cpp
r221822 r222473 453 453 addFunction(vm, globalObject, "crash", functionCrash, 0); 454 454 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)); 456 456 457 457 addFunction(vm, globalObject, "llintTrue", functionLLintTrue, 0); -
trunk/Source/JavaScriptCore/wasm/js/WebAssemblyCompileErrorConstructor.cpp
r217108 r222473 77 77 { 78 78 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); 81 81 } 82 82 -
trunk/Source/JavaScriptCore/wasm/js/WebAssemblyInstanceConstructor.cpp
r217645 r222473 106 106 { 107 107 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); 110 110 } 111 111 -
trunk/Source/JavaScriptCore/wasm/js/WebAssemblyLinkErrorConstructor.cpp
r217108 r222473 77 77 { 78 78 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); 81 81 } 82 82 -
trunk/Source/JavaScriptCore/wasm/js/WebAssemblyMemoryConstructor.cpp
r218951 r222473 129 129 { 130 130 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); 133 133 } 134 134 -
trunk/Source/JavaScriptCore/wasm/js/WebAssemblyModuleConstructor.cpp
r221849 r222473 203 203 { 204 204 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); 207 207 } 208 208 -
trunk/Source/JavaScriptCore/wasm/js/WebAssemblyRuntimeErrorConstructor.cpp
r217108 r222473 77 77 { 78 78 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); 81 81 } 82 82 -
trunk/Source/JavaScriptCore/wasm/js/WebAssemblyTableConstructor.cpp
r217645 r222473 117 117 { 118 118 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); 121 121 } 122 122
Note:
See TracChangeset
for help on using the changeset viewer.