Title: [238099] tags/Safari-607.1.13.2/Source
Revision
238099
Author
[email protected]
Date
2018-11-12 11:07:26 -0800 (Mon, 12 Nov 2018)

Log Message

Cherry-pick r238031. rdar://problem/45848446

    LLInt VectorSizeOffset should be based on offset extraction
    https://bugs.webkit.org/show_bug.cgi?id=191468

    Reviewed by Yusuke Suzuki.

    Source/_javascript_Core:

    This patch also adds some usings to LLIntOffsetsExtractor that
    make it possible to use the bare names of Vector/RefCountedArray
    in offsets extraction.

    * llint/LLIntOffsetsExtractor.cpp:
    * llint/LowLevelInterpreter.asm:

    Source/WTF:

    Make things friends with LLIntOffsetsExtractor.

    * wtf/RefCountedArray.h:
    * wtf/Vector.h:

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

Modified Paths

Diff

Modified: tags/Safari-607.1.13.2/Source/_javascript_Core/ChangeLog (238098 => 238099)


--- tags/Safari-607.1.13.2/Source/_javascript_Core/ChangeLog	2018-11-12 18:58:01 UTC (rev 238098)
+++ tags/Safari-607.1.13.2/Source/_javascript_Core/ChangeLog	2018-11-12 19:07:26 UTC (rev 238099)
@@ -1,3 +1,44 @@
+2018-11-12  Alan Coon  <[email protected]>
+
+        Cherry-pick r238031. rdar://problem/45848446
+
+    LLInt VectorSizeOffset should be based on offset extraction
+    https://bugs.webkit.org/show_bug.cgi?id=191468
+    
+    Reviewed by Yusuke Suzuki.
+    
+    Source/_javascript_Core:
+    
+    This patch also adds some usings to LLIntOffsetsExtractor that
+    make it possible to use the bare names of Vector/RefCountedArray
+    in offsets extraction.
+    
+    * llint/LLIntOffsetsExtractor.cpp:
+    * llint/LowLevelInterpreter.asm:
+    
+    Source/WTF:
+    
+    Make things friends with LLIntOffsetsExtractor.
+    
+    * wtf/RefCountedArray.h:
+    * wtf/Vector.h:
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@238031 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2018-11-09  Keith Miller  <[email protected]>
+
+            LLInt VectorSizeOffset should be based on offset extraction
+            https://bugs.webkit.org/show_bug.cgi?id=191468
+
+            Reviewed by Yusuke Suzuki.
+
+            This patch also adds some usings to LLIntOffsetsExtractor that
+            make it possible to use the bare names of Vector/RefCountedArray
+            in offsets extraction.
+
+            * llint/LLIntOffsetsExtractor.cpp:
+            * llint/LowLevelInterpreter.asm:
+
 2018-11-08  Babak Shafiei  <[email protected]>
 
         Cherry-pick r238012. rdar://problem/45930711

Modified: tags/Safari-607.1.13.2/Source/_javascript_Core/llint/LLIntOffsetsExtractor.cpp (238098 => 238099)


--- tags/Safari-607.1.13.2/Source/_javascript_Core/llint/LLIntOffsetsExtractor.cpp	2018-11-12 18:58:01 UTC (rev 238098)
+++ tags/Safari-607.1.13.2/Source/_javascript_Core/llint/LLIntOffsetsExtractor.cpp	2018-11-12 19:07:26 UTC (rev 238099)
@@ -70,6 +70,10 @@
 #define OFFLINE_ASM_OFFSETOF(clazz, field) (static_cast<unsigned>(OBJECT_OFFSETOF(clazz, field)))
 
 class LLIntOffsetsExtractor {
+    // These types are useful since we can't use '<...>' syntax in LLInt offsets extraction. e.g. Vector<int>::m_data
+    using Vector = WTF::Vector<int>;
+    using RefCountedArray = WTF::RefCountedArray<int>;
+
 public:
     static const int64_t* dummy();
 };

Modified: tags/Safari-607.1.13.2/Source/_javascript_Core/llint/LowLevelInterpreter.asm (238098 => 238099)


--- tags/Safari-607.1.13.2/Source/_javascript_Core/llint/LowLevelInterpreter.asm	2018-11-12 18:58:01 UTC (rev 238098)
+++ tags/Safari-607.1.13.2/Source/_javascript_Core/llint/LowLevelInterpreter.asm	2018-11-12 19:07:26 UTC (rev 238099)
@@ -434,13 +434,8 @@
 
 const BlackThreshold = constexpr blackThreshold
 
