Changeset 276486 in webkit
- Timestamp:
- Apr 22, 2021, 10:16:59 PM (5 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r276470 r276486 1 2021-04-22 Fujii Hironori <Hironori.Fujii@sony.com> 2 3 [JSC][Win] callOperationNoExceptionCheck() also needs to support operations that return SlowPathReturnType 4 https://bugs.webkit.org/show_bug.cgi?id=224964 5 6 Reviewed by Yusuke Suzuki. 7 8 r229989 (Bug 183655) added the x64 Windows support only for 9 callOperation(), but for callOperationNoExceptionCheck(). 10 callOperationNoExceptionCheck() also needs the x64 Windows 11 support. 12 13 This change is a preparation for Bug 224920 that is going to use 14 callOperationNoExceptionCheck instead of callOperation. 15 16 * jit/JIT.h: 17 (callOperation): Rewrote by using 'if constexpr' instead of SFINAE. 18 (callOperationNoExceptionCheck): Added a new implementation for 19 x64 Windows based on callOperation. 20 1 21 2021-04-22 Commit Queue <commit-queue@webkit.org> 2 22 -
trunk/Source/JavaScriptCore/jit/JIT.h
r275995 r276486 825 825 826 826 #if OS(WINDOWS) && CPU(X86_64) 827 template<typename Type> static constexpr bool is64BitType = sizeof(Type) <= 8; 828 template<> static constexpr bool is64BitType<void> = true; 829 827 830 template<typename OperationType, typename... Args> 828 std::enable_if_t<std::is_same<typename FunctionTraits<OperationType>::ResultType, SlowPathReturnType>::value, MacroAssembler::Call> 829 callOperation(OperationType operation, Args... args) 831 MacroAssembler::Call callOperation(OperationType operation, Args... args) 830 832 { 831 833 setupArguments<OperationType>(args...); 834 // x64 Windows cannot use standard call when the return type is larger than 64 bits. 835 if constexpr (is64BitType<typename FunctionTraits<OperationType>::ResultType>) 836 return appendCallWithExceptionCheck(operation); 832 837 return appendCallWithExceptionCheckAndSlowPathReturnType(operation); 833 }834 835 template<typename Type>836 struct is64BitType {837 static constexpr bool value = sizeof(Type) <= 8;838 };839 840 template<>841 struct is64BitType<void> {842 static constexpr bool value = true;843 };844 845 template<typename OperationType, typename... Args>846 std::enable_if_t<!std::is_same<typename FunctionTraits<OperationType>::ResultType, SlowPathReturnType>::value, MacroAssembler::Call>847 callOperation(OperationType operation, Args... args)848 {849 static_assert(is64BitType<typename FunctionTraits<OperationType>::ResultType>::value, "Win64 cannot use standard call when return type is larger than 64 bits.");850 setupArguments<OperationType>(args...);851 return appendCallWithExceptionCheck(operation);852 838 } 853 839 #else // OS(WINDOWS) && CPU(X86_64) … … 877 863 } 878 864 865 #if OS(WINDOWS) && CPU(X86_64) 866 template<typename OperationType, typename... Args> 867 MacroAssembler::Call callOperationNoExceptionCheck(OperationType operation, Args... args) 868 { 869 setupArguments<OperationType>(args...); 870 updateTopCallFrame(); 871 // x64 Windows cannot use standard call when the return type is larger than 64 bits. 872 if constexpr (is64BitType<typename FunctionTraits<OperationType>::ResultType>) 873 return appendCall(operation); 874 return appendCallWithSlowPathReturnType(operation); 875 } 876 #else 879 877 template<typename OperationType, typename... Args> 880 878 MacroAssembler::Call callOperationNoExceptionCheck(OperationType operation, Args... args) … … 884 882 return appendCall(operation); 885 883 } 884 #endif // OS(WINDOWS) && CPU(X86_64) 886 885 887 886 template<typename OperationType, typename... Args>
Note:
See TracChangeset
for help on using the changeset viewer.