Changeset 47601 in webkit for trunk/JavaScriptCore/runtime/Structure.h
- Timestamp:
- Aug 20, 2009, 3:36:36 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/runtime/Structure.h
r47022 r47601 106 106 return get(propertyName._ustring.rep(), attributes, specificValue); 107 107 } 108 bool transitionedFor(const JSCell* specificValue) 109 { 110 return m_specificValueInPrevious == specificValue; 111 } 112 bool hasTransition(UString::Rep* rep, unsigned attributes); 113 bool hasTransition(const Identifier& propertyName, unsigned attributes) 114 { 115 return hasTransition(propertyName._ustring.rep(), attributes); 116 } 108 117 109 118 void getEnumerablePropertyNames(ExecState*, PropertyNameArray&, JSObject*); … … 167 176 RefPtr<Structure> m_previous; 168 177 RefPtr<UString::Rep> m_nameInPrevious; 178 JSCell* m_specificValueInPrevious; 169 179 170 180 union { … … 172 182 StructureTransitionTable* table; 173 183 } m_transitions; 174 JSCell* m_specificValueInPrevious;175 184 176 185 RefPtr<PropertyNameArrayData> m_cachedPropertyNameArrayData; … … 232 241 } 233 242 } 234 243 244 bool StructureTransitionTable::contains(const StructureTransitionTableHash::Key& key, JSCell* specificValue) 245 { 246 const TransitionTable::iterator find = m_table.find(key); 247 if (find == m_table.end()) { 248 ASSERT(!m_table.contains(key)); 249 return false; 250 } 251 return find->second.first || find->second.second->transitionedFor(specificValue); 252 } 253 254 Structure* StructureTransitionTable::get(const StructureTransitionTableHash::Key& key, JSCell* specificValue) const 255 { 256 Transition transition = m_table.get(key); 257 if (transition.second && transition.second->transitionedFor(specificValue)) 258 return transition.second; 259 return transition.first; 260 } 235 261 } // namespace JSC 236 262
Note:
See TracChangeset
for help on using the changeset viewer.