On 2014/10/08 06:32:16, Yang wrote:
On 2014/10/07 20:24:10, mathias wrote:
> On 2014/10/07 17:50:42, Yang wrote:
> > On 2014/10/07 16:26:59, mathias wrote:
> > > I’m slightly confused by this patch. Its description is “update to
Unicode
> > > v7.0.0” but the intent also seems to be to update to the ES6
definition
of
> > > `Identifier`. However, the current patch only does that partially,
as it
> > doesn’t
> > > support supplementary Unicode symbols. E.g. `eval('var 𐐼')`
shouldn’t
throw
> an
> > > error (`𐐼` is U+1043C DESERET SMALL LETTER DEE).
> >
> > I'm not particular familiar witb the spec changes in this area. I
merely
reran
> > the script to generate V8's Unicode tables with the data files for
Unicode
> > 7.0.0. Thereby I used the same rules to generate the predicates,
except
that
I
> > added a predicate Pattern for the properties PATTERN_* to correctly
implement
> > ID_Start and ID_Continue. I'm not sure how your example is related and
where
> it
> > is described in either ES6 or Unicode. Can you give me a tip?
>
> ES6 allows supplementary characters (i.e. characters with code point >
0xFFFF)
> in identifiers, while ES5 doesn’t. See
>
https://people.mozilla.org/~jorendorff/es6-draft.html#sec-names-and-keywords,
> and note how `IdentifierStart` refers to `UnicodeIDStart` which is
defined
as
> ‘any Unicode code point with the Unicode property “ID_Start” or
> “Other_ID_Start”’ — this doesn’t exclude supplementary code points. But
ES5
did:
> https://bugs.ecmascript.org/show_bug.cgi?id=469#c0 The same thing goes
for
> `IdentifierPart` and `UnicodeIDContinue`.
>
> To illustrate the difference in code: compare
>
https://gist.github.com/mathiasbynens/6334847#file-javascript-identifier-regex-js-L34-L40
> (ES5) with
>
https://gist.github.com/mathiasbynens/6334847#file-javascript-identifier-regex-js-L65-L81
> (ES6).
I see. This seems like a somewhat separate issue than the one here. In
this CL
I
set out to solve issue 2892, by creating a new predicate generated from
Unicode
data, and while I was at it, I also updated that data to 7.0.0.
I'll file a bug for the supplementary characters issue and leave that to
later.
I'll update this CL later according to the comments above.
- Updated to handle Other_ID_Start and Other_ID_Continue correctly.
- Added unittests.
- Refactored parts of src/unicode.* to src/unicode-decoder.h
https://codereview.chromium.org/638643002/
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.