From 1cdcfa500ac971727d57db8edcb41abe38516e5a Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Fri, 12 Apr 2013 15:49:31 +0200 Subject: Apply modifications on top of WTF/JSC * Extend FunctionPtr by another overloaded constructor that allows passing 6 arguments * Work around STL <> WTF incompatibilities with iterators * Remove unused printInternal functions that rely on CString/WTFString Change-Id: Ie0cc503288871cb594716e47e03dd509b1b5ac85 Reviewed-by: Lars Knoll --- src/3rdparty/masm/assembler/AssemblerBuffer.h | 4 ++-- src/3rdparty/masm/assembler/MacroAssemblerCodeRef.h | 7 +++++++ src/3rdparty/masm/wtf/PrintStream.cpp | 10 ---------- src/3rdparty/masm/wtf/PrintStream.h | 4 ---- 4 files changed, 9 insertions(+), 16 deletions(-) (limited to 'src') diff --git a/src/3rdparty/masm/assembler/AssemblerBuffer.h b/src/3rdparty/masm/assembler/AssemblerBuffer.h index 54080bdac6..277ec1043c 100644 --- a/src/3rdparty/masm/assembler/AssemblerBuffer.h +++ b/src/3rdparty/masm/assembler/AssemblerBuffer.h @@ -65,7 +65,7 @@ namespace JSC { public: AssemblerBuffer() : m_storage(inlineCapacity) - , m_buffer(m_storage.begin()) + , m_buffer(&(*m_storage.begin())) , m_capacity(inlineCapacity) , m_index(0) { @@ -164,7 +164,7 @@ namespace JSC { m_capacity += m_capacity / 2 + extraCapacity; m_storage.grow(m_capacity); - m_buffer = m_storage.begin(); + m_buffer = &(*m_storage.begin()); } private: diff --git a/src/3rdparty/masm/assembler/MacroAssemblerCodeRef.h b/src/3rdparty/masm/assembler/MacroAssemblerCodeRef.h index c2af24060a..89cffb1278 100644 --- a/src/3rdparty/masm/assembler/MacroAssemblerCodeRef.h +++ b/src/3rdparty/masm/assembler/MacroAssemblerCodeRef.h @@ -134,6 +134,13 @@ public: ASSERT_VALID_CODE_POINTER(m_value); } + template + FunctionPtr(returnType(*value)(argType1, argType2, argType3, argType4, argType5, argType6)) + : m_value((void*)value) + { + ASSERT_VALID_CODE_POINTER(m_value); + } + // MSVC doesn't seem to treat functions with different calling conventions as // different types; these methods already defined for fastcall, below. #if CALLING_CONVENTION_IS_STDCALL && !OS(WINDOWS) diff --git a/src/3rdparty/masm/wtf/PrintStream.cpp b/src/3rdparty/masm/wtf/PrintStream.cpp index c6123e1714..3bf362e281 100644 --- a/src/3rdparty/masm/wtf/PrintStream.cpp +++ b/src/3rdparty/masm/wtf/PrintStream.cpp @@ -52,16 +52,6 @@ void printInternal(PrintStream& out, const char* string) out.printf("%s", string); } -void printInternal(PrintStream& out, const CString& string) -{ - out.print(string.data()); -} - -void printInternal(PrintStream& out, const String& string) -{ - out.print(string.utf8()); -} - void printInternal(PrintStream& out, bool value) { if (value) diff --git a/src/3rdparty/masm/wtf/PrintStream.h b/src/3rdparty/masm/wtf/PrintStream.h index 7549c17f84..6fcf9c1567 100644 --- a/src/3rdparty/masm/wtf/PrintStream.h +++ b/src/3rdparty/masm/wtf/PrintStream.h @@ -209,11 +209,7 @@ public: }; WTF_EXPORT_PRIVATE void printInternal(PrintStream&, const char*); -WTF_EXPORT_PRIVATE void printInternal(PrintStream&, const CString&); -WTF_EXPORT_PRIVATE void printInternal(PrintStream&, const String&); inline void printInternal(PrintStream& out, char* value) { printInternal(out, static_cast(value)); } -inline void printInternal(PrintStream& out, CString& value) { printInternal(out, static_cast(value)); } -inline void printInternal(PrintStream& out, String& value) { printInternal(out, static_cast(value)); } WTF_EXPORT_PRIVATE void printInternal(PrintStream&, bool); WTF_EXPORT_PRIVATE void printInternal(PrintStream&, int); WTF_EXPORT_PRIVATE void printInternal(PrintStream&, unsigned); -- cgit v1.2.3