Changeset 36977 in webkit for trunk/JavaScriptCore/kjs/lookup.cpp
- Timestamp:
- Sep 26, 2008, 7:36:15 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/lookup.cpp
r36877 r36977 30 30 HashEntry* entries = new HashEntry[hashSizeMask + 1]; 31 31 for (int i = 0; i <= hashSizeMask; ++i) 32 entries[i]. key = 0;32 entries[i].setKey(0); 33 33 for (int i = 0; values[i].key; ++i) { 34 34 UString::Rep* identifier = Identifier::add(globalData, values[i].key).releaseRef(); 35 35 int hashIndex = identifier->computedHash() & hashSizeMask; 36 ASSERT(!entries[hashIndex].key); 37 entries[hashIndex].key = identifier; 38 entries[hashIndex].integerValue = values[i].value; 39 entries[hashIndex].attributes = values[i].attributes; 40 entries[hashIndex].length = values[i].length; 36 ASSERT(!entries[hashIndex].key()); 37 entries[hashIndex].initialize(identifier, values[i].attributes, values[i].value1, values[i].value2); 41 38 } 42 39 table = entries; … … 47 44 if (table) { 48 45 for (int i = 0; i != hashSizeMask + 1; ++i) { 49 if (UString::Rep* key = table[i].key )46 if (UString::Rep* key = table[i].key()) 50 47 key->deref(); 51 48 } 52 delete [] table;49 delete [] table; 53 50 table = 0; 54 51 } … … 57 54 void setUpStaticFunctionSlot(ExecState* exec, const HashEntry* entry, JSObject* thisObj, const Identifier& propertyName, PropertySlot& slot) 58 55 { 59 ASSERT(entry->attributes & Function);56 ASSERT(entry->attributes() & Function); 60 57 JSValue** location = thisObj->getDirectLocation(propertyName); 61 58 62 59 if (!location) { 63 PrototypeFunction* function = new (exec) PrototypeFunction(exec, entry-> length, propertyName, entry->functionValue);64 thisObj->putDirect(propertyName, function, entry->attributes );60 PrototypeFunction* function = new (exec) PrototypeFunction(exec, entry->functionLength(), propertyName, entry->function()); 61 thisObj->putDirect(propertyName, function, entry->attributes()); 65 62 location = thisObj->getDirectLocation(propertyName); 66 63 } 67 64 68 65 slot.setValueSlot(thisObj, location, thisObj->offsetForLocation(location)); 69 66 }
Note:
See TracChangeset
for help on using the changeset viewer.