Bug 144377

Summary: [ES6] Implement Unicode code point escapes
Product: WebKit Reporter: Darin Adler <darin>
Component: JavaScriptCoreAssignee: 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 Flags
Patch
none
Patch koivisto: review+

Description Darin Adler 2015-04-28 23:29:40 PDT
[ES6] Implement Unicode code point escapes
Comment 1 Darin Adler 2015-04-28 23:42:58 PDT
Created attachment 251928 [details]
Patch
Comment 2 Darin Adler 2015-04-29 00:49:58 PDT
Created attachment 251932 [details]
Patch
Comment 3 Antti Koivisto 2015-04-29 09:11:21 PDT
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 4 Darin Adler 2015-04-29 09:21:36 PDT
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.
Comment 5 Darin Adler 2015-04-29 09:34:26 PDT
Committed r183552: <http://trac.webkit.org/changeset/183552>