| Summary: | [ES6] Implement Unicode code point escapes | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Darin Adler <darin> | ||||||
| Component: | JavaScriptCore | Assignee: | Darin Adler <darin> | ||||||
| Status: | RESOLVED FIXED | ||||||||
| Severity: | Normal | CC: | benjamin, ggaren, sam, ysuzuki | ||||||
| Priority: | P2 | ||||||||
| Version: | 528+ (Nightly build) | ||||||||
| Hardware: | All | ||||||||
| OS: | All | ||||||||
| See Also: | https://bugs.webkit.org/show_bug.cgi?id=198790 | ||||||||
| Attachments: |
|
||||||||
|
Description
Darin Adler
2015-04-28 23:29:40 PDT
Created attachment 251928 [details]
Patch
Created attachment 251932 [details]
Patch
Comment on attachment 251932 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=251932&action=review > Source/JavaScriptCore/parser/Lexer.cpp:624 > + enum SpecialValueType { Incomplete, Invalid }; > + ParsedUnicodeEscapeValue(SpecialValueType type) > + : m_value(type == Incomplete ? -2 : -1) > + { > + } Why not enum SpecialValue { Incomplete = -2, Invalid = -1} and use them directly? > Source/JavaScriptCore/parser/Lexer.cpp:709 > +static ALWAYS_INLINE bool isLatin1(UChar32 c) > +{ > + return !(c & ~0xFF); > +} No existing helper for this? Comment on attachment 251932 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=251932&action=review >> Source/JavaScriptCore/parser/Lexer.cpp:624 >> + } > > Why not enum SpecialValue { Incomplete = -2, Invalid = -1} and use them directly? I will do that. >> Source/JavaScriptCore/parser/Lexer.cpp:709 >> +} > > No existing helper for this? There’s not anything I could find. I was looking for a Latin-1 equivalent to the functions in ASCIICType.h and did not find one. Committed r183552: <http://trac.webkit.org/changeset/183552> |