summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore/bytecode
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2012-09-20 14:01:09 +0200
committerSimon Hausmann <simon.hausmann@digia.com>2012-09-20 14:01:09 +0200
commit6dbcd09121fe266c7704a524b5cbd7f2754659c0 (patch)
tree5ae0d16cec0cc61f576d51c57b3a4613c7e91e22 /Source/JavaScriptCore/bytecode
parent6bbb7fbbac94d0f511a7bd0cbd50854ab643bfb2 (diff)
downloadqtwebkit-6dbcd09121fe266c7704a524b5cbd7f2754659c0.tar.gz
Imported WebKit commit 080af0beaa6f0ba8ff8f44cb8bd8b5dcf75ac0af (http://svn.webkit.org/repository/webkit/trunk@129119)
New snapshot with prospective build fix for incorrect QtWebKit master module header file creation
Diffstat (limited to 'Source/JavaScriptCore/bytecode')
-rw-r--r--Source/JavaScriptCore/bytecode/ArrayProfile.cpp2
-rw-r--r--Source/JavaScriptCore/bytecode/ArrayProfile.h10
2 files changed, 12 insertions, 0 deletions
diff --git a/Source/JavaScriptCore/bytecode/ArrayProfile.cpp b/Source/JavaScriptCore/bytecode/ArrayProfile.cpp
index 9f4e1ce20..3ba974d74 100644
--- a/Source/JavaScriptCore/bytecode/ArrayProfile.cpp
+++ b/Source/JavaScriptCore/bytecode/ArrayProfile.cpp
@@ -32,6 +32,8 @@ void ArrayProfile::computeUpdatedPrediction(OperationInProgress operation)
{
if (m_lastSeenStructure) {
m_observedArrayModes |= arrayModeFromStructure(m_lastSeenStructure);
+ m_mayInterceptIndexedAccesses |=
+ m_lastSeenStructure->typeInfo().interceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero();
if (!m_structureIsPolymorphic) {
if (!m_expectedStructure)
m_expectedStructure = m_lastSeenStructure;
diff --git a/Source/JavaScriptCore/bytecode/ArrayProfile.h b/Source/JavaScriptCore/bytecode/ArrayProfile.h
index 43818d77d..3b462eaba 100644
--- a/Source/JavaScriptCore/bytecode/ArrayProfile.h
+++ b/Source/JavaScriptCore/bytecode/ArrayProfile.h
@@ -54,6 +54,8 @@ public:
, m_lastSeenStructure(0)
, m_expectedStructure(0)
, m_structureIsPolymorphic(false)
+ , m_mayStoreToHole(false)
+ , m_mayInterceptIndexedAccesses(false)
, m_observedArrayModes(0)
{
}
@@ -63,6 +65,8 @@ public:
, m_lastSeenStructure(0)
, m_expectedStructure(0)
, m_structureIsPolymorphic(false)
+ , m_mayStoreToHole(false)
+ , m_mayInterceptIndexedAccesses(false)
, m_observedArrayModes(0)
{
}
@@ -71,6 +75,7 @@ public:
Structure** addressOfLastSeenStructure() { return &m_lastSeenStructure; }
ArrayModes* addressOfArrayModes() { return &m_observedArrayModes; }
+ bool* addressOfMayStoreToHole() { return &m_mayStoreToHole; }
void observeStructure(Structure* structure)
{
@@ -89,6 +94,9 @@ public:
return !structureIsPolymorphic() && m_expectedStructure;
}
ArrayModes observedArrayModes() const { return m_observedArrayModes; }
+ bool mayInterceptIndexedAccesses() const { return m_mayInterceptIndexedAccesses; }
+
+ bool mayStoreToHole() const { return m_mayStoreToHole; }
private:
friend class LLIntOffsetsExtractor;
@@ -97,6 +105,8 @@ private:
Structure* m_lastSeenStructure;
Structure* m_expectedStructure;
bool m_structureIsPolymorphic;
+ 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.
+ bool m_mayInterceptIndexedAccesses;
ArrayModes m_observedArrayModes;
};