[webkit-changes] [WebKit/WebKit] 656204: [JSC] DFG should attempt to remove GetScope

Yusuke Suzuki noreply at github.com
Sun Jul 21 13:17:38 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 6562040ac3fbc2ca523660449449c29711266d89
      https://github.com/WebKit/WebKit/commit/6562040ac3fbc2ca523660449449c29711266d89
  Author: Yusuke Suzuki <ysuzuki at apple.com>
  Date:   2024-07-21 (Sun, 21 Jul 2024)

  Changed paths:
    A JSTests/stress/get-scope-fold.js
    M Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h
    M Source/JavaScriptCore/dfg/DFGConstantFoldingPhase.cpp

  Log Message:
  -----------
  [JSC] DFG should attempt to remove GetScope
https://bugs.webkit.org/show_bug.cgi?id=276857
rdar://132178143

Reviewed by Yijia Huang.

This patch is a part of explorative preparation for partial support of PhantomNewFunction in DFG (not FTL).
We found that GetScope(NewFunction(@scope)) is not fold at all in DFG / FTL in some cases. So let's just fold it into @scope.

* JSTests/stress/get-scope-fold.js: Added.
(shouldBe):
(escape):
(test.test2.ok):
(test.test2):
(test):
* Source/JavaScriptCore/dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
* Source/JavaScriptCore/dfg/DFGConstantFoldingPhase.cpp:
(JSC::DFG::ConstantFoldingPhase::foldConstants):

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



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


More information about the webkit-changes mailing list