Changeset 44171 in webkit for trunk/JavaScriptCore/runtime/JSObject.h
- Timestamp:
- May 26, 2009, 7:47:35 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/runtime/JSObject.h
r44076 r44171 85 85 Structure* inheritorID(); 86 86 87 ConstPropertyStorage propertyStorage() const { return (isUsingInlineStorage() ? m_inlineStorage : m_externalStorage); }88 PropertyStorage propertyStorage() { return (isUsingInlineStorage() ? m_inlineStorage : m_externalStorage); }89 90 87 virtual UString className() const; 91 88 … … 141 138 } 142 139 143 size_t getOffset(const Identifier& propertyName)144 {145 return m_structure->get(propertyName);146 }147 148 140 JSValue* getDirectLocation(const Identifier& propertyName) 149 141 { … … 164 156 } 165 157 166 const JSValue* locationForOffset(size_t offset) const167 {168 return reinterpret_cast<const JSValue*>(&propertyStorage()[offset]);169 }170 171 JSValue* locationForOffset(size_t offset)172 {173 return reinterpret_cast<JSValue*>(&propertyStorage()[offset]);174 }175 176 158 void transitionTo(Structure*); 177 159 … … 224 206 225 207 private: 208 ConstPropertyStorage propertyStorage() const { return (isUsingInlineStorage() ? m_inlineStorage : m_externalStorage); } 209 PropertyStorage propertyStorage() { return (isUsingInlineStorage() ? m_inlineStorage : m_externalStorage); } 210 211 const JSValue* locationForOffset(size_t offset) const 212 { 213 return reinterpret_cast<const JSValue*>(&propertyStorage()[offset]); 214 } 215 216 JSValue* locationForOffset(size_t offset) 217 { 218 return reinterpret_cast<JSValue*>(&propertyStorage()[offset]); 219 } 220 226 221 void putDirectInternal(const Identifier& propertyName, JSValue value, unsigned attr, bool checkReadOnly, PutPropertySlot& slot, JSCell*); 227 222 void putDirectInternal(JSGlobalData&, const Identifier& propertyName, JSValue value, unsigned attr, bool checkReadOnly, PutPropertySlot& slot); … … 427 422 size_t offset = m_structure->get(propertyName, currentAttributes, currentSpecificFunction); 428 423 if (offset != WTF::notFound) { 424 if (currentSpecificFunction && (specificFunction != currentSpecificFunction)) 425 m_structure->despecifyDictionaryFunction(propertyName); 429 426 if (checkReadOnly && currentAttributes & ReadOnly) 430 427 return; 431 428 putDirectOffset(offset, value); 432 slot.setExistingProperty(this, offset); 429 if (!specificFunction && !currentSpecificFunction) 430 slot.setExistingProperty(this, offset); 433 431 return; 434 432 } … … 470 468 471 469 if (currentSpecificFunction && (specificFunction != currentSpecificFunction)) { 472 setStructure(Structure:: changeFunctionTransition(m_structure, propertyName));470 setStructure(Structure::despecifyFunctionTransition(m_structure, propertyName)); 473 471 putDirectOffset(offset, value); 474 472 // Function transitions are not currently cachable, so leave the slot in an uncachable state.
Note:
See TracChangeset
for help on using the changeset viewer.