Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 2d4d8ad1273ab2997fa0736c0db51123256d2db9
      
https://github.com/WebKit/WebKit/commit/2d4d8ad1273ab2997fa0736c0db51123256d2db9
  Author: Justin Michaud <[email protected]>
  Date:   2025-11-25 (Tue, 25 Nov 2025)

  Changed paths:
    A JSTests/microbenchmarks/for-of-vs-for-each-2.js
    A JSTests/microbenchmarks/for-of-vs-for-each.js
    M Source/JavaScriptCore/dfg/DFGIntegerRangeOptimizationPhase.cpp
    M Source/JavaScriptCore/dfg/DFGNode.h

  Log Message:
  -----------
  Make Integer Range Optimization see through for of pattern
https://bugs.webkit.org/show_bug.cgi?id=302192

Reviewed by Yijia Huang.

We emit:

Branch(ArithBitOr(BooleanToNumber(Compare*), BooleanToNumber(Compare*)))

in the bytecode parser for iterator_next. This patch lets IRO see through
this and extract the cases, at least for the false side of the branch.

This removes the checks in the provided microbenchmarks.

* JSTests/microbenchmarks/for-of-vs-for-each-2.js: Added.
(console.consoleStub.testForOf):
(noInline.testForOf.testForEach):
(runTest):
(noInline.runTest):
* JSTests/microbenchmarks/for-of-vs-for-each.js: Added.
(console.consoleStub.testForOf):
(noInline.testForOf.testForEach):
(5.runTest):
(noInline.runTest):
* Source/JavaScriptCore/dfg/DFGIntegerRangeOptimizationPhase.cpp:
* Source/JavaScriptCore/dfg/DFGNode.h:
(JSC::DFG::Node::isBinaryUseKind):

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



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

Reply via email to