[webkit-changes] [WebKit/WebKit] a8abec: [JSC] Add uDFG validation phase

Yusuke Suzuki noreply at github.com
Fri Oct 14 15:14:30 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: a8abeceb624b2e05bf50884a32835c856e1f4a2d
      https://github.com/WebKit/WebKit/commit/a8abeceb624b2e05bf50884a32835c856e1f4a2d
  Author: Yusuke Suzuki <ysuzuki at apple.com>
  Date:   2022-10-14 (Fri, 14 Oct 2022)

  Changed paths:
    M Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
    M Source/JavaScriptCore/Sources.txt
    M Source/JavaScriptCore/dfg/DFGPlan.cpp
    A Source/JavaScriptCore/dfg/DFGValidateUnlinked.cpp
    A Source/JavaScriptCore/dfg/DFGValidateUnlinked.h
    M Source/JavaScriptCore/runtime/OptionsList.h

  Log Message:
  -----------
  [JSC] Add uDFG validation phase
https://bugs.webkit.org/show_bug.cgi?id=246499
rdar://101154136

Reviewed by Mark Lam.

This patch adds uDFG validation phase. This allows graceful failure of the compilation if
we accidentally include some linked data in DFG pipeline by enhancing this phase. And at the
same time, we can detect what is wrong in the given program and improve our uDFG quality
incrementally.
Currently, we add a first restriction: all DFG node should have the same origin to the top level
CodeBlock to make the code easy. This paves the way to the initial version of LinkerIR::GlobalObject.
We can enhance it, but it is postponed since it is not so frequent that we have multiple JSGlobalObject
in one DFG function.

* Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj:
* Source/JavaScriptCore/Sources.txt:
* Source/JavaScriptCore/dfg/DFGPlan.cpp:
(JSC::DFG::Plan::compileInThreadImpl):
* Source/JavaScriptCore/dfg/DFGValidateUnlinked.cpp: Added.
(JSC::DFG::ValidateUnlinked::run):
(JSC::DFG::ValidateUnlinked::validateNode):
(JSC::DFG::performValidateUnlinked):
* Source/JavaScriptCore/dfg/DFGValidateUnlinked.h: Added.
* Source/JavaScriptCore/runtime/OptionsList.h:

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




More information about the webkit-changes mailing list