Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 3c73fbe0cf5d46c429c5c055ee0247c96022df49
https://github.com/WebKit/WebKit/commit/3c73fbe0cf5d46c429c5c055ee0247c96022df49
Author: Simon Lewis <[email protected]>
Date: 2026-05-15 (Fri, 15 May 2026)
Changed paths:
M Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
M Source/JavaScriptCore/Sources.txt
M Source/JavaScriptCore/runtime/JSTypedArrayViewPrototype.cpp
A Source/JavaScriptCore/runtime/JSTypedArrayViewPrototypeFunctions1.cpp
A Source/JavaScriptCore/runtime/JSTypedArrayViewPrototypeFunctions2.cpp
A Source/JavaScriptCore/runtime/JSTypedArrayViewPrototypeFunctions3.cpp
A Source/JavaScriptCore/runtime/JSTypedArrayViewPrototypeFunctions4.cpp
A Source/JavaScriptCore/runtime/JSTypedArrayViewPrototypeInternal.h
Log Message:
-----------
[JSC] Shard JSTypedArrayViewPrototype host functions across @no-unify TUs
https://bugs.webkit.org/show_bug.cgi?id=313968
Reviewed by Keith Miller.
JSTypedArrayViewPrototype.cpp dispatches each %TypedArray%.prototype method
through CALL_GENERIC_TYPEDARRAY_PROTOTYPE_FUNCTION, instantiating the
genericTypedArrayViewProtoFunc* template for all twelve typed-array view
types per method. With ~30 methods that is ~360 heavy instantiations in one
translation unit, which makes its unified bundle the single longest
JavaScriptCore compile in a cold mac-asan build and the long pole on the
JSC -> WebCore critical path.
Move the dispatch macro and the host-function declarations into a new
JSTypedArrayViewPrototypeInternal.h, and split the JSC_DEFINE_HOST_FUNCTION
bodies across four @no-unify shards so the instantiations compile in
parallel. JSTypedArrayViewPrototype.cpp keeps the prototype object,
finishCreation, the iterator/toStringTag helpers, and the lightweight
private functions, and no longer includes
JSGenericTypedArrayViewPrototypeFunctions.h. Behaviour is unchanged; the
same functions are defined, just in separate TUs that finishCreation links
against by name.
Shard assignment puts the two heavy instantiations (Sort, ToSorted) in
separate shards alongside lightweight siblings so no single shard dominates;
the JSC critical-path compile is then bounded by the next-slowest unified
bundle rather than by the typed-array prototype.
* Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj:
* Source/JavaScriptCore/Sources.txt:
* Source/JavaScriptCore/runtime/JSTypedArrayViewPrototype.cpp:
* Source/JavaScriptCore/runtime/JSTypedArrayViewPrototypeFunctions1.cpp: Added.
* Source/JavaScriptCore/runtime/JSTypedArrayViewPrototypeFunctions2.cpp: Added.
* Source/JavaScriptCore/runtime/JSTypedArrayViewPrototypeFunctions3.cpp: Added.
* Source/JavaScriptCore/runtime/JSTypedArrayViewPrototypeFunctions4.cpp: Added.
* Source/JavaScriptCore/runtime/JSTypedArrayViewPrototypeInternal.h: Added.
Canonical link: https://commits.webkit.org/313344@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications