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

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Mar 11 05:54:50 PDT 2015


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

--- Comment #32 from GSkachkov <gskachkov at gmail.com> ---
(In reply to comment #28)
> (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.

Thanks for feedback. 
I'll try to cover this 3 edge cases soon.

-- 
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/20150311/731180be/attachment-0002.html>


More information about the webkit-unassigned mailing list