Title: [245710] trunk
Revision
245710
Author
[email protected]
Date
2019-05-23 13:43:49 -0700 (Thu, 23 May 2019)

Log Message

DFG::OSREntry should not perform arity check
https://bugs.webkit.org/show_bug.cgi?id=198189

Reviewed by Saam Barati.

JSTests:

* microbenchmarks/loop-osr-with-arity-mismatch.js: Added.
(foo):

Source/_javascript_Core:

The check prevents OSR entering from hot loops inside functions that were called
with too few arguments.

* dfg/DFGOSREntry.cpp:
(JSC::DFG::prepareOSREntry):

Modified Paths

Added Paths

Diff

Modified: trunk/JSTests/ChangeLog (245709 => 245710)


--- trunk/JSTests/ChangeLog	2019-05-23 20:23:01 UTC (rev 245709)
+++ trunk/JSTests/ChangeLog	2019-05-23 20:43:49 UTC (rev 245710)
@@ -1,3 +1,13 @@
+2019-05-23  Tadeu Zagallo  <[email protected]>
+
+        DFG::OSREntry should not perform arity check
+        https://bugs.webkit.org/show_bug.cgi?id=198189
+
+        Reviewed by Saam Barati.
+
+        * microbenchmarks/loop-osr-with-arity-mismatch.js: Added.
+        (foo):
+
 2019-05-23  Stephan Szabo  <[email protected]>
 
         [PlayStation] Skip additional tests on PlayStation

Added: trunk/JSTests/microbenchmarks/loop-osr-with-arity-mismatch.js (0 => 245710)


--- trunk/JSTests/microbenchmarks/loop-osr-with-arity-mismatch.js	                        (rev 0)
+++ trunk/JSTests/microbenchmarks/loop-osr-with-arity-mismatch.js	2019-05-23 20:43:49 UTC (rev 245710)
@@ -0,0 +1,6 @@
+function foo(x, y) {
+    for (var i = 0; i < 1e7; i++) {
+        x[y] += i;
+    }
+}
+foo({})

Modified: trunk/Source/_javascript_Core/ChangeLog (245709 => 245710)


--- trunk/Source/_javascript_Core/ChangeLog	2019-05-23 20:23:01 UTC (rev 245709)
+++ trunk/Source/_javascript_Core/ChangeLog	2019-05-23 20:43:49 UTC (rev 245710)
@@ -1,3 +1,16 @@
+2019-05-23  Tadeu Zagallo  <[email protected]>
+
+        DFG::OSREntry should not perform arity check
+        https://bugs.webkit.org/show_bug.cgi?id=198189
+
+        Reviewed by Saam Barati.
+
+        The check prevents OSR entering from hot loops inside functions that were called
+        with too few arguments.
+
+        * dfg/DFGOSREntry.cpp:
+        (JSC::DFG::prepareOSREntry):
+
 2019-05-23  Ross Kirsling  <[email protected]>
 
         Lexer<T>::parseDecimal ought to ASSERT isASCIIDigit

Modified: trunk/Source/_javascript_Core/dfg/DFGOSREntry.cpp (245709 => 245710)


--- trunk/Source/_javascript_Core/dfg/DFGOSREntry.cpp	2019-05-23 20:23:01 UTC (rev 245709)
+++ trunk/Source/_javascript_Core/dfg/DFGOSREntry.cpp	2019-05-23 20:43:49 UTC (rev 245710)
@@ -177,15 +177,6 @@
     //    OSR at this time.
     
     for (size_t argument = 0; argument < entry->m_expectedValues.numberOfArguments(); ++argument) {
-        if (argument >= exec->argumentCountIncludingThis()) {
-            if (Options::verboseOSR()) {
-                dataLogF("    OSR failed because argument %zu was not passed, expected ", argument);
-                entry->m_expectedValues.argument(argument).dump(WTF::dataFile());
-                dataLogF(".\n");
-            }
-            return nullptr;
-        }
-        
         JSValue value;
         if (!argument)
             value = exec->thisValue();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to