forked from scala-native/scala-native
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix scala-native#2902: Avoid Array allocation in ieee754tostring impl…
…ementations (scala-native#2917) * Fix scala-native#2902: Avoid Array allocation in ieee754tostring implementations * Address reviewer suggestions in PR scala-native#2917: * add comment to describe RESULT_STRING_MAX_LENGTH magic numbers * add private method _xxxToCharsNoCheck() (e.g. isNaN) to avoid redundant checks when calling xxxToString() * mark xxxToString() methods as @deprecated (note: this line is commented, as it is currently leading to errors in tests) * add new unit tests in RyuDoubleTest and RyuFloatTest (not asked by the reviewer) * add unit test in StringBuilderTest * renamed and reorganize tests in StringBufferTest * Remove unnecessary @noinline annotations * Remove methods RyuDouble.doubleToString()/RyuFloat.floatToString() and put simplified versions in RyuDoubleTest/RyuFloatTest * PR scala-native#2902 improvements: * re-implement Double.toString/Float.toString in order to use RyuDouble.doubleToChars()/RyuFloat.floatToChars() * simplify doubleToString()/floatToString() example wrappers in unit tests * Add a note to highlight `result.length - offset >= RESULT_STRING_MAX_LENGTH`
- Loading branch information
1 parent
396c163
commit 9446fe6
Showing
11 changed files
with
262 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.