Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: c415e39f485baa2a4bb6ac94458b8516d2213947
https://github.com/WebKit/WebKit/commit/c415e39f485baa2a4bb6ac94458b8516d2213947
Author: Yusuke Suzuki <[email protected]>
Date: 2026-05-20 (Wed, 20 May 2026)
Changed paths:
A JSTests/stress/array-sort-inline-nested-in-comparator.js
M Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp
Log Message:
-----------
[JSC] Introduce private tmp mechanism to DFG ByteCodeParser
https://bugs.webkit.org/show_bug.cgi?id=315173
rdar://177056483
Reviewed by Yijia Huang.
Sort inlining introduces new fancy opportunities to DFG: we start having
DFG private tmps and do programming in DFG. Previously all tmp comes
from CodeBlock, but now DFG can create a new tmp for its internal programming.
However current DFG ByteCodeParser is not tracking these tmps correctly,
so inlined frame will incorrectly use the assigned tmps as we are only
counting CodeBlock's tmps. This patch adds m_numPrivateTmps to each
InlineStackEntry so that we can allocate private tmps in each inlined
frame and we can track them correctly. Also adding simple allocator mechanism,
allocatePrivateTmps, to make use of them easier.
Test: JSTests/stress/array-sort-inline-nested-in-comparator.js
* JSTests/stress/array-sort-inline-nested-in-comparator.js: Added.
(makeIntArr):
(innerCmp):
(outerCmp):
(test):
* Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::PrivateTmpRange::operandAt const):
(JSC::DFG::ByteCodeParser::inlineCall):
(JSC::DFG::ByteCodeParser::tmpOffsetForInlineeOf):
(JSC::DFG::ByteCodeParser::allocatePrivateTmps):
(JSC::DFG::ByteCodeParser::InlineStackEntry::InlineStackEntry):
(JSC::DFG::ByteCodeParser::handleArraySort):
Canonical link: https://commits.webkit.org/313590@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications