Skip to content

Commit 242ec64

Browse files
authored
Merge pull request #3800 from cloudflare/jphillips/v8-13.5
Update V8 13.4.114.17 -> 13.5.212.10.
2 parents e3cddb7 + f63a01e commit 242ec64

25 files changed

+145
-573
lines changed

WORKSPACE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ git_repository(
172172
# This should match the version specified in V8 DEPS, but in practice it is generally acceptable
173173
# for it to be behind – zlib is very stable and its API has not changed in a long time, most
174174
# changes to the Chromium fork affect ancillary tools and not the zlib library itself.
175-
commit = "82a5fecf8aae8f288267cfdb2d29c9ebf7b37e59",
175+
commit = "788cb3c270e8700b425c7bdca1f9ce6b0c1400a9",
176176
remote = "https://chromium.googlesource.com/chromium/src/third_party/zlib.git",
177177
)
178178

build/deps/v8.bzl

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
22
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
33

4-
VERSION = "13.4.114.17"
4+
VERSION = "13.5.212.10"
55

6-
INTEGRITY = "sha256-2oHxjMY9AI8zSRf4VU+eJE1q5lWHWKiZ/pnOJBuV2JM="
6+
INTEGRITY = "sha256-LEez3iJZH0OE91qkYjAeuf251mHuB/c8q5WonQp11a4="
77

