Changeset 259552 in webkit


Ignore:
Timestamp:
Apr 5, 2020 11:11:30 AM (4 years ago)
Author:
mark.lam@apple.com
Message:

Change s_entropyBitsShiftForStructurePointer to 48 bits.
https://bugs.webkit.org/show_bug.cgi?id=210022
<rdar://problem/61310696>

Reviewed by Keith Miller.

This is ok because the top 16 bits of the 64-bit address is not used. We can
fill out the top 16-bits of the encodedStructureBits with the lowest 16-bits of
the StructureID (which includes the 7-bits of entropy).

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

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r259549 r259552  
     12020-04-05  Mark Lam  <mark.lam@apple.com>
     2
     3        Change s_entropyBitsShiftForStructurePointer to 48 bits.
     4        https://bugs.webkit.org/show_bug.cgi?id=210022
     5        <rdar://problem/61310696>
     6
     7        Reviewed by Keith Miller.
     8
     9        This is ok because the top 16 bits of the 64-bit address is not used.  We can
     10        fill out the top 16-bits of the encodedStructureBits  with the lowest 16-bits of
     11        the StructureID (which includes the 7-bits of entropy).
     12
     13        * runtime/StructureIDTable.h:
     14
    1152020-04-05  Yusuke Suzuki  <ysuzuki@apple.com>
    216
  • trunk/Source/JavaScriptCore/runtime/StructureIDTable.h

    r259547 r259552  
    146146    //    which are encoded from the structure pointer as such:
    147147    //
    148     //    ----------------------------------------------------------------
    149     //    | 7 entropy bits |                   57 structure pointer bits |
    150     //    ----------------------------------------------------------------
     148    //    -----------------------------------------------------------------
     149    //    | 9 low index bits | 7 entropy bits | 48 structure pointer bits |
     150    //    -----------------------------------------------------------------
    151151    //
    152152    //    The entropy bits here are the same 7 bits used in the encoding of the
     
    155155    static constexpr uint32_t s_numberOfNukeBits = 1;
    156156    static constexpr uint32_t s_numberOfEntropyBits = 7;
    157     static constexpr uint32_t s_entropyBitsShiftForStructurePointer = (sizeof(intptr_t) * 8) - s_numberOfEntropyBits;
     157    static constexpr uint32_t s_entropyBitsShiftForStructurePointer = (sizeof(EncodedStructureBits) * 8) - 16;
    158158
    159159    static constexpr uint32_t s_maximumNumberOfStructures = 1 << (32 - s_numberOfEntropyBits - s_numberOfNukeBits);
Note: See TracChangeset for help on using the changeset viewer.