Title: [231413] releases/WebKitGTK/webkit-2.20/Source
Revision
231413
Author
[email protected]
Date
2018-05-07 01:18:39 -0700 (Mon, 07 May 2018)

Log Message

Merge r230380 - Use alignas instead of compiler-specific attributes
https://bugs.webkit.org/show_bug.cgi?id=183508

Reviewed by Mark Lam.

Source/bmalloc:

Use alignas for g_gigacageBasePtr. We also add reinterpret_cast to fix
compile errors in ARMv7 and MIPS JSCOnly ports.

* bmalloc/Gigacage.cpp:
* bmalloc/Gigacage.h:
(Gigacage::basePtrs):

Source/_javascript_Core:

Use C++11 alignas specifier. It is portable compared to compiler-specific aligned attributes.

* heap/RegisterState.h:
* jit/JIT.h:
(JSC::JIT::compile): Deleted.
(JSC::JIT::compileGetByVal): Deleted.
(JSC::JIT::compileGetByValWithCachedId): Deleted.
(JSC::JIT::compilePutByVal): Deleted.
(JSC::JIT::compileDirectPutByVal): Deleted.
(JSC::JIT::compilePutByValWithCachedId): Deleted.
(JSC::JIT::compileHasIndexedProperty): Deleted.
(JSC::JIT::appendCall): Deleted.
(JSC::JIT::appendCallWithSlowPathReturnType): Deleted.
(JSC::JIT::exceptionCheck): Deleted.
(JSC::JIT::exceptionCheckWithCallFrameRollback): Deleted.
(JSC::JIT::emitInt32Load): Deleted.
(JSC::JIT::emitInt32GetByVal): Deleted.
(JSC::JIT::emitInt32PutByVal): Deleted.
(JSC::JIT::emitDoublePutByVal): Deleted.
(JSC::JIT::emitContiguousPutByVal): Deleted.
(JSC::JIT::emitStoreCell): Deleted.
(JSC::JIT::getSlowCase): Deleted.
(JSC::JIT::linkSlowCase): Deleted.
(JSC::JIT::linkDummySlowCase): Deleted.
(JSC::JIT::linkAllSlowCases): Deleted.
(JSC::JIT::callOperation): Deleted.
(JSC::JIT::callOperationWithProfile): Deleted.
(JSC::JIT::callOperationWithResult): Deleted.
(JSC::JIT::callOperationNoExceptionCheck): Deleted.
(JSC::JIT::callOperationWithCallFrameRollbackOnException): Deleted.
(JSC::JIT::emitEnterOptimizationCheck): Deleted.
(JSC::JIT::sampleCodeBlock): Deleted.
(JSC::JIT::canBeOptimized): Deleted.
(JSC::JIT::canBeOptimizedOrInlined): Deleted.
(JSC::JIT::shouldEmitProfiling): Deleted.
* runtime/VM.h:

Source/WebCore:

Use alignas instead of aligned.

* platform/graphics/cpu/arm/filters/FELightingNEON.cpp:
* platform/graphics/cpu/arm/filters/FELightingNEON.h:
(WebCore::FELighting::platformApplyNeon):

Source/WTF:

Use alignas for g_gigacageBasePtr. We also add reinterpret_cast to fix
compile errors in ARMv7 and MIPS JSCOnly ports.

* wtf/Gigacage.cpp:
* wtf/Gigacage.h:
(Gigacage::basePtrs):

Modified Paths

Diff

Modified: releases/WebKitGTK/webkit-2.20/Source/_javascript_Core/ChangeLog (231412 => 231413)


