Skip to content

Commit b387422

Browse files
authored
Erikcorry roll v8 13.0 (#2918) (#2949)
* Revert "Revert "Merge pull request #2780 from cloudflare/dominik/v8-13.0"" This reverts commit 3103adb. * Regenerate patches
1 parent 1dee401 commit b387422

23 files changed

+232
-141
lines changed

WORKSPACE

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,13 @@ git_repository(
126126
remote = "https://chromium.googlesource.com/chromium/src/third_party/abseil-cpp.git",
127127
)
128128

129+
git_repository(
130+
name = "fast_float",
131+
build_file_content = "exports_files(glob([\"**\"]))",
132+
commit = "d7417618f93d2c47e9bbde561510f9fc8bafe003",
133+
remote = "https://chromium.googlesource.com/external/github.com/fastfloat/fast_float.git",
134+
)
135+
129136
git_repository(
130137
name = "fp16",
131138
build_file_content = "exports_files(glob([\"**\"]))",
@@ -272,7 +279,7 @@ esbuild_register_toolchains(
272279

273280
http_archive(
274281
name = "v8",
275-
integrity = "sha256-OTr3bwOCu50VAtMUd7d1kZXIkT1OoF9+zo9g3E7Vyvo=",
282+
integrity = "sha256-2jQHW96t3jpEsjOlv9yyjgUem3kKNnpDAIDR4PPFSnw=",
276283
patch_args = ["-p1"],
277284
patches = [
278285
"//:patches/v8/0001-Allow-manually-setting-ValueDeserializer-format-vers.patch",
@@ -294,9 +301,10 @@ http_archive(
294301
"//:patches/v8/0017-Revert-heap-Add-masm-specific-unwinding-annotations-.patch",
295302
"//:patches/v8/0018-Update-illegal-invocation-error-message-in-v8.patch",
296303
"//:patches/v8/0019-Implement-cross-request-context-promise-resolve-hand.patch",
304+
"//:patches/v8/0020-Modify-where-to-look-for-fast_float-dependency.patch",
297305
],
298-
strip_prefix = "v8-12.9.202.27",
299-
url = "https://github.com/v8/v8/archive/refs/tags/12.9.202.27.tar.gz",
306+
strip_prefix = "v8-13.0.245.16",
307+
url = "https://github.com/v8/v8/archive/refs/tags/13.0.245.16.tar.gz",
300308
)
301309

302310
git_repository(

patches/v8/0001-Allow-manually-setting-ValueDeserializer-format-vers.patch

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
From 1716f5dcb290435138f2d2c9b15f7260da8f0934 Mon Sep 17 00:00:00 2001
1+
From 9d82ceca73562418e6ea9be81d8fc985e9b10f2e Mon Sep 17 00:00:00 2001
22
From: Alex Robinson <[email protected]>
33
Date: Wed, 2 Mar 2022 15:58:04 -0600
44
Subject: Allow manually setting ValueDeserializer format version
@@ -35,10 +35,10 @@ index 0cb3e045bc46ec732956318b980e749d1847d06d..40ad805c7970cc9379e69f046205836d
3535
* Reads raw data in various common formats to the buffer.
3636
* Note that integer types are read in base-128 varint format, not with a
3737
diff --git a/src/api/api.cc b/src/api/api.cc
38-
index 5ab671c8c4168ac7ccd9d18ea4b9fda16734e4ad..eb880d8e77b80f941c6920c8f5b85896b6334cf0 100644
38+
index eddb472d5608567255c5f55f4ae8b451abe5f6d3..c86687981fab3ed28306ada00c9d5dff5c594377 100644
3939
--- a/src/api/api.cc
4040
+++ b/src/api/api.cc
41-
@@ -3603,6 +3603,10 @@ uint32_t ValueDeserializer::GetWireFormatVersion() const {
41+
@@ -3605,6 +3605,10 @@ uint32_t ValueDeserializer::GetWireFormatVersion() const {
4242
return private_->deserializer.GetWireFormatVersion();
4343
}
4444

patches/v8/0002-Allow-manually-setting-ValueSerializer-format-versio.patch

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
From 761b74e4f5c0298dc28ea84ec27050c1503bc196 Mon Sep 17 00:00:00 2001
1+
From d4de923519e992bf2e5f1bf4a19f410d41791e10 Mon Sep 17 00:00:00 2001
22
From: James M Snell <[email protected]>
33
Date: Wed, 16 Mar 2022 08:59:21 -0700
44
Subject: Allow manually setting ValueSerializer format version
@@ -22,10 +22,10 @@ index 40ad805c7970cc9379e69f046205836dbd760373..596be18adeb3a5a81794aaa44b1d347d
2222
* Writes out a header, which includes the format version.
2323
*/
2424
diff --git a/src/api/api.cc b/src/api/api.cc
25-
index eb880d8e77b80f941c6920c8f5b85896b6334cf0..6e2191ef66d5c04b99f7d314df6fb4b75de3fd7a 100644
25+
index c86687981fab3ed28306ada00c9d5dff5c594377..7058f9a13cb73cbbd0602ddeb589268306ee45ea 100644
2626
--- a/src/api/api.cc
2727
+++ b/src/api/api.cc
28-
@@ -3471,6 +3471,10 @@ ValueSerializer::ValueSerializer(Isolate* v8_isolate, Delegate* delegate)
28+
@@ -3473,6 +3473,10 @@ ValueSerializer::ValueSerializer(Isolate* v8_isolate, Delegate* delegate)
2929

3030
ValueSerializer::~ValueSerializer() { delete private_; }
3131

@@ -37,7 +37,7 @@ index eb880d8e77b80f941c6920c8f5b85896b6334cf0..6e2191ef66d5c04b99f7d314df6fb4b7
3737

3838
void ValueSerializer::SetTreatArrayBufferViewsAsHostObjects(bool mode) {
3939
diff --git a/src/objects/value-serializer.cc b/src/objects/value-serializer.cc
40-
index 89c0d96baff05ce3b2cf506386149c14ed81779e..f7da4eefa361807dec4a76bfaf0025299cfb6b86 100644
40+
index 51abbe13a599ce3a0f1b7d6fffea3abcfbfbafa4..eeb74aa42a9d783bbfdedc171717422321435c3a 100644
4141
--- a/src/objects/value-serializer.cc
4242
+++ b/src/objects/value-serializer.cc
4343
@@ -291,6 +291,7 @@ ValueSerializer::ValueSerializer(Isolate* isolate,

patches/v8/0003-Add-ArrayBuffer-MaybeNew.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
From 5f11274f4eadae25a81124d03dca88348d7c072c Mon Sep 17 00:00:00 2001
1+
From 5a507dad8a778b7cab0880cb72e1048c2f39fe14 Mon Sep 17 00:00:00 2001
22
From: Kenton Varda <[email protected]>
33
Date: Fri, 16 Sep 2022 21:41:45 -0500
44
Subject: Add `ArrayBuffer::MaybeNew()`.

patches/v8/0004-Allow-Windows-builds-under-Bazel.patch

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,46 @@
1-
From 9fa08868bc3ef667fbe0c1d4922bdd2f8f43acfa Mon Sep 17 00:00:00 2001
1+
From 6dfefbe388136c0d648e7cee0c2080c7eaac7861 Mon Sep 17 00:00:00 2001
22
From: Brendan Coll <[email protected]>
33
Date: Thu, 16 Mar 2023 11:56:10 +0000
44
Subject: Allow Windows builds under Bazel
55

66

77
diff --git a/BUILD.bazel b/BUILD.bazel
8-
index f2b2f4da0f8164ef29e36a3d1e9489b8e9c7b86e..84a281458aaa18525fa3640b3710414153e008b1 100644
8+
index 1f269f9c149e56a7098697fc2346b5998b0c6e01..89bc2f54fc5e42a2cf6d6fa41742c2dfe2c9ab48 100644
99
--- a/BUILD.bazel
1010
+++ b/BUILD.bazel
11-
@@ -820,6 +820,7 @@ filegroup(
11+
@@ -817,6 +817,7 @@ filegroup(
1212
"src/base/platform/mutex.h",
1313
"src/base/platform/platform.cc",
1414
"src/base/platform/platform.h",
1515
+ "src/base/platform/platform-posix.h", # Always included by src/execution/isolate.h
1616
"src/base/platform/semaphore.cc",
1717
"src/base/platform/semaphore.h",
1818
"src/base/platform/time.cc",
19-
@@ -863,7 +864,6 @@ filegroup(
19+
@@ -860,7 +861,6 @@ filegroup(
2020
] + select({
2121
"@v8//bazel/config:is_posix": [
2222
"src/base/platform/platform-posix.cc",
2323
- "src/base/platform/platform-posix.h",
2424
"src/base/platform/platform-posix-time.cc",
2525
"src/base/platform/platform-posix-time.h",
2626
],
27-
@@ -886,6 +886,7 @@ filegroup(
27+
@@ -883,6 +883,7 @@ filegroup(
2828
"@v8//bazel/config:is_windows": [
2929
"src/base/debug/stack_trace_win.cc",
3030
"src/base/platform/platform-win32.cc",
3131
+ "src/base/platform/platform-win32.h",
3232
"src/base/win32-headers.h",
3333
],
3434
}),
35-
@@ -1268,6 +1269,7 @@ filegroup(
35+
@@ -1265,6 +1266,7 @@ filegroup(
3636
"include/v8-wasm-trap-handler-posix.h",
3737
"src/api/api.cc",
3838
"src/api/api.h",
3939
+ "include/v8-wasm-trap-handler-win.h",
4040
"src/api/api-arguments.cc",
4141
"src/api/api-arguments.h",
4242
"src/api/api-arguments-inl.h",
43-
@@ -2741,6 +2743,11 @@ filegroup(
43+
@@ -2739,6 +2741,11 @@ filegroup(
4444
"src/trap-handler/handler-inside-posix.cc",
4545
"src/trap-handler/handler-outside-posix.cc",
4646
],
@@ -52,7 +52,7 @@ index f2b2f4da0f8164ef29e36a3d1e9489b8e9c7b86e..84a281458aaa18525fa3640b37104141
5252
"//conditions:default": [],
5353
}) + select({
5454
"@v8//bazel/config:v8_arm64_simulator": [
55-
@@ -2748,13 +2755,6 @@ filegroup(
55+
@@ -2746,13 +2753,6 @@ filegroup(
5656
"src/trap-handler/trap-handler-simulator.h",
5757
],
5858
"//conditions:default": [],
@@ -66,7 +66,7 @@ index f2b2f4da0f8164ef29e36a3d1e9489b8e9c7b86e..84a281458aaa18525fa3640b37104141
6666
}) + select({
6767
"@v8//bazel/config:is_windows_64bit": [
6868
"src/diagnostics/unwinding-info-win64.cc",
69-
@@ -3793,6 +3793,9 @@ filegroup(
69+
@@ -3805,6 +3805,9 @@ filegroup(
7070
"@v8//bazel/config:is_msvc_asm_ia32": ["src/heap/base/asm/ia32/push_registers_masm.asm"],
7171
"@v8//bazel/config:is_msvc_asm_x64": ["src/heap/base/asm/x64/push_registers_masm.asm"],
7272
"@v8//bazel/config:is_msvc_asm_arm64": ["src/heap/base/asm/arm64/push_registers_masm.S"],
@@ -76,7 +76,7 @@ index f2b2f4da0f8164ef29e36a3d1e9489b8e9c7b86e..84a281458aaa18525fa3640b37104141
7676
}),
7777
)
7878

79-
@@ -4170,9 +4173,11 @@ filegroup(
79+
@@ -4201,9 +4204,11 @@ filegroup(
8080
"src/d8/d8-js.cc",
8181
"src/d8/d8-platforms.cc",
8282
"src/d8/d8-platforms.h",
@@ -90,7 +90,7 @@ index f2b2f4da0f8164ef29e36a3d1e9489b8e9c7b86e..84a281458aaa18525fa3640b37104141
9090
)
9191

9292
genrule(
93-
@@ -4522,7 +4527,7 @@ py_test(
93+
@@ -4554,7 +4559,7 @@ py_test(
9494
":noicu/d8",
9595
":noicu/v8_build_config",
9696
"//testing/pybase",
@@ -99,7 +99,7 @@ index f2b2f4da0f8164ef29e36a3d1e9489b8e9c7b86e..84a281458aaa18525fa3640b37104141
9999
main = "tools/run-tests.py",
100100
python_version = "PY3",
101101
tags = [
102-
@@ -4561,7 +4566,7 @@ py_test(
102+
@@ -4593,7 +4598,7 @@ py_test(
103103
":icu/d8",
104104
":icu/v8_build_config",
105105
"//testing/pybase",
@@ -178,7 +178,7 @@ index c81f278203126913c3bad74d31348706678ccf06..96e0f9cdb61d0d8f6597d337c2dd965b
178178
name = "is_clang",
179179
match_any = [
180180
diff --git a/bazel/defs.bzl b/bazel/defs.bzl
181-
index 6a3c868b002142754cbfa671e1d30a1459d32f92..7ab09f062fd0d9bad3785836cdaa2c8be789e0f2 100644
181+
index ba1716d9ad466a1a7a0a8976631c6a82cad9b894..cda9c55baefe428bd85b8d98dbf475d07e9c4307 100644
182182
--- a/bazel/defs.bzl
183183
+++ b/bazel/defs.bzl
184184
@@ -119,6 +119,24 @@ def _default_args():

patches/v8/0005-Disable-bazel-whole-archive-build.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
From 4dd002f20f669a7b845e8a73e82997eb6e02d0e2 Mon Sep 17 00:00:00 2001
1+
From 3fab228a85820d93478887f88725d740b8fb919c Mon Sep 17 00:00:00 2001
22
From: Felix Hanau <[email protected]>
33
Date: Tue, 11 Apr 2023 14:41:31 -0400
44
Subject: Disable bazel whole-archive build

patches/v8/0006-Speed-up-V8-bazel-build-by-always-using-target-cfg.patch

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
From de23c2346084629d63b6d620a4a0a70fd9a9390a Mon Sep 17 00:00:00 2001
1+
From 1f4c8f5f723a9e80abcb8a966249b13105d890bb Mon Sep 17 00:00:00 2001
22
From: Felix Hanau <[email protected]>
33
Date: Wed, 7 Jun 2023 21:40:54 -0400
44
Subject: Speed up V8 bazel build by always using target cfg
@@ -12,7 +12,7 @@ generated files as the output set. While unrelated to the build cfg change,
1212
this also improves build times.
1313

1414
diff --git a/BUILD.bazel b/BUILD.bazel
15-
index 84a281458aaa18525fa3640b3710414153e008b1..55eaca3189c6b9464c2a0a795efea9bdc83ab8da 100644
15+
index 89bc2f54fc5e42a2cf6d6fa41742c2dfe2c9ab48..675c36f7784409f10b28b6fca93d4fd39f69a17d 100644
1616
--- a/BUILD.bazel
1717
+++ b/BUILD.bazel
1818
@@ -17,6 +17,7 @@ load(
@@ -23,7 +23,7 @@ index 84a281458aaa18525fa3640b3710414153e008b1..55eaca3189c6b9464c2a0a795efea9bd
2323
)
2424
load(":bazel/v8-non-pointer-compression.bzl", "v8_binary_non_pointer_compression")
2525

26-
@@ -4180,22 +4181,20 @@ filegroup(
26+
@@ -4211,22 +4212,20 @@ filegroup(
2727
}),
2828
)
2929

@@ -52,7 +52,7 @@ index 84a281458aaa18525fa3640b3710414153e008b1..55eaca3189c6b9464c2a0a795efea9bd
5252
)
5353

5454
v8_mksnapshot(
55-
@@ -4395,8 +4394,6 @@ v8_binary(
55+
@@ -4427,8 +4426,6 @@ v8_binary(
5656
srcs = [
5757
"src/regexp/gen-regexp-special-case.cc",
5858
"src/regexp/special-case.h",
@@ -61,7 +61,7 @@ index 84a281458aaa18525fa3640b3710414153e008b1..55eaca3189c6b9464c2a0a795efea9bd
6161
],
6262
copts = ["-Wno-implicit-fallthrough"],
6363
defines = [
64-
@@ -4408,6 +4405,7 @@ v8_binary(
64+
@@ -4440,6 +4437,7 @@ v8_binary(
6565
],
6666
deps = [
6767
"//external:absl_optional",
@@ -70,7 +70,7 @@ index 84a281458aaa18525fa3640b3710414153e008b1..55eaca3189c6b9464c2a0a795efea9bd
7070
],
7171
)
7272
diff --git a/bazel/defs.bzl b/bazel/defs.bzl
73-
index 7ab09f062fd0d9bad3785836cdaa2c8be789e0f2..bb75ea080ed4a4e441e212b067c27b6d9316f81c 100644
73+
index cda9c55baefe428bd85b8d98dbf475d07e9c4307..658b44b7deca596ef8ea5b178b2d51b0d06820d3 100644
7474
--- a/bazel/defs.bzl
7575
+++ b/bazel/defs.bzl
7676
@@ -340,6 +340,15 @@ def v8_library(

0 commit comments

Comments
 (0)