Skip to content

Commit 5e31992

Browse files
authored
Upgrade V8 to 9.0 (#111)
1 parent 571ffb0 commit 5e31992

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+1790
-717
lines changed

.github/workflows/v8build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
name: Build V8 for ${{ matrix.platform }}
88
strategy:
99
matrix:
10-
platform: [ubuntu-latest, macos-latest, windows-latest]
10+
platform: [ubuntu-18.04, macos-latest, windows-latest]
1111
runs-on: ${{ matrix.platform }}
1212
steps:
1313
- name: Checkout
@@ -19,7 +19,7 @@ jobs:
1919
run: cd deps/depot_tools && git config --unset-all remote.origin.fetch; git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/*
2020
shell: bash
2121
- name: Build V8 linux
22-
if: matrix.platform == 'ubuntu-latest'
22+
if: matrix.platform == 'ubuntu-18.04'
2323
run: cd deps && ./build.py --no-clang
2424
- name: Build V8 macOS
2525
if: matrix.platform == 'macos-latest'

CHANGELOG.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
88

99
### Added
1010
- Promise resolver and promise result
11-
- Convert a Value to a Function and invoke it
11+
- Convert a Value to a Function and invoke it. Thanks to [@robfig](https://github.com/robfig)
12+
- Windows static binary. Thanks to [@cleiner](https://github.com/cleiner)
13+
- Setting/unsetting of V8 feature flags
1214

1315
### Changed
14-
- Upgrade to V8 8.9.255.20
16+
- Upgrade to V8 9.0.257.18
1517

1618
### Fixed
1719
- Go GC attempting to free C memory (via finalizer) of values after an Isolate is disposed causes a panic

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ V8 requires 64-bit on Windows, therefore it will not work on 32-bit systems.
133133

134134
## V8 dependency
135135

136-
V8 version: **8.9.255.20** (March 2021)
136+
V8 version: **9.0.257.18** (April 2021)
137137

138138
In order to make `v8go` usable as a standard Go package, prebuilt static libraries of V8
139139
are included for Linux, macOS and Windows ie. you *should not* require to build V8 yourself.

deps/build.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ def apply_mingw_patches():
7777
v8_build_path = os.path.join(v8_path, "build")
7878
apply_patch("0000-add-mingw-main-code-changes", v8_path)
7979
apply_patch("0001-add-mingw-toolchain", v8_build_path)
80-
apply_patch("0002-fix-mingw-unwind-tables", v8_build_path)
8180
update_last_change()
8281
zlib_path = os.path.join(v8_path, "third_party", "zlib")
8382
zlib_src_gn = os.path.join(deps_path, os_arch(), "zlib.gn")

deps/darwin_x86_64/libv8.a

901 KB
Binary file not shown.

deps/depot_tools

Submodule depot_tools updated from da76875 to 1dbd65b

deps/include/DEPS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ include_rules = [
44
"+cppgc/common.h",
55
# Used by v8-cppgc.h to bridge to cppgc.
66
"+cppgc/custom-space.h",
7+
"+cppgc/heap-statistics.h",
78
"+cppgc/internal/write-barrier.h",
89
"+cppgc/visitor.h",
910
]

deps/include/OWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ per-file v8-inspector-protocol.h=pfeldman@chromium.org
1616
per-file v8-inspector-protocol.h=kozyatinskiy@chromium.org
1717
per-file js_protocol.pdl=dgozman@chromium.org
1818
per-file js_protocol.pdl=pfeldman@chromium.org
19+
per-file js_protocol.pdl=bmeurer@chromium.org
1920

2021
# For branch updates:
2122
per-file v8-version.h=file:../INFRA_OWNERS

deps/include/cppgc/allocation.h

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,13 @@ template <typename T>
6464
class MakeGarbageCollectedTraitBase
6565
: private internal::MakeGarbageCollectedTraitInternal {
6666
private:
67+
static_assert(internal::IsGarbageCollectedType<T>::value,
68+
"T needs to be a garbage collected object");
69+
static_assert(!IsGarbageCollectedWithMixinTypeV<T> ||
70+
sizeof(T) <=
71+
internal::api_constants::kLargeObjectSizeThreshold,
72+
"GarbageCollectedMixin may not be a large object");
73+
6774
template <typename U, typename CustomSpace>
6875
struct SpacePolicy {
6976
static void* Allocate(AllocationHandle& handle, size_t size) {
@@ -153,12 +160,6 @@ class MakeGarbageCollectedTrait : public MakeGarbageCollectedTraitBase<T> {
153160
public:
154161
template <typename... Args>
155162
static T* Call(AllocationHandle& handle, Args&&... args) {
156-
static_assert(internal::IsGarbageCollectedType<T>::value,
157-
"T needs to be a garbage collected object");
158-
static_assert(
159-
!internal::IsGarbageCollectedMixinType<T>::value ||
160-
sizeof(T) <= internal::api_constants::kLargeObjectSizeThreshold,
161-
"GarbageCollectedMixin may not be a large object");
162163
void* memory =
163164
MakeGarbageCollectedTraitBase<T>::Allocate(handle, sizeof(T));
164165
T* object = ::new (memory) T(std::forward<Args>(args)...);
@@ -169,12 +170,6 @@ class MakeGarbageCollectedTrait : public MakeGarbageCollectedTraitBase<T> {
169170
template <typename... Args>
170171
static T* Call(AllocationHandle& handle, AdditionalBytes additional_bytes,
171172
Args&&... args) {
172-
static_assert(internal::IsGarbageCollectedType<T>::value,
173-
"T needs to be a garbage collected object");
174-
static_assert(
175-
!internal::IsGarbageCollectedMixinType<T>::value ||
176-
sizeof(T) <= internal::api_constants::kLargeObjectSizeThreshold,
177-
"GarbageCollectedMixin may not be a large object");
178173
void* memory = MakeGarbageCollectedTraitBase<T>::Allocate(
179174
handle, sizeof(T) + additional_bytes.value);
180175
T* object = ::new (memory) T(std::forward<Args>(args)...);

deps/include/cppgc/common.h

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,18 @@
1010

1111
namespace cppgc {
1212

13-
// Indicator for the stack state of the embedder.
13+
/**
14+
* Indicator for the stack state of the embedder.
15+
*/
1416
enum class EmbedderStackState {
17+
/**
18+
* Stack may contain interesting heap pointers.
19+
*/
1520
kMayContainHeapPointers,
21+
/**
22+
* Stack does not contain any interesting heap pointers.
23+
*/
1624
kNoHeapPointers,
17-
kUnknown V8_ENUM_DEPRECATED("Use kMayContainHeapPointers") =
18-
kMayContainHeapPointers,
19-
kNonEmpty V8_ENUM_DEPRECATED("Use kMayContainHeapPointers") =
20-
kMayContainHeapPointers,
21-
kEmpty V8_ENUM_DEPRECATED("Use kNoHeapPointers") = kNoHeapPointers,
2225
};
2326

2427
} // namespace cppgc

0 commit comments

Comments
 (0)