--- releases/WebKitGTK/webkit-2.20/Source/_javascript_Core/ChangeLog	2018-05-07 07:54:29 UTC (rev 231412)
+++ releases/WebKitGTK/webkit-2.20/Source/_javascript_Core/ChangeLog	2018-05-07 08:18:39 UTC (rev 231413)
@@ -1,3 +1,47 @@
+2018-04-08  Yusuke Suzuki  <[email protected]>
+
+        Use alignas instead of compiler-specific attributes
+        https://bugs.webkit.org/show_bug.cgi?id=183508
+
+        Reviewed by Mark Lam.
+
+        Use C++11 alignas specifier. It is portable compared to compiler-specific aligned attributes.
+
+        * heap/RegisterState.h:
+        * jit/JIT.h:
+        (JSC::JIT::compile): Deleted.
+        (JSC::JIT::compileGetByVal): Deleted.
+        (JSC::JIT::compileGetByValWithCachedId): Deleted.
+        (JSC::JIT::compilePutByVal): Deleted.
+        (JSC::JIT::compileDirectPutByVal): Deleted.
+        (JSC::JIT::compilePutByValWithCachedId): Deleted.
+        (JSC::JIT::compileHasIndexedProperty): Deleted.
+        (JSC::JIT::appendCall): Deleted.
+        (JSC::JIT::appendCallWithSlowPathReturnType): Deleted.
+        (JSC::JIT::exceptionCheck): Deleted.
+        (JSC::JIT::exceptionCheckWithCallFrameRollback): Deleted.
+        (JSC::JIT::emitInt32Load): Deleted.
+        (JSC::JIT::emitInt32GetByVal): Deleted.
+        (JSC::JIT::emitInt32PutByVal): Deleted.
+        (JSC::JIT::emitDoublePutByVal): Deleted.
+        (JSC::JIT::emitContiguousPutByVal): Deleted.
+        (JSC::JIT::emitStoreCell): Deleted.
+        (JSC::JIT::getSlowCase): Deleted.
+        (JSC::JIT::linkSlowCase): Deleted.
+        (JSC::JIT::linkDummySlowCase): Deleted.
+        (JSC::JIT::linkAllSlowCases): Deleted.
+        (JSC::JIT::callOperation): Deleted.
+        (JSC::JIT::callOperationWithProfile): Deleted.
+        (JSC::JIT::callOperationWithResult): Deleted.
+        (JSC::JIT::callOperationNoExceptionCheck): Deleted.
+        (JSC::JIT::callOperationWithCallFrameRollbackOnException): Deleted.
+        (JSC::JIT::emitEnterOptimizationCheck): Deleted.
+        (JSC::JIT::sampleCodeBlock): Deleted.
+        (JSC::JIT::canBeOptimized): Deleted.
+        (JSC::JIT::canBeOptimizedOrInlined): Deleted.
+        (JSC::JIT::shouldEmitProfiling): Deleted.
+        * runtime/VM.h:
+
 2018-04-10  Filip Pizlo  <[email protected]>
 
         REGRESSION(r227341 and r227742): AI and clobberize should be precise and consistent about the effectfulness of CompareEq

Modified: releases/WebKitGTK/webkit-2.20/Source/_javascript_Core/heap/RegisterState.h (231412 => 231413)


--- releases/WebKitGTK/webkit-2.20/Source/_javascript_Core/heap/RegisterState.h	2018-05-07 07:54:29 UTC (rev 231412)
+++ releases/WebKitGTK/webkit-2.20/Source/_javascript_Core/heap/RegisterState.h	2018-05-07 08:18:39 UTC (rev 231413)
@@ -131,13 +131,8 @@
 #endif // !OS(WINDOWS)
 
 #ifndef ALLOCATE_AND_GET_REGISTER_STATE
-#if COMPILER(GCC_OR_CLANG)
-#define REGISTER_BUFFER_ALIGNMENT __attribute__ ((aligned (sizeof(void*))))
-#else
-#define REGISTER_BUFFER_ALIGNMENT
-#endif
 
-typedef jmp_buf RegisterState;
+using RegisterState = jmp_buf;
 
 // ALLOCATE_AND_GET_REGISTER_STATE() is a macro so that it is always "inlined" even in debug builds.
 #if COMPILER(MSVC)
@@ -144,12 +139,12 @@
 #pragma warning(push)
 #pragma warning(disable: 4611)
 #define ALLOCATE_AND_GET_REGISTER_STATE(registers) \
-    RegisterState registers REGISTER_BUFFER_ALIGNMENT; \
+    alignas(void*) RegisterState registers; \
     setjmp(registers)
 #pragma warning(pop)
 #else
 #define ALLOCATE_AND_GET_REGISTER_STATE(registers) \
-    RegisterState registers REGISTER_BUFFER_ALIGNMENT; \
+    alignas(void*) RegisterState registers; \
     setjmp(registers)
 #endif
 #endif // ALLOCATE_AND_GET_REGISTER_STATE

Modified: releases/WebKitGTK/webkit-2.20/Source/_javascript_Core/jit/JIT.h (231412 => 231413)


