Changeset 44076 in webkit for trunk/JavaScriptCore/runtime/Structure.h
- Timestamp:
- May 22, 2009, 6:48:32 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/runtime/Structure.h
r43432 r44076 62 62 static void dumpStatistics(); 63 63 64 static PassRefPtr<Structure> addPropertyTransition(Structure*, const Identifier& propertyName, unsigned attributes, size_t& offset);65 static PassRefPtr<Structure> addPropertyTransitionToExistingStructure(Structure*, const Identifier& propertyName, unsigned attributes, size_t& offset);64 static PassRefPtr<Structure> addPropertyTransition(Structure*, const Identifier& propertyName, unsigned attributes, JSCell* specificValue, size_t& offset); 65 static PassRefPtr<Structure> addPropertyTransitionToExistingStructure(Structure*, const Identifier& propertyName, unsigned attributes, JSCell* specificValue, size_t& offset); 66 66 static PassRefPtr<Structure> removePropertyTransition(Structure*, const Identifier& propertyName, size_t& offset); 67 67 static PassRefPtr<Structure> changePrototypeTransition(Structure*, JSValue prototype); 68 static PassRefPtr<Structure> changeFunctionTransition(Structure*, const Identifier&); 68 69 static PassRefPtr<Structure> getterSetterTransition(Structure*); 69 70 static PassRefPtr<Structure> toDictionaryTransition(Structure*); … … 79 80 80 81 // These should be used with caution. 81 size_t addPropertyWithoutTransition(const Identifier& propertyName, unsigned attributes );82 size_t addPropertyWithoutTransition(const Identifier& propertyName, unsigned attributes, JSCell* specificValue); 82 83 size_t removePropertyWithoutTransition(const Identifier& propertyName); 83 84 void setPrototypeWithoutTransition(JSValue prototype) { m_prototype = prototype; } … … 99 100 100 101 size_t get(const Identifier& propertyName); 101 size_t get(const Identifier& propertyName, unsigned& attributes); 102 size_t get(const UString::Rep* rep, unsigned& attributes, JSCell*& specificValue); 103 size_t get(const Identifier& propertyName, unsigned& attributes, JSCell*& specificValue) 104 { 105 ASSERT(!propertyName.isNull()); 106 return get(propertyName._ustring.rep(), attributes, specificValue); 107 } 108 102 109 void getEnumerablePropertyNames(ExecState*, PropertyNameArray&, JSObject*); 103 110 … … 107 114 bool isEmpty() const { return m_propertyTable ? !m_propertyTable->keyCount : m_offset == noOffset; } 108 115 116 JSCell* specificValue() { return m_specificValueInPrevious; } 117 109 118 private: 110 119 Structure(JSValue prototype, const TypeInfo&); 111 120 112 size_t put(const Identifier& propertyName, unsigned attributes );121 size_t put(const Identifier& propertyName, unsigned attributes, JSCell* specificValue); 113 122 size_t remove(const Identifier& propertyName); 114 123 void getEnumerableNamesFromPropertyTable(PropertyNameArray&); … … 123 132 void checkConsistency(); 124 133 134 bool despecifyFunction(const Identifier&); 135 125 136 PropertyMapHashTable* copyPropertyTable(); 126 137 void materializePropertyMap(); … … 160 171 StructureTransitionTable* table; 161 172 } m_transitions; 173 JSCell* m_specificValueInPrevious; 162 174 163 175 RefPtr<PropertyNameArrayData> m_cachedPropertyNameArrayData;
Note:
See TracChangeset
for help on using the changeset viewer.