Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 173d202e5943dec697eb0a5cfa2632b1e5468989
https://github.com/WebKit/WebKit/commit/173d202e5943dec697eb0a5cfa2632b1e5468989
Author: Dan Hecht <[email protected]>
Date: 2026-04-20 (Mon, 20 Apr 2026)
Changed paths:
M Source/JavaScriptCore/b3/air/AirAllocateRegistersByGreedy.cpp
Log Message:
-----------
[JSC] GreedyRegAlloc: Add typed cost wrappers
https://bugs.webkit.org/show_bug.cgi?id=312790
rdar://175180811
Reviewed by Yusuke Suzuki.
Introduce UseDefCost and SpillCost wrapper types via a tagged Cost<Tag>
template to prevent accidental mixing of these two semantically distinct
cost values. This is to prevent accidental mixing of these costs like
the issue fixed by 310551@main.
* Source/JavaScriptCore/b3/air/AirAllocateRegistersByGreedy.cpp:
(JSC::B3::Air::Greedy::Cost::Cost):
(JSC::B3::Air::Greedy::Cost::value const):
(JSC::B3::Air::Greedy::Cost::operator+=):
(JSC::B3::Air::Greedy::Cost::operator-=):
(JSC::B3::Air::Greedy::Cost::operator*=):
(JSC::B3::Air::Greedy::Cost::operator* const):
(JSC::B3::Air::Greedy::Cost::operator/ const):
(JSC::B3::Air::Greedy::TmpData::dump const):
(JSC::B3::Air::Greedy::TmpData::spillCost):
(JSC::B3::Air::Greedy::GreedyAllocator::createGroupRepresentatives):
(JSC::B3::Air::Greedy::GreedyAllocator::rewriteCoalescedTmps):
(JSC::B3::Air::Greedy::GreedyAllocator::initSpillCosts):
(JSC::B3::Air::Greedy::GreedyAllocator::addTmpImpl):
(JSC::B3::Air::Greedy::GreedyAllocator::addSpillTmpWithInterval):
(JSC::B3::Air::Greedy::GreedyAllocator::addSplitTmp):
(JSC::B3::Air::Greedy::GreedyAllocator::tryEvict):
(JSC::B3::Air::Greedy::GreedyAllocator::trySplitAroundClobbers):
(JSC::B3::Air::Greedy::GreedyAllocator::trySplitIntraBlock):
Canonical link: https://commits.webkit.org/311626@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications