diff options
Diffstat (limited to 'Source/JavaScriptCore/bytecode/ArrayProfile.h')
-rw-r--r-- | Source/JavaScriptCore/bytecode/ArrayProfile.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/Source/JavaScriptCore/bytecode/ArrayProfile.h b/Source/JavaScriptCore/bytecode/ArrayProfile.h index 312473f3c..43818d77d 100644 --- a/Source/JavaScriptCore/bytecode/ArrayProfile.h +++ b/Source/JavaScriptCore/bytecode/ArrayProfile.h @@ -36,7 +36,7 @@ namespace JSC { class LLIntOffsetsExtractor; // This is a bitfield where each bit represents an IndexingType that we have seen. -// There are 17 indexing types (0 to 16, inclusive), so 32 bits is more than enough. +// There are 32 indexing types, so an unsigned is enough. typedef unsigned ArrayModes; #define asArrayModes(type) \ @@ -44,7 +44,7 @@ typedef unsigned ArrayModes; inline ArrayModes arrayModeFromStructure(Structure* structure) { - return asArrayModes(structure->indexingTypeIncludingHistory()); + return asArrayModes(structure->indexingType()); } class ArrayProfile { @@ -70,6 +70,7 @@ public: unsigned bytecodeOffset() const { return m_bytecodeOffset; } Structure** addressOfLastSeenStructure() { return &m_lastSeenStructure; } + ArrayModes* addressOfArrayModes() { return &m_observedArrayModes; } void observeStructure(Structure* structure) { @@ -79,7 +80,10 @@ public: void computeUpdatedPrediction(OperationInProgress operation = NoOperation); Structure* expectedStructure() const { return m_expectedStructure; } - bool structureIsPolymorphic() const { return m_structureIsPolymorphic; } + bool structureIsPolymorphic() const + { + return m_structureIsPolymorphic; + } bool hasDefiniteStructure() const { return !structureIsPolymorphic() && m_expectedStructure; |