OSDN Git Service

get rid of some JavaScriptCore macros and RefPtrHashMap
authorIvailo Monev <xakepa10@laimg.moc>
Mon, 8 Aug 2016 02:07:27 +0000 (02:07 +0000)
committerIvailo Monev <xakepa10@laimg.moc>
Mon, 8 Aug 2016 02:07:27 +0000 (02:07 +0000)
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
36 files changed:
src/3rdparty/javascriptcore/JavaScriptCore/API/APICast.h
src/3rdparty/javascriptcore/JavaScriptCore/assembler/ARMv7Assembler.h
src/3rdparty/javascriptcore/JavaScriptCore/assembler/AbstractMacroAssembler.h
src/3rdparty/javascriptcore/JavaScriptCore/assembler/MacroAssemblerARM.h
src/3rdparty/javascriptcore/JavaScriptCore/assembler/MacroAssemblerCodeRef.h
src/3rdparty/javascriptcore/JavaScriptCore/assembler/MacroAssemblerX86_64.h
src/3rdparty/javascriptcore/JavaScriptCore/bytecode/SamplingTool.cpp
src/3rdparty/javascriptcore/JavaScriptCore/bytecode/SamplingTool.h
src/3rdparty/javascriptcore/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp
src/3rdparty/javascriptcore/JavaScriptCore/debugger/Debugger.h
src/3rdparty/javascriptcore/JavaScriptCore/interpreter/Interpreter.cpp
src/3rdparty/javascriptcore/JavaScriptCore/jit/ExecutableAllocator.h
src/3rdparty/javascriptcore/JavaScriptCore/jit/ExecutableAllocatorPosix.cpp
src/3rdparty/javascriptcore/JavaScriptCore/jit/JITArithmetic.cpp
src/3rdparty/javascriptcore/JavaScriptCore/jit/JITInlineMethods.h
src/3rdparty/javascriptcore/JavaScriptCore/jit/JITOpcodes.cpp
src/3rdparty/javascriptcore/JavaScriptCore/jit/JITPropertyAccess.cpp
src/3rdparty/javascriptcore/JavaScriptCore/jit/JITStubCall.h
src/3rdparty/javascriptcore/JavaScriptCore/runtime/Collector.cpp
src/3rdparty/javascriptcore/JavaScriptCore/runtime/DatePrototype.cpp
src/3rdparty/javascriptcore/JavaScriptCore/runtime/Executable.h
src/3rdparty/javascriptcore/JavaScriptCore/runtime/Identifier.cpp
src/3rdparty/javascriptcore/JavaScriptCore/runtime/Identifier.h
src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSArray.cpp
src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSFunction.cpp
src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSNotAnObject.cpp
src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSVariableObject.cpp
src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSVariableObject.h
src/3rdparty/javascriptcore/JavaScriptCore/runtime/RegExp.cpp
src/3rdparty/javascriptcore/JavaScriptCore/runtime/Structure.cpp
src/3rdparty/javascriptcore/JavaScriptCore/wtf/Assertions.h
src/3rdparty/javascriptcore/JavaScriptCore/wtf/DateMath.h
src/3rdparty/javascriptcore/JavaScriptCore/wtf/HashMap.h
src/3rdparty/javascriptcore/JavaScriptCore/wtf/HashTable.h
src/3rdparty/javascriptcore/JavaScriptCore/wtf/RefPtrHashMap.h [deleted file]
src/3rdparty/javascriptcore/JavaScriptCore/wtf/UnusedParam.h [deleted file]

index a7d71d5..d1e768d 100644 (file)
@@ -30,7 +30,6 @@
 #include "JSGlobalObject.h"
 #include "JSValue.h"
 #include <wtf/Platform.h>
-#include <wtf/UnusedParam.h>
 
 namespace JSC {
     class ExecState;
@@ -63,7 +62,7 @@ inline JSC::ExecState* toJS(JSGlobalContextRef c)
 
 inline JSC::JSValue toJS(JSC::ExecState* exec, JSValueRef v)
 {
-    ASSERT_UNUSED(exec, exec);
+    Q_UNUSED(exec);
     Q_ASSERT(v);
 #if USE(JSVALUE32_64)
     JSC::JSCell* jsCell = reinterpret_cast<JSC::JSCell*>(const_cast<OpaqueJSValue*>(v));
@@ -79,7 +78,7 @@ inline JSC::JSValue toJS(JSC::ExecState* exec, JSValueRef v)
 
 inline JSC::JSValue toJSForGC(JSC::ExecState* exec, JSValueRef v)
 {
-    ASSERT_UNUSED(exec, exec);
+    Q_UNUSED(exec);
     Q_ASSERT(v);
 #if USE(JSVALUE32_64)
     JSC::JSCell* jsCell = reinterpret_cast<JSC::JSCell*>(const_cast<OpaqueJSValue*>(v));
@@ -115,7 +114,7 @@ inline JSValueRef toRef(JSC::ExecState* exec, JSC::JSValue v)
         return reinterpret_cast<JSValueRef>(JSC::jsAPIValueWrapper(exec, v).asCell());
     return reinterpret_cast<JSValueRef>(v.asCell());
 #else
-    UNUSED_PARAM(exec);
+    Q_UNUSED(exec);
     return reinterpret_cast<JSValueRef>(JSC::JSValue::encode(v));
 #endif
 }
index 05397b6..5d1c2ef 100644 (file)
@@ -239,7 +239,8 @@ class ARMThumbImmediate {
         // Make sure this constructor is only reached with type TypeUInt16;
         // this extra parameter makes the code a little clearer by making it
         // explicit at call sites which type is being constructed
-        ASSERT_UNUSED(type, type == TypeUInt16);
+        Q_UNUSED(type);
+        Q_ASSERT(type == TypeUInt16);
 
         m_value.asInt = value;
     }
index d009666..97a82fb 100644 (file)
@@ -407,9 +407,9 @@ public:
 
     Jump branch16(Condition cond, BaseIndex left, RegisterID right)
     {
-        UNUSED_PARAM(cond);
-        UNUSED_PARAM(left);
-        UNUSED_PARAM(right);
+        Q_UNUSED(cond);
+        Q_UNUSED(left);
+        Q_UNUSED(right);
         ASSERT_NOT_REACHED();
         return jump();
     }
@@ -824,8 +824,8 @@ public:
     // (specifically, in this case, INT_MIN).
     Jump branchTruncateDoubleToInt32(FPRegisterID src, RegisterID dest)
     {
-        UNUSED_PARAM(src);
-        UNUSED_PARAM(dest);
+        Q_UNUSED(src);
+        Q_UNUSED(dest);
         ASSERT_NOT_REACHED();
         return jump();
     }
index 2b5147c..a26eaeb 100644 (file)
@@ -112,7 +112,8 @@ public:
     {
         DataLabelPtr label = moveWithPatch(ImmPtr(0), scratchRegister);
         Call result = Call(m_assembler.call(scratchRegister), Call::Linkable);
-        ASSERT_UNUSED(label, differenceBetween(label, result) == REPTACH_OFFSET_CALL_R11);
+        Q_UNUSED(label);
+        Q_ASSERT(differenceBetween(label, result) == REPTACH_OFFSET_CALL_R11);
         return result;
     }
 
@@ -120,7 +121,8 @@ public:
     {
         DataLabelPtr label = moveWithPatch(ImmPtr(0), scratchRegister);
         Jump newJump = Jump(m_assembler.jmp_r(scratchRegister));
-        ASSERT_UNUSED(label, differenceBetween(label, newJump) == REPTACH_OFFSET_CALL_R11);
+        Q_UNUSED(label);
+        Q_ASSERT(differenceBetween(label, newJump) == REPTACH_OFFSET_CALL_R11);
         return Call::fromTailJump(newJump);
     }
 
@@ -129,7 +131,8 @@ public:
         oldJump.link(this);
         DataLabelPtr label = moveWithPatch(ImmPtr(0), scratchRegister);
         Jump newJump = Jump(m_assembler.jmp_r(scratchRegister));
-        ASSERT_UNUSED(label, differenceBetween(label, newJump) == REPTACH_OFFSET_CALL_R11);
+        Q_UNUSED(label);
+        Q_ASSERT(differenceBetween(label, newJump) == REPTACH_OFFSET_CALL_R11);
         return Call::fromTailJump(newJump);
     }
 
index 1fc92b8..ca7ad04 100644 (file)
@@ -197,7 +197,7 @@ void SamplingTool::notifyOfScope(ScriptExecutable* script)
     QMutexLocker locker(m_scriptSampleMapMutex);
     m_scopeSampleMap->set(script, new ScriptSampleRecord(script));
 #else
-    UNUSED_PARAM(script);
+    Q_UNUSED(script);
 #endif
 }
 
