Changeset 137937 in webkit for trunk/Source/JavaScriptCore/bytecode/ArrayProfile.h
- Timestamp:
- Dec 17, 2012, 1:38:51 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/bytecode/ArrayProfile.h
r137379 r137937 122 122 , m_lastSeenStructure(0) 123 123 , m_expectedStructure(0) 124 , m_structureIsPolymorphic(false)125 124 , m_mayStoreToHole(false) 125 , m_outOfBounds(false) 126 126 , m_mayInterceptIndexedAccesses(false) 127 127 , m_usesOriginalArrayStructures(true) … … 134 134 , m_lastSeenStructure(0) 135 135 , m_expectedStructure(0) 136 , m_structureIsPolymorphic(false)137 136 , m_mayStoreToHole(false) 137 , m_outOfBounds(false) 138 138 , m_mayInterceptIndexedAccesses(false) 139 139 , m_usesOriginalArrayStructures(true) … … 147 147 ArrayModes* addressOfArrayModes() { return &m_observedArrayModes; } 148 148 bool* addressOfMayStoreToHole() { return &m_mayStoreToHole; } 149 bool* addressOfOutOfBounds() { return &m_outOfBounds; } 149 150 150 151 void observeStructure(Structure* structure) … … 155 156 void computeUpdatedPrediction(CodeBlock*, OperationInProgress = NoOperation); 156 157 157 Structure* expectedStructure() const { return m_expectedStructure; } 158 Structure* expectedStructure() const 159 { 160 if (structureIsPolymorphic()) 161 return 0; 162 return m_expectedStructure; 163 } 158 164 bool structureIsPolymorphic() const 159 165 { 160 return m_ structureIsPolymorphic;166 return m_expectedStructure == polymorphicStructure(); 161 167 } 162 168 bool hasDefiniteStructure() const … … 169 175 170 176 bool mayStoreToHole() const { return m_mayStoreToHole; } 177 bool outOfBounds() const { return m_outOfBounds; } 171 178 172 179 bool usesOriginalArrayStructures() const { return m_usesOriginalArrayStructures; } … … 176 183 private: 177 184 friend class LLIntOffsetsExtractor; 185 186 static Structure* polymorphicStructure() { return static_cast<Structure*>(reinterpret_cast<void*>(1)); } 178 187 179 188 unsigned m_bytecodeOffset; 180 189 Structure* m_lastSeenStructure; 181 190 Structure* m_expectedStructure; 182 bool m_structureIsPolymorphic;183 191 bool m_mayStoreToHole; // This flag may become overloaded to indicate other special cases that were encountered during array access, as it depends on indexing type. Since we currently have basically just one indexing type (two variants of ArrayStorage), this flag for now just means exactly what its name implies. 192 bool m_outOfBounds; 184 193 bool m_mayInterceptIndexedAccesses; 185 194 bool m_usesOriginalArrayStructures;
Note:
See TracChangeset
for help on using the changeset viewer.