diff --git a/Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h b/Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h index c4951003c3af4..cb144e1afb21f 100644 --- a/Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h +++ b/Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h @@ -62,7 +62,6 @@ #include "WebAssemblyModuleRecord.h" #include #include -#include namespace JSC { namespace DFG { diff --git a/Source/JavaScriptCore/runtime/JSObjectInlines.h b/Source/JavaScriptCore/runtime/JSObjectInlines.h index 3c8c2f0884f3d..3f6988545cb03 100644 --- a/Source/JavaScriptCore/runtime/JSObjectInlines.h +++ b/Source/JavaScriptCore/runtime/JSObjectInlines.h @@ -37,7 +37,6 @@ #include "MegamorphicCache.h" #include "StructureInlines.h" #include "TypedArrayType.h" -#include namespace JSC { diff --git a/Source/WTF/wtf/Float16.h b/Source/WTF/wtf/Float16.h index 8fbfd7eef99e6..e003005a6a5f7 100644 --- a/Source/WTF/wtf/Float16.h +++ b/Source/WTF/wtf/Float16.h @@ -56,7 +56,7 @@ namespace WTF { */ constexpr float convertFloat16ToFloat32(uint16_t h) { -#if (CPU(ARM64) || CPU(X86_64)) && defined(__FLT16_MANT_DIG__) +#if HAVE(FLOAT16) return static_cast(__bit_cast<_Float16>(h)); #else @@ -178,7 +178,7 @@ constexpr double convertFloat16ToFloat64(uint16_t h) */ constexpr uint16_t convertFloat32ToFloat16(float f) { -#if (CPU(ARM64) || CPU(X86_64)) && defined(__FLT16_MANT_DIG__) +#if HAVE(FLOAT16) return __bit_cast(static_cast<_Float16>(f)); #else const float scale_to_inf = 0x1.0p+112f; // 0x77800000 @@ -206,7 +206,7 @@ constexpr uint16_t convertFloat32ToFloat16(float f) // Adopted from V8's DoubleToFloat16, which adopted from https://gist.github.com/rygorous/2156668. constexpr uint16_t convertFloat64ToFloat16(double value) { -#if (CPU(ARM64) || CPU(X86_64)) && defined(__FLT16_MANT_DIG__) +#if HAVE(FLOAT16) return __bit_cast(static_cast<_Float16>(value)); #else // uint64_t constants prefixed with kFP64 are bit patterns of doubles. @@ -286,7 +286,7 @@ constexpr uint16_t convertFloat64ToFloat16(double value) #endif } -#if (CPU(ARM64) || CPU(X86_64)) && defined(__FLT16_MANT_DIG__) +#if HAVE(FLOAT16) class Float16 { public: constexpr Float16() = default; diff --git a/Source/WTF/wtf/ForkExtras.h b/Source/WTF/wtf/ForkExtras.h index 76cde51188d50..108f92b3cc459 100644 --- a/Source/WTF/wtf/ForkExtras.h +++ b/Source/WTF/wtf/ForkExtras.h @@ -25,31 +25,3 @@ typedef struct jsstring_iterator { #ifdef __cplusplus } #endif - -#if CPU(X86_64) - -#ifndef __extendhfsf2 -#if defined(__FLT16_MANT_DIG__) -extern "C" float __extendhfsf2(_Float16 a); -#else -extern "C" float __extendhfsf2(uint16_t a); -#endif -#endif - -#ifndef __truncdfhf2 -#if defined(__FLT16_MANT_DIG__) -extern "C" _Float16 __truncdfhf2(double a); -#else -extern "C" uint16_t __truncdfhf2(double a); -#endif -#endif - -#ifndef __truncsfhf2 -#if defined(__FLT16_MANT_DIG__) -extern "C" _Float16 __truncsfhf2(float a); -#else -extern "C" uint16_t __truncsfhf2(float a); -#endif -#endif - -#endif diff --git a/Source/WTF/wtf/StdLibExtras.h b/Source/WTF/wtf/StdLibExtras.h index 917f2f8691d9c..d4df7fbc4c86c 100644 --- a/Source/WTF/wtf/StdLibExtras.h +++ b/Source/WTF/wtf/StdLibExtras.h @@ -39,7 +39,6 @@ #include #include #include -#include #if defined(__cpp_lib_bit_cast) && __cpp_lib_bit_cast >= 201806L #define __bit_cast std::bit_cast