[Webkit-unassigned] [Bug 208998] JavaScript identifier grammar supports unescaped astral symbols, but JSC doesn’t

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Mar 13 11:35:31 PDT 2020


--- Comment #2 from Keith Miller <keith_miller at apple.com> ---
Interesting our implementation seems semantically the same as v8's:

static inline bool isIdentStart(UChar32 c)
    return isLatin1(c) ? isIdentStart(static_cast<LChar>(c)) : isNonLatin1IdentStart(c);

static NEVER_INLINE bool isNonLatin1IdentStart(UChar c)
    return u_hasBinaryProperty(c, UCHAR_ID_START);

and similarly for non-start: 

static ALWAYS_INLINE bool isIdentPart(UChar32 c)
    return isLatin1(c) ? isIdentPart(static_cast<LChar>(c)) : isNonLatin1IdentPart(c);

static NEVER_INLINE bool isNonLatin1IdentPart(UChar32 c)
    return u_hasBinaryProperty(c, UCHAR_ID_CONTINUE) || c == 0x200C || c == 0x200D;

My guess is this is a bug in the system ICU. Does that analysis seem correct to you? My Unicode/ICU knowledge is very limited...

You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20200313/56513c3a/attachment.htm>

More information about the webkit-unassigned mailing list