Skip to content
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.

Support basic arrow function serialization #1650

Closed

Conversation

trueadm
Copy link
Contributor

@trueadm trueadm commented Mar 24, 2018

Release notes: adds basic ES2015 arrow function serialization

This allows Prepack to serialize back to arrow functions and also traverse them correctly when understanding this.

@trueadm trueadm requested a review from NTillmann March 24, 2018 14:15
@trueadm trueadm changed the title Better support arrow functions [WIP] Better support arrow functions Mar 24, 2018
@trueadm trueadm added the WIP This pull request is a work in progress and not ready for merging. label Mar 24, 2018
Copy link
Contributor

@NTillmann NTillmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good so far. Not sure what else you are (going to) run into.

ArrowFunctionExpression: {
enter(path: BabelTraversePath, state: ClosureRefVisitorState) {
state.functionInfo.depth++;
state.functionInfo.lexicalDepth++;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clever

@trueadm trueadm removed the WIP This pull request is a work in progress and not ready for merging. label Jun 14, 2018
@trueadm trueadm changed the title [WIP] Better support arrow functions Better support arrow functions Jun 14, 2018
@trueadm
Copy link
Contributor Author

trueadm commented Jun 14, 2018

Rebased and added some basic tests. @NTillmann would be good to review this now as it's a long standing PR that was actually relatively simple to implement for basic cases.

@trueadm trueadm changed the title Better support arrow functions Support basic arrow function serialization Jun 14, 2018
Copy link
Contributor

@NTillmann NTillmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@trueadm is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants