Ignore:
Timestamp:
May 5, 2009, 4:34:23 AM (16 years ago)
Author:
[email protected]
Message:

Bug 25559: Improve native function call performance
<https://bugs.webkit.org/show_bug.cgi?id=25559>

Reviewed by Gavin Barraclough

In order to cache calls to native functions we now make the standard
prototype functions use a small assembly thunk that converts the JS
calling convention into the native calling convention. As this is
only beneficial in the JIT we use the NativeFunctionWrapper typedef
to alternate between PrototypeFunction and JSFunction to keep the
code sane. This change from PrototypeFunction to NativeFunctionWrapper
is the bulk of this patch.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/assembler/X86Assembler.h

    r42481 r43220  
    10091009        m_formatter.oneByteOp(OP_LEA, dst, base, offset);
    10101010    }
     1011#if PLATFORM(X86_64)
     1012    void leaq_mr(int offset, RegisterID base, RegisterID dst)
     1013    {
     1014        m_formatter.oneByteOp64(OP_LEA, dst, base, offset);
     1015    }
     1016#endif
    10111017
    10121018    // Flow control:
     
    10221028        m_formatter.oneByteOp(OP_GROUP5_Ev, GROUP5_OP_CALLN, dst);
    10231029        return JmpSrc(m_formatter.size());
     1030    }
     1031   
     1032    void call_m(int offset, RegisterID base)
     1033    {
     1034        m_formatter.oneByteOp(OP_GROUP5_Ev, GROUP5_OP_CALLN, base, offset);
    10241035    }
    10251036
Note: See TracChangeset for help on using the changeset viewer.