Changeset 233504 in webkit


Ignore:
Timestamp:
Jul 4, 2018 5:54:48 AM (6 years ago)
Author:
guijemont@igalia.com
Message:

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):

Location:
trunk/Source/WTF
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WTF/ChangeLog

    r233501 r233504  
     12018-07-04  Guillaume Emont  <guijemont@igalia.com>
     2
     3        FunctionTraits: Make cCallArity() constant on 32-bits.
     4        https://bugs.webkit.org/show_bug.cgi?id=187292
     5
     6        Reviewed by Yusuke Suzuki.
     7
     8        On X86, in Source/JavaScriptCore/jit/CCallHelpers.h we have a
     9        static_assert that uses cCallArity(), so it needs to be constant to
     10        avoid a compilation error. This is achieved by changing an ASSERT into
     11        a static_assert.
     12
     13
     14        * wtf/FunctionTraits.h:
     15        (WTF::slotsForCCallArgument):
     16
    1172018-07-04  Tim Horton  <timothy_horton@apple.com>
    218
  • trunk/Source/WTF/wtf/FunctionTraits.h

    r229391 r233504  
    3939{
    4040    static_assert(!std::is_class<T>::value || sizeof(T) <= sizeof(void*), "This doesn't support complex structs.");
     41    static_assert(sizeof(T) == 8 || sizeof(T) <= 4, "");
    4142    // This assumes that all integral values are passed on the stack.
    4243    if (sizeof(T) == 8)
    4344        return 2;
    4445
    45     ASSERT(sizeof(T) <= 4);
    4646    return 1;
    4747}
Note: See TracChangeset for help on using the changeset viewer.