Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 402df7467548a870a413dc3d999169dbb2a1519b
      
https://github.com/WebKit/WebKit/commit/402df7467548a870a413dc3d999169dbb2a1519b
  Author: Yusuke Suzuki <[email protected]>
  Date:   2026-06-17 (Wed, 17 Jun 2026)

  Changed paths:
    M Source/JavaScriptCore/b3/B3Effects.h
    M Source/JavaScriptCore/b3/B3EliminateCommonSubexpressions.cpp
    M Source/JavaScriptCore/b3/B3EliminateDeadCode.cpp
    M Source/JavaScriptCore/b3/B3Kind.h
    M Source/JavaScriptCore/b3/B3StackmapGenerationParams.cpp
    M Source/JavaScriptCore/b3/B3Value.cpp
    M Source/JavaScriptCore/b3/B3Value.h
    M Source/JavaScriptCore/b3/B3ValueInlines.h
    M Source/WTF/wtf/Range.h
    M Source/WTF/wtf/TriState.h

  Log Message:
  -----------
  [JSC] B3::Value::effects should use constant table
https://bugs.webkit.org/show_bug.cgi?id=317330
rdar://179957480

Reviewed by Dan Hecht and Keith Miller.

We are frequently running B3::Value::effects(), but most of effects are
constant based on opcode. This patch introduces constexpr table which can 
quickly
generate the effects if it is not relying on the Value's content.

* Source/JavaScriptCore/b3/B3Effects.h:
(JSC::B3::Effects::none):
(JSC::B3::Effects::forCall):
(JSC::B3::Effects::forCheck):
(JSC::B3::Effects::mustExecute const):
* Source/JavaScriptCore/b3/B3EliminateCommonSubexpressions.cpp:
* Source/JavaScriptCore/b3/B3EliminateDeadCode.cpp:
(JSC::B3::eliminateDeadCodeImpl):
* Source/JavaScriptCore/b3/B3Kind.h:
(JSC::B3::Kind::Kind):
(JSC::B3::Kind::hasTraps const):
* Source/JavaScriptCore/b3/B3StackmapGenerationParams.cpp:
* Source/JavaScriptCore/b3/B3Value.cpp:
(JSC::B3::Value::effectsSlow const):
(JSC::B3::Value::effects const): Deleted.
* Source/JavaScriptCore/b3/B3Value.h:
* Source/JavaScriptCore/b3/B3ValueInlines.h:
(JSC::B3::constantEffectsForOpcode):
(JSC::B3::=):
(JSC::B3::constantEffectsTableIsTrapSafe):
(JSC::B3::Value::effects const):
(JSC::B3::Value::mustExecute const):
* Source/WTF/wtf/Range.h:
(WTF::Range::Range):
(WTF::Range::top):
(WTF::Range::operator bool const):
* Source/WTF/wtf/TriState.h:
(WTF::triState):
(WTF::invert):

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



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

Reply via email to