Skip to content
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

support for for..of/for..await in DCE #214

Merged
merged 3 commits into from
Oct 22, 2016
Merged

support for for..of/for..await in DCE #214

merged 3 commits into from
Oct 22, 2016

Conversation

boopathi
Copy link
Member

for..of and for..await loops are not considered in DCE and unused var
declarations in these loops are removed and this results in an empty
LVal. The same exception which is considered for a for..in loop is
also applied for for..of or for..await loops, and we use an Alias
that Babel provides - ForXStatement which is a for..in, for..of, or
a for..await loop.

+ (Close #207)
@boopathi boopathi changed the title Fix bug: support for for..of/for..await in DCE support for for..of/for..await in DCE Oct 22, 2016
});

// TODO: enable. (still a non standard feature)
xit("should not remove var from for..await statements", () => {
Copy link
Member

Choose a reason for hiding this comment

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

Can do transform(source) -> transform(source, { parserOpts: { plugins: ['asyncGenerators'] } }) to remove xit?

Copy link
Member Author

Choose a reason for hiding this comment

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

I thought we will add this after it landed in stage-4 ... but sure ... why not !

@hzoo hzoo merged commit e944dcb into master Oct 22, 2016
@hzoo hzoo added the bug Confirmed bug label Oct 22, 2016
@boopathi boopathi deleted the for-of-0 branch October 22, 2016 14:14
@boopathi boopathi added this to the 0.0.8 milestone Oct 30, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants