Commit 9237c08d authored by Mathias Bynens's avatar Mathias Bynens Committed by Commit Bot

[regexp] Support Regional_Indicator property class

This patch adds support for Regional_Indicator within Unicode property
escapes in regular expressions.

The Regional_Indicator binary property was added in Unicode v10 and is
supported in ICU 60.1.

An `#if` directive is used to prevent breaking Node.js until they
update their ICU.

BUG=v8:4743

Cq-Include-Trybots: master.tryserver.v8:v8_linux_noi18n_rel_ng
Change-Id: I7acec13c8ae7552558a0f852937984bba828e738
Reviewed-on: https://chromium-review.googlesource.com/758273Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49250}
parent 6d3e1e00
...@@ -1249,6 +1249,9 @@ bool IsSupportedBinaryProperty(UProperty property) { ...@@ -1249,6 +1249,9 @@ bool IsSupportedBinaryProperty(UProperty property) {
case UCHAR_PATTERN_WHITE_SPACE: case UCHAR_PATTERN_WHITE_SPACE:
case UCHAR_QUOTATION_MARK: case UCHAR_QUOTATION_MARK:
case UCHAR_RADICAL: case UCHAR_RADICAL:
#if U_ICU_VERSION_MAJOR_NUM >= 60
case UCHAR_REGIONAL_INDICATOR:
#endif
case UCHAR_S_TERM: case UCHAR_S_TERM:
case UCHAR_SOFT_DOTTED: case UCHAR_SOFT_DOTTED:
case UCHAR_TERMINAL_PUNCTUATION: case UCHAR_TERMINAL_PUNCTUATION:
......
...@@ -137,6 +137,9 @@ f(/\p{QMark}/u, "A"); ...@@ -137,6 +137,9 @@ f(/\p{QMark}/u, "A");
t(/\p{Radical}/u, "\u2FAD"); t(/\p{Radical}/u, "\u2FAD");
f(/\p{Radical}/u, "A"); f(/\p{Radical}/u, "A");
t(/\p{Regional_Indicator}/u, "\u{1F1E6}");
f(/\p{Regional_Indicator}/u, "A");
t(/\p{Sentence_Terminal}/u, "!"); t(/\p{Sentence_Terminal}/u, "!");
f(/\p{STerm}/u, "A"); f(/\p{STerm}/u, "A");
......
...@@ -449,9 +449,6 @@ ...@@ -449,9 +449,6 @@
'built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Katakana': [SKIP], 'built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Katakana': [SKIP],
'built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Yi': [SKIP], 'built-ins/RegExp/property-escapes/generated/Script_Extensions_-_Yi': [SKIP],
# TODO(mathias): Add support for Regional_Indicator now that ICU 60.1 has it.
'built-ins/RegExp/property-escapes/generated/Regional_Indicator': [SKIP],
# https://bugs.chromium.org/p/v8/issues/detail?id=6776 # https://bugs.chromium.org/p/v8/issues/detail?id=6776
'built-ins/Proxy/ownKeys/return-duplicate-entries-throws': [FAIL], 'built-ins/Proxy/ownKeys/return-duplicate-entries-throws': [FAIL],
'built-ins/Proxy/ownKeys/return-duplicate-symbol-entries-throws': [FAIL], 'built-ins/Proxy/ownKeys/return-duplicate-symbol-entries-throws': [FAIL],
......
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