From cfd86b747d32ac22246a1aa908eaa720c63a88c1 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Wed, 7 Nov 2012 11:22:47 +0100 Subject: Imported WebKit commit 20271caf2e2c016d5cef40184cddeefeac4f1876 (http://svn.webkit.org/repository/webkit/trunk@133733) New snapshot that contains all previous fixes as well as build fix for latest QtMultimedia API changes. --- Source/JavaScriptCore/bytecode/ArrayProfile.cpp | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'Source/JavaScriptCore/bytecode/ArrayProfile.cpp') diff --git a/Source/JavaScriptCore/bytecode/ArrayProfile.cpp b/Source/JavaScriptCore/bytecode/ArrayProfile.cpp index de7f67887..5a87380fd 100644 --- a/Source/JavaScriptCore/bytecode/ArrayProfile.cpp +++ b/Source/JavaScriptCore/bytecode/ArrayProfile.cpp @@ -26,6 +26,7 @@ #include "config.h" #include "ArrayProfile.h" +#include "CodeBlock.h" #include namespace JSC { @@ -38,14 +39,14 @@ const char* arrayModesToString(ArrayModes arrayModes) if (arrayModes == ALL_ARRAY_MODES) return "TOP"; - bool isNonArray = !!(arrayModes & NonArray); - bool isNonArrayWithContiguous = !!(arrayModes & NonArrayWithContiguous); - bool isNonArrayWithArrayStorage = !!(arrayModes & NonArrayWithArrayStorage); - bool isNonArrayWithSlowPutArrayStorage = !!(arrayModes & NonArrayWithSlowPutArrayStorage); - bool isArray = !!(arrayModes & ArrayClass); - bool isArrayWithContiguous = !!(arrayModes & ArrayWithContiguous); - bool isArrayWithArrayStorage = !!(arrayModes & ArrayWithArrayStorage); - bool isArrayWithSlowPutArrayStorage = !!(arrayModes & ArrayWithSlowPutArrayStorage); + bool isNonArray = !!(arrayModes & asArrayModes(NonArray)); + bool isNonArrayWithContiguous = !!(arrayModes & asArrayModes(NonArrayWithContiguous)); + bool isNonArrayWithArrayStorage = !!(arrayModes & asArrayModes(NonArrayWithArrayStorage)); + bool isNonArrayWithSlowPutArrayStorage = !!(arrayModes & asArrayModes(NonArrayWithSlowPutArrayStorage)); + bool isArray = !!(arrayModes & asArrayModes(ArrayClass)); + bool isArrayWithContiguous = !!(arrayModes & asArrayModes(ArrayWithContiguous)); + bool isArrayWithArrayStorage = !!(arrayModes & asArrayModes(ArrayWithArrayStorage)); + bool isArrayWithSlowPutArrayStorage = !!(arrayModes & asArrayModes(ArrayWithSlowPutArrayStorage)); static char result[256]; snprintf( @@ -64,12 +65,14 @@ const char* arrayModesToString(ArrayModes arrayModes) return result; } -void ArrayProfile::computeUpdatedPrediction(OperationInProgress operation) +void ArrayProfile::computeUpdatedPrediction(CodeBlock* codeBlock, OperationInProgress operation) { if (m_lastSeenStructure) { m_observedArrayModes |= arrayModeFromStructure(m_lastSeenStructure); m_mayInterceptIndexedAccesses |= m_lastSeenStructure->typeInfo().interceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero(); + if (!codeBlock->globalObject()->isOriginalArrayStructure(m_lastSeenStructure)) + m_usesOriginalArrayStructures = false; if (!m_structureIsPolymorphic) { if (!m_expectedStructure) m_expectedStructure = m_lastSeenStructure; -- cgit v1.2.1