FTL should be able to do simple OSR exits using llvm.webkit.stackmap
authorfpizlo@apple.com <fpizlo@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 10 Oct 2013 04:24:07 +0000 (04:24 +0000)
committerfpizlo@apple.com <fpizlo@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 10 Oct 2013 04:24:07 +0000 (04:24 +0000)
https://bugs.webkit.org/show_bug.cgi?id=122538

Reviewed by Oliver Hunt.

* wtf/PrintStream.cpp:
(WTF::printInternal):
* wtf/PrintStream.h:
* wtf/RefCountedArray.h:
(WTF::RefCountedArray::byteSize):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@157208 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WTF/ChangeLog
Source/WTF/wtf/PrintStream.cpp
Source/WTF/wtf/PrintStream.h
Source/WTF/wtf/RefCountedArray.h

index 85ad4f2..d7c29fe 100644 (file)
@@ -1,3 +1,16 @@
+2013-10-08  Filip Pizlo  <fpizlo@apple.com>
+
+        FTL should be able to do simple OSR exits using llvm.webkit.stackmap
+        https://bugs.webkit.org/show_bug.cgi?id=122538
+
+        Reviewed by Oliver Hunt.
+
+        * wtf/PrintStream.cpp:
+        (WTF::printInternal):
+        * wtf/PrintStream.h:
+        * wtf/RefCountedArray.h:
+        (WTF::RefCountedArray::byteSize):
+
 2013-10-09  Michael Saboff  <msaboff@apple.com>
 
         Change to std::unique_ptr breaks wtf/DataLog.cpp when DATA_LOG_TO_FILE set to 1
index 689420c..b068a6f 100644 (file)
@@ -89,6 +89,16 @@ void printInternal(PrintStream& out, unsigned value)
     out.printf("%u", value);
 }
 
+void printInternal(PrintStream& out, short value)
+{
+    out.printf("%d", static_cast<int>(value));
+}
+
+void printInternal(PrintStream& out, unsigned short value)
+{
+    out.printf("%u", static_cast<unsigned>(value));
+}
+
 void printInternal(PrintStream& out, long value)
 {
     out.printf("%ld", value);
index 3eaf775..290f143 100644 (file)
@@ -257,6 +257,8 @@ inline void printInternal(PrintStream& out, CString& value) { printInternal(out,
 inline void printInternal(PrintStream& out, String& value) { printInternal(out, static_cast<const String&>(value)); }
 inline void printInternal(PrintStream& out, StringImpl* value) { printInternal(out, static_cast<const StringImpl*>(value)); }
 WTF_EXPORT_PRIVATE void printInternal(PrintStream&, bool);
+WTF_EXPORT_PRIVATE void printInternal(PrintStream&, short);
+WTF_EXPORT_PRIVATE void printInternal(PrintStream&, unsigned short);
 WTF_EXPORT_PRIVATE void printInternal(PrintStream&, int);
 WTF_EXPORT_PRIVATE void printInternal(PrintStream&, unsigned);
 WTF_EXPORT_PRIVATE void printInternal(PrintStream&, long);
index 60462cb..55abe25 100644 (file)
@@ -126,6 +126,8 @@ public:
         return Header::fromPayload(m_data)->length;
     }
     
+    size_t byteSize() const { return size() * sizeof(T); }
+    
     T* data() { return m_data; }
     T* begin() { return m_data; }
     T* end()