Skip to content

Commit

Permalink
Roll V8 to 12.9 (#2684)
Browse files Browse the repository at this point in the history
Roll V8 to 12.9

This release adds Intl.DurationFormat.
  • Loading branch information
erikcorry authored Sep 10, 2024
1 parent da0cbfb commit 234d0cd
Show file tree
Hide file tree
Showing 22 changed files with 105 additions and 312 deletions.
15 changes: 5 additions & 10 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ http_archive(
# to confusing compiler errors in tcmalloc in the past.
git_repository(
name = "com_google_absl",
commit = "9d1552f25c3d9e9114b7d7aed55790570a99bc4d",
commit = "ed3733b91e472a1e7a641c1f0c1e6c0ea698e958",
remote = "https://chromium.googlesource.com/chromium/src/third_party/abseil-cpp.git",
)

Expand Down Expand Up @@ -286,7 +286,7 @@ git_repository(
name = "zlib",
build_file = "//:build/BUILD.zlib",
# Must match the version used by v8
commit = "c2469fdd73f192383d2d94288da0ff5b9a3869f5",
commit = "d3aea2341cdeaf7e717bc257a59aa7a9407d318a",
remote = "https://chromium.googlesource.com/chromium/src/third_party/zlib.git",
)

Expand Down Expand Up @@ -444,7 +444,7 @@ npm_repositories()

http_archive(
name = "v8",
integrity = "sha256-yoLczQj1XEZL4EHVRjAwpVjgr9/q0YlRGnNX47Ke2ws=",
integrity = "sha256-oOgRa4akl02v8tcMbpmbHu21VL1qOYBjerq1CzekLxc=",
patch_args = ["-p1"],
patches = [
"//:patches/v8/0001-Allow-manually-setting-ValueDeserializer-format-vers.patch",
Expand All @@ -465,14 +465,9 @@ http_archive(
"//:patches/v8/0016-Revert-TracedReference-deref-API-removal.patch",
"//:patches/v8/0017-Revert-heap-Add-masm-specific-unwinding-annotations-.patch",
"//:patches/v8/0018-Update-illegal-invocation-error-message-in-v8.patch",
# TODO(cleanup): Patches backported from V8 12.9 – adding these fixes a race condition
# leading to a segfault in several wasm-related tests under ASan. These are already included
# in 12.9 so remove the patches when updating to that version.
"//:patches/v8/0019-wasm-Fix-more-code-logging-races.patch",
"//:patches/v8/0020-wasm-Remove-destructor-of-LogCodesTask.patch",
],
strip_prefix = "v8-12.8.374.10",
url = "https://github.com/v8/v8/archive/refs/tags/12.8.374.10.tar.gz",
strip_prefix = "v8-12.9.202.13",
url = "https://github.com/v8/v8/archive/refs/tags/12.9.202.13.tar.gz",
)

git_repository(
Expand Down
2 changes: 1 addition & 1 deletion docs/v8-updates.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ from the V8 directory.
You can find the commit versions for V8's dependencies under `v8/DEPS` and the ones
that are carried through to workerd in the `workerd/WORKSPACE` file.

These currently include `abseil` and `com_googlesource_chromium_icu`.
These currently include `zlib` and `com_googlesource_chromium_icu`.
Typically you'll get a build failure if the projects are out of sync. Copy the
commit versions from `v8/DEPS` to the `WORKSPACE` file.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From 2a878e3f5a956e375cb59e4bccd0f2fa6591d66a Mon Sep 17 00:00:00 2001
From 7f2b87c02eeef64b1d15ec78b45a128e6a8b9254 Mon Sep 17 00:00:00 2001
From: Alex Robinson <[email protected]>
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 f8d3c5aa1231f4b62a614bc0c705366d922b4c75..20f02c0eee7a8f921d8e4c0ae2f06df34c22bf6f 100644
index 5ab671c8c4168ac7ccd9d18ea4b9fda16734e4ad..eb880d8e77b80f941c6920c8f5b85896b6334cf0 100644
--- a/src/api/api.cc
+++ b/src/api/api.cc
@@ -3599,6 +3599,10 @@ uint32_t ValueDeserializer::GetWireFormatVersion() const {
@@ -3603,6 +3603,10 @@ uint32_t ValueDeserializer::GetWireFormatVersion() const {
return private_->deserializer.GetWireFormatVersion();
}

Expand All @@ -50,7 +50,7 @@ index f8d3c5aa1231f4b62a614bc0c705366d922b4c75..20f02c0eee7a8f921d8e4c0ae2f06df3
PREPARE_FOR_EXECUTION(context, ValueDeserializer, ReadValue);
i::MaybeHandle<i::Object> result;
diff --git a/src/objects/value-serializer.h b/src/objects/value-serializer.h
index 094210f286ab107f93b4a0e1529210a5328e0df0..8ec0a77210dda063a8c64d3c52b3209a8194827b 100644
index 342c58be184d098499b04e656a4b7729e6953d3d..fd9ff05f3f5455a84b76246b5e9996cf7bcbf8db 100644
--- a/src/objects/value-serializer.h
+++ b/src/objects/value-serializer.h
@@ -218,6 +218,13 @@ class ValueDeserializer {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From 89b24ba580034518e735c60838819c062b985c11 Mon Sep 17 00:00:00 2001
From 904f424662a91a0d3942f31fb8fbc72516efc8b8 Mon Sep 17 00:00:00 2001
From: James M Snell <[email protected]>
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 20f02c0eee7a8f921d8e4c0ae2f06df34c22bf6f..404d19e8c5cf4b4505fb9106f0b649b44708e729 100644
index eb880d8e77b80f941c6920c8f5b85896b6334cf0..6e2191ef66d5c04b99f7d314df6fb4b75de3fd7a 100644
--- a/src/api/api.cc
+++ b/src/api/api.cc
@@ -3467,6 +3467,10 @@ ValueSerializer::ValueSerializer(Isolate* v8_isolate, Delegate* delegate)
@@ -3471,6 +3471,10 @@ ValueSerializer::ValueSerializer(Isolate* v8_isolate, Delegate* delegate)

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

Expand All @@ -37,7 +37,7 @@ index 20f02c0eee7a8f921d8e4c0ae2f06df34c22bf6f..404d19e8c5cf4b4505fb9106f0b649b4

void ValueSerializer::SetTreatArrayBufferViewsAsHostObjects(bool mode) {
diff --git a/src/objects/value-serializer.cc b/src/objects/value-serializer.cc
index e606ad4f8da446c0edb1b2696eec9701b166719a..96ad656a42173b66974539472467c497b89dc587 100644
index 89c0d96baff05ce3b2cf506386149c14ed81779e..f7da4eefa361807dec4a76bfaf0025299cfb6b86 100644
--- a/src/objects/value-serializer.cc
+++ b/src/objects/value-serializer.cc
@@ -291,6 +291,7 @@ ValueSerializer::ValueSerializer(Isolate* isolate,
Expand Down Expand Up @@ -83,7 +83,7 @@ index e606ad4f8da446c0edb1b2696eec9701b166719a..96ad656a42173b66974539472467c497
}

diff --git a/src/objects/value-serializer.h b/src/objects/value-serializer.h
index 8ec0a77210dda063a8c64d3c52b3209a8194827b..27d5d03518e7bfecde240b658f63456c899f378c 100644
index fd9ff05f3f5455a84b76246b5e9996cf7bcbf8db..cb9f1f3d9750da8914d5bd73c6742d6459c48e06 100644
--- a/src/objects/value-serializer.h
+++ b/src/objects/value-serializer.h
@@ -54,6 +54,11 @@ class ValueSerializer {
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 66ed20eae671ff611f2367ed894340cac7543236 Mon Sep 17 00:00:00 2001
From aefb9a35747b3d42287a8a5f503d2ad7410b9b0c Mon Sep 17 00:00:00 2001
From: Kenton Varda <[email protected]>
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 ba70d45d8258bd31100a63db615a82cb58d95664 Mon Sep 17 00:00:00 2001
From 10c8b0b828769d8a0dd3cf454704785a270fb2a6 Mon Sep 17 00:00:00 2001
From: Brendan Coll <[email protected]>
Date: Thu, 16 Mar 2023 11:56:10 +0000
Subject: Allow Windows builds under Bazel


diff --git a/BUILD.bazel b/BUILD.bazel
index 0718b28b05294698a38de1e13d34fe7a585038ac..e805a5174b9cfe1578c9423b5bbba4004614f0f7 100644
index f2b2f4da0f8164ef29e36a3d1e9489b8e9c7b86e..84a281458aaa18525fa3640b3710414153e008b1 100644
--- a/BUILD.bazel
+++ b/BUILD.bazel
@@ -771,6 +771,7 @@ filegroup(
@@ -820,6 +820,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",
@@ -814,7 +815,6 @@ filegroup(
@@ -863,7 +864,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",
],
@@ -837,6 +837,7 @@ filegroup(
@@ -886,6 +886,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",
],
}),
@@ -1219,6 +1220,7 @@ filegroup(
@@ -1268,6 +1269,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",
@@ -2689,6 +2691,11 @@ filegroup(
@@ -2741,6 +2743,11 @@ filegroup(
"src/trap-handler/handler-inside-posix.cc",
"src/trap-handler/handler-outside-posix.cc",
],
Expand All @@ -52,7 +52,7 @@ index 0718b28b05294698a38de1e13d34fe7a585038ac..e805a5174b9cfe1578c9423b5bbba400
"//conditions:default": [],
}) + select({
"@v8//bazel/config:v8_arm64_simulator": [
@@ -2696,13 +2703,6 @@ filegroup(
@@ -2748,13 +2755,6 @@ filegroup(
"src/trap-handler/trap-handler-simulator.h",
],
"//conditions:default": [],
Expand All @@ -66,7 +66,7 @@ index 0718b28b05294698a38de1e13d34fe7a585038ac..e805a5174b9cfe1578c9423b5bbba400
}) + select({
"@v8//bazel/config:is_windows_64bit": [
"src/diagnostics/unwinding-info-win64.cc",
@@ -3717,6 +3717,9 @@ filegroup(
@@ -3793,6 +3793,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 0718b28b05294698a38de1e13d34fe7a585038ac..e805a5174b9cfe1578c9423b5bbba400
}),
)

@@ -4094,9 +4097,11 @@ filegroup(
@@ -4170,9 +4173,11 @@ filegroup(
"src/d8/d8-js.cc",
"src/d8/d8-platforms.cc",
"src/d8/d8-platforms.h",
Expand All @@ -90,7 +90,7 @@ index 0718b28b05294698a38de1e13d34fe7a585038ac..e805a5174b9cfe1578c9423b5bbba400
)

genrule(
@@ -4446,7 +4451,7 @@ py_test(
@@ -4522,7 +4527,7 @@ py_test(
":noicu/d8",
":noicu/v8_build_config",
"//testing/pybase",
Expand All @@ -99,7 +99,7 @@ index 0718b28b05294698a38de1e13d34fe7a585038ac..e805a5174b9cfe1578c9423b5bbba400
main = "tools/run-tests.py",
python_version = "PY3",
tags = [
@@ -4485,7 +4490,7 @@ py_test(
@@ -4561,7 +4566,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 520a311595e488f39445bf9500f24971eecf0091..a81ec956ddd4e985cc6257fc015983baf593f19d 100644
index 6a3c868b002142754cbfa671e1d30a1459d32f92..7ab09f062fd0d9bad3785836cdaa2c8be789e0f2 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 8d00e3a1c7ada125c05ef95e0109125e9ae64f23 Mon Sep 17 00:00:00 2001
From 847bacce9b981c36c973192aeedaba7d2abb1ec4 Mon Sep 17 00:00:00 2001
From: Felix Hanau <[email protected]>
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 1ce25051dcd85c5782012ba42929329ff491bb1a Mon Sep 17 00:00:00 2001
From 9b8c6cdd0a183a34d4516ff924af9fd9fa0477fe Mon Sep 17 00:00:00 2001
From: Felix Hanau <[email protected]>
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 e805a5174b9cfe1578c9423b5bbba4004614f0f7..e1779cc185fb6c2614b3a7d5b39305baea9a5efa 100644
index 84a281458aaa18525fa3640b3710414153e008b1..55eaca3189c6b9464c2a0a795efea9bdc83ab8da 100644
--- a/BUILD.bazel
+++ b/BUILD.bazel
@@ -17,6 +17,7 @@ load(
Expand All @@ -23,7 +23,7 @@ index e805a5174b9cfe1578c9423b5bbba4004614f0f7..e1779cc185fb6c2614b3a7d5b39305ba
)
load(":bazel/v8-non-pointer-compression.bzl", "v8_binary_non_pointer_compression")

@@ -4104,22 +4105,20 @@ filegroup(
@@ -4180,22 +4181,20 @@ filegroup(
}),
)

Expand Down Expand Up @@ -52,7 +52,7 @@ index e805a5174b9cfe1578c9423b5bbba4004614f0f7..e1779cc185fb6c2614b3a7d5b39305ba
)

v8_mksnapshot(
@@ -4319,8 +4318,6 @@ v8_binary(
@@ -4395,8 +4394,6 @@ v8_binary(
srcs = [
"src/regexp/gen-regexp-special-case.cc",
"src/regexp/special-case.h",
Expand All @@ -61,7 +61,7 @@ index e805a5174b9cfe1578c9423b5bbba4004614f0f7..e1779cc185fb6c2614b3a7d5b39305ba
],
copts = ["-Wno-implicit-fallthrough"],
defines = [
@@ -4332,6 +4329,7 @@ v8_binary(
@@ -4408,6 +4405,7 @@ v8_binary(
],
deps = [
"//external:absl_optional",
Expand All @@ -70,7 +70,7 @@ index e805a5174b9cfe1578c9423b5bbba4004614f0f7..e1779cc185fb6c2614b3a7d5b39305ba
],
)
diff --git a/bazel/defs.bzl b/bazel/defs.bzl
index a81ec956ddd4e985cc6257fc015983baf593f19d..f8dfd9b5eb9c65547db3b17814c84e4fbc312d07 100644
index 7ab09f062fd0d9bad3785836cdaa2c8be789e0f2..bb75ea080ed4a4e441e212b067c27b6d9316f81c 100644
--- a/bazel/defs.bzl
+++ b/bazel/defs.bzl
@@ -340,6 +340,15 @@ def v8_library(
Expand Down
Loading

0 comments on commit 234d0cd

Please sign in to comment.