[webkit-changes] [WebKit/WebKit] f49d6a: [JSC] Implement Math.sumPrecise()
Commit Queue
noreply at github.com
Tue Sep 17 09:34:34 PDT 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: f49d6a41fb8d93f9c7e6758d87a06a9eea3e9698
https://github.com/WebKit/WebKit/commit/f49d6a41fb8d93f9c7e6758d87a06a9eea3e9698
Author: Alexey Shvayka <ashvayka at apple.com>
Date: 2024-09-17 (Tue, 17 Sep 2024)
Changed paths:
A JSTests/stress/math-sum-precise.js
M JSTests/test262/config.yaml
M Source/JavaScriptCore/runtime/MathObject.cpp
M Source/JavaScriptCore/runtime/OptionsList.h
M Source/WTF/WTF.xcodeproj/project.pbxproj
M Source/WTF/wtf/CMakeLists.txt
A Source/WTF/wtf/PreciseSum.cpp
A Source/WTF/wtf/PreciseSum.h
Log Message:
-----------
[JSC] Implement Math.sumPrecise()
https://bugs.webkit.org/show_bug.cgi?id=279768
<rdar://131580043>
Reviewed by Yusuke Suzuki.
This patch implements Math.sumPrecise() proposal [1] behind a flag by importing its polyfill [2] and
rewriting it in C++, with a minor tweak of how negative zero edge case is handled (without extra loop)
and proper iterator closure.
radfordneal/xsum [3], mentioned in the proposal, didn't pass all the test262 tests.
[1]: https://github.com/tc39/proposal-math-sum
[2]: https://github.com/tc39/proposal-math-sum/blob/main/polyfill/polyfill.mjs
[3]: https://gitlab.com/radfordneal/xsum
* JSTests/stress/math-sum-precise.js: Added.
* JSTests/test262/config.yaml:
* Source/JavaScriptCore/runtime/MathObject.cpp:
(JSC::MathObject::finishCreation):
(JSC::JSC_DEFINE_HOST_FUNCTION):
* Source/JavaScriptCore/runtime/OptionsList.h:
* Source/WTF/LICENSE-SumPrecise.txt: Added.
* Source/WTF/WTF.xcodeproj/project.pbxproj:
* Source/WTF/wtf/CMakeLists.txt:
* Source/WTF/wtf/sum_precise/LICENSE.txt: Added.
* Source/WTF/wtf/sum_precise/SumPrecise.cpp: Added.
(WTF::SumPrecise::twosum):
(WTF::SumPrecise::add):
(WTF::SumPrecise::compute):
* Source/WTF/wtf/sum_precise/SumPrecise.h: Added.
Canonical link: https://commits.webkit.org/283774@main
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list