Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: d7f3c7ee2d70ea57700b309d4ab38b74e73880e6
      
https://github.com/WebKit/WebKit/commit/d7f3c7ee2d70ea57700b309d4ab38b74e73880e6
  Author: Yijia Huang <[email protected]>
  Date:   2026-02-24 (Tue, 24 Feb 2026)

  Changed paths:
    M Source/JavaScriptCore/dfg/DFGCommon.cpp
    M Source/JavaScriptCore/dfg/DFGCommon.h
    M Source/JavaScriptCore/dfg/DFGDriver.cpp
    M Source/JavaScriptCore/dfg/DFGTierUpCheckInjectionPhase.cpp

  Log Message:
  -----------
  [JSC] DFGDriver should use mode-specific compilation options for FTL
https://bugs.webkit.org/show_bug.cgi?id=308563
rdar://171094227

Reviewed by Yusuke Suzuki.

DFGDriver::compileImpl() is used for both DFG and FTL compilation, but it
was always checking DFG-specific options (bytecodeRangeToDFGCompile and
ensureGlobalDFGAllowlist) regardless of the compilation mode. This meant
FTL compilation ignored its own filtering options (bytecodeRangeToFTLCompile
and ensureGlobalFTLAllowlist), making debugging tools ineffective.

This patch fixes the issue by using a switch statement to dispatch on the
JITCompilationMode parameter and check the appropriate options for each tier:
- FTL/FTLForOSREntry modes use FTL-specific options
- DFG/UnlinkedDFG modes use DFG-specific options
- Baseline/InvalidCompilation modes assert (should never reach this function)

Additionally, this patch eliminates code duplication by moving
ensureGlobalDFGAllowlist() and ensureGlobalFTLAllowlist() from DFGDriver.cpp
and DFGTierUpCheckInjectionPhase.cpp into DFGCommon.cpp. Having these shared
accessor functions in a common location ensures consistent behavior and makes
the code easier to maintain.

No new tests since these options are debug-only infrastructure that defaults to
disabled. The bug only affects developers who manually set --ftlAllowlist or
--bytecodeRangeToFTLCompile for debugging purposes. The fix is mechanically
correct and verified by inspection.

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to