-
-
Notifications
You must be signed in to change notification settings - Fork 557
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement arrow functions #601
Conversation
I hope I'm not opening Pandora's box here, but have you tried what happens if you add the more extensive arrow function test suite? Test case below should enable them, they are not run at the moment.
These usually bring out the corner cases of spec 🙂 |
Hadn't spotted that. There are a few (163) failures, I'll get back to you once I've taken a look through them & spotted any immediate bugs. |
Updated with my latest work. This is now a WIP branch that I expect will need some help to get 100% of the tests passing. |
* skip strict mode tests let variables * skip obsolete old ECMA tests * fix function name setting precondition * fix function length calculation and property flags * capture this binding when arrow function is instantiated
@AmateurMemetics @sebastienros almost there, only two test cases failing, both share the same reason. I'm running out of time for now so if either one of you could help and check with fresh eyes. Just can't figure out where the last scope isolation belongs. language/expressions/arrow-function/scope-paramsbody-var-open.js
|
whoop whoop! this is great work guys! |
This PR fully implements arrow functions.
As part of getting the test suite to pass, I've done a little playing around with where we call
SetFunctionName
.It boils down to this test:
And a similar one with array binding patterns.
I'd consider these relevant changes to the PR as this area did need modifying to work with
JintArrowFunctionExpressions
anyway.