Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: a13ce0a5a45e9f1f135df40e8622147bce3689d8
https://github.com/WebKit/WebKit/commit/a13ce0a5a45e9f1f135df40e8622147bce3689d8
Author: Keita Nonaka <[email protected]>
Date: 2025-10-15 (Wed, 15 Oct 2025)
Changed paths:
A JSTests/microbenchmarks/ArrayBuffer-full-transfer.js
A JSTests/microbenchmarks/ArrayBuffer-partial-transfer.js
M JSTests/stress/dataview-construct.js
M Source/JavaScriptCore/dfg/DFGOperations.cpp
M Source/JavaScriptCore/runtime/JSArrayBufferConstructor.cpp
M Source/JavaScriptCore/runtime/JSArrayBufferPrototype.cpp
M Source/JavaScriptCore/runtime/JSCJSValue.h
M Source/JavaScriptCore/runtime/JSCJSValueInlines.h
M Source/JavaScriptCore/runtime/JSGenericTypedArrayViewConstructorInlines.h
Log Message:
-----------
[JSC] Replace `toTypedArrayIndex` with `toIndex`
https://bugs.webkit.org/show_bug.cgi?id=300195
Reviewed by Yusuke Suzuki.
This patch replaces `toTypedArrayIndex` with `toIndex`,
since TypedArray and ArrayBuffer operations should use `toIndex` as specified
in the TC39 proposal [1][2][3].
This patch introduces no performance regressions.
TipOfTree
Patched Ratio
ArrayBuffer-full-transfer 1.7208+-0.1841
1.6495+-0.0581 might be 1.0432x faster
ArrayBuffer-Int32Array-byteOffset 2.0958+-0.1595
2.0790+-0.0754
ArrayBuffer-DataView-alloc-long-lived 6.3051+-0.2566
6.2375+-0.3518 might be 1.0108x faster
ArrayBuffer-Int8Array-alloc 5.5919+-0.5350 ?
5.6430+-0.0639 ?
ArrayBuffer-Int8Array-alloc-large-long-lived 18.3908+-1.0884 ?
18.4150+-0.7763 ?
ArrayBuffer-partial-transfer 1.9269+-0.1601
1.8385+-0.0674 might be 1.0481x faster
ArrayBuffer-Int8Array-alloc-long-lived-buffer
8.9535+-0.8227
8.9152+-0.9278
ArrayBuffer-DataView-alloc-large-long-lived 18.3303+-0.9816
18.0020+-1.0007 might be 1.0182x faster
ArrayBuffer-Int8Array-alloc-long-lived 6.6823+-0.6723
6.5441+-0.5609 might be 1.0211x faster
[1]: https://tc39.es/ecma262/#sec-arraybuffer-length
[2]: https://tc39.es/ecma262/#sec-arraybuffercopyanddetach
[3]: https://tc39.es/ecma262/#sec-typedarray
Tests: JSTests/microbenchmarks/ArrayBuffer-full-transfer.js
JSTests/microbenchmarks/ArrayBuffer-partial-transfer.js
* JSTests/microbenchmarks/ArrayBuffer-full-transfer.js: Added.
* JSTests/microbenchmarks/ArrayBuffer-partial-transfer.js: Added.
* JSTests/stress/dataview-construct.js:
(shouldThrow):
* Source/JavaScriptCore/dfg/DFGOperations.cpp:
(JSC::DFG::JSC_DEFINE_JIT_OPERATION):
* Source/JavaScriptCore/runtime/JSArrayBufferConstructor.cpp:
(JSC::JSGenericArrayBufferConstructor<sharingMode>::constructImpl):
* Source/JavaScriptCore/runtime/JSArrayBufferPrototype.cpp:
(JSC::arrayBufferProtoFuncTransferImpl):
* Source/JavaScriptCore/runtime/JSCJSValue.h:
* Source/JavaScriptCore/runtime/JSCJSValueInlines.h:
(JSC::JSValue::toTypedArrayIndex const): Deleted.
* Source/JavaScriptCore/runtime/JSGenericTypedArrayViewConstructorInlines.h:
(JSC::constructGenericTypedArrayViewWithArguments):
(JSC::constructGenericTypedArrayViewImpl):
Canonical link: https://commits.webkit.org/301569@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes