diff options
author | Lorry Tar Creator <lorry-tar-importer@lorry> | 2016-04-10 09:28:39 +0000 |
---|---|---|
committer | Lorry Tar Creator <lorry-tar-importer@lorry> | 2016-04-10 09:28:39 +0000 |
commit | 32761a6cee1d0dee366b885b7b9c777e67885688 (patch) | |
tree | d6bec92bebfb216f4126356e55518842c2f476a1 /Source/JavaScriptCore/bytecode/ArrayProfile.cpp | |
parent | a4e969f4965059196ca948db781e52f7cfebf19e (diff) | |
download | WebKitGtk-tarball-32761a6cee1d0dee366b885b7b9c777e67885688.tar.gz |
webkitgtk-2.4.11webkitgtk-2.4.11
Diffstat (limited to 'Source/JavaScriptCore/bytecode/ArrayProfile.cpp')
-rw-r--r-- | Source/JavaScriptCore/bytecode/ArrayProfile.cpp | 42 |
1 files changed, 8 insertions, 34 deletions
diff --git a/Source/JavaScriptCore/bytecode/ArrayProfile.cpp b/Source/JavaScriptCore/bytecode/ArrayProfile.cpp index b8ade2223..4c055fea5 100644 --- a/Source/JavaScriptCore/bytecode/ArrayProfile.cpp +++ b/Source/JavaScriptCore/bytecode/ArrayProfile.cpp @@ -27,7 +27,6 @@ #include "ArrayProfile.h" #include "CodeBlock.h" -#include "JSCInlines.h" #include <wtf/CommaPrinter.h> #include <wtf/StringExtras.h> #include <wtf/StringPrintStream.h> @@ -73,53 +72,28 @@ void dumpArrayModes(PrintStream& out, ArrayModes arrayModes) out.print(comma, "ArrayWithArrayStorage"); if (arrayModes & asArrayModes(ArrayWithSlowPutArrayStorage)) out.print(comma, "ArrayWithSlowPutArrayStorage"); - - if (arrayModes & Int8ArrayMode) - out.print(comma, "Int8ArrayMode"); - if (arrayModes & Int16ArrayMode) - out.print(comma, "Int16ArrayMode"); - if (arrayModes & Int32ArrayMode) - out.print(comma, "Int32ArrayMode"); - if (arrayModes & Uint8ArrayMode) - out.print(comma, "Uint8ArrayMode"); - if (arrayModes & Uint8ClampedArrayMode) - out.print(comma, "Uint8ClampedArrayMode"); - if (arrayModes & Uint16ArrayMode) - out.print(comma, "Uint16ArrayMode"); - if (arrayModes & Uint32ArrayMode) - out.print(comma, "Uint32ArrayMode"); - if (arrayModes & Float32ArrayMode) - out.print(comma, "Float32ArrayMode"); - if (arrayModes & Float64ArrayMode) - out.print(comma, "Float64ArrayMode"); } -void ArrayProfile::computeUpdatedPrediction(const ConcurrentJITLocker& locker, CodeBlock* codeBlock) +void ArrayProfile::computeUpdatedPrediction(const ConcurrentJITLocker&, CodeBlock* codeBlock) { - if (!m_lastSeenStructureID) + if (!m_lastSeenStructure) return; - Structure* lastSeenStructure = codeBlock->heap()->structureIDTable().get(m_lastSeenStructureID); - computeUpdatedPrediction(locker, codeBlock, lastSeenStructure); - m_lastSeenStructureID = 0; -} - -void ArrayProfile::computeUpdatedPrediction(const ConcurrentJITLocker&, CodeBlock* codeBlock, Structure* lastSeenStructure) -{ - m_observedArrayModes |= arrayModeFromStructure(lastSeenStructure); + m_observedArrayModes |= arrayModeFromStructure(m_lastSeenStructure); if (!m_didPerformFirstRunPruning && hasTwoOrMoreBitsSet(m_observedArrayModes)) { - m_observedArrayModes = arrayModeFromStructure(lastSeenStructure); + m_observedArrayModes = arrayModeFromStructure(m_lastSeenStructure); m_didPerformFirstRunPruning = true; } m_mayInterceptIndexedAccesses |= - lastSeenStructure->typeInfo().interceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero(); + m_lastSeenStructure->typeInfo().interceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero(); JSGlobalObject* globalObject = codeBlock->globalObject(); - if (!globalObject->isOriginalArrayStructure(lastSeenStructure) - && !globalObject->isOriginalTypedArrayStructure(lastSeenStructure)) + if (!globalObject->isOriginalArrayStructure(m_lastSeenStructure) + && !globalObject->isOriginalTypedArrayStructure(m_lastSeenStructure)) m_usesOriginalArrayStructures = false; + m_lastSeenStructure = 0; } CString ArrayProfile::briefDescription(const ConcurrentJITLocker& locker, CodeBlock* codeBlock) |