- Notifications
You must be signed in to change notification settings - Fork 13.2k
Downlevel emit for let\const #2161
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
Merged
Merged
Changes from all commits
Commits
Show all changes
24 commits Select commit Hold shift + click to select a range
a0bcd7e initial revision of downlevel compilation for let/const bindings
vladima b28d72a Merge branch 'master' into letConstES5Minus
vladima ba52d60 try only names generated in current scope with testing if name is unique
vladima 7f5fb8b drop locals in block-scope container nodes during binding
vladima 5f2588f show error if block scoped variable declared in the loop is captured …
vladima 4aff9c3 explicitly initialize let binding in generated code to default value
vladima 40bcad9 accepted baselines
vladima 83b0ddc merge with master
vladima 393b95e accepted baselines
vladima e6cfc10 added missing files
vladima b4c82c9 added tests, accepted baselines
vladima def6812 merge with master
vladima 8891128 moved name generation logic to utilities
vladima 33dfe50 do not emit default initializer for let\const in for-in\for-of statem…
vladima 32aef1a do not report error on non-initialized const bindings in for-in\for-o…
vladima b183f8d added 'nodeIsSynthesized' function, use createSynthesizedNode in emit…
vladima 4ff22a0 added SyntaxKind.ModuleDeclaration to list of block scope containers
vladima 16378e3 do not treat property names in binding elements as block scoped varia…
vladima 904d116 added tests
vladima 4bf0bb6 added comments
vladima 7be2e50 merge with master
vladima 626b6d4 merge with master
vladima 09d5582 merge with master
vladima 3b3a94c addressed PR feedback
vladima File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know what
cleanLocalsmeans without reading the function, and even then I don't know what the implications for this are. Can you leave a comment regarding the situations in which this is useful?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand this. Why is blockScopedContainer.locals populated? I thought it should always be empty to start.