@@ -250,7 +250,7 @@ void SamplingTool::dump(ExecState* exec)
     // Tidies up SunSpider output by removing short scripts - such a small number of samples would likely not be useful anyhow.
     if (m_sampleCount < 10)
         return;
-    
+
     // (1) Build and sort 'opcodeSampleInfo' array.
 
     OpcodeSampleInfo opcodeSampleInfo[numOpcodeIDs];
@@ -275,7 +275,7 @@ void SamplingTool::dump(ExecState* exec)
             continue;
 
         OpcodeID opcodeID = opcodeSampleInfo[i].opcode;
-        
+
         const char* opcodeName = opcodeNames[opcodeID];
         const char* opcodePadding = padOpcodeName(opcodeID, 28);
         double percentOfVM = (static_cast<double>(count) * 100) / m_opcodeSampleCount;
@@ -356,17 +356,10 @@ void SamplingTool::dump(ExecState* exec)
         }
     }
 #else
-    UNUSED_PARAM(exec);
-#endif
+    Q_UNUSED(exec);
+#endif // ENABLE(CODEBLOCK_SAMPLING)
 }
-
-#else
-
-void SamplingTool::dump(ExecState*)
-{
-}
-
-#endif
+#endif // ENABLE(OPCODE_SAMPLING)
 
 void AbstractSamplingCounter::dump()
 {
index 1c8ce95..1dcfdb2 100644 (file)
@@ -214,7 +214,9 @@ namespace JSC {
         }
 
         void setup();
+#if ENABLE(OPCODE_SAMPLING)
         void dump(ExecState*);
+#endif
 
         void notifyOfScope(ScriptExecutable* scope);
 
index 2dec0e2..8c940e3 100644 (file)
@@ -124,7 +124,7 @@ void BytecodeGenerator::setDumpsGeneratedCode(bool dumpsGeneratedCode)
 #ifndef NDEBUG
     s_dumpsGeneratedCode = dumpsGeneratedCode;
 #else
-    UNUSED_PARAM(dumpsGeneratedCode);
+    Q_UNUSED(dumpsGeneratedCode);
 #endif
 }
 
