Skip to content

deps: V8: cherry-pick 64b36b441179#61698

Open
rmagrin wants to merge 1 commit intonodejs:v24.x-stagingfrom
rmagrin:v8-backport-writeutf8v2-v24
Open

deps: V8: cherry-pick 64b36b441179#61698
rmagrin wants to merge 1 commit intonodejs:v24.x-stagingfrom
rmagrin:v8-backport-writeutf8v2-v24

Conversation

@rmagrin
Copy link

@rmagrin rmagrin commented Feb 5, 2026

Summary

  • Cherry-picks V8 commit 64b36b44117949fe03df33d077117e7bd6257669 (ASCII fast path optimization in WriteUtf8V2)
  • Adds SIMD-accelerated ASCII validation using simdutf::validate_ascii
  • Uses memcpy for pure-ASCII strings instead of byte-by-byte UTF-8 encoding
  • Bumps v8_embedder_string from -node.40 to -node.41

Changes

Files modified:

  • deps/v8/src/strings/unicode-inl.h — Added IsAsciiOneByteString template specializations and ASCII fast path in Encode
  • deps/v8/src/strings/unicode.h — Added IsAsciiOneByteString declarations
  • common.gypi — Incremented embedder string

Note on Manual Fix

The cherry-pick required a manual addition of #include "third_party/simdutf/simdutf.h" to unicode-inl.h. The upstream V8 commit relies on this include being present, but the git-node backport tool did not pick it up (the include may have been added in a separate commit or already present in newer V8 versions).

References

Test Plan

  • make cctest — 176/176 tests passed
  • python3 tools/test.py -J --mode=release v8 — 25/25 tests passed
  • python3 tools/test.py -J --mode=release — 4795/4796 tests passed (1 unrelated SEA test failure)
  • Manual correctness checks for Buffer.from with ASCII and UTF-8 strings

Original commit message:

    optimize ascii fast path in WriteUtf8V2

    Change-Id: If28168cb4395b953d0ec642ef4fc618ce963dbcd
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/7124103
    Reviewed-by: Toon Verwaest <verwaest@chromium.org>
    Commit-Queue: Erik Corry <erikcorry@chromium.org>
    Reviewed-by: Erik Corry <erikcorry@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#103542}

Refs: v8/v8@64b36b4
@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/gyp
  • @nodejs/security-wg
  • @nodejs/v8-update

@nodejs-github-bot nodejs-github-bot added build Issues and PRs related to build files or the CI. needs-ci PRs that need a full CI run. v24.x Issues that can be reproduced on v24.x or PRs targeting the v24.x-staging branch. v8 engine Issues and PRs related to the V8 dependency. labels Feb 5, 2026
@rmagrin
Copy link
Author

rmagrin commented Feb 5, 2026

@nodejs-github-bot v8-ci

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build Issues and PRs related to build files or the CI. needs-ci PRs that need a full CI run. v8 engine Issues and PRs related to the V8 dependency. v24.x Issues that can be reproduced on v24.x or PRs targeting the v24.x-staging branch.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants