Bug 144377 - [ES6] Implement Unicode code point escapes
Summary: [ES6] Implement Unicode code point escapes
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Darin Adler
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-04-28 23:29 PDT by Darin Adler
Modified: 2020-04-04 09:02 PDT (History)
4 users (show)

See Also:


Attachments
Patch (30.96 KB, patch)
2015-04-28 23:42 PDT, Darin Adler
no flags Details | Formatted Diff | Diff
Patch (30.95 KB, patch)
2015-04-29 00:49 PDT, Darin Adler
koivisto: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>