Ignore:
Timestamp:
May 17, 2010, 7:39:20 PM (15 years ago)
Author:
[email protected]
Message:

Bug 39252 - Move host/native JSFunction's NativeFunction onto NativeExecutable.

Reviewed by Geoff Garen.

Currently host functions reuse JSFunction's ScopeChain as storage for their
NativeFunction (the C function pointer to the host function implementation).
Instead, move this onto NativeExecutable. This will allow host functions to
have a scopechain (which will be implemented as a separate patch).

  • JavaScriptCore.xcodeproj/project.pbxproj:
  • jit/JIT.h:
  • jit/JITCall.cpp:

(JSC::JIT::compileOpCallInitializeCallFrame):
(JSC::JIT::compileOpCall):

  • jit/JITOpcodes.cpp:

(JSC::JIT::privateCompileCTIMachineTrampolines):

  • jit/JITOpcodes32_64.cpp:
  • jit/JITPropertyAccess.cpp:

(JSC::JIT::stringGetByValStubGenerator):
(JSC::JIT::emitSlow_op_get_by_val):

  • jit/JITPropertyAccess32_64.cpp:

(JSC::JIT::stringGetByValStubGenerator):
(JSC::JIT::emitSlow_op_get_by_val):

  • jit/JITStubs.cpp:

(JSC::JITThunks::specializedThunk):

  • jit/JITStubs.h:

(JSC::JITThunks::ctiNativeCall):

  • jit/SpecializedThunkJIT.h:

(JSC::SpecializedThunkJIT::finalize):

  • jit/ThunkGenerators.cpp:

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

  • jit/ThunkGenerators.h:
  • runtime/Executable.h:

(JSC::NativeExecutable::create):
(JSC::NativeExecutable::function):
(JSC::NativeExecutable::NativeExecutable):
(JSC::JSFunction::nativeFunction):

  • runtime/JSFunction.cpp:

(JSC::JSFunction::JSFunction):
(JSC::JSFunction::~JSFunction):
(JSC::JSFunction::markChildren):
(JSC::JSFunction::getCallData):
(JSC::JSFunction::call):
(JSC::JSFunction::getOwnPropertySlot):
(JSC::JSFunction::getConstructData):
(JSC::JSFunction::construct):

  • runtime/JSFunction.h:

(JSC::JSFunction::scope):

  • runtime/JSGlobalData.h:

(JSC::JSGlobalData::getThunk):

  • runtime/Lookup.cpp:

(JSC::setUpStaticFunctionSlot):

  • runtime/StringConstructor.cpp:

(JSC::StringConstructor::StringConstructor):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/jit/ThunkGenerators.cpp

    r58902 r59637  
    6363}
    6464
    65 PassRefPtr<NativeExecutable> charCodeAtThunkGenerator(JSGlobalData* globalData, ExecutablePool* pool)
     65MacroAssemblerCodePtr charCodeAtThunkGenerator(JSGlobalData* globalData, ExecutablePool* pool)
    6666{
    6767    SpecializedThunkJIT jit(1, globalData, pool);
     
    7171}
    7272
    73 PassRefPtr<NativeExecutable> charAtThunkGenerator(JSGlobalData* globalData, ExecutablePool* pool)
     73MacroAssemblerCodePtr charAtThunkGenerator(JSGlobalData* globalData, ExecutablePool* pool)
    7474{
    7575    SpecializedThunkJIT jit(1, globalData, pool);
     
    8080}
    8181
    82 PassRefPtr<NativeExecutable> fromCharCodeThunkGenerator(JSGlobalData* globalData, ExecutablePool* pool)
     82MacroAssemblerCodePtr fromCharCodeThunkGenerator(JSGlobalData* globalData, ExecutablePool* pool)
    8383{
    8484    SpecializedThunkJIT jit(1, globalData, pool);
     
    9090}
    9191
    92 PassRefPtr<NativeExecutable> sqrtThunkGenerator(JSGlobalData* globalData, ExecutablePool* pool)
     92MacroAssemblerCodePtr sqrtThunkGenerator(JSGlobalData* globalData, ExecutablePool* pool)
    9393{
    9494#if USE(JSVALUE64) || USE(JSVALUE32_64)
    9595    SpecializedThunkJIT jit(1, globalData, pool);
    9696    if (!jit.supportsFloatingPointSqrt())
    97         return globalData->jitStubs.ctiNativeCallThunk();
     97        return globalData->jitStubs.ctiNativeCall();
    9898
    9999    jit.loadDoubleArgument(0, SpecializedThunkJIT::fpRegT0, SpecializedThunkJIT::regT0);
     
    103103#else
    104104    UNUSED_PARAM(pool);
    105     return globalData->jitStubs.ctiNativeCallThunk();
     105    return globalData->jitStubs.ctiNativeCall();
    106106#endif
    107107}
     
    110110static const double negativeHalfConstant = -0.5;
    111111
    112 PassRefPtr<NativeExecutable> powThunkGenerator(JSGlobalData* globalData, ExecutablePool* pool)
     112MacroAssemblerCodePtr powThunkGenerator(JSGlobalData* globalData, ExecutablePool* pool)
    113113{
    114114#if USE(JSVALUE64) || USE(JSVALUE32_64)
    115115    SpecializedThunkJIT jit(2, globalData, pool);
    116116    if (!jit.supportsFloatingPoint())
    117         return globalData->jitStubs.ctiNativeCallThunk();
     117        return globalData->jitStubs.ctiNativeCall();
    118118
    119119    jit.loadDouble(&oneConstant, SpecializedThunkJIT::fpRegT1);
     
    151151#else
    152152    UNUSED_PARAM(pool);
    153     return globalData->jitStubs.ctiNativeCallThunk();
     153    return globalData->jitStubs.ctiNativeCall();
    154154#endif
    155155}
Note: See TracChangeset for help on using the changeset viewer.