-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
Use returned values from super calls as 'this' #10762
Merged
Merged
Changes from 34 commits
Commits
Show all changes
44 commits
Select commit
Hold shift + click to select a range
9dbab97
Emit '_this' declaration for derived classes; initialize it when call…
DanielRosenwasser 99f1df4
Accepted baselines.
DanielRosenwasser d778e78
Transform other instances of 'this' to '_this' when in the constructo…
DanielRosenwasser c21cc24
Accepted baselines for all tests apart from one with source map changes.
DanielRosenwasser 9c6e148
Accepted baselines for sourcemap test.
DanielRosenwasser cd5e76b
Always tack on a return statement for '_this' in derived classes.
DanielRosenwasser 30ec599
Accepted baselines.
DanielRosenwasser bab6d6f
Ensure prologue directives occur first.
DanielRosenwasser ce953ce
Accepted baselines.
DanielRosenwasser d6e548b
Consolidate '_this' declaration and assignments for first statements …
DanielRosenwasser 11bc6c4
Fixed issue where last function context & parent node wasn't being pr…
DanielRosenwasser d8846dd
Accepted baselines.
DanielRosenwasser 86088d0
Always perform `this` captures after default & rest parameters.
DanielRosenwasser dd27139
Accepted baselines.
DanielRosenwasser f3dcaae
Added a test for branched returns at the end of a constructor.
DanielRosenwasser 1be4cee
Accepted baselines.
DanielRosenwasser c87a773
Don't emit a return statement at the end in most useful cases.
DanielRosenwasser d144665
Accepted baselines.
DanielRosenwasser b476815
Added test for '_this'.
DanielRosenwasser 230737f
Accepted baselines.
DanielRosenwasser b11db57
Mark constructors as this-capturing if they are defined in a derived …
DanielRosenwasser 25f9555
Merge branch 'master' into useReturnedThisFromSuperCalls
DanielRosenwasser 3a5fb0c
Accepted baselines.
DanielRosenwasser f11c646
Added missing semicolons.
DanielRosenwasser a63a0d8
Merge remote-tracking branch 'origin/master' into useReturnedThisFrom…
DanielRosenwasser 138e18c
Accepted baselines.
DanielRosenwasser da29813
Added test and comment.
DanielRosenwasser 60bcd7e
Accepted baselines.
DanielRosenwasser 5b3a93d
Always mark derived constructors as 'this'-capturing.
DanielRosenwasser bc4cf6d
Accepted baselines.
DanielRosenwasser dc58fb5
Immediately return the result of super calls when they are the first …
DanielRosenwasser cd787cc
Accepted baselines.
DanielRosenwasser 6580262
Initialize instead of letting the value be potentially undefined.
DanielRosenwasser 3e8fb37
Merge remote-tracking branch 'origin/master' into useReturnedThisFrom…
DanielRosenwasser 5fadfd4
Merge remote-tracking branch 'origin/master' into useReturnedThisFrom…
DanielRosenwasser 4a5830d
Remove usage of 'useCapturedThis'.
DanielRosenwasser c668644
Collapse 'super()' capture/returns into a single return statement for…
DanielRosenwasser 1fbdb86
Accepted baselines.
DanielRosenwasser e0c35f2
Restore arrow function.
DanielRosenwasser f8fbc22
Reuse the 'captureThisForNode' function.
DanielRosenwasser fb4b503
Removed pointlessish overloads.
DanielRosenwasser b5a1031
Moved code around, fixed indent, reworded comment.
DanielRosenwasser c29ec6f
Consolidated 'super()' transformation logic into one function.
DanielRosenwasser 02b9917
Merge remote-tracking branch 'origin/master' into useReturnedThisFrom…
DanielRosenwasser File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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.
Wouldn't it be more succinct to write this as:
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.
Fixed.