Title: [221317] trunk/Source/_javascript_Core
Revision
221317
Author
sbar...@apple.com
Date
2017-08-29 14:55:12 -0700 (Tue, 29 Aug 2017)

Log Message

Throwing an exception in the DFG/FTL should not be a jettison-able OSR exit
https://bugs.webkit.org/show_bug.cgi?id=176060

Reviewed by Michael Saboff.

OSR exitting when we throw an exception is expected behavior. We should
not count these exits towards our jettison OSR exit threshold.

* bytecode/ExitKind.cpp:
(JSC::exitKindToString):
(JSC::exitKindMayJettison):
* bytecode/ExitKind.h:
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileThrow):

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (221316 => 221317)


--- trunk/Source/_javascript_Core/ChangeLog	2017-08-29 21:41:35 UTC (rev 221316)
+++ trunk/Source/_javascript_Core/ChangeLog	2017-08-29 21:55:12 UTC (rev 221317)
@@ -1,3 +1,24 @@
+2017-08-29  Saam Barati  <sbar...@apple.com>
+
+        Throwing an exception in the DFG/FTL should not be a jettison-able OSR exit
+        https://bugs.webkit.org/show_bug.cgi?id=176060
+
+        Reviewed by Michael Saboff.
+
+        OSR exitting when we throw an exception is expected behavior. We should
+        not count these exits towards our jettison OSR exit threshold.
+
+        * bytecode/ExitKind.cpp:
+        (JSC::exitKindToString):
+        (JSC::exitKindMayJettison):
+        * bytecode/ExitKind.h:
+        * dfg/DFGSpeculativeJIT32_64.cpp:
+        (JSC::DFG::SpeculativeJIT::compile):
+        * dfg/DFGSpeculativeJIT64.cpp:
+        (JSC::DFG::SpeculativeJIT::compile):
+        * ftl/FTLLowerDFGToB3.cpp:
+        (JSC::FTL::DFG::LowerDFGToB3::compileThrow):
+
 2017-08-29  Chris Dumez  <cdu...@apple.com>
 
         Add initial support for dataTransferItem.webkitGetAsEntry()

Modified: trunk/Source/_javascript_Core/bytecode/ExitKind.cpp (221316 => 221317)


--- trunk/Source/_javascript_Core/bytecode/ExitKind.cpp	2017-08-29 21:41:35 UTC (rev 221316)
+++ trunk/Source/_javascript_Core/bytecode/ExitKind.cpp	2017-08-29 21:55:12 UTC (rev 221317)
@@ -90,6 +90,8 @@
         return "ExceptionCheck";
     case GenericUnwind:
         return "GenericUnwind";
+    case ThrowException:
+        return "ThrowException";
     }
     RELEASE_ASSERT_NOT_REACHED();
     return "Unknown";
@@ -100,6 +102,7 @@
     switch (kind) {
     case ExceptionCheck:
     case GenericUnwind:
+    case ThrowException:
         return false;
     default:
         return true;

Modified: trunk/Source/_javascript_Core/bytecode/ExitKind.h (221316 => 221317)


--- trunk/Source/_javascript_Core/bytecode/ExitKind.h	2017-08-29 21:41:35 UTC (rev 221316)
+++ trunk/Source/_javascript_Core/bytecode/ExitKind.h	2017-08-29 21:55:12 UTC (rev 221317)
@@ -56,6 +56,7 @@
     DebuggerEvent, // We exited because we need to service the debugger.
     ExceptionCheck, // We exited because a direct exception check showed that we threw an exception from a C call.
     GenericUnwind, // We exited because a we arrived at this OSR exit from genericUnwind.
+    ThrowException, // We exited because we did 'throw'.
 };
 
 const char* exitKindToString(ExitKind);

Modified: trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT32_64.cpp (221316 => 221317)


--- trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT32_64.cpp	2017-08-29 21:41:35 UTC (rev 221316)
+++ trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT32_64.cpp	2017-08-29 21:55:12 UTC (rev 221317)
@@ -3651,7 +3651,7 @@
     case ThrowStaticError: {
         // We expect that throw statements are rare and are intended to exit the code block
         // anyway, so we just OSR back to the old JIT for now.
-        terminateSpeculativeExecution(Uncountable, JSValueRegs(), 0);
+        terminateSpeculativeExecution(ThrowException, JSValueRegs(), 0);
         break;
     }
         

Modified: trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT64.cpp (221316 => 221317)


--- trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT64.cpp	2017-08-29 21:41:35 UTC (rev 221316)
+++ trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT64.cpp	2017-08-29 21:55:12 UTC (rev 221317)
@@ -3874,7 +3874,7 @@
     case ThrowStaticError: {
         // We expect that throw statements are rare and are intended to exit the code block
         // anyway, so we just OSR back to the old JIT for now.
-        terminateSpeculativeExecution(Uncountable, JSValueRegs(), 0);
+        terminateSpeculativeExecution(ThrowException, JSValueRegs(), 0);
         break;
     }
         

Modified: trunk/Source/_javascript_Core/ftl/FTLLowerDFGToB3.cpp (221316 => 221317)


--- trunk/Source/_javascript_Core/ftl/FTLLowerDFGToB3.cpp	2017-08-29 21:41:35 UTC (rev 221316)
+++ trunk/Source/_javascript_Core/ftl/FTLLowerDFGToB3.cpp	2017-08-29 21:55:12 UTC (rev 221317)
@@ -7800,7 +7800,7 @@
     
     void compileThrow()
     {
-        terminate(Uncountable);
+        terminate(ThrowException);
     }
     
     void compileInvalidationPoint()
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to