-# This must match wtf/Vector.h
-const VectorBufferOffset = 0
-if JSVALUE64
-    const VectorSizeOffset = 12
-else
-    const VectorSizeOffset = 8
-end
+const VectorBufferOffset = Vector::m_buffer
+const VectorSizeOffset = Vector::m_size
 
 # Some common utilities.
 macro crash()
@@ -1113,7 +1108,7 @@
     addp -profileArgSkip, t0 # Use addi because that's what has the peephole
     assert(macro (ok) bpgteq t0, 0, ok end)
     btpz t0, .argumentProfileDone
-    loadp CodeBlock::m_argumentValueProfiles + VectorBufferOffset[t1], t3
+    loadp CodeBlock::m_argumentValueProfiles + RefCountedArray::m_data[t1], t3
     btpz t3, .argumentProfileDone # When we can't JIT, we don't allocate any argument value profiles.
     mulp sizeof ValueProfile, t0, t2 # Aaaaahhhh! Need strength reduction!
     lshiftp 3, t0

Modified: tags/Safari-607.1.13.2/Source/WTF/ChangeLog (238098 => 238099)


--- tags/Safari-607.1.13.2/Source/WTF/ChangeLog	2018-11-12 18:58:01 UTC (rev 238098)
+++ tags/Safari-607.1.13.2/Source/WTF/ChangeLog	2018-11-12 19:07:26 UTC (rev 238099)
@@ -1,3 +1,42 @@
+2018-11-12  Alan Coon  <[email protected]>
+
+        Cherry-pick r238031. rdar://problem/45848446
+
+    LLInt VectorSizeOffset should be based on offset extraction
+    https://bugs.webkit.org/show_bug.cgi?id=191468
+    
+    Reviewed by Yusuke Suzuki.
+    
+    Source/_javascript_Core:
+    
+    This patch also adds some usings to LLIntOffsetsExtractor that
+    make it possible to use the bare names of Vector/RefCountedArray
+    in offsets extraction.
+    
+    * llint/LLIntOffsetsExtractor.cpp:
+    * llint/LowLevelInterpreter.asm:
+    
+    Source/WTF:
+    
+    Make things friends with LLIntOffsetsExtractor.
+    
+    * wtf/RefCountedArray.h:
+    * wtf/Vector.h:
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@238031 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2018-11-09  Keith Miller  <[email protected]>
+
+            LLInt VectorSizeOffset should be based on offset extraction
+            https://bugs.webkit.org/show_bug.cgi?id=191468
+
+            Reviewed by Yusuke Suzuki.
+
+            Make things friends with LLIntOffsetsExtractor.
+
+            * wtf/RefCountedArray.h:
+            * wtf/Vector.h:
+
 2018-11-07  Alan Coon  <[email protected]>
 
         Revert r237547. rdar://problem/45895377

Modified: tags/Safari-607.1.13.2/Source/WTF/wtf/RefCountedArray.h (238098 => 238099)


--- tags/Safari-607.1.13.2/Source/WTF/wtf/RefCountedArray.h	2018-11-12 18:58:01 UTC (rev 238098)
+++ tags/Safari-607.1.13.2/Source/WTF/wtf/RefCountedArray.h	2018-11-12 19:07:26 UTC (rev 238099)
@@ -235,6 +235,7 @@
             Header::fromPayload(data())->refCount++;
     }
 
+    friend class JSC::LLIntOffsetsExtractor;
     typename PtrTraits::StorageType m_data { nullptr };
 };
 

Modified: tags/Safari-607.1.13.2/Source/WTF/wtf/Vector.h (238098 => 238099)


--- tags/Safari-607.1.13.2/Source/WTF/wtf/Vector.h	2018-11-12 18:58:01 UTC (rev 238098)
+++ tags/Safari-607.1.13.2/Source/WTF/wtf/Vector.h	2018-11-12 19:07:26 UTC (rev 238099)
@@ -40,6 +40,10 @@
 extern "C" void __sanitizer_annotate_contiguous_container(const void* begin, const void* end, const void* old_mid, const void* new_mid);
 #endif
 
+namespace JSC {
+class LLIntOffsetsExtractor;
+}
+
 namespace WTF {
 
 template <bool needsDestruction, typename T>
@@ -428,6 +432,7 @@
     using Base::m_size;
 
 private:
+    friend class JSC::LLIntOffsetsExtractor;
     using Base::m_buffer;
     using Base::m_capacity;
 };
@@ -607,6 +612,7 @@
 private:
     typedef VectorBuffer<T, inlineCapacity> Base;
     typedef VectorTypeOperations<T> TypeOperations;
+    friend class JSC::LLIntOffsetsExtractor;
 
 public:
     typedef T ValueType;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to