Skip to content

Commit 3ae4277

Browse files
FrankYFTangV8 LUCI CQ
authored andcommitted
[intl] Fix arm64-N5X failure in NumberFormat v3 due to precision issue
Use the new ICU 71-1 API Precision::incrementExact https://unicode-org.github.io/icu-docs/apidoc/dev/icu4c/classicu_1_1number_1_1Precision.html#aedfb413e5a37c69868594c870a87134b Change-Id: I6d8841e5a07972d1be36026ce150eb83dbf300e7 Cq-Include-Trybots: luci.v8.try:v8_android_arm64_n5x_rel_ng Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3430378 Reviewed-by: Shu-yu Guo <[email protected]> Commit-Queue: Frank Tang <[email protected]> Cr-Commit-Position: refs/heads/main@{#80126}
1 parent b081948 commit 3ae4277

3 files changed

Lines changed: 3 additions & 12 deletions

File tree

src/objects/intl-objects.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
#include "unicode/locid.h"
2222
#include "unicode/uversion.h"
2323

24-
#define V8_MINIMUM_ICU_VERSION 69
24+
#define V8_MINIMUM_ICU_VERSION 71
2525

2626
namespace U_ICU_NAMESPACE {
2727
class BreakIterator;

src/objects/js-number-format.cc

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -884,9 +884,8 @@ icu::number::UnlocalizedNumberFormatter SetDigitOptionsToFormatterV3(
884884
break;
885885
}
886886
if (rounding_increment != 1) {
887-
double icu_increment = rounding_increment *
888-
std::pow(10, -digit_options.maximum_fraction_digits);
889-
precision = ::icu::number::Precision::increment(icu_increment)
887+
precision = ::icu::number::Precision::incrementExact(
888+
rounding_increment, -digit_options.maximum_fraction_digits)
890889
.withMinFraction(digit_options.minimum_fraction_digits);
891890
}
892891
if (trailing_zeros == JSNumberFormat::ShowTrailingZeros::kHide) {

test/test262/test262.status

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3128,14 +3128,6 @@
31283128
'language/identifiers/start-unicode-9*': [FAIL],
31293129
}], # no_i18n == True
31303130

3131-
['arch == arm64', {
3132-
# Problem in V8 Android Arm64 - N5X
3133-
'intl402/NumberFormat/prototype/format/format-rounding-increment-1000': [SKIP],
3134-
'intl402/NumberFormat/prototype/format/format-rounding-increment-2000': [SKIP],
3135-
'intl402/NumberFormat/prototype/format/format-rounding-increment-2500': [SKIP],
3136-
'intl402/NumberFormat/prototype/format/format-rounding-increment-5000': [SKIP],
3137-
}], # 'arch == arm64'
3138-
31393131
['arch == arm or arch == mipsel or arch == mips or arch == arm64 or arch == mips64 or arch == mips64el', {
31403132

31413133
# Causes stack overflow on simulators due to eager compilation of

0 commit comments

Comments
 (0)