util: fix formatting of objects with SIMD enabled#7864
util: fix formatting of objects with SIMD enabled#7864addaleax wants to merge 3 commits intonodejs:masterfrom
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.formatcouldn’t display objects (with at least 1 key) because the formatter function got overridden.