Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34.3k
remove unused catch bindings#24079
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
remove unused catch bindings #24079
Uh oh!
There was an error while loading. Please reload this page.
Conversation
cjihrig commented Nov 4, 2018 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
nodejs-github-bot commented Nov 4, 2018
sam-github left a comment
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.
It would also be handy to have eslint check for unused catch bindings, so they don't creep back into the code.
cjihrig commented Nov 4, 2018
@sam-github enabled linting for unused catch bindings. Good idea. |
refack commented Nov 4, 2018 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
I'm +1 on this (both for readability, and explicit-y), but there was the "backporting" argument made in another PR. @bmeurer does not binding the unused exception object provide any performance benefit (or will in the future 🤞 )?
I would actually suggest the opposite, lint for these and force the author explicitly comment why it's Ok (out of scope of this PR). |
bmeurer commented Nov 4, 2018
@refack V8 doesn't need to allocate the catch context in that case, which makes the exception object available. TurboFan will probably optimize that away anyways, but for bytecode it's a nice saving. |
cjihrig commented Nov 6, 2018 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
PR-URL: nodejs#24079 Reviewed-By: Sam Roberts <[email protected]> Reviewed-By: Wyatt Preul <[email protected]>
PR-URL: nodejs#24079 Reviewed-By: Sam Roberts <[email protected]> Reviewed-By: Wyatt Preul <[email protected]>
PR-URL: nodejs#24079 Reviewed-By: Sam Roberts <[email protected]> Reviewed-By: Wyatt Preul <[email protected]>
PR-URL: nodejs#24079 Reviewed-By: Sam Roberts <[email protected]> Reviewed-By: Wyatt Preul <[email protected]>
PR-URL: nodejs#24079 Reviewed-By: Sam Roberts <[email protected]> Reviewed-By: Wyatt Preul <[email protected]>
PR-URL: nodejs#24079 Reviewed-By: Sam Roberts <[email protected]> Reviewed-By: Wyatt Preul <[email protected]>
PR-URL: nodejs#24079 Reviewed-By: Sam Roberts <[email protected]> Reviewed-By: Wyatt Preul <[email protected]>
PR-URL: nodejs#24079 Reviewed-By: Sam Roberts <[email protected]> Reviewed-By: Wyatt Preul <[email protected]>
PR-URL: nodejs#24079 Reviewed-By: Sam Roberts <[email protected]> Reviewed-By: Wyatt Preul <[email protected]>
PR-URL: nodejs#24079 Reviewed-By: Sam Roberts <[email protected]> Reviewed-By: Wyatt Preul <[email protected]>
PR-URL: nodejs#24079 Reviewed-By: Sam Roberts <[email protected]> Reviewed-By: Wyatt Preul <[email protected]>
PR-URL: nodejs#24079 Reviewed-By: Sam Roberts <[email protected]> Reviewed-By: Wyatt Preul <[email protected]>
Jimbly commented Nov 6, 2018 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
This PR appears to be crashing Travis CI on PRs since this was merged? https://travis-ci.com/nodejs/node/builds/90427486 $ make lint make[1]: Entering directory `/home/travis/build/nodejs/node'Running JS linter.../home/travis/build/nodejs/node/.eslintrc.js:20 } catch{ ^SyntaxError: Unexpected token{ at createScript (vm.js:80:10) at Object.runInThisContext (vm.js:139:10) at Module._compile (module.js:599:28) at Object.Module._extensions..js (module.js:646:10) at Module.load (module.js:554:32) at tryModuleLoad (module.js:497:12) at Function.Module._load (module.js:489:3) at Module.require (module.js:579:17) at require (internal/module.js:11:18) at module.exports (/home/travis/build/nodejs/node/tools/node_modules/eslint/node_modules/require-uncached/index.js:28:9) |
PR-URL: #24079 Reviewed-By: Sam Roberts <[email protected]> Reviewed-By: Wyatt Preul <[email protected]>
PR-URL: #24079 Reviewed-By: Sam Roberts <[email protected]> Reviewed-By: Wyatt Preul <[email protected]>
codebytere commented Nov 29, 2018 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
@cjihrig i see |
cjihrig commented Nov 29, 2018
I believe optional |
PR-URL: #24079 Reviewed-By: Sam Roberts <[email protected]> Reviewed-By: Wyatt Preul <[email protected]>
PR-URL: #24079 Reviewed-By: Sam Roberts <[email protected]> Reviewed-By: Wyatt Preul <[email protected]>
PR-URL: #24079 Reviewed-By: Sam Roberts <[email protected]> Reviewed-By: Wyatt Preul <[email protected]>
PR-URL: #24079 Reviewed-By: Sam Roberts <[email protected]> Reviewed-By: Wyatt Preul <[email protected]>
PR-URL: #24079 Reviewed-By: Sam Roberts <[email protected]> Reviewed-By: Wyatt Preul <[email protected]>
PR-URL: #24079 Reviewed-By: Sam Roberts <[email protected]> Reviewed-By: Wyatt Preul <[email protected]>
PR-URL: #24079 Reviewed-By: Sam Roberts <[email protected]> Reviewed-By: Wyatt Preul <[email protected]>
PR-URL: #24079 Reviewed-By: Sam Roberts <[email protected]> Reviewed-By: Wyatt Preul <[email protected]>
PR-URL: #24079 Reviewed-By: Sam Roberts <[email protected]> Reviewed-By: Wyatt Preul <[email protected]>
PR-URL: #24079 Reviewed-By: Sam Roberts <[email protected]> Reviewed-By: Wyatt Preul <[email protected]>
PR-URL: #24079 Reviewed-By: Sam Roberts <[email protected]> Reviewed-By: Wyatt Preul <[email protected]>
PR-URL: #24079 Reviewed-By: Sam Roberts <[email protected]> Reviewed-By: Wyatt Preul <[email protected]>
PR-URL: #24079 Reviewed-By: Sam Roberts <[email protected]> Reviewed-By: Wyatt Preul <[email protected]>
PR-URL: #24079 Reviewed-By: Sam Roberts <[email protected]> Reviewed-By: Wyatt Preul <[email protected]>
PR-URL: #24079 Reviewed-By: Sam Roberts <[email protected]> Reviewed-By: Wyatt Preul <[email protected]>
PR-URL: #24079 Reviewed-By: Sam Roberts <[email protected]> Reviewed-By: Wyatt Preul <[email protected]>
PR-URL: #24079 Reviewed-By: Sam Roberts <[email protected]> Reviewed-By: Wyatt Preul <[email protected]>
PR-URL: #24079 Reviewed-By: Sam Roberts <[email protected]> Reviewed-By: Wyatt Preul <[email protected]>
PR-URL: #24079 Reviewed-By: Sam Roberts <[email protected]> Reviewed-By: Wyatt Preul <[email protected]>
PR-URL: #24079 Reviewed-By: Sam Roberts <[email protected]> Reviewed-By: Wyatt Preul <[email protected]>
PR-URL: #24079 Reviewed-By: Sam Roberts <[email protected]> Reviewed-By: Wyatt Preul <[email protected]>
PR-URL: #24079 Reviewed-By: Sam Roberts <[email protected]> Reviewed-By: Wyatt Preul <[email protected]>
PR-URL: #24079 Reviewed-By: Sam Roberts <[email protected]> Reviewed-By: Wyatt Preul <[email protected]>
PR-URL: #24079 Reviewed-By: Sam Roberts <[email protected]> Reviewed-By: Wyatt Preul <[email protected]>
NOTE: I didn't update the unused bindings in the stream subsystem, as I assume that would break readable-stream.
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes