Ignore:
Timestamp:
Jan 13, 2016, 4:28:40 PM (10 years ago)
Author:
[email protected]
Message:

NativeExecutable should have a name field
https://bugs.webkit.org/show_bug.cgi?id=153083

Reviewed by Geoffrey Garen.

This is going to help the SamplingProfiler come up
with names for NativeExecutable objects it encounters.

  • jit/JITThunks.cpp:

(JSC::JITThunks::finalize):
(JSC::JITThunks::hostFunctionStub):

  • jit/JITThunks.h:
  • runtime/Executable.h:
  • runtime/JSBoundFunction.cpp:

(JSC::JSBoundFunction::create):

  • runtime/JSFunction.cpp:

(JSC::JSFunction::create):
(JSC::JSFunction::lookUpOrCreateNativeExecutable):

  • runtime/JSFunction.h:

(JSC::JSFunction::createImpl):

  • runtime/JSNativeStdFunction.cpp:

(JSC::JSNativeStdFunction::create):

  • runtime/VM.cpp:

(JSC::thunkGeneratorForIntrinsic):
(JSC::VM::getHostFunction):

  • runtime/VM.h:

(JSC::VM::getCTIStub):
(JSC::VM::exceptionOffset):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/jit/JITThunks.cpp

    r190113 r195000  
    8383}
    8484
    85 NativeExecutable* JITThunks::hostFunctionStub(VM* vm, NativeFunction function, NativeFunction constructor)
     85NativeExecutable* JITThunks::hostFunctionStub(VM* vm, NativeFunction function, NativeFunction constructor, const String& name)
    8686{
    8787    ASSERT(!isCompilationThread());
     
    9595        function,
    9696        adoptRef(new NativeJITCode(MacroAssemblerCodeRef::createSelfManagedCodeRef(ctiNativeConstruct(vm)), JITCode::HostCallThunk)),
    97         constructor, NoIntrinsic);
     97        constructor, NoIntrinsic, name);
    9898    weakAdd(*m_hostFunctionStubMap, std::make_pair(function, constructor), Weak<NativeExecutable>(nativeExecutable, this));
    9999    return nativeExecutable;
    100100}
    101101
    102 NativeExecutable* JITThunks::hostFunctionStub(VM* vm, NativeFunction function, ThunkGenerator generator, Intrinsic intrinsic)
     102NativeExecutable* JITThunks::hostFunctionStub(VM* vm, NativeFunction function, ThunkGenerator generator, Intrinsic intrinsic, const String& name)
    103103{
    104104    ASSERT(!isCompilationThread());   
     
    117117    RefPtr<JITCode> forConstruct = adoptRef(new NativeJITCode(MacroAssemblerCodeRef::createSelfManagedCodeRef(ctiNativeConstruct(vm)), JITCode::HostCallThunk));
    118118   
    119     NativeExecutable* nativeExecutable = NativeExecutable::create(*vm, forCall, function, forConstruct, callHostFunctionAsConstructor, intrinsic);
     119    NativeExecutable* nativeExecutable = NativeExecutable::create(*vm, forCall, function, forConstruct, callHostFunctionAsConstructor, intrinsic, name);
    120120    weakAdd(*m_hostFunctionStubMap, std::make_pair(function, &callHostFunctionAsConstructor), Weak<NativeExecutable>(nativeExecutable, this));
    121121    return nativeExecutable;
Note: See TracChangeset for help on using the changeset viewer.