Changeset 246792 in webkit


Ignore:
Timestamp:
Jun 25, 2019 9:08:27 AM (5 years ago)
Author:
Michael Catanzaro
Message:

REGRESSION(r245586): static assertion failed: Match result and EncodedMatchResult should be the same size
https://bugs.webkit.org/show_bug.cgi?id=198518

Reviewed by Keith Miller.

r245586 made some bad assumptions about the size of size_t, which we can solve using the
CPU(ADDRESS32) guard that I didn't know about.

This solution was developed by Mark Lam and Keith Miller. I'm just preparing the patch.

  • runtime/MatchResult.h:
Location:
trunk/Source/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r246780 r246792  
     12019-06-25  Michael Catanzaro  <mcatanzaro@igalia.com>
     2
     3        REGRESSION(r245586): static assertion failed: Match result and EncodedMatchResult should be the same size
     4        https://bugs.webkit.org/show_bug.cgi?id=198518
     5
     6        Reviewed by Keith Miller.
     7
     8        r245586 made some bad assumptions about the size of size_t, which we can solve using the
     9        CPU(ADDRESS32) guard that I didn't know about.
     10
     11        This solution was developed by Mark Lam and Keith Miller. I'm just preparing the patch.
     12
     13        * runtime/MatchResult.h:
     14
    1152019-06-24  Commit Queue  <commit-queue@webkit.org>
    216
  • trunk/Source/JavaScriptCore/runtime/MatchResult.h

    r245586 r246792  
    3232
    3333struct MatchResult;
    34 #if CPU(ARM64) || CPU(X86_64)
     34#if CPU(ADDRESS32)
     35using EncodedMatchResult = uint64_t;
     36#else
    3537using EncodedMatchResult = MatchResult;
    36 #else
    37 using EncodedMatchResult = uint64_t;
    3838#endif
    3939
     
    5151    }
    5252
    53 #if !(CPU(ARM64) || CPU(X86_64))
     53#if CPU(ADDRESS32)
    5454    ALWAYS_INLINE MatchResult(EncodedMatchResult match)
    5555        : start(bitwise_cast<MatchResult>(match).start)
     
    8080};
    8181
     82static_assert(sizeof(EncodedMatchResult) == 2 * sizeof(size_t), "https://bugs.webkit.org/show_bug.cgi?id=198518#c11");
    8283static_assert(sizeof(MatchResult) == sizeof(EncodedMatchResult), "Match result and EncodedMatchResult should be the same size");
    8384
Note: See TracChangeset for help on using the changeset viewer.