Uh oh!
There was an error while loading. Please reload this page.
lib: var to const - #13756
Conversation
tniessen
left a comment
There was a problem hiding this comment.
I don't have a strong opinion on this if someone can confirm that there is no performance degression.
tniessen
commented
Jun 18, 2017
BridgeAR
commented
Jun 18, 2017
@tniessen I just compared the streams and the performance did not change: |
refack
commented
Jun 19, 2017
Ref: #13729 |
gibfahn
commented
Jun 19, 2017
So it's probably worth thinking about backporting here. If this cannot be backported to v6.x due to deoptimisations then that will make it very difficult to backport any other changes after this. Maybe the answer is to wait until v6.x goes into maintenance. I'm +1 on removing Thoughts @nodejs/lts ? |
BridgeAR
commented
Jun 26, 2017
@gibfahn I am running the deopt test in v6 with and without all |
BridgeAR
commented
Aug 25, 2017
Just as info - I am going to update this as soon as v8 6.1 lands. The deopt test does not work anymore with Turbofan as there are pretty much no deopts but bmeurer (not mentioning him here because he does not need to be summoned for it) fixed a deopt in #13403 (comment) and as he said that will be fixed with 6.1. So I think we are pretty safe going forward from that point on. |
5b8aa51 to
a85436cCompareBridgeAR
commented
Sep 14, 2017
Rebased. As v8 6.1 has landed this can now also properly land. |
Another ping @nodejs/lts re backporting concerns for this. I'm still thinking it might be better to wait for It's annoying that there isn't an eslint rule we can add for this, I guess we could enable |
BridgeAR
commented
Sep 14, 2017
jasnell
left a comment
There was a problem hiding this comment.
This LGTM but I'd like to see some benchmarks and a CITGM run.
BridgeAR
commented
Sep 15, 2017
@jasnell any const that might be reassigned would trigger (or at least should) an eslint error. Those var statements were in fact changed by eslint and not by me (that would be a horrible amount of work...) so two rules would have to make a mistake here. a) the prefer-const rule and b) no-const-assign rule. I am also not sure how CITGM could show any issues because all those variables can not be reassigned by a user. Another main aspect is that the tests would very likely fail if there is a reassignment for any const because we have a quite decent coverage for such changes. I would like to get this landed soon because the code base changes fast and I would have to rebase often otherwise. |
jasnell
commented
Sep 15, 2017
Indeed, no arguments there. CITGM is not a blocker, it's just advisory just in case. |
BridgeAR
commented
Sep 15, 2017
I just thought about @gibfahn s comment again about backporting... It is indeed going to make our lives miserable to backport things to v6.x. We should not backport this PR to v6.x because there are some deoptimizations possible in some cases and therefore it would increase the amount of conflicts for many backports. So... I believe you would be much happier with that? @gibfahn |
gibfahn
commented
Sep 16, 2017
Happier is the wrong word, I'd personally rather we could use I'll put this on the LTS (now Release) agenda, and we'll discuss at the next meeting. |
sam-github
commented
Sep 19, 2017
Agreed to wait 6 months to do this sweep. At that point, 6.x will be in maintenance, and this can be applied to master and backported to 8.x safely at that time. |
BridgeAR
commented
Sep 19, 2017
Thx closing this in that case. |
As discussed in #13732: this will change all
vartoconstif applicable.The main question is if this is wanted due to the churn.
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passesAffected core subsystem(s)
lib