Commit 3ae42771 authored by Frank Tang's avatar Frank Tang Committed by V8 LUCI CQ

[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/+/3430378Reviewed-by: 's avatarShu-yu Guo <syg@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80126}
parent b0819480
......@@ -21,7 +21,7 @@
#include "unicode/locid.h"
#include "unicode/uversion.h"
#define V8_MINIMUM_ICU_VERSION 69
#define V8_MINIMUM_ICU_VERSION 71
namespace U_ICU_NAMESPACE {
class BreakIterator;
......
......@@ -884,9 +884,8 @@ icu::number::UnlocalizedNumberFormatter SetDigitOptionsToFormatterV3(
break;
}
if (rounding_increment != 1) {
double icu_increment = rounding_increment *
std::pow(10, -digit_options.maximum_fraction_digits);
precision = ::icu::number::Precision::increment(icu_increment)
precision = ::icu::number::Precision::incrementExact(
rounding_increment, -digit_options.maximum_fraction_digits)
.withMinFraction(digit_options.minimum_fraction_digits);
}
if (trailing_zeros == JSNumberFormat::ShowTrailingZeros::kHide) {
......
......@@ -3128,14 +3128,6 @@
'language/identifiers/start-unicode-9*': [FAIL],
}], # no_i18n == True
['arch == arm64', {
# Problem in V8 Android Arm64 - N5X
'intl402/NumberFormat/prototype/format/format-rounding-increment-1000': [SKIP],
'intl402/NumberFormat/prototype/format/format-rounding-increment-2000': [SKIP],
'intl402/NumberFormat/prototype/format/format-rounding-increment-2500': [SKIP],
'intl402/NumberFormat/prototype/format/format-rounding-increment-5000': [SKIP],
}], # 'arch == arm64'
['arch == arm or arch == mipsel or arch == mips or arch == arm64 or arch == mips64 or arch == mips64el', {
# Causes stack overflow on simulators due to eager compilation of
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment