Ignore:
Timestamp:
Feb 14, 2019, 1:35:14 PM (6 years ago)
Author:
[email protected]
Message:

[JSC] Non-JIT entrypoints should share NativeJITCode per entrypoint type
https://bugs.webkit.org/show_bug.cgi?id=194659

Reviewed by Mark Lam.

Non-JIT entrypoints create NativeJITCode every time it is called. But it is meaningless since these entry point code are identical.
We should create one per entrypoint type (for function, we should have CodeForCall and CodeForConstruct) and continue to use them.
And we use NativeJITCode instead of DirectJITCode if it does not have difference between usual entrypoint and arity check entrypoint.

  • dfg/DFGJITCode.h:
  • dfg/DFGJITFinalizer.cpp:

(JSC::DFG::JITFinalizer::finalize):
(JSC::DFG::JITFinalizer::finalizeFunction):

  • jit/JITCode.cpp:

(JSC::DirectJITCode::initializeCodeRefForDFG):
(JSC::DirectJITCode::initializeCodeRef): Deleted.
(JSC::NativeJITCode::initializeCodeRef): Deleted.

  • jit/JITCode.h:
  • llint/LLIntEntrypoint.cpp:

(JSC::LLInt::setFunctionEntrypoint):
(JSC::LLInt::setEvalEntrypoint):
(JSC::LLInt::setProgramEntrypoint):
(JSC::LLInt::setModuleProgramEntrypoint): Retagged is removed since the tag is the same.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/dfg/DFGJITFinalizer.cpp

    r234178 r241560  
    5858{
    5959    MacroAssemblerCodeRef<JSEntryPtrTag> codeRef = FINALIZE_DFG_CODE(*m_linkBuffer, JSEntryPtrTag, "DFG JIT code for %s", toCString(CodeBlockWithJITType(m_plan.codeBlock(), JITCode::DFGJIT)).data());
    60     m_jitCode->initializeCodeRef(codeRef, codeRef.code());
     60    m_jitCode->initializeCodeRefForDFG(codeRef, codeRef.code());
    6161
    6262    m_plan.codeBlock()->setJITCode(m_jitCode.copyRef());
     
    7070{
    7171    RELEASE_ASSERT(!m_withArityCheck.isEmptyValue());
    72     m_jitCode->initializeCodeRef(
     72    m_jitCode->initializeCodeRefForDFG(
    7373        FINALIZE_DFG_CODE(*m_linkBuffer, JSEntryPtrTag, "DFG JIT code for %s", toCString(CodeBlockWithJITType(m_plan.codeBlock(), JITCode::DFGJIT)).data()),
    7474        m_withArityCheck);
Note: See TracChangeset for help on using the changeset viewer.