Changeset 165603 in webkit for trunk/Source/JavaScriptCore/runtime/JSObject.cpp
- Timestamp:
- Mar 13, 2014, 11:45:39 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/runtime/JSObject.cpp
r165497 r165603 76 76 static inline void getClassPropertyNames(ExecState* exec, const ClassInfo* classInfo, PropertyNameArray& propertyNames, EnumerationMode mode, bool didReify) 77 77 { 78 VM& vm = exec->vm(); 79 78 80 // Add properties from the static hashtables of properties 79 81 for (; classInfo; classInfo = classInfo->parentClass) { 80 const HashTable* table = classInfo->propHashTable( exec);82 const HashTable* table = classInfo->propHashTable(vm); 81 83 if (!table) 82 84 continue; 83 table->initializeIfNeeded(exec); 84 ASSERT(table->table); 85 86 int hashSizeMask = table->compactSize - 1; 87 const HashEntry* entry = table->table; 88 for (int i = 0; i <= hashSizeMask; ++i, ++entry) { 89 if (entry->key() && (!(entry->attributes() & DontEnum) || (mode == IncludeDontEnumProperties)) && !((entry->attributes() & BuiltinOrFunction) && didReify)) 90 propertyNames.add(entry->key()); 85 86 for (auto iter = table->begin(vm); iter != table->end(vm); ++iter) { 87 if ((!(iter->attributes() & DontEnum) || (mode == IncludeDontEnumProperties)) && !((iter->attributes() & BuiltinOrFunction) && didReify)) 88 propertyNames.add(iter.key()); 91 89 } 92 90 } … … 397 395 const ClassInfo* info = obj->classInfo(); 398 396 if (info->hasStaticSetterOrReadonlyProperties(vm)) { 399 if (const Hash Entry* entry = obj->findPropertyHashEntry(vm, propertyName)) {397 if (const HashTableValue* entry = obj->findPropertyHashEntry(vm, propertyName)) { 400 398 putEntry(exec, entry, obj, propertyName, value, slot); 401 399 return; … … 1274 1272 1275 1273 // Look in the static hashtable of properties 1276 const Hash Entry* entry = thisObject->findPropertyHashEntry(vm, propertyName);1274 const HashTableValue* entry = thisObject->findPropertyHashEntry(vm, propertyName); 1277 1275 if (entry) { 1278 1276 if (entry->attributes() & DontDelete && !vm.isInDefineOwnProperty()) … … 1402 1400 } 1403 1401 1404 const Hash Entry* JSObject::findPropertyHashEntry(VM& vm, PropertyName propertyName) const1402 const HashTableValue* JSObject::findPropertyHashEntry(VM& vm, PropertyName propertyName) const 1405 1403 { 1406 1404 for (const ClassInfo* info = classInfo(); info; info = info->parentClass) { 1407 1405 if (const HashTable* propHashTable = info->propHashTable(vm)) { 1408 if (const Hash Entry* entry = propHashTable->entry(vm, propertyName))1406 if (const HashTableValue* entry = propHashTable->entry(vm, propertyName)) 1409 1407 return entry; 1410 1408 } … … 1622 1620 1623 1621 for (const ClassInfo* info = classInfo(); info; info = info->parentClass) { 1624 const HashTable* hashTable = info->propHashTable( globalObject()->globalExec());1622 const HashTable* hashTable = info->propHashTable(vm); 1625 1623 if (!hashTable) 1626 1624 continue; 1627 1625 PropertySlot slot(this); 1628 for ( HashTable::ConstIteratoriter = hashTable->begin(vm); iter != hashTable->end(vm); ++iter) {1626 for (auto iter = hashTable->begin(vm); iter != hashTable->end(vm); ++iter) { 1629 1627 if (iter->attributes() & BuiltinOrFunction) 1630 setUpStaticFunctionSlot(globalObject()->globalExec(), *iter, this, Identifier(&vm, iter->key()), slot);1628 setUpStaticFunctionSlot(globalObject()->globalExec(), iter.value(), this, Identifier(&vm, iter.key()), slot); 1631 1629 } 1632 1630 }
Note:
See TracChangeset
for help on using the changeset viewer.