Skip to content

Commit 03d00ae

Browse files
bnoordhuistisba
authored andcommitted
Update to node 22.9.0 (rubyjs#62)
Note the V8 version didn't change between 22.7.0 and 22.9.0 although Node.js did add a new API in nodejs/node#54279 Remove unused and/or unnecessary patches. Upstream disabled Maglev so we no longer have to do that manually. The genv8constants.py patches were for a script that I removed upstream last year.
1 parent 0388a46 commit 03d00ae

11 files changed

+27
-143
lines changed

lib/libv8/node/version.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ module Libv8
44
end
55

66
module Libv8::Node
7-
VERSION = '22.7.0.4'
8-
NODE_VERSION = '22.7.0'
7+
VERSION = '22.9.0.0'
8+
NODE_VERSION = '22.9.0'
99
LIBV8_VERSION = '12.4.254.21' # from src/node-.../deps/v8/include/v8-version.h
1010
end

libexec/build-libv8

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ cd "${src}/node-v${version}"
1919

2020
# Maglev is disabled because of a suspected x64 snapshot regression in
2121
# DoComputeOutputFrames
22-
configure_flags='--v8-disable-maglev --openssl-no-asm --without-npm --shared --with-intl=full-icu'
22+
configure_flags='--openssl-no-asm --without-npm --shared --with-intl=full-icu'
2323
eval "$("${libexec}/platform")"
2424

2525
echo "configure: ${configure_flags}"

libexec/extract-node

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -29,21 +29,6 @@ extract "${src}" "${src}/node-v${version}.tar.gz"
2929

3030
cd "${src}/node-v${version}"
3131

32-
#patch -p1 < "${top}"/patch/gyp-libv8_monolith.patch
33-
#patch -p1 < "${top}"/patch/py2-icutrim.patch
34-
#patch -p1 < "${top}"/patch/py2-genv8constants.patch
35-
patch -p1 < "${top}"/patch/v8-no-assert-trivially-copyable.patch
32+
patch -p1 < "${top}"/patch/v8-std-is-trivially-destructible.patch
3633
patch -p1 < "${top}"/patch/v8-disable-madv-dontfork.patch
3734
patch -p1 < "${top}"/patch/v8-disable-pkey.patch
38-
patch -p1 < "${top}"/patch/v8-disable-marking.patch
39-
40-
# TODO: the following still fails on py3 so the above one forcing py2 is needed
41-
# patch -p1 < ../../py3-genv8constants.patch
42-
#
43-
# This is the error:
44-
#
45-
# Traceback (most recent call last):
46-
# File "tools/genv8constants.py", line 99, in <module>
47-
# curr_val += int('0x%s' % octetstr, 16) << (curr_octet * 8)
48-
# ValueError: invalid literal for int() with base 16: "0xb'04 '"
49-
# node_dtrace_ustack.target.mk:13: recipe for target '/usbkey/user_home/vagrant/ruby-libv8-node/src/node-14.14.0/out/Release/obj/gen/v8constants.h' failed

patch/gyp-libv8_monolith.patch

Lines changed: 0 additions & 44 deletions
This file was deleted.

patch/py2-genv8constants.patch

Lines changed: 0 additions & 10 deletions
This file was deleted.

patch/py2-icutrim.patch

Lines changed: 0 additions & 14 deletions
This file was deleted.

patch/py3-genv8constants.patch

Lines changed: 0 additions & 20 deletions
This file was deleted.

patch/v8-disable-marking.patch

Lines changed: 0 additions & 22 deletions
This file was deleted.

patch/v8-no-assert-trivially-copyable.patch

Lines changed: 0 additions & 14 deletions
This file was deleted.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
diff --git a/deps/v8/src/base/macros.h b/deps/v8/src/base/macros.h
2+
index d404b6120a..053ac0e5ba 100644
3+
--- a/deps/v8/src/base/macros.h
4+
+++ b/deps/v8/src/base/macros.h
5+
@@ -173,7 +173,7 @@ namespace base {
6+
// base::is_trivially_copyable will differ for these cases.
7+
template <typename T>
8+
struct is_trivially_copyable {
9+
-#if V8_CC_MSVC || (__GNUC__ == 12 && __GNUC_MINOR__ <= 2)
10+
+#if V8_CC_MSVC || (__GNUC__ == 12 && __GNUC_MINOR__ <= 2) || defined(__clang__)
11+
// Unfortunately, MSVC 2015 is broken in that std::is_trivially_copyable can
12+
// be false even though it should be true according to the standard.
13+
// (status at 2018-02-26, observed on the msvc waterfall bot).
14+
@@ -186,6 +186,8 @@ struct is_trivially_copyable {
15+
// distributions, so the same polyfill is also used.
16+
// See
17+
// https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=aeba3e009b0abfccaf01797556445dbf891cc8dc
18+
+ //
19+
+ // The same is observed with at least clang 14 and 15.
20+
static constexpr bool value =
21+
// Copy constructor is trivial or deleted.
22+
(std::is_trivially_copy_constructible<T>::value ||

0 commit comments

Comments
 (0)