X-Git-Url: https://git.saurik.com/apple/javascriptcore.git/blobdiff_plain/9dae56ea45a0f5f8136a5c93d6f3a7f99399ca73..14957cd040308e3eeec43d26bae5d76da13fcd85:/bytecode/Opcode.cpp diff --git a/bytecode/Opcode.cpp b/bytecode/Opcode.cpp index bb7696d..0bb714b 100644 --- a/bytecode/Opcode.cpp +++ b/bytecode/Opcode.cpp @@ -30,6 +30,11 @@ #include "config.h" #include "Opcode.h" +#if ENABLE(OPCODE_STATS) +#include +#include +#endif + using namespace std; namespace JSC { @@ -101,10 +106,10 @@ OpcodeStats::~OpcodeStats() for (int j = 0; j < numOpcodeIDs; ++j) totalInstructionPairs += opcodePairCounts[i][j]; - int sortedIndices[numOpcodeIDs]; + FixedArray sortedIndices; for (int i = 0; i < numOpcodeIDs; ++i) sortedIndices[i] = i; - qsort(sortedIndices, numOpcodeIDs, sizeof(int), compareOpcodeIndices); + qsort(sortedIndices.data(), numOpcodeIDs, sizeof(int), compareOpcodeIndices); pair sortedPairIndices[numOpcodeIDs * numOpcodeIDs]; pair* currentPairIndex = sortedPairIndices;