@@ -1846,7 +1846,7 @@ void BytecodeGenerator::beginSwitch(RegisterID* scrutineeRegister, SwitchInfo::S
 
 static int32_t keyForImmediateSwitch(ExpressionNode* node, int32_t min, int32_t max)
 {
-    UNUSED_PARAM(max);
+    Q_UNUSED(max);
     Q_ASSERT(node->isNumber());
     double value = static_cast<NumberNode*>(node)->value();
     int32_t key = static_cast<int32_t>(value);
@@ -1871,7 +1871,7 @@ static void prepareJumpTableForImmediateSwitch(SimpleJumpTable& jumpTable, int32
 
 static int32_t keyForCharacterSwitch(ExpressionNode* node, int32_t min, int32_t max)
 {
-    UNUSED_PARAM(max);
+    Q_UNUSED(max);
     Q_ASSERT(node->isString());
     UString::Rep* clause = static_cast<StringNode*>(node)->value().ustring().rep();
     Q_ASSERT(clause->size() == 1);
index 9b86a7f..2db3d75 100644 (file)
@@ -43,45 +43,45 @@ namespace JSC {
 
         virtual void scriptUnload(QT_PREPEND_NAMESPACE(qint64) id)
         {
-            UNUSED_PARAM(id);
+            Q_UNUSED(id);
         };
         virtual void scriptLoad(QT_PREPEND_NAMESPACE(qint64) id, const UString &program,
                             const UString &fileName, int baseLineNumber)
         {
-            UNUSED_PARAM(id);
-            UNUSED_PARAM(program);
-            UNUSED_PARAM(fileName);
-            UNUSED_PARAM(baseLineNumber);
+            Q_UNUSED(id);
+            Q_UNUSED(program);
+            Q_UNUSED(fileName);
+            Q_UNUSED(baseLineNumber);
         };
         virtual void contextPush() {};
         virtual void contextPop() {};
 
         virtual void evaluateStart(intptr_t sourceID)
         {
-            UNUSED_PARAM(sourceID);
+            Q_UNUSED(sourceID);
         }
         virtual void evaluateStop(const JSC::JSValue& returnValue, intptr_t sourceID)
         {
-            UNUSED_PARAM(sourceID);
-            UNUSED_PARAM(returnValue);
+            Q_UNUSED(sourceID);
+            Q_UNUSED(returnValue);
         }
 
         virtual void exceptionThrow(const JSC::DebuggerCallFrame& frame, intptr_t sourceID, bool hasHandler)
         {
-            UNUSED_PARAM(frame);
-            UNUSED_PARAM(sourceID);
-            UNUSED_PARAM(hasHandler);
+            Q_UNUSED(frame);
+            Q_UNUSED(sourceID);
+            Q_UNUSED(hasHandler);
         };
         virtual void exceptionCatch(const JSC::DebuggerCallFrame& frame, intptr_t sourceID)
         {
-            UNUSED_PARAM(frame);
-            UNUSED_PARAM(sourceID);
+            Q_UNUSED(frame);
+            Q_UNUSED(sourceID);
         };
 
         virtual void functionExit(const JSC::JSValue& returnValue, intptr_t sourceID)
         {
-            UNUSED_PARAM(returnValue);
-            UNUSED_PARAM(sourceID);
+            Q_UNUSED(returnValue);
+            Q_UNUSED(sourceID);
         };
 
         virtual void sourceParsed(ExecState*, const SourceCode&, int errorLineNumber, const UString& errorMessage) = 0;
index 9067fa3..d979193 100644 (file)
@@ -76,7 +76,7 @@ static ALWAYS_INLINE unsigned bytecodeOffsetForPC(CallFrame* callFrame, CodeBloc
 #if ENABLE(JIT)
     return codeBlock->getBytecodeIndex(callFrame, ReturnAddressPtr(pc));
 #else
-    UNUSED_PARAM(callFrame);
+    Q_UNUSED(callFrame);
     return static_cast<Instruction*>(pc) - codeBlock->instructions().begin();
 #endif
 }
@@ -3900,7 +3900,7 @@ void Interpreter::dumpSampleData(ExecState* exec)
     if (m_sampler)
         m_sampler->dump(exec);
 #else
-    UNUSED_PARAM(exec);
+    Q_UNUSED(exec);
 #endif
 }
 void Interpreter::startSampling()
index ece88a0..2b13960 100644 (file)
@@ -31,7 +31,6 @@
 #include <wtf/Assertions.h>
 #include <wtf/PassRefPtr.h>
 #include <wtf/RefCounted.h>
-#include <wtf/UnusedParam.h>
 #include <wtf/Vector.h>
 
 #if OS(IPHONE_OS)
index 4888ef2..6913cf2 100644 (file)
@@ -52,7 +52,8 @@ ExecutablePool::Allocation ExecutablePool::systemAlloc(size_t n)
 void ExecutablePool::systemRelease(const ExecutablePool::Allocation& alloc)
 { 
     int result = munmap(alloc.pages, alloc.size);
-    ASSERT_UNUSED(result, !result);
+    Q_UNUSED(result)
+    Q_ASSERT(!result);
 }
 
 }
index 1946791..3fda624 100644 (file)
@@ -1230,8 +1230,8 @@ void JIT::emitSlow_op_lshift(Instruction* currentInstruction, Vector<SlowCaseEnt
     unsigned op2 = currentInstruction[3].u.operand;
 
 #if USE(JSVALUE64)
-    UNUSED_PARAM(op1);
-    UNUSED_PARAM(op2);
+    Q_UNUSED(op1);
+    Q_UNUSED(op2);
     linkSlowCase(iter);
     linkSlowCase(iter);
 #else
index b3a3d77..cbee5b5 100644 (file)
@@ -815,7 +815,7 @@ ALWAYS_INLINE void JIT::emitFastArithReTagImmediate(RegisterID src, RegisterID d
 ALWAYS_INLINE void JIT::emitFastArithImmToInt(RegisterID reg)
 {
 #if USE(JSVALUE64)
-    UNUSED_PARAM(reg);
+    Q_UNUSED(reg);
 #else
     rshift32(Imm32(JSImmediate::IntegerPayloadShift), reg);
 #endif
index b12f622..5dc5fd1 100644 (file)
@@ -370,12 +370,12 @@ void JIT::privateCompileCTIMachineTrampolines(RefPtr<ExecutablePool>* executable
 #if ENABLE(JIT_OPTIMIZE_PROPERTY_ACCESS)
     *ctiStringLengthTrampoline = trampolineAt(finalCode, stringLengthBegin);
 #else
-    UNUSED_PARAM(ctiStringLengthTrampoline);
+    Q_UNUSED(ctiStringLengthTrampoline);
 #endif
 #if ENABLE(JIT_OPTIMIZE_CALL)
     *ctiVirtualCallLink = trampolineAt(finalCode, virtualCallLinkBegin);
 #else
-    UNUSED_PARAM(ctiVirtualCallLink);
+    Q_UNUSED(ctiVirtualCallLink);
 #endif
 }
 
@@ -1814,7 +1814,7 @@ void JIT::privateCompileCTIMachineTrampolines(RefPtr<ExecutablePool>* executable
 #if ENABLE(JIT_OPTIMIZE_PROPERTY_ACCESS)
     *ctiStringLengthTrampoline = trampolineAt(finalCode, stringLengthBegin);
 #else
-    UNUSED_PARAM(ctiStringLengthTrampoline);
+    Q_UNUSED(ctiStringLengthTrampoline);
 #endif
 }
 
index 3b8b855..75618cd 100644 (file)
@@ -226,9 +226,11 @@ void JIT::emit_op_method_check(Instruction* currentInstruction)
     move(Imm32(JSValue::CellTag), regT1);
     Jump match = jump();
 
-    ASSERT_UNUSED(protoObj, differenceBetween(info.structureToCompare, protoObj) == patchOffsetMethodCheckProtoObj);
+    Q_UNUSED(protoObj);
+    Q_ASSERT(differenceBetween(info.structureToCompare, protoObj) == patchOffsetMethodCheckProtoObj);
     Q_ASSERT(differenceBetween(info.structureToCompare, protoStructureToCompare) == patchOffsetMethodCheckProtoStruct);
-    ASSERT_UNUSED(putFunction, differenceBetween(info.structureToCompare, putFunction) == patchOffsetMethodCheckPutFunction);
+    Q_UNUSED(putFunction);
+    Q_ASSERT(differenceBetween(info.structureToCompare, putFunction) == patchOffsetMethodCheckPutFunction);
 
     // Link the failure cases here.
     structureCheck.link(this);
@@ -395,12 +397,15 @@ void JIT::compileGetByIdHotPath()
     Label externalLoad = loadPtrWithPatchToLEA(Address(regT0, OBJECT_OFFSETOF(JSObject, m_externalStorage)), regT2);
     Label externalLoadComplete(this);
     Q_ASSERT(differenceBetween(hotPathBegin, externalLoad) == patchOffsetGetByIdExternalLoad);
-    ASSERT_UNUSED(externalLoad, differenceBetween(externalLoad, externalLoadComplete) == patchLengthGetByIdExternalLoad);
+    Q_UNUSED(externalLoad);
+    Q_ASSERT(differenceBetween(externalLoad, externalLoadComplete) == patchLengthGetByIdExternalLoad);
 
     DataLabel32 displacementLabel1 = loadPtrWithAddressOffsetPatch(Address(regT2, patchGetByIdDefaultOffset), regT0); // payload
-    ASSERT_UNUSED(displacementLabel1, differenceBetween(hotPathBegin, displacementLabel1) == patchOffsetGetByIdPropertyMapOffset1);
+    Q_UNUSED(displacementLabel1);
+    Q_ASSERT(differenceBetween(hotPathBegin, displacementLabel1) == patchOffsetGetByIdPropertyMapOffset1);
     DataLabel32 displacementLabel2 = loadPtrWithAddressOffsetPatch(Address(regT2, patchGetByIdDefaultOffset), regT1); // tag
-    ASSERT_UNUSED(displacementLabel2, differenceBetween(hotPathBegin, displacementLabel2) == patchOffsetGetByIdPropertyMapOffset2);
+    Q_UNUSED(displacementLabel2);
+    Q_ASSERT(differenceBetween(hotPathBegin, displacementLabel2) == patchOffsetGetByIdPropertyMapOffset2);
 
     Label putResult(this);
     Q_ASSERT(differenceBetween(hotPathBegin, putResult) == patchOffsetGetByIdPutResult);
@@ -474,15 +479,18 @@ void JIT::emit_op_put_by_id(Instruction* currentInstruction)
     Label externalLoad = loadPtrWithPatchToLEA(Address(regT0, OBJECT_OFFSETOF(JSObject, m_externalStorage)), regT0);
     Label externalLoadComplete(this);
     Q_ASSERT(differenceBetween(hotPathBegin, externalLoad) == patchOffsetPutByIdExternalLoad);
-    ASSERT_UNUSED(externalLoad, differenceBetween(externalLoad, externalLoadComplete) == patchLengthPutByIdExternalLoad);
+    Q_UNUSED(externalLoad);
+    Q_ASSERT(differenceBetween(externalLoad, externalLoadComplete) == patchLengthPutByIdExternalLoad);
 
     DataLabel32 displacementLabel1 = storePtrWithAddressOffsetPatch(regT2, Address(regT0, patchGetByIdDefaultOffset)); // payload
     DataLabel32 displacementLabel2 = storePtrWithAddressOffsetPatch(regT3, Address(regT0, patchGetByIdDefaultOffset)); // tag
 
     END_UNINTERRUPTED_SEQUENCE(sequencePutById);
 
-    ASSERT_UNUSED(displacementLabel1, differenceBetween(hotPathBegin, displacementLabel1) == patchOffsetPutByIdPropertyMapOffset1);
-    ASSERT_UNUSED(displacementLabel2, differenceBetween(hotPathBegin, displacementLabel2) == patchOffsetPutByIdPropertyMapOffset2);
+    Q_UNUSED(displacementLabel1);
+    Q_ASSERT(differenceBetween(hotPathBegin, displacementLabel1) == patchOffsetPutByIdPropertyMapOffset1);
+    Q_UNUSED(displacementLabel2);
+    Q_ASSERT(differenceBetween(hotPathBegin, displacementLabel2) == patchOffsetPutByIdPropertyMapOffset2);
 }
 
 void JIT::emitSlow_op_put_by_id(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
index 0360de0..433fe25 100644 (file)
@@ -200,7 +200,8 @@ namespace JSC {
 #else
         JIT::Call call(unsigned dst) // dst is a virtual register.
         {
-            ASSERT_UNUSED(m_returnType, m_returnType == VoidPtr || m_returnType == Cell);
+            Q_UNUSED(m_returnType);
+            Q_ASSERT(m_returnType == VoidPtr || m_returnType == Cell);
             JIT::Call call = this->call();
             m_jit->emitPutVirtualRegister(dst);
             return call;
@@ -209,10 +210,11 @@ namespace JSC {
 
         JIT::Call call(JIT::RegisterID dst) // dst is a machine register.
         {
+            Q_UNUSED(m_returnType);
 #if USE(JSVALUE32_64)
-            ASSERT_UNUSED(m_returnType, m_returnType == Value || m_returnType == VoidPtr || m_returnType == Int || m_returnType == Cell);
+            Q_ASSERT(m_returnType == Value || m_returnType == VoidPtr || m_returnType == Int || m_returnType == Cell);
 #else
-            ASSERT_UNUSED(m_returnType, m_returnType == VoidPtr || m_returnType == Int || m_returnType == Cell);
+            Q_ASSERT(m_returnType == VoidPtr || m_returnType == Int || m_returnType == Cell);
 #endif
             JIT::Call call = this->call();
             if (dst != JIT::returnValueRegister)
index 99f5cdb..3194ef6 100644 (file)
@@ -41,7 +41,6 @@
 #include <stdlib.h>
 #include <wtf/FastMalloc.h>
 #include <wtf/HashCountedSet.h>
-#include <wtf/UnusedParam.h>
 #include <wtf/VMTags.h>
 
 #if OS(DARWIN)
@@ -301,8 +300,9 @@ void* Heap::allocate(size_t s)
 {
     typedef HeapConstants::Block Block;
     typedef HeapConstants::Cell Cell;
-    
-    ASSERT_UNUSED(s, s <= HeapConstants::cellSize);
+
+    Q_UNUSED(s);
+    Q_ASSERT(s <= HeapConstants::cellSize);
 
     Q_ASSERT(m_heap.operationInProgress == NoOperation);
 
index 8a1966b..9153465 100644 (file)
@@ -41,7 +41,6 @@
 #include <wtf/DateMath.h>
 #include <wtf/MathExtras.h>
 #include <wtf/StringExtras.h>
-#include <wtf/UnusedParam.h>
 
 #if HAVE(SYS_PARAM_H)
 #include <sys/param.h>
@@ -770,13 +769,13 @@ static JSValue setNewValueFromDateArgs(ExecState* exec, JSValue thisValue, const
             return jsNaN(exec);
         gregorianDateTime.copyFrom(*other);
     }
-    
+
     if (!fillStructuresUsingDateArgs(exec, args, numArgsToUse, &ms, &gregorianDateTime)) {
         JSValue result = jsNaN(exec);
         thisDateObj->setInternalValue(result);
         return result;
     } 
-           
+
     JSValue result = jsNumber(exec, gregorianDateTimeToMS(exec, gregorianDateTime, ms, inputIsUTC));
     thisDateObj->setInternalValue(result);
     return result;
index 011a66c..2054700 100644 (file)
@@ -113,7 +113,7 @@ namespace JSC {
             if (SamplingTool* sampler = globalData->interpreter->sampler())
                 sampler->notifyOfScope(this);
 #else
-            UNUSED_PARAM(globalData);
+            Q_UNUSED(globalData);
 #endif
         }
 
@@ -126,7 +126,7 @@ namespace JSC {
             if (SamplingTool* sampler = exec->globalData().interpreter->sampler())
                 sampler->notifyOfScope(this);
 #else
-            UNUSED_PARAM(exec);
+            Q_UNUSED(exec);
 #endif
         }
 
@@ -165,7 +165,8 @@ namespace JSC {
         {
             if (!m_evalCodeBlock) {
                 JSObject* error = compile(exec, scopeChainNode);
-                ASSERT_UNUSED(!error, error);
+                Q_UNUSED(error);
+                Q_ASSERT(!error);
             }
             return *m_evalCodeBlock;
         }
@@ -212,7 +213,8 @@ namespace JSC {
         {
             if (!m_programCodeBlock) {
                 JSObject* error = compile(exec, scopeChainNode);
-                ASSERT_UNUSED(!error, error);
+                Q_UNUSED(error);
+                Q_ASSERT(!error);
             }
             return *m_programCodeBlock;
         }
index 6c576d9..b8ac272 100644 (file)
@@ -217,7 +217,7 @@ PassRefPtr<UString::Rep> Identifier::addSlowCase(JSGlobalData* globalData, UStri
             r = globalData->smallStrings.singleCharacterStringRep(c);
             if (r->isIdentifier()) {
 #ifndef NDEBUG
-                checkSameIdentifierTable(globalData, r);
+                checkSameIdentifierTable(globalData);
 #endif
                 return r;
             }
@@ -240,27 +240,17 @@ void Identifier::remove(UString::Rep* r)
 }
 
 #ifndef NDEBUG
-
-void Identifier::checkSameIdentifierTable(ExecState* exec, UString::Rep*)
+void Identifier::checkSameIdentifierTable(ExecState* exec)
 {
-    ASSERT_UNUSED(exec, exec->globalData().identifierTable == currentIdentifierTable());
+    Q_UNUSED(exec);
+    Q_ASSERT(exec->globalData().identifierTable == currentIdentifierTable());
 }
 
-void Identifier::checkSameIdentifierTable(JSGlobalData* globalData, UString::Rep*)
-{
-    ASSERT_UNUSED(globalData, globalData->identifierTable == currentIdentifierTable());
-}
-
-#else
-
-void Identifier::checkSameIdentifierTable(ExecState*, UString::Rep*)
+void Identifier::checkSameIdentifierTable(JSGlobalData* globalData)
 {
+    Q_UNUSED(globalData);
+    Q_ASSERT(globalData->identifierTable == currentIdentifierTable());
 }
-
-void Identifier::checkSameIdentifierTable(JSGlobalData*, UString::Rep*)
-{
-}
-
 #endif
 
 ThreadSpecific<ThreadIdentifierTableData>* g_identifierTableSpecific = 0;
index 1d1bd18..542664b 100644 (file)
@@ -95,7 +95,7 @@ namespace JSC {
         {
             if (r->isIdentifier()) {
 #ifndef NDEBUG
-                checkSameIdentifierTable(exec, r);
+                checkSameIdentifierTable(exec);
 #endif
                 return r;
             }
@@ -105,7 +105,7 @@ namespace JSC {
         {
             if (r->isIdentifier()) {
 #ifndef NDEBUG
-                checkSameIdentifierTable(globalData, r);
+                checkSameIdentifierTable(globalData);
 #endif
                 return r;
             }
@@ -115,8 +115,10 @@ namespace JSC {
         static PassRefPtr<UString::Rep> addSlowCase(ExecState*, UString::Rep* r);
         static PassRefPtr<UString::Rep> addSlowCase(JSGlobalData*, UString::Rep* r);
 
-        static void checkSameIdentifierTable(ExecState*, UString::Rep*);
-        static void checkSameIdentifierTable(JSGlobalData*, UString::Rep*);
+#ifndef NDEBUG
+        static void checkSameIdentifierTable(ExecState*);
+        static void checkSameIdentifierTable(JSGlobalData*);
+#endif
     };
     
     inline bool operator==(const Identifier& a, const Identifier& b)
index 04ff77d..d441913 100644 (file)
@@ -950,7 +950,8 @@ void JSArray::fillArgList(ExecState* exec, MarkedArgumentBuffer& args)
 
 void JSArray::copyToRegisters(ExecState* exec, Register* buffer, uint32_t maxSize)
 {
-    ASSERT_UNUSED(maxSize, m_storage->m_length == maxSize);
+    Q_UNUSED(maxSize);
+    Q_ASSERT(m_storage->m_length == maxSize);
     JSValue* vector = m_storage->m_vector;
     unsigned vectorEnd = min(m_storage->m_length, m_vectorLength);
     unsigned i = 0;
index 61d369b..40203d8 100644 (file)
@@ -66,8 +66,8 @@ JSFunction::JSFunction(ExecState* exec, NonNullPassRefPtr<Structure> structure,
     setNativeFunction(func);
     putDirect(exec->propertyNames().length, jsNumber(exec, length), DontDelete | ReadOnly | DontEnum);
 #else
-    UNUSED_PARAM(length);
-    UNUSED_PARAM(func);
+    Q_UNUSED(length);
+    Q_UNUSED(func);
     ASSERT_NOT_REACHED();
 #endif
 }
index f4764e2..d568f1b 100644 (file)
@@ -30,8 +30,6 @@
 #include "config.h"
 #include "JSNotAnObject.h"
 
-#include <wtf/UnusedParam.h>
-
 namespace JSC {
 
 ASSERT_CLASS_FITS_IN_CELL(JSNotAnObject);
@@ -39,37 +37,43 @@ ASSERT_CLASS_FITS_IN_CELL(JSNotAnObject);
 // JSValue methods
 JSValue JSNotAnObject::toPrimitive(ExecState* exec, PreferredPrimitiveType) const
 {
-    ASSERT_UNUSED(exec, exec->hadException() && exec->exception() == m_exception);
+    Q_UNUSED(exec);
+    Q_ASSERT(exec->hadException() && exec->exception() == m_exception);
     return m_exception;
 }
 
 bool JSNotAnObject::getPrimitiveNumber(ExecState* exec, double&, JSValue&)
 {
-    ASSERT_UNUSED(exec, exec->hadException() && exec->exception() == m_exception);
+    Q_UNUSED(exec);
+    Q_ASSERT(exec->hadException() && exec->exception() == m_exception);
     return false;
 }
 
 bool JSNotAnObject::toBoolean(ExecState* exec) const
 {
-    ASSERT_UNUSED(exec, exec->hadException() && exec->exception() == m_exception);
+    Q_UNUSED(exec);
+    Q_ASSERT(exec->hadException() && exec->exception() == m_exception);
     return false;
 }
 
 double JSNotAnObject::toNumber(ExecState* exec) const
 {
-    ASSERT_UNUSED(exec, exec->hadException() && exec->exception() == m_exception);
+    Q_UNUSED(exec);
+    Q_ASSERT(exec->hadException() && exec->exception() == m_exception);
     return NaN;
 }
 
 UString JSNotAnObject::toString(ExecState* exec) const
 {
-    ASSERT_UNUSED(exec, exec->hadException() && exec->exception() == m_exception);
+    Q_UNUSED(exec);
+    Q_ASSERT(exec->hadException() && exec->exception() == m_exception);
     return "";
 }
 
 JSObject* JSNotAnObject::toObject(ExecState* exec) const
 {
-    ASSERT_UNUSED(exec, exec->hadException() && exec->exception() == m_exception);
+    Q_UNUSED(exec);
+    Q_ASSERT(exec->hadException() && exec->exception() == m_exception);
     return m_exception;
 }
 
@@ -83,47 +87,55 @@ void JSNotAnObject::markChildren(MarkStack& markStack)
 // JSObject methods
 bool JSNotAnObject::getOwnPropertySlot(ExecState* exec, const Identifier&, PropertySlot&)
 {
-    ASSERT_UNUSED(exec, exec->hadException() && exec->exception() == m_exception);
+    Q_UNUSED(exec);
+    Q_ASSERT(exec->hadException() && exec->exception() == m_exception);
     return false;
 }
 
 bool JSNotAnObject::getOwnPropertySlot(ExecState* exec, unsigned, PropertySlot&)
 {
-    ASSERT_UNUSED(exec, exec->hadException() && exec->exception() == m_exception);
+    Q_UNUSED(exec);
+    Q_ASSERT(exec->hadException() && exec->exception() == m_exception);
     return false;
 }
 
 bool JSNotAnObject::getOwnPropertyDescriptor(ExecState* exec, const Identifier&, PropertyDescriptor&)
 {
-    ASSERT_UNUSED(exec, exec->hadException() && exec->exception() == m_exception);
+    Q_UNUSED(exec);
+    Q_ASSERT(exec->hadException() && exec->exception() == m_exception);
     return false;
 }
 
 void JSNotAnObject::put(ExecState* exec, const Identifier& , JSValue, PutPropertySlot&)
 {
-    ASSERT_UNUSED(exec, exec->hadException() && exec->exception() == m_exception);
+    Q_UNUSED(exec);
+    Q_ASSERT(exec->hadException() && exec->exception() == m_exception);
 }
 
 void JSNotAnObject::put(ExecState* exec, unsigned, JSValue)
 {
-    ASSERT_UNUSED(exec, exec->hadException() && exec->exception() == m_exception);
+    Q_UNUSED(exec);
+    Q_ASSERT(exec->hadException() && exec->exception() == m_exception);
 }
 
 bool JSNotAnObject::deleteProperty(ExecState* exec, const Identifier&)
 {
-    ASSERT_UNUSED(exec, exec->hadException() && exec->exception() == m_exception);
+    Q_UNUSED(exec);
+    Q_ASSERT(exec->hadException() && exec->exception() == m_exception);
     return false;
 }
 
 bool JSNotAnObject::deleteProperty(ExecState* exec, unsigned)
 {
-    ASSERT_UNUSED(exec, exec->hadException() && exec->exception() == m_exception);
+    Q_UNUSED(exec);
+    Q_ASSERT(exec->hadException() && exec->exception() == m_exception);
     return false;
 }
 
 void JSNotAnObject::getOwnPropertyNames(ExecState* exec, PropertyNameArray&, EnumerationMode)
 {
-    ASSERT_UNUSED(exec, exec->hadException() && exec->exception() == m_exception);
+    Q_UNUSED(exec);
+    Q_ASSERT(exec->hadException() && exec->exception() == m_exception);
 }
 
 } // namespace JSC
index 7365001..15e7b02 100644 (file)
@@ -60,7 +60,7 @@ bool JSVariableObject::isVariableObject() const
 
 bool JSVariableObject::symbolTableGet(const Identifier& propertyName, PropertyDescriptor& descriptor)
 {
-    SymbolTableEntry entry = symbolTable().inlineGet(propertyName.ustring().rep());
+    SymbolTableEntry entry = symbolTable().get(propertyName.ustring().rep());
     if (!entry.isNull()) {
         descriptor.setDescriptor(registerAt(entry.getIndex()).jsValue(), entry.getAttributes() | DontDelete);
         return true;
index dfa9006..b96efe6 100644 (file)
@@ -32,9 +32,7 @@
 #include "JSObject.h"
 #include "Register.h"
 #include "SymbolTable.h"
-#include "UnusedParam.h"
 #include <wtf/OwnArrayPtr.h>
-#include <wtf/UnusedParam.h>
 
 namespace JSC {
 
@@ -50,7 +48,7 @@ namespace JSC {
 
         virtual bool deleteProperty(ExecState*, const Identifier&);
         virtual void getOwnPropertyNames(ExecState*, PropertyNameArray&, EnumerationMode mode = ExcludeDontEnumProperties);
-        
+
         virtual bool isVariableObject() const;
         virtual bool isDynamicScope() const = 0;
 
@@ -60,7 +58,7 @@ namespace JSC {
         {
             return Structure::create(prototype, TypeInfo(ObjectType, StructureFlags));
         }
-        
+
     protected:
         static const unsigned StructureFlags = OverridesGetPropertyNames | JSObject::StructureFlags;
         // Subclasses of JSVariableObject can subclass this struct to add data
@@ -103,7 +101,7 @@ namespace JSC {
 
     inline bool JSVariableObject::symbolTableGet(const Identifier& propertyName, PropertySlot& slot)
     {
-        SymbolTableEntry entry = symbolTable().inlineGet(propertyName.ustring().rep());
+        SymbolTableEntry entry = symbolTable().get(propertyName.ustring().rep());
         if (!entry.isNull()) {
             slot.setRegisterSlot(&registerAt(entry.getIndex()));
             return true;
@@ -113,7 +111,7 @@ namespace JSC {
 
     inline bool JSVariableObject::symbolTableGet(const Identifier& propertyName, PropertySlot& slot, bool& slotIsWriteable)
     {
-        SymbolTableEntry entry = symbolTable().inlineGet(propertyName.ustring().rep());
+        SymbolTableEntry entry = symbolTable().get(propertyName.ustring().rep());
         if (!entry.isNull()) {
             slot.setRegisterSlot(&registerAt(entry.getIndex()));
             slotIsWriteable = !entry.isReadOnly();
@@ -126,7 +124,7 @@ namespace JSC {
     {
         Q_ASSERT(!Heap::heap(value) || Heap::heap(value) == Heap::heap(this));
 
-        SymbolTableEntry entry = symbolTable().inlineGet(propertyName.ustring().rep());
+        SymbolTableEntry entry = symbolTable().get(propertyName.ustring().rep());
         if (entry.isNull())
             return false;
         if (entry.isReadOnly())
index bf37bb3..82d4040 100644 (file)
@@ -111,7 +111,7 @@ void RegExp::compile(JSGlobalData* globalData)
 #if ENABLE(YARR_JIT)
     Yarr::jitCompileRegex(globalData, m_regExpJITCode, m_pattern, m_numSubpatterns, m_constructionError, ignoreCase(), multiline());
 #else
-    UNUSED_PARAM(globalData);
+    Q_UNUSED(globalData);
     m_regExpBytecode.set(Yarr::byteCompileRegex(m_pattern, m_numSubpatterns, m_constructionError, ignoreCase(), multiline()));
 #endif
 }
@@ -173,7 +173,7 @@ int RegExp::match(const UString& s, int startOffset, Vector<int, 32>* ovector)
 void RegExp::compile(JSGlobalData* globalData)
 {
     m_regExp = 0;
-    UNUSED_PARAM(globalData);
+    Q_UNUSED(globalData);
 
     JSRegExpIgnoreCaseOption ignoreCaseOption = ignoreCase() ? JSRegExpIgnoreCase : JSRegExpDoNotIgnoreCase;
     JSRegExpMultilineOption multilineOption = multiline() ? JSRegExpMultiline : JSRegExpSingleLine;
index 3073689..2eb11c0 100644 (file)
@@ -446,7 +446,8 @@ PassRefPtr<Structure> Structure::despecifyFunctionTransition(Structure* structur
         transition->despecifyAllFunctions();
     else {
         bool removed = transition->despecifyFunction(replaceFunction);
-        ASSERT_UNUSED(removed, removed);
+        Q_UNUSED(removed);
+        Q_ASSERT(removed);
     }
 
     return transition.release();
index 0e2bb66..cacb12a 100644 (file)
 } while(false)
 #endif
 
-// TODO: get rid of those assert macros?
-/* ASSERT_NOT_REACHED, ASSERT_UNUSED */
+// TODO: get rid of that assert macro?
+/* ASSERT_NOT_REACHED */
 
 #include <qglobal.h>
 
 #ifdef QT_NO_DEBUG
 
 #define ASSERT_NOT_REACHED() ((void)0)
-#define ASSERT_UNUSED(variable, assertion) ((void)variable)
 
 #else
 
-#define ASSERT_NOT_REACHED() Q_ASSERT_X(false, 0, "SHOULD NEVER BE REACHED\n")
-#define ASSERT_UNUSED(variable, assertion) Q_ASSERT(assertion); Q_UNUSED(variable)
+#define ASSERT_NOT_REACHED() Q_ASSERT_X(false, 0, "SHOULD NEVER BE REACHED")
 
 #endif
 
index 0c0e4da..985d612 100644 (file)
@@ -47,7 +47,6 @@
 #include <time.h>
 #include <wtf/CurrentTime.h>
 #include <wtf/Noncopyable.h>
-#include <wtf/UnusedParam.h>
 
 namespace WTF {
 
index a93b07e..19a95e8 100644 (file)
@@ -398,6 +398,4 @@ namespace WTF {
 
 using WTF::HashMap;
 
-#include "RefPtrHashMap.h"
-
 #endif /* WTF_HashMap_h */
index f22560c..ef5eff9 100644 (file)
@@ -197,7 +197,8 @@ namespace WTF {
         void checkValidity(const const_iterator& other) const
         {
             Q_ASSERT(m_table);
-            ASSERT_UNUSED(other, other.m_table);
+            Q_UNUSED(other);
+            Q_ASSERT(other.m_table);
             Q_ASSERT(m_table == other.m_table);
         }
 #else
@@ -1066,9 +1067,6 @@ namespace WTF {
     template<typename Key, typename Value, typename Extractor, typename HashFunctions, typename Traits, typename KeyTraits>
     void removeIterator(HashTableConstIterator<Key, Value, Extractor, HashFunctions, Traits, KeyTraits>* it)
     {
-        typedef HashTable<Key, Value, Extractor, HashFunctions, Traits, KeyTraits> HashTableType;
-        typedef HashTableConstIterator<Key, Value, Extractor, HashFunctions, Traits, KeyTraits> const_iterator;
-
         // Delete iterator from doubly-linked list of iterators.
         if (!it->m_table) {
             Q_ASSERT(!it->m_next);
diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/wtf/RefPtrHashMap.h b/src/3rdparty/javascriptcore/JavaScriptCore/wtf/RefPtrHashMap.h
deleted file mode 100644 (file)
index 38a17d8..0000000
+++ /dev/null
@@ -1,350 +0,0 @@
-/*
- * Copyright (C) 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB.  If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- *
- */
-
-namespace WTF {
-
-    // This specialization is a direct copy of HashMap, with overloaded functions
-    // to allow for lookup by pointer instead of RefPtr, avoiding ref-count churn.
-    
-    // FIXME: Find a better way that doesn't require an entire copy of the HashMap template.
-    
-    template<typename RawKeyType, typename ValueType, typename ValueTraits, typename HashFunctions>
-    struct RefPtrHashMapRawKeyTranslator {
-        typedef typename ValueType::first_type KeyType;
-        typedef typename ValueType::second_type MappedType;
-        typedef typename ValueTraits::FirstTraits KeyTraits;
-        typedef typename ValueTraits::SecondTraits MappedTraits;
-
-        static unsigned hash(RawKeyType key) { return HashFunctions::hash(key); }
-        static bool equal(const KeyType& a, RawKeyType b) { return HashFunctions::equal(a, b); }
-        static void translate(ValueType& location, RawKeyType key, const MappedType& mapped)
-        {
-            location.first = key;
-            location.second = mapped;
-        }
-    };
-
-    template<typename T, typename MappedArg, typename HashArg, typename KeyTraitsArg, typename MappedTraitsArg>
-    class RefPtrHashMap : public FastAllocBase {
-    private:
-        typedef KeyTraitsArg KeyTraits;
-        typedef MappedTraitsArg MappedTraits;
-        typedef PairHashTraits<KeyTraits, MappedTraits> ValueTraits;
-
-    public:
-        typedef typename KeyTraits::TraitType KeyType;
-        typedef T* RawKeyType;
-        typedef typename MappedTraits::TraitType MappedType;
-        typedef typename ValueTraits::TraitType ValueType;
-
-    private:
-        typedef HashArg HashFunctions;
-
-        typedef HashTable<KeyType, ValueType, PairFirstExtractor<ValueType>,
-            HashFunctions, ValueTraits, KeyTraits> HashTableType;
-
-        typedef RefPtrHashMapRawKeyTranslator<RawKeyType, ValueType, ValueTraits, HashFunctions>
-            RawKeyTranslator;
-
-    public:
-        typedef HashTableIteratorAdapter<HashTableType, ValueType> iterator;
-        typedef HashTableConstIteratorAdapter<HashTableType, ValueType> const_iterator;
-
-        void swap(RefPtrHashMap&);
-
-        int size() const;
-        int capacity() const;
-        bool isEmpty() const;
-
-        // iterators iterate over pairs of keys and values
-        iterator begin();
-        iterator end();
-        const_iterator begin() const;
-        const_iterator end() const;
-
-        iterator find(const KeyType&);
-        iterator find(RawKeyType);
-        const_iterator find(const KeyType&) const;
-        const_iterator find(RawKeyType) const;
-        bool contains(const KeyType&) const;
-        bool contains(RawKeyType) const;
-        MappedType get(const KeyType&) const;
-        MappedType get(RawKeyType) const;
-        MappedType inlineGet(RawKeyType) const;
-
-        // replaces value but not key if key is already present
-        // return value is a pair of the iterator to the key location, 
-        // and a boolean that's true if a new value was actually added
-        pair<iterator, bool> set(const KeyType&, const MappedType&); 
-        pair<iterator, bool> set(RawKeyType, const MappedType&); 
-
-        // does nothing if key is already present
-        // return value is a pair of the iterator to the key location, 
-        // and a boolean that's true if a new value was actually added
-        pair<iterator, bool> add(const KeyType&, const MappedType&); 
-        pair<iterator, bool> add(RawKeyType, const MappedType&); 
-
-        void remove(const KeyType&);
-        void remove(RawKeyType);
-        void remove(iterator);
-        void clear();
-
-        MappedType take(const KeyType&); // efficient combination of get with remove
-        MappedType take(RawKeyType); // efficient combination of get with remove
-
-    private:
-        pair<iterator, bool> inlineAdd(const KeyType&, const MappedType&);
-        pair<iterator, bool> inlineAdd(RawKeyType, const MappedType&);
-
-        HashTableType m_impl;
-    };
-    template<typename T, typename MappedArg, typename HashArg, typename KeyTraitsArg, typename MappedTraitsArg>
-    class HashMap<RefPtr<T>, MappedArg, HashArg, KeyTraitsArg, MappedTraitsArg> :
-        public RefPtrHashMap<T, MappedArg, HashArg, KeyTraitsArg, MappedTraitsArg>
-    {
-    };
-    
-    template<typename T, typename U, typename V, typename W, typename X>
-    inline void RefPtrHashMap<T, U, V, W, X>::swap(RefPtrHashMap& other)
-    {
-        m_impl.swap(other.m_impl); 
-    }
-
-    template<typename T, typename U, typename V, typename W, typename X>
-    inline int RefPtrHashMap<T, U, V, W, X>::size() const
-    {
-        return m_impl.size(); 
-    }
-
-    template<typename T, typename U, typename V, typename W, typename X>
-    inline int RefPtrHashMap<T, U, V, W, X>::capacity() const
-    { 
-        return m_impl.capacity(); 
-    }
-
-    template<typename T, typename U, typename V, typename W, typename X>
-    inline bool RefPtrHashMap<T, U, V, W, X>::isEmpty() const
-    {
-        return m_impl.isEmpty();
-    }
-
-    template<typename T, typename U, typename V, typename W, typename X>
-    inline typename RefPtrHashMap<T, U, V, W, X>::iterator RefPtrHashMap<T, U, V, W, X>::begin()
-    {
-        return m_impl.begin();
-    }
-
-    template<typename T, typename U, typename V, typename W, typename X>
-    inline typename RefPtrHashMap<T, U, V, W, X>::iterator RefPtrHashMap<T, U, V, W, X>::end()
-    {
-        return m_impl.end();
-    }
-
-    template<typename T, typename U, typename V, typename W, typename X>
-    inline typename RefPtrHashMap<T, U, V, W, X>::const_iterator RefPtrHashMap<T, U, V, W, X>::begin() const
-    {
-        return m_impl.begin();
-    }
-
-    template<typename T, typename U, typename V, typename W, typename X>
-    inline typename RefPtrHashMap<T, U, V, W, X>::const_iterator RefPtrHashMap<T, U, V, W, X>::end() const
-    {
-        return m_impl.end();
-    }
-
-    template<typename T, typename U, typename V, typename W, typename X>
-    inline typename RefPtrHashMap<T, U, V, W, X>::iterator RefPtrHashMap<T, U, V, W, X>::find(const KeyType& key)
-    {
-        return m_impl.find(key);
-    }
-
-    template<typename T, typename U, typename V, typename W, typename X>
-    inline typename RefPtrHashMap<T, U, V, W, X>::iterator RefPtrHashMap<T, U, V, W, X>::find(RawKeyType key)
-    {
-        return m_impl.template find<RawKeyType, RawKeyTranslator>(key);
-    }
-
-    template<typename T, typename U, typename V, typename W, typename X>
-    inline typename RefPtrHashMap<T, U, V, W, X>::const_iterator RefPtrHashMap<T, U, V, W, X>::find(const KeyType& key) const
-    {
-        return m_impl.find(key);
-    }
-
-    template<typename T, typename U, typename V, typename W, typename X>
-    inline typename RefPtrHashMap<T, U, V, W, X>::const_iterator RefPtrHashMap<T, U, V, W, X>::find(RawKeyType key) const
-    {
-        return m_impl.template find<RawKeyType, RawKeyTranslator>(key);
-    }
-
-    template<typename T, typename U, typename V, typename W, typename X>
-    inline bool RefPtrHashMap<T, U, V, W, X>::contains(const KeyType& key) const
-    {
-        return m_impl.contains(key);
-    }
-
-    template<typename T, typename U, typename V, typename W, typename X>
-    inline bool RefPtrHashMap<T, U, V, W, X>::contains(RawKeyType key) const
-    {
-        return m_impl.template contains<RawKeyType, RawKeyTranslator>(key);
-    }
-
-    template<typename T, typename U, typename V, typename W, typename X>
-    inline pair<typename RefPtrHashMap<T, U, V, W, X>::iterator, bool>
-    RefPtrHashMap<T, U, V, W, X>::inlineAdd(const KeyType& key, const MappedType& mapped) 
-    {
-        typedef HashMapTranslator<ValueType, ValueTraits, HashFunctions> TranslatorType;
-        pair<typename HashTableType::iterator, bool> p = m_impl.template add<KeyType, MappedType, TranslatorType>(key, mapped);
-//        typename RefPtrHashMap<T, U, V, W, X>::iterator temp = p.first;
-        return std::pair<typename RefPtrHashMap<T, U, V, W, X>::iterator, bool>(
-            typename RefPtrHashMap<T, U, V, W, X>::iterator(p.first), p.second);
-
-//        return m_impl.template add<KeyType, MappedType, TranslatorType>(key, mapped);
-    }
-
-    template<typename T, typename U, typename V, typename W, typename X>
-    inline pair<typename RefPtrHashMap<T, U, V, W, X>::iterator, bool>
-    RefPtrHashMap<T, U, V, W, X>::inlineAdd(RawKeyType key, const MappedType& mapped) 
-    {
-        pair<typename HashTableType::iterator, bool> p = m_impl.template add<RawKeyType, MappedType, RawKeyTranslator>(key, mapped);
-        return std::pair<typename RefPtrHashMap<T, U, V, W, X>::iterator, bool>(
-            typename RefPtrHashMap<T, U, V, W, X>::iterator(p.first), p.second);
-
- //       return m_impl.template add<RawKeyType, MappedType, RawKeyTranslator>(key, mapped);
-    }
-
-    template<typename T, typename U, typename V, typename W, typename X>
-    pair<typename RefPtrHashMap<T, U, V, W, X>::iterator, bool>
-    RefPtrHashMap<T, U, V, W, X>::set(const KeyType& key, const MappedType& mapped) 
-    {
-        pair<iterator, bool> result = inlineAdd(key, mapped);
-        if (!result.second) {
-            // add call above didn't change anything, so set the mapped value
-            result.first->second = mapped;
-        }
-        return result;
-    }
-
-    template<typename T, typename U, typename V, typename W, typename X>
-    pair<typename RefPtrHashMap<T, U, V, W, X>::iterator, bool>
-    RefPtrHashMap<T, U, V, W, X>::set(RawKeyType key, const MappedType& mapped) 
-    {
-        pair<iterator, bool> result = inlineAdd(key, mapped);
-        if (!result.second) {
-            // add call above didn't change anything, so set the mapped value
-            result.first->second = mapped;
-        }
-        return result;
-    }
-
-    template<typename T, typename U, typename V, typename W, typename X>
-    pair<typename RefPtrHashMap<T, U, V, W, X>::iterator, bool>
-    RefPtrHashMap<T, U, V, W, X>::add(const KeyType& key, const MappedType& mapped)
-    {
-        return inlineAdd(key, mapped);
-    }
-
-    template<typename T, typename U, typename V, typename W, typename X>
-    pair<typename RefPtrHashMap<T, U, V, W, X>::iterator, bool>
-    RefPtrHashMap<T, U, V, W, X>::add(RawKeyType key, const MappedType& mapped)
-    {
-        return inlineAdd(key, mapped);
-    }
-
-    template<typename T, typename U, typename V, typename W, typename MappedTraits>
-    typename RefPtrHashMap<T, U, V, W, MappedTraits>::MappedType
-    RefPtrHashMap<T, U, V, W, MappedTraits>::get(const KeyType& key) const
-    {
-        ValueType* entry = const_cast<HashTableType&>(m_impl).lookup(key);
-        if (!entry)
-            return MappedTraits::emptyValue();
-        return entry->second;
-    }
-
-    template<typename T, typename U, typename V, typename W, typename MappedTraits>
-    typename RefPtrHashMap<T, U, V, W, MappedTraits>::MappedType
-    inline RefPtrHashMap<T, U, V, W, MappedTraits>::inlineGet(RawKeyType key) const
-    {
-        ValueType* entry = const_cast<HashTableType&>(m_impl).template lookup<RawKeyType, RawKeyTranslator>(key);
-        if (!entry)
-            return MappedTraits::emptyValue();
-        return entry->second;
-    }
-
-    template<typename T, typename U, typename V, typename W, typename MappedTraits>
-    typename RefPtrHashMap<T, U, V, W, MappedTraits>::MappedType
-    RefPtrHashMap<T, U, V, W, MappedTraits>::get(RawKeyType key) const
-    {
-        return inlineGet(key);
-    }
-
-    template<typename T, typename U, typename V, typename W, typename X>
-    inline void RefPtrHashMap<T, U, V, W, X>::remove(iterator it)
-    {
-        if (it.m_impl == m_impl.end())
-            return;
-        m_impl.checkTableConsistency();
-        m_impl.removeWithoutEntryConsistencyCheck(it.m_impl);
-    }
-
-    template<typename T, typename U, typename V, typename W, typename X>
-    inline void RefPtrHashMap<T, U, V, W, X>::remove(const KeyType& key)
-    {
-        remove(find(key));
-    }
-
-    template<typename T, typename U, typename V, typename W, typename X>
-    inline void RefPtrHashMap<T, U, V, W, X>::remove(RawKeyType key)
-    {
-        remove(find(key));
-    }
-
-    template<typename T, typename U, typename V, typename W, typename X>
-    inline void RefPtrHashMap<T, U, V, W, X>::clear()
-    {
-        m_impl.clear();
-    }
-
-    template<typename T, typename U, typename V, typename W, typename MappedTraits>
-    typename RefPtrHashMap<T, U, V, W, MappedTraits>::MappedType
-    RefPtrHashMap<T, U, V, W, MappedTraits>::take(const KeyType& key)
-    {
-        // This can probably be made more efficient to avoid ref/deref churn.
-        iterator it = find(key);
-        if (it == end())
-            return MappedTraits::emptyValue();
-        typename RefPtrHashMap<T, U, V, W, MappedTraits>::MappedType result = it->second;
-        remove(it);
-        return result;
-    }
-
-    template<typename T, typename U, typename V, typename W, typename MappedTraits>
-    typename RefPtrHashMap<T, U, V, W, MappedTraits>::MappedType
-    RefPtrHashMap<T, U, V, W, MappedTraits>::take(RawKeyType key)
-    {
-        // This can probably be made more efficient to avoid ref/deref churn.
-        iterator it = find(key);
-        if (it == end())
-            return MappedTraits::emptyValue();
-        typename RefPtrHashMap<T, U, V, W, MappedTraits>::MappedType result = it->second;
-        remove(it);
-        return result;
-    }
-
-} // namespace WTF
diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/wtf/UnusedParam.h b/src/3rdparty/javascriptcore/JavaScriptCore/wtf/UnusedParam.h
deleted file mode 100644 (file)
index 996f5c8..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- *  Copyright (C) 2006 Apple Computer, Inc.
- *
- *  This library is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Library General Public
- *  License as published by the Free Software Foundation; either
- *  version 2 of the License, or (at your option) any later version.
- *
- *  This library is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Library General Public License for more details.
- *
- *  You should have received a copy of the GNU Library General Public License
- *  along with this library; see the file COPYING.LIB.  If not, write to
- *  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- *  Boston, MA 02110-1301, USA.
- *
- */
-
-#ifndef WTF_UnusedParam_h
-#define WTF_UnusedParam_h
-
-/* don't use this for C++, it should only be used in plain C files or
-   ObjC methods, where leaving off the parameter name is not allowed. */
-
-#define UNUSED_PARAM(x) (void)x
-
-#endif /* WTF_UnusedParam_h */