Ignore:
Timestamp:
Apr 18, 2016, 11:54:25 PM (9 years ago)
Author:
[email protected]
Message:

[JSC] Fix some overhead affecting small codegen
https://bugs.webkit.org/show_bug.cgi?id=156728

Patch by Benjamin Poulain <[email protected]> on 2016-04-18
Reviewed by Filip Pizlo.

  • assembler/AbstractMacroAssembler.h:

(JSC::AbstractMacroAssembler::AbstractMacroAssembler):
(JSC::AbstractMacroAssembler::random):
cryptographicallyRandomNumber() is very costly.
We only need it in lowering some very particular cases
of non-trusted immediates. No inline cache needs that.

  • assembler/LinkBuffer.h:

(JSC::LinkBuffer::link):

  • jit/JIT.h:
  • jit/JITInlines.h:

(JSC::JIT::addSlowCase):
Do not copy the JumpList to access its elements.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/assembler/LinkBuffer.h

    r197816 r199710  
    145145    }
    146146
    147     void link(JumpList list, CodeLocationLabel label)
    148     {
    149         for (unsigned i = 0; i < list.m_jumps.size(); ++i)
    150             link(list.m_jumps[i], label);
     147    void link(const JumpList& list, CodeLocationLabel label)
     148    {
     149        for (const Jump& jump : list.jumps())
     150            link(jump, label);
    151151    }
    152152
Note: See TracChangeset for help on using the changeset viewer.