Ignore:
Timestamp:
May 18, 2010, 11:04:18 PM (15 years ago)
Author:
[email protected]
Message:

Bug 39343 - Dynamically generate a native call thunk per NativeFunction

Reviewed by Geoff Garen.

https://bugs.webkit.org/show_bug.cgi?id=39252 regressed performance on i386,
by adding an extra indirection to making a native call. By introducing per-
NativeFunction thunks we can hard code the function pointer into the thunk
so that it need not be loaded from the callee.

  • jit/JIT.h:

(JSC::JIT::compileCTINativeCall):

  • jit/JITOpcodes.cpp:

(JSC::JIT::privateCompileCTINativeCall):

  • jit/JITOpcodes32_64.cpp:

(JSC::JIT::privateCompileCTINativeCall):

  • jit/JITPropertyAccess.cpp:

(JSC::JIT::emitSlow_op_get_by_val):

  • jit/JITPropertyAccess32_64.cpp:

(JSC::JIT::emitSlow_op_get_by_val):

  • jit/JITStubs.cpp:

(JSC::JITThunks::ctiStub):
(JSC::JITThunks::hostFunctionStub):

  • jit/JITStubs.h:
  • jit/SpecializedThunkJIT.h:

(JSC::SpecializedThunkJIT::finalize):

  • jit/ThunkGenerators.cpp:

(JSC::charCodeAtThunkGenerator):
(JSC::charAtThunkGenerator):
(JSC::fromCharCodeThunkGenerator):
(JSC::sqrtThunkGenerator):
(JSC::powThunkGenerator):

  • runtime/JSFunction.cpp:

(JSC::JSFunction::JSFunction):

  • runtime/JSGlobalData.cpp:

(JSC::JSGlobalData::getHostFunction):

  • runtime/JSGlobalData.h:

(JSC::JSGlobalData::getCTIStub):

  • runtime/Lookup.cpp:

(JSC::setUpStaticFunctionSlot):

  • runtime/StringConstructor.cpp:

(JSC::StringConstructor::StringConstructor):

  • wtf/Platform.h:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/runtime/JSFunction.cpp

    r59676 r59746  
    7777    : Base(&exec->globalData(), structure, name)
    7878#if ENABLE(JIT)
    79     , m_executable(exec->globalData().getNativeExecutable(func))
     79    , m_executable(exec->globalData().getHostFunction(func))
    8080#endif
    8181    , m_scopeChain(NoScopeChain())
Note: See TracChangeset for help on using the changeset viewer.