Title: [230078] trunk/Source/_javascript_Core
Revision
230078
Author
keith_mil...@apple.com
Date
2018-03-29 12:09:01 -0700 (Thu, 29 Mar 2018)

Log Message

ArrayMode should not try to get the DFG to think it can convert TypedArrays
https://bugs.webkit.org/show_bug.cgi?id=184137

Reviewed by Saam Barati.

* dfg/DFGArrayMode.cpp:
(JSC::DFG::ArrayMode::fromObserved):

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (230077 => 230078)


--- trunk/Source/_javascript_Core/ChangeLog	2018-03-29 16:52:33 UTC (rev 230077)
+++ trunk/Source/_javascript_Core/ChangeLog	2018-03-29 19:09:01 UTC (rev 230078)
@@ -1,3 +1,13 @@
+2018-03-29  Keith Miller  <keith_mil...@apple.com>
+
+        ArrayMode should not try to get the DFG to think it can convert TypedArrays
+        https://bugs.webkit.org/show_bug.cgi?id=184137
+
+        Reviewed by Saam Barati.
+
+        * dfg/DFGArrayMode.cpp:
+        (JSC::DFG::ArrayMode::fromObserved):
+
 2018-03-29  Commit Queue  <commit-qu...@webkit.org>
 
         Unreviewed, rolling out r230062.

Modified: trunk/Source/_javascript_Core/dfg/DFGArrayMode.cpp (230077 => 230078)


--- trunk/Source/_javascript_Core/dfg/DFGArrayMode.cpp	2018-03-29 16:52:33 UTC (rev 230077)
+++ trunk/Source/_javascript_Core/dfg/DFGArrayMode.cpp	2018-03-29 19:09:01 UTC (rev 230078)
@@ -118,6 +118,10 @@
         return ArrayMode(Array::Float64Array, nonArray, Array::AsIs).withProfile(locker, profile, makeSafe);
 
     default:
+        // If we have seen multiple TypedArray types, or a TypedArray and non-typed array, it doesn't make sense to try to convert the object since you can't convert typed arrays.
+        if (observed & ALL_TYPED_ARRAY_MODES)
+            return ArrayMode(Array::Generic, nonArray, Array::AsIs).withProfile(locker, profile, makeSafe);
+
         if ((observed & asArrayModes(NonArray)) && profile->mayInterceptIndexedAccesses(locker))
             return ArrayMode(Array::SelectUsingPredictions).withSpeculationFromProfile(locker, profile, makeSafe);
         
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to