Correctly handle celestial plane codepoints in ES5.1. (#3510)

Fixes #3498.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
This commit is contained in:
Zoltan Herczeg
2020-01-14 15:11:59 +01:00
committed by Dániel Bátyai
parent d6070a9fed
commit 0d7b461185
4 changed files with 34 additions and 7 deletions
+4
View File
@@ -223,6 +223,8 @@ lit_code_point_is_identifier_start (lit_code_point_t code_point) /**< code point
/* TODO: detect these ranges correctly. */
return (code_point >= 0x10C80 && code_point <= 0x10CF2);
}
#else /* !ENABLED (JERRY_ES2015) */
JERRY_ASSERT (code_point <= LIT_UTF8_4_BYTE_CODE_POINT_MIN);
#endif /* ENABLED (JERRY_ES2015) */
return lit_char_is_unicode_letter ((ecma_char_t) code_point);
@@ -252,6 +254,8 @@ lit_code_point_is_identifier_part (lit_code_point_t code_point) /**< code point
/* TODO: detect these ranges correctly. */
return (code_point >= 0x10C80 && code_point <= 0x10CF2);
}
#else /* !ENABLED (JERRY_ES2015) */
JERRY_ASSERT (code_point <= LIT_UTF8_4_BYTE_CODE_POINT_MIN);
#endif /* ENABLED (JERRY_ES2015) */
return (lit_char_is_unicode_letter ((ecma_char_t) code_point)