--- releases/WebKitGTK/webkit-2.20/Source/_javascript_Core/jit/JIT.h	2018-05-07 07:54:29 UTC (rev 231412)
+++ releases/WebKitGTK/webkit-2.20/Source/_javascript_Core/jit/JIT.h	2018-05-07 08:18:39 UTC (rev 231413)
@@ -27,14 +27,6 @@
 
 #if ENABLE(JIT)
 
-// We've run into some problems where changing the size of the class JIT leads to
-// performance fluctuations.  Try forcing alignment in an attempt to stabalize this.
-#if COMPILER(GCC_OR_CLANG)
-#define JIT_CLASS_ALIGNMENT __attribute__ ((aligned (32)))
-#else
-#define JIT_CLASS_ALIGNMENT
-#endif
-
 #define ASSERT_JIT_OFFSET(actual, expected) ASSERT_WITH_MESSAGE(actual == expected, "JIT Offset \"%s\" should be %d, not %d.\n", #expected, static_cast<int>(expected), static_cast<int>(actual));
 
 #include "CodeBlock.h"
@@ -176,7 +168,9 @@
 
     void ctiPatchCallByReturnAddress(ReturnAddressPtr, FunctionPtr newCalleeFunction);
 
-    class JIT : private JSInterfaceJIT {
+    // We've run into some problems where changing the size of the class JIT leads to
+    // performance fluctuations. Try forcing alignment in an attempt to stabilize this.
+    class alignas(32) JIT : private JSInterfaceJIT {
         friend class JITSlowPathCall;
         friend class JITStubCall;
 
@@ -946,7 +940,7 @@
         bool m_shouldEmitProfiling;
         bool m_shouldUseIndexMasking;
         unsigned m_loopOSREntryBytecodeOffset { 0 };
-    } JIT_CLASS_ALIGNMENT;
+    };
 
 } // namespace JSC
 

Modified: releases/WebKitGTK/webkit-2.20/Source/_javascript_Core/runtime/VM.h (231412 => 231413)


--- releases/WebKitGTK/webkit-2.20/Source/_javascript_Core/runtime/VM.h	2018-05-07 07:54:29 UTC (rev 231412)
+++ releases/WebKitGTK/webkit-2.20/Source/_javascript_Core/runtime/VM.h	2018-05-07 08:18:39 UTC (rev 231413)
@@ -232,7 +232,7 @@
         double pad; // Make sure m_buffer is double aligned.
     } u;
 #if CPU(MIPS) && (defined WTF_MIPS_ARCH_REV && WTF_MIPS_ARCH_REV == 2)
-    void* m_buffer[0] __attribute__((aligned(8)));
+    alignas(8) void* m_buffer[0];
 #else
     void* m_buffer[0];
 #endif

Modified: releases/WebKitGTK/webkit-2.20/Source/WTF/ChangeLog (231412 => 231413)


--- releases/WebKitGTK/webkit-2.20/Source/WTF/ChangeLog	2018-05-07 07:54:29 UTC (rev 231412)
+++ releases/WebKitGTK/webkit-2.20/Source/WTF/ChangeLog	2018-05-07 08:18:39 UTC (rev 231413)
@@ -1,3 +1,17 @@
+2018-04-08  Yusuke Suzuki  <[email protected]>
+
+        Use alignas instead of compiler-specific attributes
+        https://bugs.webkit.org/show_bug.cgi?id=183508
+
+        Reviewed by Mark Lam.
+
+        Use alignas for g_gigacageBasePtr. We also add reinterpret_cast to fix
+        compile errors in ARMv7 and MIPS JSCOnly ports.
+
+        * wtf/Gigacage.cpp:
+        * wtf/Gigacage.h:
+        (Gigacage::basePtrs):
+
 2018-03-28  Robin Morisset  <[email protected]>
 
         appendQuotedJSONString stops on arithmetic overflow instead of propagating it upwards

Modified: releases/WebKitGTK/webkit-2.20/Source/WTF/wtf/Gigacage.cpp (231412 => 231413)


--- releases/WebKitGTK/webkit-2.20/Source/WTF/wtf/Gigacage.cpp	2018-05-07 07:54:29 UTC (rev 231412)
+++ releases/WebKitGTK/webkit-2.20/Source/WTF/wtf/Gigacage.cpp	2018-05-07 08:18:39 UTC (rev 231413)
@@ -32,7 +32,7 @@
 
 #if defined(USE_SYSTEM_MALLOC) && USE_SYSTEM_MALLOC
 
