Original commit message:
[compiler] reset script details in functions deserialized from code cache
During the serialization of the code cache, V8 would wipe out the
host-defined options, so after a script id deserialized from the
code cache, the host-defined options need to be reset on the script
using what's provided by the embedder when doing the deserializing
compilation, otherwise the HostImportModuleDynamically callbacks
can't get the data it needs to implement dynamic import().
Change-Id: I33cc6a5e43b6469d3527242e083f7ae6d8ed0c6a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5401780
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Joyee Cheung <joyee@igalia.com>
Cr-Commit-Position: refs/heads/main@{#93323}
Refs: cd10ad7cdb
PR-URL: https://github.com/nodejs/node/pull/52535
Refs: https://github.com/nodejs/node/issues/47472
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/52465
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
After enabling -std:c++20 on Windows, patch is now much smaller.
PR-URL: https://github.com/nodejs/node/pull/52465
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Our Linux build infra is not ready for it yet,
but V8 is making it difficult to compile on Windows
without it.
Refs: https://github.com/nodejs/node/issues/45402
PR-URL: https://github.com/nodejs/node/pull/52465
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
We are not ready to compile with C++20 support yet.
This is only a DCHECK that can be removed without affecting the behavior
of release builds.
PR-URL: https://github.com/nodejs/node/pull/49639
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/52465
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Original commit message:
[compiler] reset script details in functions deserialized from code cache
During the serialization of the code cache, V8 would wipe out the
host-defined options, so after a script id deserialized from the
code cache, the host-defined options need to be reset on the script
using what's provided by the embedder when doing the deserializing
compilation, otherwise the HostImportModuleDynamically callbacks
can't get the data it needs to implement dynamic import().
Change-Id: I33cc6a5e43b6469d3527242e083f7ae6d8ed0c6a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5401780
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Joyee Cheung <joyee@igalia.com>
Cr-Commit-Position: refs/heads/main@{#93323}
Refs: cd10ad7cdb
PR-URL: https://github.com/nodejs/node/pull/52535
Refs: https://github.com/nodejs/node/issues/47472
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/52293
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Original commit message:
Fix build with gcc12
- A number of erroneous flags have been added to BUILD.gn
- wasm-init-expr.cc is creating an 8 byte buffer witch may be
much smaller than max size_t output. We also need to make room
for the `f` character and the terminating null character
- inspector_protocol currently generates the following error
```
error: loop variable ‘json_in’ of type ‘const std::string&’ {aka
‘const std::__cxx11::basic_string<char>&’} binds to a temporary
constructed from type ‘const char* const’
```
Change-Id: I1139899b2664e47d01ebc44f2e972fc4c0ec212d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5331756
Reviewed-by: Matthias Liedtke <mliedtke@chromium.org>
Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/main@{#92615}
Refs: c4be0a97f9
PR-URL: https://github.com/nodejs/node/pull/52183
Refs: f8d5e576b8
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/52293
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
PR-URL: https://github.com/nodejs/node/pull/52293
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
This patches V8 v12.3 for Windows, by fixing multiple compilation
errors caused by V8 being a Clang-oriented project. There are various
types of errors fixed by this going from changing `using` directives
and renaming to overcoming the differences in which Clang and MSVC see
templates and metaprogramming.
The changes introduced here are strictly meant as a patch only, so they
shouldn't be pushed upstream.
Refs: https://github.com/targos/node/pull/13
Refs: https://github.com/targos/node/pull/14
Refs: https://github.com/targos/node/pull/15
PR-URL: https://github.com/nodejs/node/pull/52293
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
PR-URL: https://github.com/nodejs/node/pull/49639
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/52293
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Richard Lau <rlau@redhat.com>
We are not ready to compile with C++20 support yet.
This is only a DCHECK that can be removed without affecting the behavior
of release builds.
PR-URL: https://github.com/nodejs/node/pull/49639
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/52293
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Richard Lau <rlau@redhat.com>
PR-URL: https://github.com/nodejs/node/pull/45579
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/52293
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
PR-URL: https://github.com/nodejs/node/pull/52293
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Original commit message:
[compiler] reset script details in functions deserialized from code cache
During the serialization of the code cache, V8 would wipe out the
host-defined options, so after a script id deserialized from the
code cache, the host-defined options need to be reset on the script
using what's provided by the embedder when doing the deserializing
compilation, otherwise the HostImportModuleDynamically callbacks
can't get the data it needs to implement dynamic import().
Change-Id: I33cc6a5e43b6469d3527242e083f7ae6d8ed0c6a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5401780
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Joyee Cheung <joyee@igalia.com>
Cr-Commit-Position: refs/heads/main@{#93323}
Refs: cd10ad7cdb
PR-URL: https://github.com/nodejs/node/pull/52535
Refs: https://github.com/nodejs/node/issues/47472
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Original commit message:
Fix build with gcc12
- A number of erroneous flags have been added to BUILD.gn
- wasm-init-expr.cc is creating an 8 byte buffer witch may be
much smaller than max size_t output. We also need to make room
for the `f` character and the terminating null character
- inspector_protocol currently generates the following error
```
error: loop variable ‘json_in’ of type ‘const std::string&’ {aka
‘const std::__cxx11::basic_string<char>&’} binds to a temporary
constructed from type ‘const char* const’
```
Change-Id: I1139899b2664e47d01ebc44f2e972fc4c0ec212d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5331756
Reviewed-by: Matthias Liedtke <mliedtke@chromium.org>
Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/main@{#92615}
Refs: c4be0a97f9
PR-URL: https://github.com/nodejs/node/pull/52183
Refs: f8d5e576b8
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/51362
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
This patches V8 v12.2 for Windows, by fixing multiple compilation
errors caused by V8 being a Clang-oriented project. There are various
types of errors fixed by this going from changing `using` directives
and renaming to overcoming the differences in which Clang and MSVC see
templates and metaprogramming.
The changes introduced here are strictly meant as a patch only, so they
shouldn't be pushed upstream.
Refs: https://github.com/targos/node/pull/13
Refs: https://github.com/targos/node/pull/14
PR-URL: https://github.com/nodejs/node/pull/51362
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
We are not ready to compile with C++20 support yet.
This is only a DCHECK that can be removed without affecting the behavior
of release builds.
PR-URL: https://github.com/nodejs/node/pull/49639
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/51362
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
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>
PR-URL: https://github.com/nodejs/node/pull/51362
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
PR-URL: https://github.com/nodejs/node/pull/51362
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Original commit message:
Fix build with gcc12
- A number of erroneous flags have been added to BUILD.gn
- wasm-init-expr.cc is creating an 8 byte buffer witch may be
much smaller than max size_t output. We also need to make room
for the `f` character and the terminating null character
- inspector_protocol currently generates the following error
```
error: loop variable ‘json_in’ of type ‘const std::string&’ {aka
‘const std::__cxx11::basic_string<char>&’} binds to a temporary
constructed from type ‘const char* const’
```
Change-Id: I1139899b2664e47d01ebc44f2e972fc4c0ec212d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5331756
Reviewed-by: Matthias Liedtke <mliedtke@chromium.org>
Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/main@{#92615}
Refs: c4be0a97f9
PR-URL: https://github.com/nodejs/node/pull/52183
Refs: f8d5e576b8
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Original commit message:
[api] Add v8::ScriptCompiler::CachedData::CompatibilityCheck()
This patch adds a new API v8::ScriptCompiler::CachedData::CompatibilityCheck()
in order to allow embedders to check if the code cache can be used in
the current isolate without looking up for the source code. It also returns more detailed reasons about why the code cache cannot be used
when it's bound to be rejected. This makes it possible to enforce
portability checks in case code code becomes CPU-dependent in the
future.
Refs: https://github.com/nodejs/node/issues/42566#issuecomment-1735862123
Change-Id: Ia1d677b949050add961af6fbf62c44342c061312
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4905290
Reviewed-by: Marja Hölttä <marja@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Joyee Cheung <joyee@igalia.com>
Cr-Commit-Position: refs/heads/main@{#90833}
Refs: efb1133eb8
PR-URL: https://github.com/nodejs/node/pull/51551
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Original commit message:
[maglev] fix non-ptr-compr compilation on old compilers
When pointer compression is disabled, the preprocessor expands some
static asserts to static_assert(false), which doesn't compile on
compilers not implementing the C++ defect report CWG2518, notably clang
before version 17 and gcc before version 13.
Adding in part of the template parameter to the static assert prevents
it from being evaluated immediately which fixes the compilation.
Test: compiled with gcc-11 and clang-14 without pointer compression.
Change-Id: I95ce29bdb1278e6dad9e592d6f9476395f8aeb59
Fixed: v8:14355
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5022760
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#91553}
Refs: de611e69ad
PR-URL: https://github.com/nodejs/node/pull/51200
Refs: https://github.com/nodejs/node/issues/50690
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
PR-URL: https://github.com/nodejs/node/pull/50115
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Original commit message:
[heap-profiler]: expose QueryObjects() to v8::HeapProfiler
This allows embedders to use this API for testing memory leaks more
reliably. See https://github.com/nodejs/node/pull/50572 for an
example about how the API can be used.
Change-Id: Ic3d1268e2b331c37e8ec92997b764b9b5486f8c2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5006373
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Joyee Cheung <joyee@igalia.com>
Cr-Commit-Position: refs/heads/main@{#91123}
Refs: 0fd478bcda
PR-URL: https://github.com/nodejs/node/pull/50572
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
PR-URL: https://github.com/nodejs/node/pull/50115
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Original commit message:
[gcc] Add include for TurboShaft
Include <limits> for std::numeric_limits.
Bug: chromium:819294
Change-Id: I26a71ed4bad1858d2f5ed5d7dcd529e9cae60f37
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4889285
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/main@{#90347}
Refs: 8f0b94671d
PR-URL: https://github.com/nodejs/node/pull/50654
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/50115
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Original commit message:
[logging] Bugfix: LinuxPerfBasicLogger should log JS functions
This patch fixes a typo that was introduced in commit
c51041f45400928cd64fbc8f389c0dd0dd15f82f /
https://chromium-review.googlesource.com/c/v8/v8/+/2336793, which reversed the behavior of the perf_basic_prof_only_functions flag.
This also refactors the equivalent guard in LinuxPerfJitLogger to use the same inline CodeKind API for identifying JS Functions. This is unrelated to the bug, but it seems a fair rider to add on here.
Bug: v8:14387
Change-Id: I25766b0d45f4c65dfec5ae01e094a1ed94111054
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4954225
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#90501}
Refs: f7d000a7ae
PR-URL: https://github.com/nodejs/node/pull/50302
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
Reviewed-By: Debadree Chatterjee <debadree333@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/50115
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Original commit message:
[api] add line breaks to the output of Message::PrintCurrentStackTrace
Previously this prints the stack trace without line breaks and it
can be difficult to read. This also affects
--abort-on-uncaught-exception. This patch adds line breaks to the
output to improve readability.
Change-Id: I4c44b529f8c829329f784b0859b1d13c9ec56838
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4925009
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Joyee Cheung <joyee@igalia.com>
Cr-Commit-Position: refs/heads/main@{#90360}
Refs: 25902244ad
PR-URL: https://github.com/nodejs/node/pull/50156
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Debadree Chatterjee <debadree333@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/50115
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
We are not ready to compile with C++20 support yet.
This is only a DCHECK that can be removed without affecting the behavior
of release builds.
PR-URL: https://github.com/nodejs/node/pull/49639
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/50115
Reviewed-By: Michael Dawson <midawson@redhat.com>
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>
PR-URL: https://github.com/nodejs/node/pull/49639
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/50115
Reviewed-By: Michael Dawson <midawson@redhat.com>