Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: c59d70e267eb709e91bfc70153c33fc2f7cd7a4f
https://github.com/WebKit/WebKit/commit/c59d70e267eb709e91bfc70153c33fc2f7cd7a4f
Author: Vassili Bykov <[email protected]>
Date: 2026-10-01 (Thu, 01 Oct 2026)
Changed paths:
M Source/JavaScriptCore/bytecode/ExpressionInfo.cpp
M Source/JavaScriptCore/bytecode/ExpressionInfo.h
M Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.cpp
M Source/JavaScriptCore/parser/SourceCharacters.h
M Source/JavaScriptCore/parser/SourceProvider.cpp
M Source/WTF/wtf/SIMDHelpers.h
Log Message:
-----------
[JSC] Cache decoded ExpressionInfo entries, build line start tables in one
pass
https://bugs.webkit.org/show_bug.cgi?id=325559
rdar://188641639
Reviewed by Yusuke Suzuki.
Earlier PR https://github.com/WebKit/WebKit/pull/74359 stopped storing line and
column numbers
in ExpressionInfo and removed the per-instance cache of line and column values
keyed by
bytecode offset. That removal increased the cost of looking up line and column
numbers because
it now requires decoding ExpressionInfo first.
This patch makes two changes to improve the performance of that mapping:
1. It introduces a cache of decoded ExpressionInfos keyed by bytecode offset,
which also
benefits code paths other than the lookup of line/column numbers (all
callers of
expressionInfoForBytecodeIndex). The cache is protected by a lock because
compiler threads
also look up entries when dumping source positions. (The old line/column
cache did not have
a lock, and that was a latent bug).
2. It improves the SIMD scanning of source to populate a line start table in
one go
beginning to end instead of the original approach of restarting SIMD scan at
every line break.
Testing: optimizations only, covered by existing tests.
Canonical link: https://commits.webkit.org/322425@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications