Commit graph

1052 commits

Author SHA1 Message Date
Dan McDonald
5baff3e47b
deps: support madvise(3C) across ALL illumos revisions
In illumos, madvise(3C) now takes `void *` for its first argument
post-illumos#14418, but uses `caddr_t` pre-illumos#14418. This fix will
detect if the illumos mman.h file in use is pre-or-post-illumos#14418 so
builds can work either way.

PR-URL: https://github.com/nodejs/node/pull/58237
Reviewed-By: Richard Lau <richard.lau@ibm.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2025-08-07 14:14:08 +00:00
Chengzhong Wu
effe81f712 deps: V8: backport 493cb53691be
Original commit message:

    [include] suppress clang cast-function-type-mismatch warning on SetWeak

    Suppress clang warning cast-function-type-mismatch in embedder calls
    to `SetWeak`.

    Change-Id: I6c4eda1b932199a2ea4947fe851ffdf2ae04ad73
    Reviewed-on: 6689209
    Reviewed-by: Camillo Bruni <cbruni@chromium.org>
    Commit-Queue: Chengzhong Wu <cwu631@bloomberg.net>
    Cr-Commit-Position: refs/heads/main@{#101186}

Ignore `cast-function-type` instead of `cast-function-type-mismatch` for
compatibility with older versions of Clang.

Refs: 493cb53691
PR-URL: https://github.com/nodejs/node/pull/59238
Refs: https://github.com/nodejs/node/issues/58069
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com>
2025-07-29 15:51:26 +00:00
Levi Zim
1539f3b727
deps: V8: cherry-pick 0ce2edb7adfd
Original commit message:

    Fix invalid template specialization

    Bug: chromium:40565911
    Change-Id: If206c140e99e24a6df4ee7351e8022748eabac22
    Reviewed-on: 6491420
    Auto-Submit: Bruno Pitrus <brunopitrus@hotmail.com>
    Commit-Queue: Jakob Linke <jgruber@chromium.org>
    Reviewed-by: Leszek Swirski <leszeks@chromium.org>
    Reviewed-by: Jakob Linke <jgruber@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#99987}

Refs: 0ce2edb7ad
Fixes: https://github.com/nodejs/node/issues/58485
PR-URL: https://github.com/nodejs/node/pull/58773
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Richard Lau <richard.lau@ibm.com>
2025-07-04 12:56:56 +00:00
Michaël Zasso
8db664f72c
deps: V8: cherry-pick 1d7159580156
Original commit message:

    [explicit-resource-management] Clear isolate internal exception

    This CL clears the isolate internal exception before rejecting
    the promise.

    Bug: 418103036
    Change-Id: If3748f7fc4b79b7b5be5009b9fff0d0267541a6f
    Reviewed-on: 6594252
    Reviewed-by: Shu-yu Guo <syg@chromium.org>
    Commit-Queue: Rezvan Mahdavi Hezaveh <rezvan@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#100532}

Refs: 1d71595801
PR-URL: https://github.com/nodejs/node/pull/58749
Reviewed-By: Richard Lau <richard.lau@ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2025-07-03 17:37:17 +02:00
Shelley Vohr
ab9ef37aa7
build: disable v8_enable_pointer_compression_shared_cage on non-64bit
PR-URL: https://github.com/nodejs/node/pull/58867
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2025-06-30 08:39:43 +00:00
Chengzhong Wu
c1c36731ce deps: V8: cherry-pick e3df60f3f5ab
Original commit message:

    [objects] allow host defined serializer of JSError

    Allow host defined serializer and deserializer of JSError in
    ValueSerializer API. This allows hosts that implement DOMException
    in JS to support `Error.isError` proposal and `structuredClone`.

    Refs: https://github.com/nodejs/node/pull/58691
    Change-Id: I022821c9abd659970c4d449b3c69c5fb54d0618a
    Reviewed-on: 6637876
    Reviewed-by: Camillo Bruni <cbruni@chromium.org>
    Commit-Queue: Chengzhong Wu <cwu631@bloomberg.net>
    Cr-Commit-Position: refs/heads/main@{#100894}

Refs: e3df60f3f5
PR-URL: https://github.com/nodejs/node/pull/58691
Fixes: https://github.com/nodejs/node/issues/56497
Refs: https://github.com/nodejs/node/pull/58138
Reviewed-By: Jason Zhang <xzha4350@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev>
Reviewed-By: James M Snell <jasnell@gmail.com>
2025-06-21 10:43:37 +00:00
Michaël Zasso
d327cbea9a
deps: V8: cherry-pick 249de887a8d3
Original commit message:

    [explicit-resource-management] Fix parsing for (using of=null;;)

    Apparently `using of` is allowed in the initializer position of C-style
    for loops.

    See https://github.com/tc39/proposal-explicit-resource-management/issues/248

    Bug: 42203506
    Change-Id: Ia056b161f4ea28a0f3ba4e3e420f1718195274a4
    Reviewed-on: 6594471
    Commit-Queue: Shu-yu Guo <syg@chromium.org>
    Reviewed-by: Rezvan Mahdavi Hezaveh <rezvan@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#100531}

Refs: 249de887a8
PR-URL: https://github.com/nodejs/node/pull/58561
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2025-06-05 07:51:08 +00:00
hqzing
7964eb3a3b
build: add support for OpenHarmony operating system
PR-URL: https://github.com/nodejs/node/pull/58350
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2025-05-21 13:18:38 +00:00
Joyee Cheung
ac8706196b build: fix pointer compression builds
- Remove usage of deprecated V8::InitializeSandbox().
- External code space and pointer compression shared cage must
  be enabled when pointer compression builds are enabled.
- We cannot enable the sandbox because that requires allocating
  the array buffer backing stores in the sandbox - we currently
  have many backing stores tied to pointers from C++ land that
  are not even necessarily dynamic (e.g. in static storage).
  Until we manage to get rid of all those, sandbox cannot be
  enabled. Note that enabling pointer compression without
  enabling sandbox is unsupported by V8, and can be broken
  at any time.

PR-URL: https://github.com/nodejs/node/pull/58171
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2025-05-18 23:24:01 +00:00
Michaël Zasso
a8217a9eb8 tools: update V8 gypfiles for 13.7
Refs: 1eb7d3ce47
Refs: f942a499fe
PR-URL: https://github.com/nodejs/node/pull/58064
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2025-05-18 07:42:54 +00:00
Shu-yu Guo
6d61175db0 deps: V8: backport 1d3362c55396
Original commit message:

    [float16array] Turn flag on by default

    Float16Array has shipped in blink since M135. It is unlikely it'll
    unship by now, so turn the flag on by default.

    Bug: 42203953
    Change-Id: Ibd9de407b8810dd7bcdb46194fe04fc290ff8fb8
    Reviewed-on: 6513988
    Reviewed-by: Rezvan Mahdavi Hezaveh <rezvan@chromium.org>
    Commit-Queue: Shu-yu Guo <syg@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#100104}

Refs: 1d3362c553
Co-authored-by: Michaël Zasso <targos@protonmail.com>
PR-URL: https://github.com/nodejs/node/pull/58230
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/58064
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2025-05-18 07:42:53 +00:00
Shu-yu Guo
974773572e deps: V8: cherry-pick 4f38995c8295
Original commit message:

    [explicit-resource-management] Turn flag on by default

    This feature has shipped since M134 on the blink side, and is highly
    unlikely to be unshipped now, so flip the flag on.

    Bug: 42203506
    Change-Id: I9554cea721983464b150c0de70b58a4b50fd477b
    Reviewed-on: 6513391
    Reviewed-by: Rezvan Mahdavi Hezaveh <rezvan@chromium.org>
    Commit-Queue: Shu-yu Guo <syg@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#100069}

Refs: 4f38995c82
PR-URL: https://github.com/nodejs/node/pull/58230
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/58064
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2025-05-18 07:42:53 +00:00
Rezvan Mahdavi Hezaveh
70bfc398e9 deps: V8: cherry-pick 044b9b6f589d
Original commit message:

    [explicit-resource-management] disallow using in switch cases

    This CL disallows `using` and `await using` in switch cases.
    This was a normative change that got consensus in TC39 meetings:
    https://github.com/rbuckton/ecma262/pull/14

    Bug: 409478039
    Change-Id: I077e75d7d0d632c8b34150cfc76e4903984d6091
    Reviewed-on: 6500234
    Reviewed-by: Shu-yu Guo <syg@chromium.org>
    Commit-Queue: Rezvan Mahdavi Hezaveh <rezvan@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#100037}

Refs: 044b9b6f58
PR-URL: https://github.com/nodejs/node/pull/58230
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/58064
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2025-05-18 07:42:52 +00:00
Joyee Cheung
6bfc525cf0 deps: V8: cherry-pick d2ad518a0b57
Original commit message:

    [serializer] serialize ExternalPointers in InterceptorInfo properly

    Previously the ObjectSerializer didn't serialize the ExternalPointers
    in the InterceptorInfo properly, but this case can be shadowed by
    the fact that they get promoted to RO space by default and don't get
    serialized by ObjectSerializer. This patch fixes up the missing
    handling in ObjectSerializer and adds a test case for this path.

    Refs: https://github.com/nodejs/node/pull/58064

    Change-Id: Icc62a01b006eaf68d1d2be1e3bc98b448f0c66dc
    Reviewed-on: 6516091
    Reviewed-by: Leszek Swirski <leszeks@chromium.org>
    Commit-Queue: Joyee Cheung <joyee@igalia.com>
    Reviewed-by: Igor Sheludko <ishell@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#100315}

Refs: d2ad518a0b
PR-URL: https://github.com/nodejs/node/pull/58064
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2025-05-18 07:42:51 +00:00
Michaël Zasso
754d28e34f deps: V8: revert 6d6c1e680c7b
It depends on `std::atomic_ref`, which is not available in Xcode 16.1.

Refs: 6d6c1e680c
PR-URL: https://github.com/nodejs/node/pull/58064
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2025-05-18 07:42:51 +00:00
Michaël Zasso
8c508b9399 deps: V8: revert e3cddbedb205
simdutf's `atomic_binary_to_base64` requires `std::atomic_ref`.
`std::atomic_ref` is only available in LLVM 19, which is only available
in Xcode 16.3, which is only available on macOS 15.

Refs: https://github.com/llvm/llvm-project/pull/76647
Refs: e3cddbedb2
PR-URL: https://github.com/nodejs/node/pull/58064
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2025-05-18 07:42:50 +00:00
Joyee Cheung
88ca8287b6 deps: use std::map in MSVC STL for EphemeronRememberedSet
PR-URL: https://github.com/nodejs/node/pull/58070
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
PR-URL: https://github.com/nodejs/node/pull/58064
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2025-05-18 07:42:49 +00:00
Dan McDonald
838e2332a5 deps: patch V8 for illumos
illumos pointers are VA48, can allocate from the top of the 64-bit range
as well.

PR-URL: https://github.com/nodejs/node/pull/58070
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
PR-URL: https://github.com/nodejs/node/pull/58064
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2025-05-18 07:42:49 +00:00
Michaël Zasso
3522731d9a deps: remove problematic comment from v8-internal
GCC emits warnings because of the trailing backslashes.

PR-URL: https://github.com/nodejs/node/pull/58070
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
PR-URL: https://github.com/nodejs/node/pull/58064
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2025-05-18 07:42:48 +00:00
Stefan Stojanovic
d234475a33 deps: define V8_PRESERVE_MOST as no-op on Windows
It's causing linker errors with node.lib in node-gyp and potentially
breaks other 3rd party tools

PR-URL: https://github.com/nodejs/node/pull/56238
Refs: https://github.com/nodejs/node/pull/55784
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
PR-URL: https://github.com/nodejs/node/pull/58064
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
2025-05-18 07:42:47 +00:00
Stefan Stojanovic
a738eb4a7f deps: fix FP16 bitcasts.h
PR-URL: https://github.com/nodejs/node/pull/53134
Refs: https://github.com/nodejs/node/issues/52809
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
PR-URL: https://github.com/nodejs/node/pull/58064
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
2025-05-18 07:42:47 +00:00
Michaël Zasso
1744c7d991 deps: patch V8 to avoid duplicated zlib symbol
PR-URL: https://github.com/nodejs/node/pull/54077
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
PR-URL: https://github.com/nodejs/node/pull/58064
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
2025-05-18 07:42:46 +00:00
Michaël Zasso
21b131e93a build: reset embedder string to "-node.0"
PR-URL: https://github.com/nodejs/node/pull/58064
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2025-05-18 07:42:45 +00:00
Shu-yu Guo
5c0687a5b6 deps: V8: backport 1d3362c55396
Original commit message:

    [float16array] Turn flag on by default

    Float16Array has shipped in blink since M135. It is unlikely it'll
    unship by now, so turn the flag on by default.

    Bug: 42203953
    Change-Id: Ibd9de407b8810dd7bcdb46194fe04fc290ff8fb8
    Reviewed-on: 6513988
    Reviewed-by: Rezvan Mahdavi Hezaveh <rezvan@chromium.org>
    Commit-Queue: Shu-yu Guo <syg@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#100104}

Refs: 1d3362c553
Co-authored-by: Michaël Zasso <targos@protonmail.com>
PR-URL: https://github.com/nodejs/node/pull/58230
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2025-05-10 09:39:34 +00:00
Shu-yu Guo
a186e075ef deps: V8: cherry-pick 4f38995c8295
Original commit message:

    [explicit-resource-management] Turn flag on by default

    This feature has shipped since M134 on the blink side, and is highly
    unlikely to be unshipped now, so flip the flag on.

    Bug: 42203506
    Change-Id: I9554cea721983464b150c0de70b58a4b50fd477b
    Reviewed-on: 6513391
    Reviewed-by: Rezvan Mahdavi Hezaveh <rezvan@chromium.org>
    Commit-Queue: Shu-yu Guo <syg@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#100069}

Refs: 4f38995c82
PR-URL: https://github.com/nodejs/node/pull/58230
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2025-05-10 09:39:33 +00:00
Rezvan Mahdavi Hezaveh
c8f82953bb deps: V8: cherry-pick 044b9b6f589d
Original commit message:

    [explicit-resource-management] disallow using in switch cases

    This CL disallows `using` and `await using` in switch cases.
    This was a normative change that got consensus in TC39 meetings:
    https://github.com/rbuckton/ecma262/pull/14

    Bug: 409478039
    Change-Id: I077e75d7d0d632c8b34150cfc76e4903984d6091
    Reviewed-on: 6500234
    Reviewed-by: Shu-yu Guo <syg@chromium.org>
    Commit-Queue: Rezvan Mahdavi Hezaveh <rezvan@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#100037}

Refs: 044b9b6f58
PR-URL: https://github.com/nodejs/node/pull/58230
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2025-05-10 09:39:33 +00:00
Michaël Zasso
e5e8eaaf16 Revert "deps: patch V8 to support compilation with MSVC"
This reverts commit 0f98039268.

PR-URL: https://github.com/nodejs/node/pull/58187
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2025-05-08 08:28:07 +00:00
Michaël Zasso
f2138b5b5a Revert "deps: always define V8_EXPORT_PRIVATE as no-op"
This reverts commit ffadf3561a.

PR-URL: https://github.com/nodejs/node/pull/58187
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2025-05-08 08:28:06 +00:00
Michaël Zasso
32a8cc0ba5 Revert "deps: disable V8 concurrent sparkplug compilation"
This reverts commit 57699fffb8.

PR-URL: https://github.com/nodejs/node/pull/58187
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2025-05-08 08:28:06 +00:00
RafaelGSS
74c8358fa7
build: use FILE_OFFSET_BITS=64 esp. on 32-bit arch
Co-Authored-By: richardlau - Richard Lau <rlau@redhat.com>
PR-URL: https://github.com/nodejs/node/pull/58090
Refs: https://github.com/nodejs/node/issues/57934
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
2025-05-06 15:38:53 -03:00
Michaël Zasso
de8e7bd772
build: pass -fPIC to linker as well for shared builds
PR-URL: https://github.com/nodejs/node/pull/58070
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2025-05-02 15:10:37 +02:00
Joyee Cheung
d58f474b2d
deps: V8: backport 954187bb1b87
Original commit message:

    [api] add Isolate::Deinitialize() and Isolate::Free()

    This allows embedders to mirror the isolate disposal routine
    with an initialization routine that uses Isolate::Allocate().

    ```
    v8::Isolate* isolate = v8::Isolate::Allocate();
    // Use the isolate address as a key.
    v8::Isolate::Initialize(isolate, params);

    isolate->Deinitialize();
    // Remove the entry keyed by isolate address.
    v8::Isolate::Free(isolate);
    ```

    Previously, the only way to dispose the isolate bundles the
    de-initialization and the freeing of the address together in
    v8::Isolate::Dispose(). This is inadequate for embedders like
    Node.js that uses the isolate address as a key to manage the
    task runner associated with it, if another thread gets an
    isolate allocated at the aligned address before the other
    thread finishes cleanup for the isolate previously allocated
    at the same address, and locking on the entire disposal can
    be too risky since it may post GC tasks that in turn requires
    using the isolate address to locate the task runner. It's a
    lot simpler to handle the issue if the disposal process of
    the isolate can mirror the initialization of it and split
    into two routines.

    Refs: https://github.com/nodejs/node/pull/57753#issuecomment-2818999420
    Refs: https://github.com/nodejs/node/issues/30850
    Bug: 412943769
    Change-Id: I3865c27395aded3a6f32de74d96d0698b2d891b9
    Reviewed-on: 6480071
    Reviewed-by: Leszek Swirski <leszeks@chromium.org>
    Commit-Queue: Joyee Cheung <joyee@igalia.com>
    Cr-Commit-Position: refs/heads/main@{#99890}

Refs: 954187bb1b
PR-URL: https://github.com/nodejs/node/pull/58070
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2025-05-02 15:10:33 +02:00
StefanStojanovic
0f98039268
deps: patch V8 to support compilation with MSVC
Co-Authored-By: Michaël Zasso <targos@protonmail.com>
PR-URL: https://github.com/nodejs/node/pull/58070
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2025-05-02 15:10:33 +02:00
Michaël Zasso
ffadf3561a
deps: always define V8_EXPORT_PRIVATE as no-op
dllexport introduces issues when compiling with MSVC.

PR-URL: https://github.com/nodejs/node/pull/47251
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/58070
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
2025-05-02 15:10:33 +02:00
Michaël Zasso
57699fffb8
deps: disable V8 concurrent sparkplug compilation
It introduces process hangs on some platforms because Node.js doesn't
tear down V8 correctly.
Disable it while we work on a solution.

Refs: https://github.com/nodejs/node/issues/47297
Refs: https://bugs.chromium.org/p/v8/issues/detail?id=13902
PR-URL: https://github.com/nodejs/node/pull/47450
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/58070
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2025-05-02 15:10:33 +02:00
Joyee Cheung
4d7da6cca1
deps: use std::map in MSVC STL for EphemeronRememberedSet
PR-URL: https://github.com/nodejs/node/pull/58070
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2025-05-02 15:10:33 +02:00
Dan McDonald
c951b76a3b
deps: patch V8 for illumos
illumos pointers are VA48, can allocate from the top of the 64-bit range
as well.

PR-URL: https://github.com/nodejs/node/pull/58070
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2025-05-02 15:10:23 +02:00
Michaël Zasso
69aa19e04f
deps: remove problematic comment from v8-internal
GCC emits warnings because of the trailing backslashes.

PR-URL: https://github.com/nodejs/node/pull/58070
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2025-05-02 15:07:38 +02:00
Stefan Stojanovic
4adcd59f3f
deps: define V8_PRESERVE_MOST as no-op on Windows
It's causing linker errors with node.lib in node-gyp and potentially
breaks other 3rd party tools

PR-URL: https://github.com/nodejs/node/pull/56238
Refs: https://github.com/nodejs/node/pull/55784
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/55014
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/58070
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2025-05-02 15:07:34 +02:00
Stefan Stojanovic
395b917ed9
deps: fix FP16 bitcasts.h
PR-URL: https://github.com/nodejs/node/pull/53134
Refs: https://github.com/nodejs/node/issues/52809
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/55014
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
PR-URL: https://github.com/nodejs/node/pull/58070
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2025-05-02 15:07:22 +02:00
Michaël Zasso
91617e7a67
deps: patch V8 to avoid duplicated zlib symbol
PR-URL: https://github.com/nodejs/node/pull/54077
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
PR-URL: https://github.com/nodejs/node/pull/58070
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2025-05-02 15:07:14 +02:00
Michaël Zasso
bba72e0389
build: reset embedder string to "-node.0"
PR-URL: https://github.com/nodejs/node/pull/58070
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2025-05-02 15:06:58 +02:00
Choongwoo Han
2cb1d07e0f
deps: V8: cherry-pick c172ffc5bf54
Original commit message:

    Compact retained maps array more often

    When we add maps to the retained maps array, we compacted the array if
    it's full. But, since we are now adding maps in a batch, it's unlikely
    to meet the condition. Thus, update the condition to check whether new
    size exceeds the capacity.

    Bug: 398528460
    Change-Id: I89caa47b69532c6397596edfe5caf7c7d24768cc
    Reviewed-on: 6330019
    Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
    Commit-Queue: Choongwoo Han <choongwoo.han@microsoft.com>
    Cr-Commit-Position: refs/heads/main@{#99163}

Refs: c172ffc5bf
PR-URL: https://github.com/nodejs/node/pull/57437
Fixes: https://github.com/nodejs/node/issues/57412
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Co-Authored-By: tunamagur0
  <47546832+tunamagur0@users.noreply.github.com>
2025-03-16 12:17:51 +01:00
Hüseyin Açacak
f161033bd5
win,build: add option to enable Control Flow Guard
PR-URL: https://github.com/nodejs/node/pull/56605
Fixes: https://github.com/nodejs/node/issues/42100
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
2025-03-07 07:09:26 +00:00
Michaël Zasso
8b40221777
build: bump supported macOS version to 13.5
macOS 11 is no longer supported by Apple since September 2023,
and macOS 12 since September 2024
Let's not lock ourselves on already EoL versions for future
Node.js 24 LTS.

This also enables access to more C++20 features,
in particular `std::format` (which requires at least 13.3).

PR-URL: https://github.com/nodejs/node/pull/57115
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Beth Griggs <bethanyngriggs@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
2025-02-20 09:00:20 +00:00
Levi Zim
c889b85498
deps: V8: cherry-pick 9ab40592f697
Original commit message:

    [riscv] Flush icache in both local and remote harts

    Fix the I-Cache flush flag according to the implementation of flush_icache_mm in Linux kernel.

    Change-Id: I6e6b1f56c377c2c0a629e170737bfac6c357ce8d
    Reviewed-on: 6080611
    Commit-Queue: Yahan Lu (LuYahan) <yahan@iscas.ac.cn>
    Reviewed-by: Ji Qiu <qiuji@iscas.ac.cn>
    Cr-Commit-Position: refs/heads/main@{#97673}

Refs: 9ab40592f6
PR-URL: https://github.com/nodejs/node/pull/56781
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Debadree Chatterjee <debadree333@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
2025-02-04 16:11:38 +00:00
Michaël Zasso
44b0e423dc
build: remove support for ppc 32-bit
V8 removed support for it.

Refs: 643753953a
PR-URL: https://github.com/nodejs/node/pull/55014
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2025-01-31 12:47:09 +01:00
Olivier Flückiger
52d39441d0
deps: V8: cherry-pick f915fa4c9f41
Original commit message:

    [osr] Ensure trying to osr does not skip loop interrupts

    Fixed: 374013413
    Change-Id: I52d7b4e165e0abd0bd517a81d2e8ef3f1f802bfb
    Reviewed-on: 5946288
    Commit-Queue: Darius Mercadier <dmercadier@chromium.org>
    Auto-Submit: Olivier Flückiger <olivf@chromium.org>
    Reviewed-by: Darius Mercadier <dmercadier@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#96708}

Refs: f915fa4c9f
PR-URL: https://github.com/nodejs/node/pull/55014
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2025-01-31 12:47:03 +01:00
Yagiz Nizipli
99ffe3555a
deps: V8: cherry-pick 0d5d6e71bbb0
Original commit message:

    Remove `--js-promise-withresolvers` runtime flag

    Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
    Bug: 42204122
    Change-Id: I017a0d1ae0f8225513206ffb7806a4250be75d4c
    Reviewed-on: 5843972
    Reviewed-by: Igor Sheludko <ishell@chromium.org>
    Commit-Queue: Erik Corry <erikcorry@chromium.org>
    Reviewed-by: Shu-yu Guo <syg@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#96215}

Refs: 0d5d6e71bb
PR-URL: https://github.com/nodejs/node/pull/55014
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2025-01-31 12:47:01 +01:00
Michaël Zasso
5d8011d91c
deps: V8: cherry-pick 0c11feeeca4a
Original commit message:

    [turboshaft][tsa] specify namespace for Block

    It is ambiguous otherwise. There is `v8::internal::Block` and
    `v8::internal::compiler::turboshaft::Block`.
    This change is also consistent with the other types used in the macro.

    Change-Id: Ica7e5a09de955d8f38756fe26ab5f7e93e7e16e2
    Reviewed-on: 5878257
    Reviewed-by: Camillo Bruni <cbruni@chromium.org>
    Commit-Queue: Michaël Zasso <mic.besace@gmail.com>
    Reviewed-by: Igor Sheludko <ishell@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#96278}

Refs: 0c11feeeca
PR-URL: https://github.com/nodejs/node/pull/55014
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2025-01-31 12:46:46 +01:00