Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Erikcorry roll v8 13.0 (#2918) #2949

Merged
merged 2 commits into from
Oct 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,13 @@ git_repository(
remote = "https://chromium.googlesource.com/chromium/src/third_party/abseil-cpp.git",
)

git_repository(
name = "fast_float",
build_file_content = "exports_files(glob([\"**\"]))",
commit = "d7417618f93d2c47e9bbde561510f9fc8bafe003",
remote = "https://chromium.googlesource.com/external/github.com/fastfloat/fast_float.git",
)

git_repository(
name = "fp16",
build_file_content = "exports_files(glob([\"**\"]))",
Expand Down Expand Up @@ -269,7 +276,7 @@ esbuild_register_toolchains(

http_archive(
name = "v8",
integrity = "sha256-OTr3bwOCu50VAtMUd7d1kZXIkT1OoF9+zo9g3E7Vyvo=",
integrity = "sha256-2jQHW96t3jpEsjOlv9yyjgUem3kKNnpDAIDR4PPFSnw=",
patch_args = ["-p1"],
patches = [
"//:patches/v8/0001-Allow-manually-setting-ValueDeserializer-format-vers.patch",
Expand All @@ -291,9 +298,10 @@ http_archive(
"//:patches/v8/0017-Revert-heap-Add-masm-specific-unwinding-annotations-.patch",
"//:patches/v8/0018-Update-illegal-invocation-error-message-in-v8.patch",
"//:patches/v8/0019-Implement-cross-request-context-promise-resolve-hand.patch",
"//:patches/v8/0020-Modify-where-to-look-for-fast_float-dependency.patch",
],
strip_prefix = "v8-12.9.202.27",
url = "https://github.com/v8/v8/archive/refs/tags/12.9.202.27.tar.gz",
strip_prefix = "v8-13.0.245.16",
url = "https://github.com/v8/v8/archive/refs/tags/13.0.245.16.tar.gz",
)

git_repository(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From 1716f5dcb290435138f2d2c9b15f7260da8f0934 Mon Sep 17 00:00:00 2001
From 9d82ceca73562418e6ea9be81d8fc985e9b10f2e Mon Sep 17 00:00:00 2001
From: Alex Robinson <arobinson@cloudflare.com>
Date: Wed, 2 Mar 2022 15:58:04 -0600
Subject: Allow manually setting ValueDeserializer format version
Expand Down Expand Up @@ -35,10 +35,10 @@ index 0cb3e045bc46ec732956318b980e749d1847d06d..40ad805c7970cc9379e69f046205836d
* Reads raw data in various common formats to the buffer.
* Note that integer types are read in base-128 varint format, not with a
diff --git a/src/api/api.cc b/src/api/api.cc
index 5ab671c8c4168ac7ccd9d18ea4b9fda16734e4ad..eb880d8e77b80f941c6920c8f5b85896b6334cf0 100644
index eddb472d5608567255c5f55f4ae8b451abe5f6d3..c86687981fab3ed28306ada00c9d5dff5c594377 100644
--- a/src/api/api.cc
+++ b/src/api/api.cc
@@ -3603,6 +3603,10 @@ uint32_t ValueDeserializer::GetWireFormatVersion() const {
@@ -3605,6 +3605,10 @@ uint32_t ValueDeserializer::GetWireFormatVersion() const {
return private_->deserializer.GetWireFormatVersion();
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From 761b74e4f5c0298dc28ea84ec27050c1503bc196 Mon Sep 17 00:00:00 2001
From d4de923519e992bf2e5f1bf4a19f410d41791e10 Mon Sep 17 00:00:00 2001
From: James M Snell <jasnell@gmail.com>
Date: Wed, 16 Mar 2022 08:59:21 -0700
Subject: Allow manually setting ValueSerializer format version
Expand All @@ -22,10 +22,10 @@ index 40ad805c7970cc9379e69f046205836dbd760373..596be18adeb3a5a81794aaa44b1d347d
* Writes out a header, which includes the format version.
*/
diff --git a/src/api/api.cc b/src/api/api.cc
index eb880d8e77b80f941c6920c8f5b85896b6334cf0..6e2191ef66d5c04b99f7d314df6fb4b75de3fd7a 100644
index c86687981fab3ed28306ada00c9d5dff5c594377..7058f9a13cb73cbbd0602ddeb589268306ee45ea 100644
--- a/src/api/api.cc
+++ b/src/api/api.cc
@@ -3471,6 +3471,10 @@ ValueSerializer::ValueSerializer(Isolate* v8_isolate, Delegate* delegate)
@@ -3473,6 +3473,10 @@ ValueSerializer::ValueSerializer(Isolate* v8_isolate, Delegate* delegate)

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

Expand All @@ -37,7 +37,7 @@ index eb880d8e77b80f941c6920c8f5b85896b6334cf0..6e2191ef66d5c04b99f7d314df6fb4b7

void ValueSerializer::SetTreatArrayBufferViewsAsHostObjects(bool mode) {
diff --git a/src/objects/value-serializer.cc b/src/objects/value-serializer.cc
index 89c0d96baff05ce3b2cf506386149c14ed81779e..f7da4eefa361807dec4a76bfaf0025299cfb6b86 100644
index 51abbe13a599ce3a0f1b7d6fffea3abcfbfbafa4..eeb74aa42a9d783bbfdedc171717422321435c3a 100644
--- a/src/objects/value-serializer.cc
+++ b/src/objects/value-serializer.cc
@@ -291,6 +291,7 @@ ValueSerializer::ValueSerializer(Isolate* isolate,
Expand Down
2 changes: 1 addition & 1 deletion patches/v8/0003-Add-ArrayBuffer-MaybeNew.patch
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From 5f11274f4eadae25a81124d03dca88348d7c072c Mon Sep 17 00:00:00 2001
From 5a507dad8a778b7cab0880cb72e1048c2f39fe14 Mon Sep 17 00:00:00 2001
From: Kenton Varda <kenton@cloudflare.com>
Date: Fri, 16 Sep 2022 21:41:45 -0500
Subject: Add `ArrayBuffer::MaybeNew()`.
Expand Down
26 changes: 13 additions & 13 deletions patches/v8/0004-Allow-Windows-builds-under-Bazel.patch
Original file line number Diff line number Diff line change
@@ -1,46 +1,46 @@
From 9fa08868bc3ef667fbe0c1d4922bdd2f8f43acfa Mon Sep 17 00:00:00 2001
From 6dfefbe388136c0d648e7cee0c2080c7eaac7861 Mon Sep 17 00:00:00 2001
From: Brendan Coll <bcoll@cloudflare.com>
Date: Thu, 16 Mar 2023 11:56:10 +0000
Subject: Allow Windows builds under Bazel


diff --git a/BUILD.bazel b/BUILD.bazel
index f2b2f4da0f8164ef29e36a3d1e9489b8e9c7b86e..84a281458aaa18525fa3640b3710414153e008b1 100644
index 1f269f9c149e56a7098697fc2346b5998b0c6e01..89bc2f54fc5e42a2cf6d6fa41742c2dfe2c9ab48 100644
--- a/BUILD.bazel
+++ b/BUILD.bazel
@@ -820,6 +820,7 @@ filegroup(
@@ -817,6 +817,7 @@ filegroup(
"src/base/platform/mutex.h",
"src/base/platform/platform.cc",
"src/base/platform/platform.h",
+ "src/base/platform/platform-posix.h", # Always included by src/execution/isolate.h
"src/base/platform/semaphore.cc",
"src/base/platform/semaphore.h",
"src/base/platform/time.cc",
@@ -863,7 +864,6 @@ filegroup(
@@ -860,7 +861,6 @@ filegroup(
] + select({
"@v8//bazel/config:is_posix": [
"src/base/platform/platform-posix.cc",
- "src/base/platform/platform-posix.h",
"src/base/platform/platform-posix-time.cc",
"src/base/platform/platform-posix-time.h",
],
@@ -886,6 +886,7 @@ filegroup(
@@ -883,6 +883,7 @@ filegroup(
"@v8//bazel/config:is_windows": [
"src/base/debug/stack_trace_win.cc",
"src/base/platform/platform-win32.cc",
+ "src/base/platform/platform-win32.h",
"src/base/win32-headers.h",
],
}),
@@ -1268,6 +1269,7 @@ filegroup(
@@ -1265,6 +1266,7 @@ filegroup(
"include/v8-wasm-trap-handler-posix.h",
"src/api/api.cc",
"src/api/api.h",
+ "include/v8-wasm-trap-handler-win.h",
"src/api/api-arguments.cc",
"src/api/api-arguments.h",
"src/api/api-arguments-inl.h",
@@ -2741,6 +2743,11 @@ filegroup(
@@ -2739,6 +2741,11 @@ filegroup(
"src/trap-handler/handler-inside-posix.cc",
"src/trap-handler/handler-outside-posix.cc",
],
Expand All @@ -52,7 +52,7 @@ index f2b2f4da0f8164ef29e36a3d1e9489b8e9c7b86e..84a281458aaa18525fa3640b37104141
"//conditions:default": [],
}) + select({
"@v8//bazel/config:v8_arm64_simulator": [
@@ -2748,13 +2755,6 @@ filegroup(
@@ -2746,13 +2753,6 @@ filegroup(
"src/trap-handler/trap-handler-simulator.h",
],
"//conditions:default": [],
Expand All @@ -66,7 +66,7 @@ index f2b2f4da0f8164ef29e36a3d1e9489b8e9c7b86e..84a281458aaa18525fa3640b37104141
}) + select({
"@v8//bazel/config:is_windows_64bit": [
"src/diagnostics/unwinding-info-win64.cc",
@@ -3793,6 +3793,9 @@ filegroup(
@@ -3805,6 +3805,9 @@ filegroup(
"@v8//bazel/config:is_msvc_asm_ia32": ["src/heap/base/asm/ia32/push_registers_masm.asm"],
"@v8//bazel/config:is_msvc_asm_x64": ["src/heap/base/asm/x64/push_registers_masm.asm"],
"@v8//bazel/config:is_msvc_asm_arm64": ["src/heap/base/asm/arm64/push_registers_masm.S"],
Expand All @@ -76,7 +76,7 @@ index f2b2f4da0f8164ef29e36a3d1e9489b8e9c7b86e..84a281458aaa18525fa3640b37104141
}),
)

@@ -4170,9 +4173,11 @@ filegroup(
@@ -4201,9 +4204,11 @@ filegroup(
"src/d8/d8-js.cc",
"src/d8/d8-platforms.cc",
"src/d8/d8-platforms.h",
Expand All @@ -90,7 +90,7 @@ index f2b2f4da0f8164ef29e36a3d1e9489b8e9c7b86e..84a281458aaa18525fa3640b37104141
)

genrule(
@@ -4522,7 +4527,7 @@ py_test(
@@ -4554,7 +4559,7 @@ py_test(
":noicu/d8",
":noicu/v8_build_config",
"//testing/pybase",
Expand All @@ -99,7 +99,7 @@ index f2b2f4da0f8164ef29e36a3d1e9489b8e9c7b86e..84a281458aaa18525fa3640b37104141
main = "tools/run-tests.py",
python_version = "PY3",
tags = [
@@ -4561,7 +4566,7 @@ py_test(
@@ -4593,7 +4598,7 @@ py_test(
":icu/d8",
":icu/v8_build_config",
"//testing/pybase",
Expand Down Expand Up @@ -178,7 +178,7 @@ index c81f278203126913c3bad74d31348706678ccf06..96e0f9cdb61d0d8f6597d337c2dd965b
name = "is_clang",
match_any = [
diff --git a/bazel/defs.bzl b/bazel/defs.bzl
index 6a3c868b002142754cbfa671e1d30a1459d32f92..7ab09f062fd0d9bad3785836cdaa2c8be789e0f2 100644
index ba1716d9ad466a1a7a0a8976631c6a82cad9b894..cda9c55baefe428bd85b8d98dbf475d07e9c4307 100644
--- a/bazel/defs.bzl
+++ b/bazel/defs.bzl
@@ -119,6 +119,24 @@ def _default_args():
Expand Down
2 changes: 1 addition & 1 deletion patches/v8/0005-Disable-bazel-whole-archive-build.patch
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From 4dd002f20f669a7b845e8a73e82997eb6e02d0e2 Mon Sep 17 00:00:00 2001
From 3fab228a85820d93478887f88725d740b8fb919c Mon Sep 17 00:00:00 2001
From: Felix Hanau <felix@cloudflare.com>
Date: Tue, 11 Apr 2023 14:41:31 -0400
Subject: Disable bazel whole-archive build
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From de23c2346084629d63b6d620a4a0a70fd9a9390a Mon Sep 17 00:00:00 2001
From 1f4c8f5f723a9e80abcb8a966249b13105d890bb Mon Sep 17 00:00:00 2001
From: Felix Hanau <felix@cloudflare.com>
Date: Wed, 7 Jun 2023 21:40:54 -0400
Subject: Speed up V8 bazel build by always using target cfg
Expand All @@ -12,7 +12,7 @@ generated files as the output set. While unrelated to the build cfg change,
this also improves build times.

diff --git a/BUILD.bazel b/BUILD.bazel
index 84a281458aaa18525fa3640b3710414153e008b1..55eaca3189c6b9464c2a0a795efea9bdc83ab8da 100644
index 89bc2f54fc5e42a2cf6d6fa41742c2dfe2c9ab48..675c36f7784409f10b28b6fca93d4fd39f69a17d 100644
--- a/BUILD.bazel
+++ b/BUILD.bazel
@@ -17,6 +17,7 @@ load(
Expand All @@ -23,7 +23,7 @@ index 84a281458aaa18525fa3640b3710414153e008b1..55eaca3189c6b9464c2a0a795efea9bd
)
load(":bazel/v8-non-pointer-compression.bzl", "v8_binary_non_pointer_compression")

@@ -4180,22 +4181,20 @@ filegroup(
@@ -4211,22 +4212,20 @@ filegroup(
}),
)

Expand Down Expand Up @@ -52,7 +52,7 @@ index 84a281458aaa18525fa3640b3710414153e008b1..55eaca3189c6b9464c2a0a795efea9bd
)

v8_mksnapshot(
@@ -4395,8 +4394,6 @@ v8_binary(
@@ -4427,8 +4426,6 @@ v8_binary(
srcs = [
"src/regexp/gen-regexp-special-case.cc",
"src/regexp/special-case.h",
Expand All @@ -61,7 +61,7 @@ index 84a281458aaa18525fa3640b3710414153e008b1..55eaca3189c6b9464c2a0a795efea9bd
],
copts = ["-Wno-implicit-fallthrough"],
defines = [
@@ -4408,6 +4405,7 @@ v8_binary(
@@ -4440,6 +4437,7 @@ v8_binary(
],
deps = [
"//external:absl_optional",
Expand All @@ -70,7 +70,7 @@ index 84a281458aaa18525fa3640b3710414153e008b1..55eaca3189c6b9464c2a0a795efea9bd
],
)
diff --git a/bazel/defs.bzl b/bazel/defs.bzl
index 7ab09f062fd0d9bad3785836cdaa2c8be789e0f2..bb75ea080ed4a4e441e212b067c27b6d9316f81c 100644
index cda9c55baefe428bd85b8d98dbf475d07e9c4307..658b44b7deca596ef8ea5b178b2d51b0d06820d3 100644
--- a/bazel/defs.bzl
+++ b/bazel/defs.bzl
@@ -340,6 +340,15 @@ def v8_library(
Expand Down
Loading