Commit 63536799 authored by Mathias Bynens's avatar Mathias Bynens Committed by Commit Bot

[regexp] Support Emoji_Component property class

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

The Emoji_Component binary property was added in Emoji data v5
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: If1b49a4c175e88f1840ca5ef8d57829d6d8c3291
Reviewed-on: https://chromium-review.googlesource.com/758261Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49229}
parent d98ef522
......@@ -1225,9 +1225,9 @@ bool IsSupportedBinaryProperty(UProperty property) {
case UCHAR_DEPRECATED:
case UCHAR_DIACRITIC:
case UCHAR_EMOJI:
// TODO(yangguo): Uncomment this once we upgrade to ICU 60.
// See https://ssl.icu-project.org/trac/ticket/13062
// case UCHAR_EMOJI_COMPONENT:
#if U_ICU_VERSION_MAJOR_NUM >= 60
case UCHAR_EMOJI_COMPONENT:
#endif
case UCHAR_EMOJI_MODIFIER_BASE:
case UCHAR_EMOJI_MODIFIER:
case UCHAR_EMOJI_PRESENTATION:
......
......@@ -71,8 +71,8 @@ f(/\p{Dia}/u, "1");
t(/\p{Emoji}/u, "\u2603");
f(/\p{Emoji}/u, "x");
// t(/\p{Emoji_Component}/u, "\u2603");
// f(/\p{Emoji_Component}/u, "x");
t(/\p{Emoji_Component}/u, "\u{1F1E6}");
f(/\p{Emoji_Component}/u, "x");
t(/\p{Emoji_Modifier_Base}/u, "\u{1F6CC}");
f(/\p{Emoji_Modifier_Base}/u, "x");
......
......@@ -438,9 +438,6 @@
'built-ins/Object/internals/DefineOwnProperty/consistent-value-function-caller': [FAIL_SLOPPY],
'built-ins/Object/internals/DefineOwnProperty/consistent-value-function-arguments': [FAIL_SLOPPY],
# https://bugs.chromium.org/p/v8/issues/detail?id=4743#c28
'built-ins/RegExp/property-escapes/generated/Emoji_Component': [FAIL],
# ICU 59 uses Unicode 9 data; property escape tests were generated for Unicode 10
'built-ins/RegExp/property-escapes/generated/*': [SKIP],
......
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