88
PATCHES = [
99
"0001-Allow-manually-setting-ValueDeserializer-format-vers.patch",
@@ -26,11 +26,7 @@ PATCHES = [
2626
"0018-Disable-memory-leak-assert-when-shutting-down-V8.patch",
2727
"0019-Enable-V8-shared-linkage.patch",
2828
"0020-Fix-macOS-build.patch",
29-
"0021-Delete-IsolateGroup-in-V8-Dispose.patch",
30-
"0022-Reset-code_range_-before-pointer-compression-cage.patch",
31-
"0023-Move-tear-down-in-IsolateGroup-Release-into-destruct.patch",
32-
"0024-Modify-where-to-look-for-fast_float-and-simdutf.patch",
33-
"0025-add-processed_characters-option-to-WriteUtf8V2.patch",
29+
"0021-Modify-where-to-look-for-fast_float-and-simdutf.patch",
3430
]
3531

3632
# V8 and its dependencies
@@ -60,7 +56,7 @@ def deps_v8():
6056
git_repository(
6157
name = "com_googlesource_chromium_icu",
6258
build_file = "@v8//:bazel/BUILD.icu",
63-
commit = "bbccc2f6efc1b825de5f2c903c48be685cd0cf22",
59+
commit = "d30b7b0bb3829f2e220df403ed461a1ede78b774",
6460
patch_cmds = ["find source -name BUILD.bazel | xargs rm"],
6561
patch_cmds_win = ["Get-ChildItem -Path source -File -Include BUILD.bazel -Recurse | Remove-Item"],
6662
remote = "https://chromium.googlesource.com/chromium/deps/icu.git",

docs/v8-updates.md

Lines changed: 12 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ To update the version of V8 used by workerd, the steps are:
1818

1919
4. Sync the local copy of V8 to the version used by workerd.
2020

21-
First find, the tag of the V8 `http_archive` (`name = "v8"`) in the workerd [WORKSPACE](../WORKSPACE) file.
21+
First, find workerd's current version of V8 in `v8.bzl`. We will call this `<old_version>`.
2222

2323
Then sync your fetched version v8 based on the tag.
2424

2525
```sh
2626
cd <path_to_v8>/v8
27-
git checkout <tag>
27+
git checkout <old_version>
2828
gclient sync
2929
```
3030

@@ -36,55 +36,43 @@ To update the version of V8 used by workerd, the steps are:
3636
```
3737

3838
6. Rebase the workerd V8 changes onto the new version of V8. For example, assuming
39-
we are updating to 11.4.183.8 and there are 19 workerd patches for V8, the
40-
command would be:
39+
we are updating to `<new_version>`, the command would be:
4140

4241
```sh
43-
git rebase --onto 11.4.183.8 HEAD~19
42+
git rebase --onto <new_version> <old_version>
4443
```
4544

46-
Note that `HEAD~19`, here and elsewhere, could be replaced with
47-
`$(git describe --tags --abbrev=0)`, which prints the name of the tag on which the
48-
branch is based.
49-
5045
There is usually some minor patch editing required during a rebase.
5146

5247
Ideally at this stage, you should be able to build and test the local V8 with the
5348
patches applied. See the V8 [Testing](https://v8.dev/docs/test) page.
5449

55-
7. Re-generate workerd's V8 patches. Assuming there are 19 workerd patches for V8,
56-
the command would be:
50+
7. Re-generate workerd's V8 patches.
5751

5852
```sh
59-
git format-patch --full-index -k --no-signature --no-stat --zero-commit HEAD~19
53+
git format-patch --full-index -k --no-signature --no-stat --zero-commit <new_version>
6054
```
6155

62-
8. Remove the existing patches from `workerd/patches/v8` and copy over the latest generated patches
56+
8. Remove the existing patches from `<path_to_workerd>/patches/v8` and copy over the latest generated patches
6357
from the V8 directory.
6458

65-
9. Update the `http_archive` for V8 in the `workerd/WORKSPACE` file.
59+
9. Update the `VERSION` for V8 in `v8.bzl`.
6660

6761
The list of patches should be refreshed if new patches are being added or existing
6862
patches are being removed.
6963

70-
`strip_prefix` and `url` in the `http_archive` for V8 should be updated based on the new V8
71-
version/tag.
72-
73-
The `integrity` check needs to be updated to the new value. You can get the new value in
64+
`INTEGRITY` needs to be updated to the new value. You can get the new value in
7465
bazel's preferred format just by looking into the mismatch error while trying to compile
7566
workerd using the newer V8 version or by running
7667
`openssl dgst -sha256 -binary <tarball_filename> | openssl base64 -A`
7768

78-
See [V8 http_archive in WORKSPACE](https://github.com/cloudflare/workerd/blob/587ad90dd1e91d2660c271018056f4189fca3501/WORKSPACE#L408)
79-
80-
10. Update V8's dependencies in `workerd/WORKSPACE`.
69+
10. Update V8's dependencies in `v8.bzl` and `WORKSPACE`.
8170

82-
You can find the commit versions for V8's dependencies under `v8/DEPS` and the ones
83-
that are carried through to workerd in the `workerd/WORKSPACE` file.
71+
You can find the commit versions for V8's dependencies under `<path_to_v8>/DEPS`.
8472

8573
These currently include `zlib` and `com_googlesource_chromium_icu`.
8674
Typically you'll get a build failure if the projects are out of sync. Copy the
87-
commit versions from `v8/DEPS` to the `WORKSPACE` file.
75+
commit versions from `v8/DEPS` to the `v8.bzl` or `WORKSPACE` file.
8876

8977
11. Check workerd's tests pass with the updated V8.
9078

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -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 6fcf4f9c7e65b7a95f2d7db924695219ac9aaa3e..f38ba2110bf41fc4fe09e243c4833d5fb962c6d4 100644
38+
index 0ccd4a150caf4eabb3121219d2f2fc02b1d3539c..c5605259910e29e71ef6a97b5e23fdb7378cb1ad 100644
3939
--- a/src/api/api.cc
4040
+++ b/src/api/api.cc
41-
@@ -3637,6 +3637,10 @@ uint32_t ValueDeserializer::GetWireFormatVersion() const {
41+
@@ -3459,6 +3459,10 @@ uint32_t ValueDeserializer::GetWireFormatVersion() const {
4242
return private_->deserializer.GetWireFormatVersion();
4343
}
4444

@@ -50,10 +50,10 @@ index 6fcf4f9c7e65b7a95f2d7db924695219ac9aaa3e..f38ba2110bf41fc4fe09e243c4833d5f
5050
PREPARE_FOR_EXECUTION(context, ValueDeserializer, ReadValue);
5151
i::MaybeDirectHandle<i::Object> result;
5252
diff --git a/src/objects/value-serializer.h b/src/objects/value-serializer.h
53-
index 47ee062e5acab8f187d640dec8665e7285df9e59..39021ed40fa46981db639719da7d3b1a5ea34e58 100644
53+
index fbe47397ea5dfda03f834ec2bff44ba57e1f2a96..395f3848f0d0e62c1515a33ab07e7ef46e15d0e6 100644
5454
--- a/src/objects/value-serializer.h
5555
+++ b/src/objects/value-serializer.h
56-
@@ -220,6 +220,13 @@ class ValueDeserializer {
56+
@@ -221,6 +221,13 @@ class ValueDeserializer {
5757
*/
5858
uint32_t GetWireFormatVersion() const { return version_; }
5959

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -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 f38ba2110bf41fc4fe09e243c4833d5fb962c6d4..56483742053c7f3e59b73c9d2e789239067cdc0a 100644
25+
index c5605259910e29e71ef6a97b5e23fdb7378cb1ad..5c6315a5c20f026f6e780aa05ed2ade7ff317ceb 100644
2626
--- a/src/api/api.cc
2727
+++ b/src/api/api.cc
28-
@@ -3505,6 +3505,10 @@ ValueSerializer::ValueSerializer(Isolate* v8_isolate, Delegate* delegate)
28+
@@ -3327,6 +3327,10 @@ ValueSerializer::ValueSerializer(Isolate* v8_isolate, Delegate* delegate)
2929

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

@@ -37,7 +37,7 @@ index f38ba2110bf41fc4fe09e243c4833d5fb962c6d4..56483742053c7f3e59b73c9d2e789239
3737

3838
void ValueSerializer::SetTreatArrayBufferViewsAsHostObjects(bool mode) {
3939
diff --git a/src/objects/value-serializer.cc b/src/objects/value-serializer.cc
40-
index 735cda53cac436d659bd7ad09a1e2eaecc2493fc..1b3dcf71d4c682ff2db23718ee54b86121f1f1c8 100644
40+
index 49ad642086bf85ab67c55482111e2c89e6db657c..9bd318b43b7ac3a9ef54af0be077e29155cdcfa0 100644
4141
--- a/src/objects/value-serializer.cc
4242
+++ b/src/objects/value-serializer.cc
4343
@@ -291,6 +291,7 @@ ValueSerializer::ValueSerializer(Isolate* isolate,
@@ -67,7 +67,7 @@ index 735cda53cac436d659bd7ad09a1e2eaecc2493fc..1b3dcf71d4c682ff2db23718ee54b861
6767
}
6868

6969
void ValueSerializer::SetTreatArrayBufferViewsAsHostObjects(bool mode) {
70-
@@ -1033,10 +1042,12 @@ Maybe<bool> ValueSerializer::WriteJSArrayBufferView(
70+
@@ -1037,10 +1046,12 @@ Maybe<bool> ValueSerializer::WriteJSArrayBufferView(
7171
WriteVarint(static_cast<uint8_t>(tag));
7272
WriteVarint(static_cast<uint32_t>(view->byte_offset()));
7373
WriteVarint(static_cast<uint32_t>(view->byte_length()));
@@ -83,7 +83,7 @@ index 735cda53cac436d659bd7ad09a1e2eaecc2493fc..1b3dcf71d4c682ff2db23718ee54b861
8383
}
8484

8585
diff --git a/src/objects/value-serializer.h b/src/objects/value-serializer.h
86-
index 39021ed40fa46981db639719da7d3b1a5ea34e58..ec79ccae64617547239b2b48c01a2be6ce43d035 100644
86+
index 395f3848f0d0e62c1515a33ab07e7ef46e15d0e6..a463753df6ee29e79768829c7b7d5b3136bd997d 100644
8787
--- a/src/objects/value-serializer.h
8888
+++ b/src/objects/value-serializer.h
8989
@@ -54,6 +54,11 @@ class ValueSerializer {
@@ -98,7 +98,7 @@ index 39021ed40fa46981db639719da7d3b1a5ea34e58..ec79ccae64617547239b2b48c01a2be6
9898
/*
9999
* Writes out a header, which includes the format version.
100100
*/
101-
@@ -181,6 +186,7 @@ class ValueSerializer {
101+
@@ -182,6 +187,7 @@ class ValueSerializer {
102102
bool treat_array_buffer_views_as_host_objects_ = false;
103103
bool out_of_memory_ = false;
104104
Zone zone_;

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ Subject: Allow Windows builds under Bazel
55

66

77
diff --git a/BUILD.bazel b/BUILD.bazel
8-
index 967f7bbfb2810366de89b7a7a90f284efab6c9c6..702648004a7c68721c80e7b43cdcd355ceb16710 100644
8+
index f8c653bd7eaf1df8b484c1badef4f411387a8fb5..7521eac6a6a0ef4777e2d7602bda9e7495a00d24 100644
99
--- a/BUILD.bazel
1010
+++ b/BUILD.bazel
11-
@@ -3829,6 +3829,8 @@ filegroup(
11+
@@ -3848,6 +3848,8 @@ filegroup(
1212
"@v8//bazel/config:is_inline_asm_x64": ["src/heap/base/asm/x64/push_registers_asm.cc"],
1313
"@v8//bazel/config:is_inline_asm_arm": ["src/heap/base/asm/arm/push_registers_asm.cc"],
1414
"@v8//bazel/config:is_inline_asm_arm64": ["src/heap/base/asm/arm64/push_registers_asm.cc"],

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ speedup for the build: Components like ICU were previously compiled in
88
both target and exec configurations as generator tools depend on them.
99

1010
diff --git a/BUILD.bazel b/BUILD.bazel
11-
index 702648004a7c68721c80e7b43cdcd355ceb16710..e65bd03bec247979b2825584f5b59e5ab0c40283 100644
11+
index 7521eac6a6a0ef4777e2d7602bda9e7495a00d24..56c6f15cbcbcedaae0176ca5fe45e29dd155afe9 100644
1212
--- a/BUILD.bazel
1313
+++ b/BUILD.bazel
1414
@@ -17,6 +17,7 @@ load(
@@ -19,7 +19,7 @@ index 702648004a7c68721c80e7b43cdcd355ceb16710..e65bd03bec247979b2825584f5b59e5a
1919
)
2020
load(":bazel/v8-non-pointer-compression.bzl", "v8_binary_non_pointer_compression")
2121

22-
@@ -4217,22 +4218,20 @@ filegroup(
22+
@@ -4235,22 +4236,20 @@ filegroup(
2323
],
2424
)
2525

@@ -48,7 +48,7 @@ index 702648004a7c68721c80e7b43cdcd355ceb16710..e65bd03bec247979b2825584f5b59e5a
4848
)
4949

5050
v8_mksnapshot(
51-
@@ -4441,7 +4440,6 @@ v8_binary(
51+
@@ -4459,7 +4458,6 @@ v8_binary(
5252
srcs = [
5353
"src/regexp/gen-regexp-special-case.cc",
5454
"src/regexp/special-case.h",

0 commit comments

Comments
 (0)