-
Notifications
You must be signed in to change notification settings - Fork 12.4k
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
Rename local variable arguments
to args
#14996
Conversation
Any measurements? |
@@ -1411,16 +1411,16 @@ namespace ts { | |||
if (callExpression.kind !== SyntaxKind.CallExpression) { | |||
return false; | |||
} | |||
const { expression, arguments } = callExpression as CallExpression; | |||
const { expression, arguments: args } = callExpression as CallExpression; |
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.
Would it be better to just rename property in CallExpression? Also would this change should be applied to newExpression
as well?
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.
That would be a breaking change to API consumers.
@RyanCavanaugh there was a spike in the build-to-build performance tests associated with this change. Whether this was the direct cause I haven't yet determined. Regardless of the performance metrics, we should never shadow |
The PR that added this code was #14984 on April 3rd. The performance tester showed emit time spike after that commit, but this function is called by the binder and checker. In the time since, emit time has gone back down. |
@andy-ms the initial
So any assignment to That said, I ran a javascript project through tsc with hydrogen tracing and didn't see any specific deoptimizations in this function. I still think its worth the change. |
Ah, forgot we're compiling to ES5. |
This may be affecting performance? CC @rbuckton