Title: [254712] trunk/Source/_javascript_Core
Revision
254712
Author
[email protected]
Date
2020-01-16 15:04:28 -0800 (Thu, 16 Jan 2020)

Log Message

Reduce the code generated by DFGSlowPathGenerator.h
https://bugs.webkit.org/show_bug.cgi?id=206330

Reviewed by Mark Lam.

The FunctionType parameter is only needed by CallResultAndArgumentsSlowPathGenerator, not by its base class CallSlowPathGenerator.
Moving it allows saving about 200kB from _javascript_Core (in Release mode), by reducing the number of instantiations of the methods of CallSlowPathGenerator.

* dfg/DFGSlowPathGenerator.h:
(JSC::DFG::CallSlowPathGenerator::CallSlowPathGenerator):
(JSC::DFG::CallResultAndArgumentsSlowPathGenerator::CallResultAndArgumentsSlowPathGenerator):

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (254711 => 254712)


--- trunk/Source/_javascript_Core/ChangeLog	2020-01-16 22:57:43 UTC (rev 254711)
+++ trunk/Source/_javascript_Core/ChangeLog	2020-01-16 23:04:28 UTC (rev 254712)
@@ -1,3 +1,17 @@
+2020-01-16  Robin Morisset  <[email protected]>
+
+        Reduce the code generated by DFGSlowPathGenerator.h
+        https://bugs.webkit.org/show_bug.cgi?id=206330
+
+        Reviewed by Mark Lam.
+
+        The FunctionType parameter is only needed by CallResultAndArgumentsSlowPathGenerator, not by its base class CallSlowPathGenerator.
+        Moving it allows saving about 200kB from _javascript_Core (in Release mode), by reducing the number of instantiations of the methods of CallSlowPathGenerator.
+
+        * dfg/DFGSlowPathGenerator.h:
+        (JSC::DFG::CallSlowPathGenerator::CallSlowPathGenerator):
+        (JSC::DFG::CallResultAndArgumentsSlowPathGenerator::CallResultAndArgumentsSlowPathGenerator):
+
 2020-01-16  Don Olmstead  <[email protected]>
 
         Non-unified build fixes mid January 2020 edition

Modified: trunk/Source/_javascript_Core/dfg/DFGSlowPathGenerator.h (254711 => 254712)


--- trunk/Source/_javascript_Core/dfg/DFGSlowPathGenerator.h	2020-01-16 22:57:43 UTC (rev 254711)
+++ trunk/Source/_javascript_Core/dfg/DFGSlowPathGenerator.h	2020-01-16 23:04:28 UTC (rev 254712)
@@ -102,17 +102,16 @@
     CheckNotNeeded
 };
 
-template<typename JumpType, typename FunctionType, typename ResultType>
+template<typename JumpType, typename ResultType>
 class CallSlowPathGenerator : public JumpingSlowPathGenerator<JumpType> {
 public:
     CallSlowPathGenerator(
-        JumpType from, SpeculativeJIT* jit, FunctionType function,
+        JumpType from, SpeculativeJIT* jit,
         SpillRegistersMode spillMode, ExceptionCheckRequirement requirement, ResultType result)
         : JumpingSlowPathGenerator<JumpType>(from, jit)
         , m_spillMode(spillMode)
         , m_exceptionCheckRequirement(requirement)
         , m_result(result)
-        , m_function(function)
     {
         if (m_spillMode == NeedToSpill)
             jit->silentSpillAllRegistersImpl(false, m_plans, extractResult(result));
@@ -153,19 +152,18 @@
     SpillRegistersMode m_spillMode;
     ExceptionCheckRequirement m_exceptionCheckRequirement;
     ResultType m_result;
-    FunctionType m_function;
     Vector<SilentRegisterSavePlan, 2> m_plans;
 };
 
 template<typename JumpType, typename FunctionType, typename ResultType, typename... Arguments>
 class CallResultAndArgumentsSlowPathGenerator
-    : public CallSlowPathGenerator<JumpType, FunctionType, ResultType> {
+    : public CallSlowPathGenerator<JumpType, ResultType> {
 public:
     CallResultAndArgumentsSlowPathGenerator(
         JumpType from, SpeculativeJIT* jit, FunctionType function,
         SpillRegistersMode spillMode, ExceptionCheckRequirement requirement, ResultType result, Arguments... arguments)
-        : CallSlowPathGenerator<JumpType, FunctionType, ResultType>(
-            from, jit, function, spillMode, requirement, result)
+        : CallSlowPathGenerator<JumpType, ResultType>(from, jit, spillMode, requirement, result)
+        , m_function(function)
         , m_arguments(std::forward<Arguments>(arguments)...)
     {
     }
@@ -184,6 +182,7 @@
         unpackAndGenerate(jit, std::make_index_sequence<std::tuple_size<std::tuple<Arguments...>>::value>());
     }
 
+    FunctionType m_function;
     std::tuple<Arguments...> m_arguments;
 };
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to