-char g_gigacageBasePtrs[GIGACAGE_BASE_PTRS_SIZE];
+alignas(GIGACAGE_BASE_PTRS_SIZE) char g_gigacageBasePtrs[GIGACAGE_BASE_PTRS_SIZE];
 
 namespace Gigacage {
 

Modified: releases/WebKitGTK/webkit-2.20/Source/WTF/wtf/Gigacage.h (231412 => 231413)


--- releases/WebKitGTK/webkit-2.20/Source/WTF/wtf/Gigacage.h	2018-05-07 07:54:29 UTC (rev 231412)
+++ releases/WebKitGTK/webkit-2.20/Source/WTF/wtf/Gigacage.h	2018-05-07 08:18:39 UTC (rev 231413)
@@ -34,7 +34,7 @@
 #define GIGACAGE_BASE_PTRS_SIZE 8192
 
 extern "C" {
-extern WTF_EXPORTDATA char g_gigacageBasePtrs[GIGACAGE_BASE_PTRS_SIZE];
+alignas(GIGACAGE_BASE_PTRS_SIZE) extern WTF_EXPORTDATA char g_gigacageBasePtrs[GIGACAGE_BASE_PTRS_SIZE];
 }
 
 namespace Gigacage {
@@ -94,7 +94,7 @@
 
 ALWAYS_INLINE BasePtrs& basePtrs()
 {
-    return *reinterpret_cast<BasePtrs*>(g_gigacageBasePtrs);
+    return *reinterpret_cast<BasePtrs*>(reinterpret_cast<void*>(g_gigacageBasePtrs));
 }
 
 ALWAYS_INLINE void*& basePtr(Kind kind)

Modified: releases/WebKitGTK/webkit-2.20/Source/WebCore/ChangeLog (231412 => 231413)


--- releases/WebKitGTK/webkit-2.20/Source/WebCore/ChangeLog	2018-05-07 07:54:29 UTC (rev 231412)
+++ releases/WebKitGTK/webkit-2.20/Source/WebCore/ChangeLog	2018-05-07 08:18:39 UTC (rev 231413)
@@ -1,3 +1,16 @@
+2018-04-08  Yusuke Suzuki  <[email protected]>
+
+        Use alignas instead of compiler-specific attributes
+        https://bugs.webkit.org/show_bug.cgi?id=183508
+
+        Reviewed by Mark Lam.
+
+        Use alignas instead of aligned.
+
+        * platform/graphics/cpu/arm/filters/FELightingNEON.cpp:
+        * platform/graphics/cpu/arm/filters/FELightingNEON.h:
+        (WebCore::FELighting::platformApplyNeon):
+
 2018-04-17  Carlos Alberto Lopez Perez  <[email protected]>
 
         [GTK] Build fix after r230529 (WaylandCompositorDisplay leaks its wl_display)

Modified: releases/WebKitGTK/webkit-2.20/Source/WebCore/platform/graphics/cpu/arm/filters/FELightingNEON.cpp (231412 => 231413)


--- releases/WebKitGTK/webkit-2.20/Source/WebCore/platform/graphics/cpu/arm/filters/FELightingNEON.cpp	2018-05-07 07:54:29 UTC (rev 231412)
+++ releases/WebKitGTK/webkit-2.20/Source/WebCore/platform/graphics/cpu/arm/filters/FELightingNEON.cpp	2018-05-07 08:18:39 UTC (rev 231413)
@@ -35,7 +35,7 @@
 //   ALPHAX_Q ALPHAY_Q REMAPX_D REMAPY_D
 
 
-static short s_FELightingConstantsForNeon[] __attribute__((__aligned__(16))) = {
+static alignas(16) short s_FELightingConstantsForNeon[] = {
     // Alpha coefficients.
     -2, 1, 0, -1, 2, 1, 0, -1,
     0, -1, -2, -1, 0, 1, 2, 1,

Modified: releases/WebKitGTK/webkit-2.20/Source/WebCore/platform/graphics/cpu/arm/filters/FELightingNEON.h (231412 => 231413)


--- releases/WebKitGTK/webkit-2.20/Source/WebCore/platform/graphics/cpu/arm/filters/FELightingNEON.h	2018-05-07 07:54:29 UTC (rev 231412)
+++ releases/WebKitGTK/webkit-2.20/Source/WebCore/platform/graphics/cpu/arm/filters/FELightingNEON.h	2018-05-07 08:18:39 UTC (rev 231413)
@@ -95,7 +95,7 @@
 
 inline void FELighting::platformApplyNeon(const LightingData& data, const LightSource::PaintingData& paintingData)
 {
-    FELightingFloatArgumentsForNeon floatArguments __attribute__((__aligned__(16)));
+    alignas(16) FELightingFloatArgumentsForNeon floatArguments;
     FELightingPaintingDataForNeon neonData = {
         data.pixels->data(),
         1,

Modified: releases/WebKitGTK/webkit-2.20/Source/bmalloc/ChangeLog (231412 => 231413)


--- releases/WebKitGTK/webkit-2.20/Source/bmalloc/ChangeLog	2018-05-07 07:54:29 UTC (rev 231412)
+++ releases/WebKitGTK/webkit-2.20/Source/bmalloc/ChangeLog	2018-05-07 08:18:39 UTC (rev 231413)
@@ -1,3 +1,17 @@
+2018-04-08  Yusuke Suzuki  <[email protected]>
+
+        Use alignas instead of compiler-specific attributes
+        https://bugs.webkit.org/show_bug.cgi?id=183508
+
+        Reviewed by Mark Lam.
+
+        Use alignas for g_gigacageBasePtr. We also add reinterpret_cast to fix
+        compile errors in ARMv7 and MIPS JSCOnly ports.
+
+        * bmalloc/Gigacage.cpp:
+        * bmalloc/Gigacage.h:
+        (Gigacage::basePtrs):
+
 2018-03-16  Michael Catanzaro  <[email protected]>
 
         Improve error message when Gigacage cannot allocate virtual memory

Modified: releases/WebKitGTK/webkit-2.20/Source/bmalloc/bmalloc/Gigacage.cpp (231412 => 231413)


--- releases/WebKitGTK/webkit-2.20/Source/bmalloc/bmalloc/Gigacage.cpp	2018-05-07 07:54:29 UTC (rev 231412)
+++ releases/WebKitGTK/webkit-2.20/Source/bmalloc/bmalloc/Gigacage.cpp	2018-05-07 08:18:39 UTC (rev 231413)
@@ -42,7 +42,7 @@
 // If this were less than 32GB, those OOB accesses could reach outside of the cage.
 #define GIGACAGE_RUNWAY (32llu * 1024 * 1024 * 1024)
 
-char g_gigacageBasePtrs[GIGACAGE_BASE_PTRS_SIZE] __attribute__((aligned(GIGACAGE_BASE_PTRS_SIZE)));
+alignas(GIGACAGE_BASE_PTRS_SIZE) char g_gigacageBasePtrs[GIGACAGE_BASE_PTRS_SIZE];
 
 using namespace bmalloc;
 

Modified: releases/WebKitGTK/webkit-2.20/Source/bmalloc/bmalloc/Gigacage.h (231412 => 231413)


--- releases/WebKitGTK/webkit-2.20/Source/bmalloc/bmalloc/Gigacage.h	2018-05-07 07:54:29 UTC (rev 231412)
+++ releases/WebKitGTK/webkit-2.20/Source/bmalloc/bmalloc/Gigacage.h	2018-05-07 08:18:39 UTC (rev 231413)
@@ -68,7 +68,7 @@
 #define GIGACAGE_BASE_PTRS_SIZE 4096
 #endif
 
-extern "C" BEXPORT char g_gigacageBasePtrs[GIGACAGE_BASE_PTRS_SIZE] __attribute__((aligned(GIGACAGE_BASE_PTRS_SIZE)));
+extern "C" alignas(GIGACAGE_BASE_PTRS_SIZE) BEXPORT char g_gigacageBasePtrs[GIGACAGE_BASE_PTRS_SIZE];
 
 namespace Gigacage {
 
@@ -133,7 +133,7 @@
 
 BINLINE BasePtrs& basePtrs()
 {
-    return *reinterpret_cast<BasePtrs*>(g_gigacageBasePtrs);
+    return *reinterpret_cast<BasePtrs*>(reinterpret_cast<void*>(g_gigacageBasePtrs));
 }
 
 BINLINE void*& basePtr(Kind kind)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to