Changeset 195365 in webkit


Ignore:
Timestamp:
Jan 20, 2016 12:27:01 PM (8 years ago)
Author:
akling@apple.com
Message:

Pack RegisterAtOffset harder.
<https://webkit.org/b/152501>

Reviewed by Michael Saboff.

Pack the register index and the offset into a single pointer-sized word instead of two.
This reduces memory consumption by 620 kB on mobile theverge.com.

The packing doesn't succeed on MSVC for some reason, so I've left out the static
assertion about class size in those builds.

  • jit/RegisterAtOffset.cpp:
  • jit/RegisterAtOffset.h:
Location:
trunk/Source/JavaScriptCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r195362 r195365  
     12016-01-20  Andreas Kling  <akling@apple.com>
     2
     3        Pack RegisterAtOffset harder.
     4        <https://webkit.org/b/152501>
     5
     6        Reviewed by Michael Saboff.
     7
     8        Pack the register index and the offset into a single pointer-sized word instead of two.
     9        This reduces memory consumption by 620 kB on mobile theverge.com.
     10
     11        The packing doesn't succeed on MSVC for some reason, so I've left out the static
     12        assertion about class size in those builds.
     13
     14        * jit/RegisterAtOffset.cpp:
     15        * jit/RegisterAtOffset.h:
     16
    1172016-01-20  Per Arne Vollan  <peavo@outlook.com>
    218
  • trunk/Source/JavaScriptCore/jit/RegisterAtOffset.cpp

    r189575 r195365  
    3131namespace JSC {
    3232
     33#if !COMPILER(MSVC)
     34static_assert(sizeof(RegisterAtOffset) == sizeof(ptrdiff_t), "RegisterAtOffset should be small.");
     35#endif
     36
    3337void RegisterAtOffset::dump(PrintStream& out) const
    3438{
  • trunk/Source/JavaScriptCore/jit/RegisterAtOffset.h

    r189575 r195365  
    7171private:
    7272    Reg m_reg;
    73     ptrdiff_t m_offset;
     73    ptrdiff_t m_offset : sizeof(ptrdiff_t) * 8 - sizeof(Reg) * 8;
    7474};
    7575
Note: See TracChangeset for help on using the changeset viewer.