Title: [276516] trunk/Source/_javascript_Core
- Revision
- 276516
- Author
- [email protected]
- Date
- 2021-04-23 14:01:01 -0700 (Fri, 23 Apr 2021)
Log Message
[JSC][Win] callOperationNoExceptionCheck() also needs to support operations that return SlowPathReturnType
https://bugs.webkit.org/show_bug.cgi?id=224964
Reviewed by Yusuke Suzuki.
r229989 (Bug 183655) added the x64 Windows support only for
callOperation(), but for callOperationNoExceptionCheck().
callOperationNoExceptionCheck() also needs the x64 Windows
support.
This change is a preparation for Bug 224920 that is going to use
callOperationNoExceptionCheck instead of callOperation.
* jit/JIT.h:
(callOperation): Rewrote by using 'if constexpr' instead of SFINAE.
(callOperationNoExceptionCheck): Added a new implementation for
x64 Windows based on callOperation.
Modified Paths
Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (276515 => 276516)
--- trunk/Source/_javascript_Core/ChangeLog 2021-04-23 20:11:39 UTC (rev 276515)
+++ trunk/Source/_javascript_Core/ChangeLog 2021-04-23 21:01:01 UTC (rev 276516)
@@ -1,3 +1,23 @@
+2021-04-23 Fujii Hironori <[email protected]>
+
+ [JSC][Win] callOperationNoExceptionCheck() also needs to support operations that return SlowPathReturnType
+ https://bugs.webkit.org/show_bug.cgi?id=224964
+
+ Reviewed by Yusuke Suzuki.
+
+ r229989 (Bug 183655) added the x64 Windows support only for
+ callOperation(), but for callOperationNoExceptionCheck().
+ callOperationNoExceptionCheck() also needs the x64 Windows
+ support.
+
+ This change is a preparation for Bug 224920 that is going to use
+ callOperationNoExceptionCheck instead of callOperation.
+
+ * jit/JIT.h:
+ (callOperation): Rewrote by using 'if constexpr' instead of SFINAE.
+ (callOperationNoExceptionCheck): Added a new implementation for
+ x64 Windows based on callOperation.
+
2021-04-23 Commit Queue <[email protected]>
Unreviewed, reverting r276486.
Modified: trunk/Source/_javascript_Core/jit/JIT.h (276515 => 276516)
--- trunk/Source/_javascript_Core/jit/JIT.h 2021-04-23 20:11:39 UTC (rev 276515)
+++ trunk/Source/_javascript_Core/jit/JIT.h 2021-04-23 21:01:01 UTC (rev 276516)
@@ -824,14 +824,6 @@
}
#if OS(WINDOWS) && CPU(X86_64)
- 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)
- {
- setupArguments<OperationType>(args...);
- return appendCallWithExceptionCheckAndSlowPathReturnType(operation);
- }
-
template<typename Type>
struct is64BitType {
static constexpr bool value = sizeof(Type) <= 8;
@@ -843,12 +835,13 @@
};
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)
+ 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);
+ // x64 Windows cannot use standard call when the return type is larger than 64 bits.
+ if constexpr (is64BitType<typename FunctionTraits<OperationType>::ResultType>::value)
+ return appendCallWithExceptionCheck(operation);
+ return appendCallWithExceptionCheckAndSlowPathReturnType(operation);
}
#else // OS(WINDOWS) && CPU(X86_64)
template<typename OperationType, typename... Args>
@@ -876,13 +869,26 @@
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>::value)
+ return appendCall(operation);
+ return appendCallWithSlowPathReturnType(operation);
+ }
+#else // OS(WINDOWS) && CPU(X86_64)
+ 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