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/interpreter/Interpreter.cpp

    r43153 r43220  
    691691        m_reentryDepth++;
    692692#if ENABLE(JIT)
    693         if (!codeBlock->jitCode())
    694             JIT::compile(scopeChain->globalData, codeBlock);
    695         result = codeBlock->jitCode().execute(&m_registerFile, newCallFrame, scopeChain->globalData, exception);
     693        result = functionBodyNode->jitCode(scopeChain).execute(&m_registerFile, newCallFrame, scopeChain->globalData, exception);
    696694#else
    697695        result = privateExecute(Normal, &m_registerFile, newCallFrame, exception);
     
    741739    newCallFrame->init(codeBlock, 0, scopeChain, callFrame->addHostCallFrameFlag(), 0, argc, function);
    742740#if ENABLE(JIT)
    743     if (!codeBlock->jitCode())
    744         JIT::compile(scopeChain->globalData, codeBlock);
     741    functionBodyNode->jitCode(scopeChain);
    745742#endif
    746743
     
    762759        m_reentryDepth++;
    763760#if ENABLE(JIT)
     761        ASSERT(closure.codeBlock->jitCode());
    764762        result = closure.codeBlock->jitCode().execute(&m_registerFile, closure.newCallFrame, closure.globalData, exception);
    765763#else
Note: See TracChangeset for help on using the changeset viewer.