-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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
util: fix formatting of objects with SIMD enabled #7864
Conversation
When SIMD is enabled, `util.format` couldn’t display objects (with at least 1 key) because the formatter function got overridden.
For robustness and performance reasons (no double lookup), it might be better to set the formatter in the else block around line 510, but LGTM either way. |
@bnoordhuis Updated, if I understood your suggestion correctly. |
Not quite what I had in mind but your approach is a bit better still. LGTM. |
New CI, last one failed with a Jenkins error on Windows: https://ci.nodejs.org/job/node-test-pull-request/3421/ |
oh, thank you for this, I'd noted this down a while back but never got around to it! This LGTM! |
Shouldn't we run the test with |
@targos I’ve added some tests from |
LGTM. Updated CI: https://ci.nodejs.org/job/node-test-pull-request/3483/ |
Build bot failure on Windows in the last CI run, running again just to be safe: https://ci.nodejs.org/job/node-test-pull-request/3487/ |
LGTM |
That last CI failed completely, new attempt: https://ci.nodejs.org/job/node-test-commit/4370/ |
Landed in 1b24b37, thanks for the reviews! |
When SIMD is enabled, `util.format` couldn’t display objects (with at least 1 key) because the formatter function got overridden. PR-URL: #7864 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
When SIMD is enabled, `util.format` couldn’t display objects (with at least 1 key) because the formatter function got overridden. PR-URL: #7864 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Checklist
make -j4 test
(UNIX), orvcbuild test nosign
(Windows) passesAffected core subsystem(s)
util
Description of change
When SIMD is enabled,
util.format
couldn’t display objects (with at least 1 key) because the formatter function got overridden.