Ignore:
Timestamp:
Jan 13, 2016, 4:28:40 PM (9 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/runtime/Executable.h

    r194449 r195000  
    258258    static const unsigned StructureFlags = Base::StructureFlags | StructureIsImmortal;
    259259
    260     static NativeExecutable* create(VM& vm, PassRefPtr<JITCode> callThunk, NativeFunction function, PassRefPtr<JITCode> constructThunk, NativeFunction constructor, Intrinsic intrinsic)
     260    static NativeExecutable* create(VM& vm, PassRefPtr<JITCode> callThunk, NativeFunction function, PassRefPtr<JITCode> constructThunk, NativeFunction constructor, Intrinsic intrinsic, const String& name)
    261261    {
    262262        NativeExecutable* executable;
    263263        executable = new (NotNull, allocateCell<NativeExecutable>(vm.heap)) NativeExecutable(vm, function, constructor);
    264         executable->finishCreation(vm, callThunk, constructThunk, intrinsic);
     264        executable->finishCreation(vm, callThunk, constructThunk, intrinsic, name);
    265265        return executable;
    266266    }
     
    295295    Intrinsic intrinsic() const;
    296296
     297    const String& name() const { return m_name; }
     298
    297299protected:
    298     void finishCreation(VM& vm, PassRefPtr<JITCode> callThunk, PassRefPtr<JITCode> constructThunk, Intrinsic intrinsic)
     300    void finishCreation(VM& vm, PassRefPtr<JITCode> callThunk, PassRefPtr<JITCode> constructThunk, Intrinsic intrinsic, const String& name)
    299301    {
    300302        Base::finishCreation(vm);
     
    302304        m_jitCodeForConstruct = constructThunk;
    303305        m_intrinsic = intrinsic;
     306        m_name = name;
    304307    }
    305308
     
    318321       
    319322    Intrinsic m_intrinsic;
     323
     324    String m_name;
    320325};
    321326
Note: See TracChangeset for help on using the changeset viewer.