Retire legacy dtoa function and DecimalNumber class
authordarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 3 Mar 2019 20:43:01 +0000 (20:43 +0000)
committerdarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 3 Mar 2019 20:43:01 +0000 (20:43 +0000)
commitb9aa5505c669fabb12b4b201e051590cff02cb95
treef98a9e3be8a2b321395f8688583cd51df2267997
parent7eff27547db360086bf093ded72e0aaf3764947d
Retire legacy dtoa function and DecimalNumber class
https://bugs.webkit.org/show_bug.cgi?id=195253

Reviewed by Daniel Bates.

LayoutTests/imported/w3c:

* web-platform-tests/web-animations/animation-model/keyframe-effects/effect-value-iteration-composite-operation-expected.txt:
Rebaseline still-failing part of this test that dumps super-small numbers that are formatted
differently by the new code (exponential style).

Source/JavaScriptCore:

* runtime/NumberPrototype.cpp:
(JSC::numberProtoFuncToExponential): Removed dependency on NumberToStringBufferLength,
using NumberToStringBuffer instead. Also tweaked style of implementation a bit.

Source/WebCore:

* css/CSSPrimitiveValue.cpp:
(WebCore::CSSPrimitiveValue::formatNumberValue const): Use makeString instead
of DecimalNumber. Also changed return type to String and use StringView and
removed special handling of literals.
(WebCore::CSSPrimitiveValue::formatNumberForCustomCSSText const): Removed an
unnecessary use of StringBuilder.

* css/CSSPrimitiveValue.h: Updated for changes to formatNumberValue.

Source/WTF:

* WTF.xcodeproj/project.pbxproj: Removed DecimalNumber.cpp/h.
* wtf/CMakeLists.txt: Ditto.

* wtf/DecimalNumber.cpp: Removed.
* wtf/DecimalNumber.h: Removed.

* wtf/JSONValues.cpp:
(WTF::JSONImpl::Value::writeJSON const): Use
StringBuilder::appendECMAScriptNumber instead of custom logic
using the DecimalNumber class.

* wtf/dtoa.cpp:
(WTF::storeInc): Deleted.
(WTF::BigInt): Deleted.
(WTF::multadd): Deleted.
(WTF::hi0bits): Deleted.
(WTF::lo0bits): Deleted.
(WTF::i2b): Deleted.
(WTF::mult): Deleted.
(WTF::P5Node::P5Node): Deleted.
(WTF::pow5mult): Deleted.
(WTF::lshift): Deleted.
(WTF::cmp): Deleted.
(WTF::diff): Deleted.
(WTF::d2b): Deleted.
(WTF::quorem): Deleted.
(WTF::dtoa): Deleted.

* wtf/dtoa.h: Removed DtoaBuffer, dtoa, and NumberToStringBufferLength.

LayoutTests:

* fast/css/large-value-csstext-expected.txt:
* media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-volume-styles-expected.txt:
* media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-volume-styles.html:
Updated expected value to expect exponential syntax for super-small numbers that are formatted
differently by the new code.

* platform/ios/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-expected.txt:
* platform/ios/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-expected.txt:
* platform/ios/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-expected.txt:
* platform/mac/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-expected.txt:
* platform/mac/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-expected.txt:
* platform/mac/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-expected.txt:
Rebaseline still-failing parts of these tests that dump super-small numbers that are formatted
differently by the new code. Still probably needs to be done for 4 other platforms.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@242330 268f45cc-cd09-0410-ab3c-d52691b4dbfc
25 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/css/large-value-csstext-expected.txt
LayoutTests/imported/w3c/ChangeLog
LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/keyframe-effects/effect-value-iteration-composite-operation-expected.txt
LayoutTests/media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-volume-styles-expected.txt
LayoutTests/media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-volume-styles.html
LayoutTests/platform/ios/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-expected.txt
LayoutTests/platform/ios/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-expected.txt
LayoutTests/platform/ios/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-expected.txt
LayoutTests/platform/mac/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-expected.txt
LayoutTests/platform/mac/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/addition-per-property-expected.txt
LayoutTests/platform/mac/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-expected.txt
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/runtime/NumberPrototype.cpp
Source/WTF/ChangeLog
Source/WTF/WTF.xcodeproj/project.pbxproj
Source/WTF/wtf/CMakeLists.txt
Source/WTF/wtf/DecimalNumber.cpp [deleted file]
Source/WTF/wtf/DecimalNumber.h [deleted file]
Source/WTF/wtf/JSONValues.cpp
Source/WTF/wtf/dtoa.cpp
Source/WTF/wtf/dtoa.h
Source/WebCore/ChangeLog
Source/WebCore/css/CSSPrimitiveValue.cpp
Source/WebCore/css/CSSPrimitiveValue.h