Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 58fbd8418cf40ae43400f9b19fc5edbe772a8c03
      
https://github.com/WebKit/WebKit/commit/58fbd8418cf40ae43400f9b19fc5edbe772a8c03
  Author: Yusuke Suzuki <[email protected]>
  Date:   2023-09-12 (Tue, 12 Sep 2023)

  Changed paths:
    M Source/JavaScriptCore/assembler/MacroAssemblerARMv7.h
    M Source/JavaScriptCore/assembler/MacroAssemblerMIPS.h
    M Source/JavaScriptCore/assembler/MacroAssemblerRISCV64.h
    M Source/JavaScriptCore/bytecode/AccessCaseSnippetParams.cpp
    M Source/JavaScriptCore/bytecode/CodeBlock.cpp
    M Source/JavaScriptCore/bytecode/InlineCacheCompiler.cpp
    M Source/JavaScriptCore/bytecode/InlineCacheCompiler.h
    M Source/JavaScriptCore/bytecode/StructureStubInfo.h
    M Source/JavaScriptCore/dfg/DFGJITCode.cpp
    M Source/JavaScriptCore/dfg/DFGJITCode.h
    M Source/JavaScriptCore/dfg/DFGJITCompiler.cpp
    M Source/JavaScriptCore/dfg/DFGJITCompiler.h
    M Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp
    M Source/JavaScriptCore/dfg/DFGThunks.cpp
    M Source/JavaScriptCore/ftl/FTLJITCode.cpp
    M Source/JavaScriptCore/ftl/FTLJITCode.h
    M Source/JavaScriptCore/jit/BaselineJITCode.cpp
    M Source/JavaScriptCore/jit/BaselineJITCode.h
    M Source/JavaScriptCore/jit/GPRInfo.h
    M Source/JavaScriptCore/jit/JITCode.cpp
    M Source/JavaScriptCore/jit/JITCode.h
    M Source/JavaScriptCore/jit/RegisterSet.cpp
    M Source/JavaScriptCore/llint/LLIntData.h
    M Source/JavaScriptCore/runtime/Options.cpp

  Log Message:
  -----------
  [JSC] Get rid of CodeBlock dependency from DataIC
https://bugs.webkit.org/show_bug.cgi?id=261440
rdar://115317826

Reviewed by Keith Miller.

Towards handler IC, we would like to make IC code independent from attached 
CodeBlock since the code
will be shared by multiple CodeBlocks' IC sites. Right now, we have two places. 
This patch gets rid
of these dependencies.

1. Before calling a function, we need to store CallSiteIndex to the stack. And 
this is tied the CodeBlock.
   In this patch, we get this from StructureStubInfo data structure, 
materialized per IC site. And it is
   already storing this information. So, code itself gets independent from 
CallSiteIndex.
2. After calling JS function, we need to adjust stack pointer since it gets 
changed due to tail calls etc.
   Previously we got stack height from the CodeBlock and adjusted it with 
callFrameRegister. However this
   is tied to CodeBlock. In this patch, we made JITData always having this 
stack height information so that
   we can load this from JITData. JITData is always stored in a particular 
callee-save register and it exists
   in Baseline and DFG. So we can easily get this per-CodeBlock information 
from JITData. We disable DataIC
   in FTL (this is only for testing. No production is using DataIC in FTL) for 
now since FTL does not have
   JITData right now. We should make it enabled after we fully convert our IC 
to the new form.

* Source/JavaScriptCore/bytecode/AccessCaseSnippetParams.cpp:
* Source/JavaScriptCore/bytecode/CodeBlock.cpp:
(JSC::CodeBlock::setupWithUnlinkedBaselineCode):
* Source/JavaScriptCore/bytecode/InlineCacheCompiler.cpp:
(JSC::InlineCacheCompiler::generateImpl):
(JSC::InlineCacheCompiler::emitDOMJITGetter):
(JSC::InlineCacheCompiler::emitProxyObjectAccess):
(JSC::InlineCacheCompiler::regenerate):
* Source/JavaScriptCore/bytecode/InlineCacheCompiler.h:
* Source/JavaScriptCore/bytecode/StructureStubInfo.h:
(JSC::StructureStubInfo::offsetOfCallSiteIndex):
* Source/JavaScriptCore/dfg/DFGJITCode.cpp:
(JSC::DFG::JITData::tryInitialize):
(JSC::DFG::JITCode::dfgCommon const):
* Source/JavaScriptCore/dfg/DFGJITCode.h:
* Source/JavaScriptCore/ftl/FTLJITCode.cpp:
(JSC::FTL::JITCode::dfgCommon const):
* Source/JavaScriptCore/ftl/FTLJITCode.h:
* Source/JavaScriptCore/jit/BaselineJITCode.cpp:
(JSC::BaselineJITData::BaselineJITData):
* Source/JavaScriptCore/jit/BaselineJITCode.h:
* Source/JavaScriptCore/jit/JITCode.cpp:
(JSC::JITCode::dfgCommon const):
* Source/JavaScriptCore/jit/JITCode.h:
* Source/JavaScriptCore/runtime/Options.cpp:
(JSC::Options::notifyOptionsChanged):

Canonical link: https://commits.webkit.org/267915@main


_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to