[Webkit-unassigned] [Bug 140855] [ES6] Implement ES6 arrow function syntax

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Mar 10 15:14:59 PDT 2015


https://bugs.webkit.org/show_bug.cgi?id=140855

--- Comment #28 from Yusuke Suzuki <utatane.tea at gmail.com> ---
(In reply to comment #26)
> (In reply to comment #24)
> > One tip: we can write tests related to JavaScriptCore under 'tests/stress'
> > instead of layout-tests. fpizlo told me this very nice test infrastructure :)
> 
> Thanks for the tip. I'll do this.
> Yusuke Suzuki, What do you think, do I need add/change something inside of
> the tests, for instance cover some special cases or cover some special
> exception and etc?

Ideally, I think there's 3 edge cases for arrow functions in the ES6 spec.
If I missed / misunderstood something, please point it :)

1. Arrow Function's environment doesn't has |this| binding.

So, |this| should be lookuped from outer side.
And Function.prototype.bind for ArrowFunction doesn't work well according to the spec.
And since `class syntax` is now landed (like https://trac.webkit.org/changeset/181293), be careful for treating |this| and TDZ. (at some point, |this| is not accessable)

2. Arrow Function doesn't has [[Construct]]

So, arrow function with `new` call should be raise TypeError.

3. Don't create "arguments" for arrow function

arrow function doesn't have "arguments" in its environment.

-- 
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/20150310/6f2db3b1/attachment-0002.html>


More information about the webkit-unassigned mailing list