Title: [276496] trunk/Source/_javascript_Core
Revision
276496
Author
[email protected]
Date
2021-04-23 07:07:46 -0700 (Fri, 23 Apr 2021)

Log Message

Unreviewed, reverting r276486.
https://bugs.webkit.org/show_bug.cgi?id=224973

broke windows build

Reverted changeset:

"[JSC][Win] callOperationNoExceptionCheck() also needs to
support operations that return SlowPathReturnType"
https://bugs.webkit.org/show_bug.cgi?id=224964
https://trac.webkit.org/changeset/276486

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (276495 => 276496)


--- trunk/Source/_javascript_Core/ChangeLog	2021-04-23 13:29:26 UTC (rev 276495)
+++ trunk/Source/_javascript_Core/ChangeLog	2021-04-23 14:07:46 UTC (rev 276496)
@@ -1,3 +1,17 @@
+2021-04-23  Commit Queue  <[email protected]>
+
+        Unreviewed, reverting r276486.
+        https://bugs.webkit.org/show_bug.cgi?id=224973
+
+        broke windows build
+
+        Reverted changeset:
+
+        "[JSC][Win] callOperationNoExceptionCheck() also needs to
+        support operations that return SlowPathReturnType"
+        https://bugs.webkit.org/show_bug.cgi?id=224964
+        https://trac.webkit.org/changeset/276486
+
 2021-04-22  Fujii Hironori  <[email protected]>
 
         [JSC][Win] callOperationNoExceptionCheck() also needs to support operations that return SlowPathReturnType

Modified: trunk/Source/_javascript_Core/jit/JIT.h (276495 => 276496)


--- trunk/Source/_javascript_Core/jit/JIT.h	2021-04-23 13:29:26 UTC (rev 276495)
+++ trunk/Source/_javascript_Core/jit/JIT.h	2021-04-23 14:07:46 UTC (rev 276496)
@@ -824,18 +824,32 @@
         }
 
 #if OS(WINDOWS) && CPU(X86_64)
-        template<typename Type> static constexpr bool is64BitType = sizeof(Type) <= 8;
-        template<> static constexpr bool is64BitType<void> = true;
-
         template<typename OperationType, typename... Args>
-        MacroAssembler::Call callOperation(OperationType operation, Args... args)
+        std::enable_if_t<std::is_same<typename FunctionTraits<OperationType>::ResultType, SlowPathReturnType>::value, MacroAssembler::Call>
+        callOperation(OperationType operation, Args... args)
         {
             setupArguments<OperationType>(args...);
-            // x64 Windows cannot use standard call when the return type is larger than 64 bits.
-            if constexpr (is64BitType<typename FunctionTraits<OperationType>::ResultType>)
-                return appendCallWithExceptionCheck(operation);
             return appendCallWithExceptionCheckAndSlowPathReturnType(operation);
         }
+
+        template<typename Type>
+        struct is64BitType {
+            static constexpr bool value = sizeof(Type) <= 8;
+        };
+
+        template<>
+        struct is64BitType<void> {
+            static constexpr bool value = true;
+        };
+
+        template<typename OperationType, typename... Args>
+        std::enable_if_t<!std::is_same<typename FunctionTraits<OperationType>::ResultType, SlowPathReturnType>::value, MacroAssembler::Call>
+        callOperation(OperationType operation, Args... args)
+        {
+            static_assert(is64BitType<typename FunctionTraits<OperationType>::ResultType>::value, "Win64 cannot use standard call when return type is larger than 64 bits.");
+            setupArguments<OperationType>(args...);
+            return appendCallWithExceptionCheck(operation);
+        }
 #else // OS(WINDOWS) && CPU(X86_64)
         template<typename OperationType, typename... Args>
         MacroAssembler::Call callOperation(OperationType operation, Args... args)
@@ -862,26 +876,13 @@
             return result;
         }
 
-#if OS(WINDOWS) && CPU(X86_64)
         template<typename OperationType, typename... Args>
         MacroAssembler::Call callOperationNoExceptionCheck(OperationType operation, Args... args)
         {
             setupArguments<OperationType>(args...);
             updateTopCallFrame();
-            // x64 Windows cannot use standard call when the return type is larger than 64 bits.
-            if constexpr (is64BitType<typename FunctionTraits<OperationType>::ResultType>)
-                return appendCall(operation);
-            return appendCallWithSlowPathReturnType(operation);
-        }
-#else
-        template<typename OperationType, typename... Args>
-        MacroAssembler::Call callOperationNoExceptionCheck(OperationType operation, Args... args)
-        {
-            setupArguments<OperationType>(args...);
-            updateTopCallFrame();
             return appendCall(operation);
         }
-#endif // OS(WINDOWS) && CPU(X86_64)
 
         template<typename OperationType, typename... Args>
         MacroAssembler::Call callOperationWithCallFrameRollbackOnException(OperationType operation, Args... args)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to