[Webkit-unassigned] [Bug 174212] [JSC] Add support for class fields to the parser

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Aug 2 19:18:25 PDT 2017


--- Comment #6 from Yusuke Suzuki <utatane.tea at gmail.com> ---
(In reply to Xan Lopez from comment #5)
> OK, some updates.
> The issue with caitp's suggestions about the parser is that they would not
> support STRING idents, so we still need to do something similar to what my
> patch does (all PropertyNames per the spec must be support, including
> StringLiteral).
> About:
> > > 2) I'm just using as-is the code to parse assignments. Probably needs
> > tweaking.
> > It depends what the grammar is. What does the grammar say here?
> The grammar says this is just an AssignmentExpression, so I think we are
> fine.
> About code generation:
> After exploring the code I bit it seemed to me I could just add a new
> PropertyNode to the PropertyNodeList with the result of the assignment
> parsing as the second parameter. Something like:
> context.createProperty(ident, initializer, PropertyNode::Constant,
> PropertyNode::Unknown, etc);
> This seems to actually work. Of course we'd still need to figure out private
> and static fields, but this seems good enough to get started. Is there any
> obvious reason to not use PropertyNodes for data fields?
> Related to that, I saw https://bugs.webkit.org/show_bug.cgi?id=174935, which
> seems to suggest Yuzuke is also thinking of using properties to do this if I
> read it right.

Let's check and follow what the actual spec says. What the attribute of the class field property?
I just introduced private symbols to implement private fields super efficiently.
But I don't investigate the spec super deeply yet :P

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/20170803/f15f2e84/attachment-0001.html>

More information about the webkit-unassigned mailing list