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.
(JSC::JIT::compileCTINativeCall):
(JSC::JIT::privateCompileCTINativeCall):
(JSC::JIT::privateCompileCTINativeCall):
- jit/JITPropertyAccess.cpp:
(JSC::JIT::emitSlow_op_get_by_val):
- jit/JITPropertyAccess32_64.cpp:
(JSC::JIT::emitSlow_op_get_by_val):
(JSC::JITThunks::ctiStub):
(JSC::JITThunks::hostFunctionStub):
- jit/JITStubs.h:
- jit/SpecializedThunkJIT.h:
(JSC::SpecializedThunkJIT::finalize):
(JSC::charCodeAtThunkGenerator):
(JSC::charAtThunkGenerator):
(JSC::fromCharCodeThunkGenerator):
(JSC::sqrtThunkGenerator):
(JSC::powThunkGenerator):
(JSC::JSFunction::JSFunction):
- runtime/JSGlobalData.cpp:
(JSC::JSGlobalData::getHostFunction):
(JSC::JSGlobalData::getCTIStub):
(JSC::setUpStaticFunctionSlot):
- runtime/StringConstructor.cpp:
(JSC::StringConstructor::StringConstructor):