FunctionTraits: Make cCallArity() constant on 32-bits.
https://bugs.webkit.org/show_bug.cgi?id=187292

Reviewed by Yusuke Suzuki.

On X86, in Source/JavaScriptCore/jit/CCallHelpers.h we have a
static_assert that uses cCallArity(), so it needs to be constant to
avoid a compilation error. This is achieved by changing an ASSERT into
a static_assert.

* wtf/FunctionTraits.h:
(WTF::slotsForCCallArgument):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@233504 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/WTF/ChangeLog b/Source/WTF/ChangeLog
index 154771d..54f6b0c 100644
--- a/Source/WTF/ChangeLog
+++ b/Source/WTF/ChangeLog
@@ -1,3 +1,19 @@
+2018-07-04  Guillaume Emont  <guijemont@igalia.com>
+
+        FunctionTraits: Make cCallArity() constant on 32-bits.
+        https://bugs.webkit.org/show_bug.cgi?id=187292
+
+        Reviewed by Yusuke Suzuki.
+
+        On X86, in Source/JavaScriptCore/jit/CCallHelpers.h we have a
+        static_assert that uses cCallArity(), so it needs to be constant to
+        avoid a compilation error. This is achieved by changing an ASSERT into
+        a static_assert.
+
+
+        * wtf/FunctionTraits.h:
+        (WTF::slotsForCCallArgument):
+
 2018-07-04  Tim Horton  <timothy_horton@apple.com>
 
         Introduce PLATFORM(IOSMAC)
diff --git a/Source/WTF/wtf/FunctionTraits.h b/Source/WTF/wtf/FunctionTraits.h
index eb5dbed..3533fb2 100644
--- a/Source/WTF/wtf/FunctionTraits.h
+++ b/Source/WTF/wtf/FunctionTraits.h
@@ -38,11 +38,11 @@
 static constexpr unsigned slotsForCCallArgument()
 {
     static_assert(!std::is_class<T>::value || sizeof(T) <= sizeof(void*), "This doesn't support complex structs.");
+    static_assert(sizeof(T) == 8 || sizeof(T) <= 4, "");
     // This assumes that all integral values are passed on the stack.
     if (sizeof(T) == 8)
         return 2;
 
-    ASSERT(sizeof(T) <= 4);
     return 1;
 }