diff options
author | Simon Hausmann <simon.hausmann@nokia.com> | 2012-02-09 14:16:12 +0100 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@nokia.com> | 2012-02-09 14:16:12 +0100 |
commit | 03e12282df9aa1e1fb05a8b90f1cfc2e08764cec (patch) | |
tree | 52599cd0ab782b1768e23ad176f7618f98333cb6 /Source/JavaScriptCore/bytecode | |
parent | cd44dc59cdfc39534aef4d417e9f3c412e3be139 (diff) | |
download | qtwebkit-03e12282df9aa1e1fb05a8b90f1cfc2e08764cec.tar.gz |
Imported WebKit commit e09a82039aa4273ab318b71122e92d8e5f233525 (http://svn.webkit.org/repository/webkit/trunk@107223)
Diffstat (limited to 'Source/JavaScriptCore/bytecode')
-rw-r--r-- | Source/JavaScriptCore/bytecode/CodeBlock.cpp | 4 | ||||
-rw-r--r-- | Source/JavaScriptCore/bytecode/CodeBlock.h | 14 | ||||
-rw-r--r-- | Source/JavaScriptCore/bytecode/CodeOrigin.h | 4 | ||||
-rw-r--r-- | Source/JavaScriptCore/bytecode/DFGExitProfile.h | 2 | ||||
-rw-r--r-- | Source/JavaScriptCore/bytecode/DataFormat.h | 2 | ||||
-rw-r--r-- | Source/JavaScriptCore/bytecode/PredictedType.cpp | 2 | ||||
-rw-r--r-- | Source/JavaScriptCore/bytecode/PredictedType.h | 2 | ||||
-rw-r--r-- | Source/JavaScriptCore/bytecode/ValueRecovery.h | 7 |
8 files changed, 2 insertions, 35 deletions
diff --git a/Source/JavaScriptCore/bytecode/CodeBlock.cpp b/Source/JavaScriptCore/bytecode/CodeBlock.cpp index 4a953266e..191fafd62 100644 --- a/Source/JavaScriptCore/bytecode/CodeBlock.cpp +++ b/Source/JavaScriptCore/bytecode/CodeBlock.cpp @@ -59,8 +59,6 @@ namespace JSC { using namespace DFG; #endif -#if !defined(NDEBUG) || ENABLE(OPCODE_SAMPLING) - static UString escapeQuotes(const UString& str) { UString result = str; @@ -1286,8 +1284,6 @@ void CodeBlock::dump(ExecState* exec, const Vector<Instruction>::const_iterator& } } -#endif // !defined(NDEBUG) || ENABLE(OPCODE_SAMPLING) - #if DUMP_CODE_BLOCK_STATISTICS static HashSet<CodeBlock*> liveCodeBlockSet; #endif diff --git a/Source/JavaScriptCore/bytecode/CodeBlock.h b/Source/JavaScriptCore/bytecode/CodeBlock.h index 23d6a6b6d..bc2feeb2a 100644 --- a/Source/JavaScriptCore/bytecode/CodeBlock.h +++ b/Source/JavaScriptCore/bytecode/CodeBlock.h @@ -134,11 +134,9 @@ namespace JSC { static void dumpStatistics(); -#if !defined(NDEBUG) || ENABLE_OPCODE_SAMPLING void dump(ExecState*) const; void printStructures(const Instruction*) const; void printStructure(const char* name, const Instruction*, int operand) const; -#endif bool isStrictMode() const { return m_isStrictMode; } @@ -354,17 +352,8 @@ namespace JSC { { m_shouldDiscardBytecode = true; } - void handleBytecodeDiscardingOpportunity() - { - if (!!alternative()) - discardBytecode(); - else - discardBytecodeLater(); - } -#ifndef NDEBUG bool usesOpcode(OpcodeID); -#endif unsigned instructionCount() { return m_instructionCount; } void setInstructionCount(unsigned instructionCount) { m_instructionCount = instructionCount; } @@ -522,6 +511,7 @@ namespace JSC { ValueProfile* addValueProfile(int bytecodeOffset) { ASSERT(bytecodeOffset != -1); + ASSERT(m_valueProfiles.isEmpty() || m_valueProfiles.last().m_bytecodeOffset < bytecodeOffset); m_valueProfiles.append(ValueProfile(bytecodeOffset)); return &m_valueProfiles.last(); } @@ -1016,7 +1006,6 @@ namespace JSC { void tallyFrequentExitSites() { } #endif -#if !defined(NDEBUG) || ENABLE(OPCODE_SAMPLING) void dump(ExecState*, const Vector<Instruction>::const_iterator& begin, Vector<Instruction>::const_iterator&) const; CString registerName(ExecState*, int r) const; @@ -1026,7 +1015,6 @@ namespace JSC { void printGetByIdOp(ExecState*, int location, Vector<Instruction>::const_iterator&, const char* op) const; void printCallOp(ExecState*, int location, Vector<Instruction>::const_iterator&, const char* op) const; void printPutByIdOp(ExecState*, int location, Vector<Instruction>::const_iterator&, const char* op) const; -#endif void visitStructures(SlotVisitor&, Instruction* vPC) const; #if ENABLE(DFG_JIT) diff --git a/Source/JavaScriptCore/bytecode/CodeOrigin.h b/Source/JavaScriptCore/bytecode/CodeOrigin.h index 25a116c55..eda17648b 100644 --- a/Source/JavaScriptCore/bytecode/CodeOrigin.h +++ b/Source/JavaScriptCore/bytecode/CodeOrigin.h @@ -83,10 +83,8 @@ struct CodeOrigin { bool operator!=(const CodeOrigin& other) const { return !(*this == other); } -#ifndef NDEBUG // Get the inline stack. This is slow, and is intended for debugging only. Vector<CodeOrigin> inlineStack() const; -#endif }; struct InlineCallFrame { @@ -122,7 +120,6 @@ inline bool CodeOrigin::operator==(const CodeOrigin& other) const && inlineCallFrame == other.inlineCallFrame; } -#ifndef NDEBUG // Get the inline stack. This is slow, and is intended for debugging only. inline Vector<CodeOrigin> CodeOrigin::inlineStack() const { @@ -133,7 +130,6 @@ inline Vector<CodeOrigin> CodeOrigin::inlineStack() const result[index--] = current->caller; return result; } -#endif inline unsigned getCallReturnOffsetForCodeOrigin(CodeOriginAtCallReturnOffset* data) { diff --git a/Source/JavaScriptCore/bytecode/DFGExitProfile.h b/Source/JavaScriptCore/bytecode/DFGExitProfile.h index f18b69a54..edabfabf9 100644 --- a/Source/JavaScriptCore/bytecode/DFGExitProfile.h +++ b/Source/JavaScriptCore/bytecode/DFGExitProfile.h @@ -41,7 +41,6 @@ enum ExitKind { Uncountable, // We exited for none of the above reasons, and we should not count it. Most uses of this should be viewed as a FIXME. }; -#ifndef NDEBUG inline const char* exitKindToString(ExitKind kind) { switch (kind) { @@ -59,7 +58,6 @@ inline const char* exitKindToString(ExitKind kind) return "Unknown"; } } -#endif inline bool exitKindIsCountable(ExitKind kind) { diff --git a/Source/JavaScriptCore/bytecode/DataFormat.h b/Source/JavaScriptCore/bytecode/DataFormat.h index b78a6e8e6..4f015486a 100644 --- a/Source/JavaScriptCore/bytecode/DataFormat.h +++ b/Source/JavaScriptCore/bytecode/DataFormat.h @@ -50,7 +50,6 @@ enum DataFormat { DataFormatJSBoolean = DataFormatJS | DataFormatBoolean }; -#ifndef NDEBUG inline const char* dataFormatToString(DataFormat dataFormat) { switch (dataFormat) { @@ -80,7 +79,6 @@ inline const char* dataFormatToString(DataFormat dataFormat) return "Unknown"; } } -#endif #if USE(JSVALUE64) inline bool needDataFormatConversion(DataFormat from, DataFormat to) diff --git a/Source/JavaScriptCore/bytecode/PredictedType.cpp b/Source/JavaScriptCore/bytecode/PredictedType.cpp index 4b07ff446..a8118adf9 100644 --- a/Source/JavaScriptCore/bytecode/PredictedType.cpp +++ b/Source/JavaScriptCore/bytecode/PredictedType.cpp @@ -36,7 +36,6 @@ namespace JSC { -#ifndef NDEBUG const char* predictionToString(PredictedType value) { if (value == PredictNone) @@ -160,7 +159,6 @@ const char* predictionToString(PredictedType value) return description; } -#endif PredictedType predictionFromClassInfo(const ClassInfo* classInfo) { diff --git a/Source/JavaScriptCore/bytecode/PredictedType.h b/Source/JavaScriptCore/bytecode/PredictedType.h index 47583361d..efbe9b30d 100644 --- a/Source/JavaScriptCore/bytecode/PredictedType.h +++ b/Source/JavaScriptCore/bytecode/PredictedType.h @@ -217,9 +217,7 @@ inline bool isOtherPrediction(PredictedType value) return value == PredictOther; } -#ifndef NDEBUG const char* predictionToString(PredictedType value); -#endif // Merge two predictions. Note that currently this just does left | right. It may // seem tempting to do so directly, but you would be doing so at your own peril, diff --git a/Source/JavaScriptCore/bytecode/ValueRecovery.h b/Source/JavaScriptCore/bytecode/ValueRecovery.h index 356abe84f..4d2134e0a 100644 --- a/Source/JavaScriptCore/bytecode/ValueRecovery.h +++ b/Source/JavaScriptCore/bytecode/ValueRecovery.h @@ -30,11 +30,8 @@ #include "JSValue.h" #include "MacroAssembler.h" #include "VirtualRegister.h" -#include <wtf/Platform.h> - -#ifndef NDEBUG #include <stdio.h> -#endif +#include <wtf/Platform.h> namespace JSC { @@ -249,7 +246,6 @@ public: return JSValue::decode(m_source.constant); } -#ifndef NDEBUG void dump(FILE* out) const { switch (technique()) { @@ -314,7 +310,6 @@ public: break; } } -#endif private: ValueRecoveryTechnique m_technique; |