libv8-node 21.7.2.0-aarch64-linux-musl → 24.12.0.0-aarch64-linux-musl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/ext/libv8-node/location.rb +3 -5
- data/ext/libv8-node/paths.rb +2 -0
- data/lib/libv8/node/version.rb +7 -4
- data/lib/libv8/node.rb +2 -0
- data/lib/libv8-node.rb +2 -0
- data/vendor/v8/aarch64-linux-musl/libv8/obj/libv8_monolith.a +0 -0
- data/vendor/v8/include/cppgc/allocation.h +11 -13
- data/vendor/v8/include/cppgc/default-platform.h +3 -2
- data/vendor/v8/include/cppgc/garbage-collected.h +8 -0
- data/vendor/v8/include/cppgc/heap-consistency.h +1 -1
- data/vendor/v8/include/cppgc/heap-statistics.h +2 -0
- data/vendor/v8/include/cppgc/internal/api-constants.h +2 -14
- data/vendor/v8/include/cppgc/internal/base-page-handle.h +2 -4
- data/vendor/v8/include/cppgc/internal/caged-heap-local-data.h +0 -4
- data/vendor/v8/include/cppgc/internal/caged-heap.h +0 -4
- data/vendor/v8/include/cppgc/internal/compiler-specific.h +9 -1
- data/vendor/v8/include/cppgc/internal/conditional-stack-allocated.h +41 -0
- data/vendor/v8/include/cppgc/internal/gc-info.h +12 -10
- data/vendor/v8/include/cppgc/internal/logging.h +3 -3
- data/vendor/v8/include/cppgc/internal/member-storage.h +69 -20
- data/vendor/v8/include/cppgc/internal/name-trait.h +5 -1
- data/vendor/v8/include/cppgc/internal/persistent-node.h +8 -3
- data/vendor/v8/include/cppgc/internal/pointer-policies.h +48 -11
- data/vendor/v8/include/cppgc/macros.h +21 -0
- data/vendor/v8/include/cppgc/member.h +70 -36
- data/vendor/v8/include/cppgc/name-provider.h +10 -0
- data/vendor/v8/include/cppgc/platform.h +11 -0
- data/vendor/v8/include/cppgc/type-traits.h +26 -4
- data/vendor/v8/include/cppgc/visitor.h +25 -1
- data/vendor/v8/include/libplatform/libplatform-export.h +2 -2
- data/vendor/v8/include/libplatform/v8-tracing.h +0 -1
- data/vendor/v8/include/v8-array-buffer.h +149 -46
- data/vendor/v8/include/v8-callbacks.h +100 -43
- data/vendor/v8/include/v8-container.h +54 -0
- data/vendor/v8/include/v8-context.h +92 -30
- data/vendor/v8/include/v8-cppgc.h +5 -56
- data/vendor/v8/include/v8-data.h +5 -0
- data/vendor/v8/include/v8-date.h +9 -0
- data/vendor/v8/include/v8-debug.h +11 -0
- data/vendor/v8/include/v8-embedder-heap.h +8 -20
- data/vendor/v8/include/v8-embedder-state-scope.h +2 -1
- data/vendor/v8/include/v8-exception.h +87 -9
- data/vendor/v8/include/v8-external-memory-accounter.h +60 -0
- data/vendor/v8/include/v8-fast-api-calls.h +67 -223
- data/vendor/v8/include/v8-forward.h +1 -0
- data/vendor/v8/include/v8-function-callback.h +296 -75
- data/vendor/v8/include/v8-function.h +11 -3
- data/vendor/v8/include/v8-handle-base.h +52 -82
- data/vendor/v8/include/v8-initialization.h +26 -1
- data/vendor/v8/include/v8-inspector.h +26 -27
- data/vendor/v8/include/v8-internal.h +960 -230
- data/vendor/v8/include/v8-isolate.h +347 -226
- data/vendor/v8/include/v8-local-handle.h +307 -55
- data/vendor/v8/include/v8-maybe.h +2 -1
- data/vendor/v8/include/v8-memory-span.h +284 -4
- data/vendor/v8/include/v8-message.h +11 -5
- data/vendor/v8/include/v8-metrics.h +15 -0
- data/vendor/v8/include/v8-microtask-queue.h +0 -5
- data/vendor/v8/include/v8-object.h +314 -41
- data/vendor/v8/include/v8-persistent-handle.h +29 -39
- data/vendor/v8/include/v8-platform.h +135 -77
- data/vendor/v8/include/v8-primitive.h +223 -5
- data/vendor/v8/include/v8-profiler.h +51 -2
- data/vendor/v8/include/v8-promise.h +2 -2
- data/vendor/v8/include/v8-proxy.h +0 -1
- data/vendor/v8/include/v8-regexp.h +0 -1
- data/vendor/v8/include/v8-sandbox.h +173 -0
- data/vendor/v8/include/v8-script.h +125 -27
- data/vendor/v8/include/v8-snapshot.h +130 -23
- data/vendor/v8/include/v8-source-location.h +6 -1
- data/vendor/v8/include/v8-statistics.h +10 -24
- data/vendor/v8/include/v8-template.h +320 -193
- data/vendor/v8/include/v8-trace-categories.h +23 -0
- data/vendor/v8/include/v8-traced-handle.h +99 -76
- data/vendor/v8/include/v8-typed-array.h +111 -7
- data/vendor/v8/include/v8-unwinder-state.h +2 -3
- data/vendor/v8/include/v8-unwinder.h +2 -1
- data/vendor/v8/include/v8-util.h +10 -125
- data/vendor/v8/include/v8-value-serializer-version.h +3 -3
- data/vendor/v8/include/v8-value.h +113 -6
- data/vendor/v8/include/v8-version.h +3 -3
- data/vendor/v8/include/v8-wasm.h +27 -0
- data/vendor/v8/include/v8-weak-callback-info.h +20 -12
- data/vendor/v8/include/v8.h +3 -3
- data/vendor/v8/include/v8config.h +116 -53
- metadata +55 -12
- data/vendor/v8/include/cppgc/ephemeron-pair.h +0 -30
|
@@ -7,12 +7,51 @@
|
|
|
7
7
|
|
|
8
8
|
#include <stddef.h>
|
|
9
9
|
|
|
10
|
+
#include <array>
|
|
11
|
+
#include <cstddef>
|
|
12
|
+
#include <iterator>
|
|
13
|
+
#include <type_traits>
|
|
14
|
+
|
|
10
15
|
#include "v8config.h" // NOLINT(build/include_directory)
|
|
11
16
|
|
|
17
|
+
// TODO(pkasting): Use <compare>/spaceship unconditionally after dropping
|
|
18
|
+
// support for old libstdc++ versions.
|
|
19
|
+
#if __has_include(<version>)
|
|
20
|
+
#include <version>
|
|
21
|
+
#endif
|
|
22
|
+
#if defined(__cpp_lib_three_way_comparison) && \
|
|
23
|
+
__cpp_lib_three_way_comparison >= 201711L
|
|
24
|
+
#define V8_HAVE_SPACESHIP_OPERATOR 1
|
|
25
|
+
#else
|
|
26
|
+
#define V8_HAVE_SPACESHIP_OPERATOR 0
|
|
27
|
+
#endif
|
|
28
|
+
|
|
29
|
+
// TODO(pkasting): Make this block unconditional after dropping support for old
|
|
30
|
+
// libstdc++ versions.
|
|
31
|
+
#if __has_include(<ranges>)
|
|
32
|
+
#include <ranges>
|
|
33
|
+
|
|
34
|
+
namespace v8 {
|
|
35
|
+
|
|
36
|
+
template <typename T>
|
|
37
|
+
class V8_EXPORT MemorySpan;
|
|
38
|
+
|
|
39
|
+
} // namespace v8
|
|
40
|
+
|
|
41
|
+
// Mark `MemorySpan` as satisfying the `view` and `borrowed_range` concepts.
|
|
42
|
+
// This should be done before the definition of `MemorySpan`, so that any
|
|
43
|
+
// inlined calls to range functionality use the correct specializations.
|
|
44
|
+
template <typename T>
|
|
45
|
+
inline constexpr bool std::ranges::enable_view<v8::MemorySpan<T>> = true;
|
|
46
|
+
template <typename T>
|
|
47
|
+
inline constexpr bool std::ranges::enable_borrowed_range<v8::MemorySpan<T>> =
|
|
48
|
+
true;
|
|
49
|
+
#endif
|
|
50
|
+
|
|
12
51
|
namespace v8 {
|
|
13
52
|
|
|
14
53
|
/**
|
|
15
|
-
* Points to an unowned
|
|
54
|
+
* Points to an unowned contiguous buffer holding a known number of elements.
|
|
16
55
|
*
|
|
17
56
|
* This is similar to std::span (under consideration for C++20), but does not
|
|
18
57
|
* require advanced C++ support. In the (far) future, this may be replaced with
|
|
@@ -23,21 +62,262 @@ namespace v8 {
|
|
|
23
62
|
*/
|
|
24
63
|
template <typename T>
|
|
25
64
|
class V8_EXPORT MemorySpan {
|
|
65
|
+
private:
|
|
66
|
+
/** Some C++ machinery, brought from the future. */
|
|
67
|
+
template <typename From, typename To>
|
|
68
|
+
using is_array_convertible = std::is_convertible<From (*)[], To (*)[]>;
|
|
69
|
+
template <typename From, typename To>
|
|
70
|
+
static constexpr bool is_array_convertible_v =
|
|
71
|
+
is_array_convertible<From, To>::value;
|
|
72
|
+
|
|
73
|
+
template <typename It>
|
|
74
|
+
using iter_reference_t = decltype(*std::declval<It&>());
|
|
75
|
+
|
|
76
|
+
template <typename It, typename = void>
|
|
77
|
+
struct is_compatible_iterator : std::false_type {};
|
|
78
|
+
template <typename It>
|
|
79
|
+
struct is_compatible_iterator<
|
|
80
|
+
It,
|
|
81
|
+
std::void_t<
|
|
82
|
+
std::is_base_of<std::random_access_iterator_tag,
|
|
83
|
+
typename std::iterator_traits<It>::iterator_category>,
|
|
84
|
+
is_array_convertible<std::remove_reference_t<iter_reference_t<It>>,
|
|
85
|
+
T>>> : std::true_type {};
|
|
86
|
+
template <typename It>
|
|
87
|
+
static constexpr bool is_compatible_iterator_v =
|
|
88
|
+
is_compatible_iterator<It>::value;
|
|
89
|
+
|
|
90
|
+
template <typename U>
|
|
91
|
+
[[nodiscard]] static constexpr U* to_address(U* p) noexcept {
|
|
92
|
+
return p;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
template <typename It,
|
|
96
|
+
typename = std::void_t<decltype(std::declval<It&>().operator->())>>
|
|
97
|
+
[[nodiscard]] static constexpr auto to_address(It it) noexcept {
|
|
98
|
+
return it.operator->();
|
|
99
|
+
}
|
|
100
|
+
|
|
26
101
|
public:
|
|
27
102
|
/** The default constructor creates an empty span. */
|
|
28
103
|
constexpr MemorySpan() = default;
|
|
29
104
|
|
|
30
|
-
|
|
105
|
+
/** Constructor from nullptr and count, for backwards compatibility.
|
|
106
|
+
* This is not compatible with C++20 std::span.
|
|
107
|
+
*/
|
|
108
|
+
constexpr MemorySpan(std::nullptr_t, size_t) {}
|
|
109
|
+
|
|
110
|
+
/** Constructor from "iterator" and count. */
|
|
111
|
+
template <typename Iterator,
|
|
112
|
+
std::enable_if_t<is_compatible_iterator_v<Iterator>, bool> = true>
|
|
113
|
+
constexpr MemorySpan(Iterator first,
|
|
114
|
+
size_t count) // NOLINT(runtime/explicit)
|
|
115
|
+
: data_(to_address(first)), size_(count) {}
|
|
116
|
+
|
|
117
|
+
/** Constructor from two "iterators". */
|
|
118
|
+
template <typename Iterator,
|
|
119
|
+
std::enable_if_t<is_compatible_iterator_v<Iterator> &&
|
|
120
|
+
!std::is_convertible_v<Iterator, size_t>,
|
|
121
|
+
bool> = true>
|
|
122
|
+
constexpr MemorySpan(Iterator first,
|
|
123
|
+
Iterator last) // NOLINT(runtime/explicit)
|
|
124
|
+
: data_(to_address(first)), size_(last - first) {}
|
|
125
|
+
|
|
126
|
+
/** Implicit conversion from C-style array. */
|
|
127
|
+
template <size_t N>
|
|
128
|
+
constexpr MemorySpan(T (&a)[N]) noexcept // NOLINT(runtime/explicit)
|
|
129
|
+
: data_(a), size_(N) {}
|
|
130
|
+
|
|
131
|
+
/** Implicit conversion from std::array. */
|
|
132
|
+
template <typename U, size_t N,
|
|
133
|
+
std::enable_if_t<is_array_convertible_v<U, T>, bool> = true>
|
|
134
|
+
constexpr MemorySpan(
|
|
135
|
+
std::array<U, N>& a) noexcept // NOLINT(runtime/explicit)
|
|
136
|
+
: data_(a.data()), size_{N} {}
|
|
137
|
+
|
|
138
|
+
/** Implicit conversion from const std::array. */
|
|
139
|
+
template <typename U, size_t N,
|
|
140
|
+
std::enable_if_t<is_array_convertible_v<const U, T>, bool> = true>
|
|
141
|
+
constexpr MemorySpan(
|
|
142
|
+
const std::array<U, N>& a) noexcept // NOLINT(runtime/explicit)
|
|
143
|
+
: data_(a.data()), size_{N} {}
|
|
31
144
|
|
|
32
145
|
/** Returns a pointer to the beginning of the buffer. */
|
|
33
|
-
constexpr T* data() const { return data_; }
|
|
146
|
+
[[nodiscard]] constexpr T* data() const { return data_; }
|
|
34
147
|
/** Returns the number of elements that the buffer holds. */
|
|
35
|
-
constexpr size_t size() const { return size_; }
|
|
148
|
+
[[nodiscard]] constexpr size_t size() const { return size_; }
|
|
149
|
+
|
|
150
|
+
[[nodiscard]] constexpr T& operator[](size_t i) const { return data_[i]; }
|
|
151
|
+
|
|
152
|
+
/** Returns true if the buffer is empty. */
|
|
153
|
+
[[nodiscard]] constexpr bool empty() const { return size() == 0; }
|
|
154
|
+
|
|
155
|
+
class Iterator {
|
|
156
|
+
public:
|
|
157
|
+
using difference_type = std::ptrdiff_t;
|
|
158
|
+
using value_type = T;
|
|
159
|
+
using pointer = value_type*;
|
|
160
|
+
using reference = value_type&;
|
|
161
|
+
using iterator_category = std::random_access_iterator_tag;
|
|
162
|
+
// There seems to be no feature-test macro covering this, so use the
|
|
163
|
+
// presence of `<ranges>` as a crude proxy, since it was added to the
|
|
164
|
+
// standard as part of the Ranges papers.
|
|
165
|
+
// TODO(pkasting): Add this unconditionally after dropping support for old
|
|
166
|
+
// libstdc++ versions.
|
|
167
|
+
#if __has_include(<ranges>)
|
|
168
|
+
using iterator_concept = std::contiguous_iterator_tag;
|
|
169
|
+
#endif
|
|
170
|
+
|
|
171
|
+
// Required to satisfy `std::semiregular<>`.
|
|
172
|
+
constexpr Iterator() = default;
|
|
173
|
+
|
|
174
|
+
[[nodiscard]] friend constexpr bool operator==(const Iterator& a,
|
|
175
|
+
const Iterator& b) {
|
|
176
|
+
// TODO(pkasting): Replace this body with `= default` after dropping
|
|
177
|
+
// support for old gcc versions.
|
|
178
|
+
return a.ptr_ == b.ptr_;
|
|
179
|
+
}
|
|
180
|
+
#if V8_HAVE_SPACESHIP_OPERATOR
|
|
181
|
+
[[nodiscard]] friend constexpr auto operator<=>(const Iterator&,
|
|
182
|
+
const Iterator&) = default;
|
|
183
|
+
#else
|
|
184
|
+
// Assume that if spaceship isn't present, operator rewriting might not be
|
|
185
|
+
// either.
|
|
186
|
+
[[nodiscard]] friend constexpr bool operator!=(const Iterator& a,
|
|
187
|
+
const Iterator& b) {
|
|
188
|
+
return a.ptr_ != b.ptr_;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
[[nodiscard]] friend constexpr bool operator<(const Iterator& a,
|
|
192
|
+
const Iterator& b) {
|
|
193
|
+
return a.ptr_ < b.ptr_;
|
|
194
|
+
}
|
|
195
|
+
[[nodiscard]] friend constexpr bool operator<=(const Iterator& a,
|
|
196
|
+
const Iterator& b) {
|
|
197
|
+
return a.ptr_ <= b.ptr_;
|
|
198
|
+
}
|
|
199
|
+
[[nodiscard]] friend constexpr bool operator>(const Iterator& a,
|
|
200
|
+
const Iterator& b) {
|
|
201
|
+
return a.ptr_ > b.ptr_;
|
|
202
|
+
}
|
|
203
|
+
[[nodiscard]] friend constexpr bool operator>=(const Iterator& a,
|
|
204
|
+
const Iterator& b) {
|
|
205
|
+
return a.ptr_ >= b.ptr_;
|
|
206
|
+
}
|
|
207
|
+
#endif
|
|
208
|
+
|
|
209
|
+
constexpr Iterator& operator++() {
|
|
210
|
+
++ptr_;
|
|
211
|
+
return *this;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
constexpr Iterator operator++(int) {
|
|
215
|
+
Iterator temp = *this;
|
|
216
|
+
++*this;
|
|
217
|
+
return temp;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
constexpr Iterator& operator--() {
|
|
221
|
+
--ptr_;
|
|
222
|
+
return *this;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
constexpr Iterator operator--(int) {
|
|
226
|
+
Iterator temp = *this;
|
|
227
|
+
--*this;
|
|
228
|
+
return temp;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
constexpr Iterator& operator+=(difference_type rhs) {
|
|
232
|
+
ptr_ += rhs;
|
|
233
|
+
return *this;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
[[nodiscard]] friend constexpr Iterator operator+(Iterator lhs,
|
|
237
|
+
difference_type rhs) {
|
|
238
|
+
lhs += rhs;
|
|
239
|
+
return lhs;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
[[nodiscard]] friend constexpr Iterator operator+(difference_type lhs,
|
|
243
|
+
const Iterator& rhs) {
|
|
244
|
+
return rhs + lhs;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
constexpr Iterator& operator-=(difference_type rhs) {
|
|
248
|
+
ptr_ -= rhs;
|
|
249
|
+
return *this;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
[[nodiscard]] friend constexpr Iterator operator-(Iterator lhs,
|
|
253
|
+
difference_type rhs) {
|
|
254
|
+
lhs -= rhs;
|
|
255
|
+
return lhs;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
[[nodiscard]] friend constexpr difference_type operator-(
|
|
259
|
+
const Iterator& lhs, const Iterator& rhs) {
|
|
260
|
+
return lhs.ptr_ - rhs.ptr_;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
[[nodiscard]] constexpr reference operator*() const { return *ptr_; }
|
|
264
|
+
[[nodiscard]] constexpr pointer operator->() const { return ptr_; }
|
|
265
|
+
[[nodiscard]] constexpr reference operator[](size_t offset) const {
|
|
266
|
+
return ptr_[offset];
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
private:
|
|
270
|
+
friend class MemorySpan<T>;
|
|
271
|
+
|
|
272
|
+
constexpr explicit Iterator(T* ptr) : ptr_(ptr) {}
|
|
273
|
+
|
|
274
|
+
T* ptr_ = nullptr;
|
|
275
|
+
};
|
|
276
|
+
|
|
277
|
+
[[nodiscard]] Iterator begin() const { return Iterator(data_); }
|
|
278
|
+
[[nodiscard]] Iterator end() const { return Iterator(data_ + size_); }
|
|
36
279
|
|
|
37
280
|
private:
|
|
38
281
|
T* data_ = nullptr;
|
|
39
282
|
size_t size_ = 0;
|
|
40
283
|
};
|
|
41
284
|
|
|
285
|
+
/**
|
|
286
|
+
* Helper function template to create an array of fixed length, initialized by
|
|
287
|
+
* the provided initializer list, without explicitly specifying the array size,
|
|
288
|
+
* e.g.
|
|
289
|
+
*
|
|
290
|
+
* auto arr = v8::to_array<Local<String>>({v8_str("one"), v8_str("two")});
|
|
291
|
+
*
|
|
292
|
+
* In the future, this may be replaced with or aliased to std::to_array (under
|
|
293
|
+
* consideration for C++20).
|
|
294
|
+
*/
|
|
295
|
+
|
|
296
|
+
namespace detail {
|
|
297
|
+
template <class T, std::size_t N, std::size_t... I>
|
|
298
|
+
[[nodiscard]] constexpr std::array<std::remove_cv_t<T>, N> to_array_lvalue_impl(
|
|
299
|
+
T (&a)[N], std::index_sequence<I...>) {
|
|
300
|
+
return {{a[I]...}};
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
template <class T, std::size_t N, std::size_t... I>
|
|
304
|
+
[[nodiscard]] constexpr std::array<std::remove_cv_t<T>, N> to_array_rvalue_impl(
|
|
305
|
+
T (&&a)[N], std::index_sequence<I...>) {
|
|
306
|
+
return {{std::move(a[I])...}};
|
|
307
|
+
}
|
|
308
|
+
} // namespace detail
|
|
309
|
+
|
|
310
|
+
template <class T, std::size_t N>
|
|
311
|
+
[[nodiscard]] constexpr std::array<std::remove_cv_t<T>, N> to_array(T (&a)[N]) {
|
|
312
|
+
return detail::to_array_lvalue_impl(a, std::make_index_sequence<N>{});
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
template <class T, std::size_t N>
|
|
316
|
+
[[nodiscard]] constexpr std::array<std::remove_cv_t<T>, N> to_array(
|
|
317
|
+
T (&&a)[N]) {
|
|
318
|
+
return detail::to_array_rvalue_impl(std::move(a),
|
|
319
|
+
std::make_index_sequence<N>{});
|
|
320
|
+
}
|
|
321
|
+
|
|
42
322
|
} // namespace v8
|
|
43
323
|
#endif // INCLUDE_V8_MEMORY_SPAN_H_
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|
#include <iosfwd>
|
|
11
11
|
|
|
12
|
+
#include "v8-callbacks.h" // NOLINT(build/include_directory)
|
|
12
13
|
#include "v8-local-handle.h" // NOLINT(build/include_directory)
|
|
13
14
|
#include "v8-maybe.h" // NOLINT(build/include_directory)
|
|
14
15
|
#include "v8-primitive.h" // NOLINT(build/include_directory)
|
|
@@ -61,7 +62,7 @@ class ScriptOriginOptions {
|
|
|
61
62
|
*/
|
|
62
63
|
class V8_EXPORT ScriptOrigin {
|
|
63
64
|
public:
|
|
64
|
-
V8_INLINE ScriptOrigin(
|
|
65
|
+
V8_INLINE ScriptOrigin(Local<Value> resource_name,
|
|
65
66
|
int resource_line_offset = 0,
|
|
66
67
|
int resource_column_offset = 0,
|
|
67
68
|
bool resource_is_shared_cross_origin = false,
|
|
@@ -70,8 +71,7 @@ class V8_EXPORT ScriptOrigin {
|
|
|
70
71
|
bool resource_is_opaque = false, bool is_wasm = false,
|
|
71
72
|
bool is_module = false,
|
|
72
73
|
Local<Data> host_defined_options = Local<Data>())
|
|
73
|
-
:
|
|
74
|
-
resource_name_(resource_name),
|
|
74
|
+
: resource_name_(resource_name),
|
|
75
75
|
resource_line_offset_(resource_line_offset),
|
|
76
76
|
resource_column_offset_(resource_column_offset),
|
|
77
77
|
options_(resource_is_shared_cross_origin, resource_is_opaque, is_wasm,
|
|
@@ -92,7 +92,6 @@ class V8_EXPORT ScriptOrigin {
|
|
|
92
92
|
|
|
93
93
|
private:
|
|
94
94
|
void VerifyHostDefinedOptions() const;
|
|
95
|
-
Isolate* v8_isolate_;
|
|
96
95
|
Local<Value> resource_name_;
|
|
97
96
|
int resource_line_offset_;
|
|
98
97
|
int resource_column_offset_;
|
|
@@ -187,7 +186,14 @@ class V8_EXPORT Message {
|
|
|
187
186
|
bool IsSharedCrossOrigin() const;
|
|
188
187
|
bool IsOpaque() const;
|
|
189
188
|
|
|
190
|
-
|
|
189
|
+
/**
|
|
190
|
+
* If provided, the callback can be used to selectively include
|
|
191
|
+
* or redact frames based on their script names. (true to include a frame)
|
|
192
|
+
*/
|
|
193
|
+
static void PrintCurrentStackTrace(
|
|
194
|
+
Isolate* isolate, std::ostream& out,
|
|
195
|
+
PrintCurrentStackTraceFilterCallback should_include_frame_callback =
|
|
196
|
+
nullptr);
|
|
191
197
|
|
|
192
198
|
static const int kNoLineNumberInfo = 0;
|
|
193
199
|
static const int kNoColumnInfo = 0;
|
|
@@ -8,9 +8,11 @@
|
|
|
8
8
|
#include <stddef.h>
|
|
9
9
|
#include <stdint.h>
|
|
10
10
|
|
|
11
|
+
#include <optional>
|
|
11
12
|
#include <vector>
|
|
12
13
|
|
|
13
14
|
#include "v8-internal.h" // NOLINT(build/include_directory)
|
|
15
|
+
#include "v8-isolate.h" // NOLINT(build/include_directory)
|
|
14
16
|
#include "v8-local-handle.h" // NOLINT(build/include_directory)
|
|
15
17
|
#include "v8config.h" // NOLINT(build/include_directory)
|
|
16
18
|
|
|
@@ -37,6 +39,10 @@ struct GarbageCollectionSizes {
|
|
|
37
39
|
|
|
38
40
|
struct GarbageCollectionFullCycle {
|
|
39
41
|
int reason = -1;
|
|
42
|
+
// The priority of the isolate during the GC cycle. A nullopt value denotes a
|
|
43
|
+
// mixed priority cycle, meaning the Isolate's priority was changed while the
|
|
44
|
+
// cycle was in progress.
|
|
45
|
+
std::optional<v8::Isolate::Priority> priority = std::nullopt;
|
|
40
46
|
GarbageCollectionPhases total;
|
|
41
47
|
GarbageCollectionPhases total_cpp;
|
|
42
48
|
GarbageCollectionPhases main_thread;
|
|
@@ -55,6 +61,11 @@ struct GarbageCollectionFullCycle {
|
|
|
55
61
|
double efficiency_cpp_in_bytes_per_us = -1.0;
|
|
56
62
|
double main_thread_efficiency_in_bytes_per_us = -1.0;
|
|
57
63
|
double main_thread_efficiency_cpp_in_bytes_per_us = -1.0;
|
|
64
|
+
double collection_weight_in_percent = -1.0;
|
|
65
|
+
double collection_weight_cpp_in_percent = -1.0;
|
|
66
|
+
double main_thread_collection_weight_in_percent = -1.0;
|
|
67
|
+
double main_thread_collection_weight_cpp_in_percent = -1.0;
|
|
68
|
+
int64_t incremental_marking_start_stop_wall_clock_duration_in_us = -1;
|
|
58
69
|
};
|
|
59
70
|
|
|
60
71
|
struct GarbageCollectionFullMainThreadIncrementalMark {
|
|
@@ -81,6 +92,10 @@ using GarbageCollectionFullMainThreadBatchedIncrementalSweep =
|
|
|
81
92
|
|
|
82
93
|
struct GarbageCollectionYoungCycle {
|
|
83
94
|
int reason = -1;
|
|
95
|
+
// The priority of the isolate during the GC cycle. A nullopt value denotes a
|
|
96
|
+
// mixed priority cycle, meaning the Isolate's priority was changed while the
|
|
97
|
+
// cycle was in progress.
|
|
98
|
+
std::optional<v8::Isolate::Priority> priority = std::nullopt;
|
|
84
99
|
int64_t total_wall_clock_duration_in_us = -1;
|
|
85
100
|
int64_t main_thread_wall_clock_duration_in_us = -1;
|
|
86
101
|
double collection_rate_in_percent = -1.0;
|
|
@@ -118,11 +118,6 @@ class V8_EXPORT V8_NODISCARD MicrotasksScope {
|
|
|
118
118
|
public:
|
|
119
119
|
enum Type { kRunMicrotasks, kDoNotRunMicrotasks };
|
|
120
120
|
|
|
121
|
-
V8_DEPRECATE_SOON(
|
|
122
|
-
"May be incorrect if context was created with non-default microtask "
|
|
123
|
-
"queue")
|
|
124
|
-
MicrotasksScope(Isolate* isolate, Type type);
|
|
125
|
-
|
|
126
121
|
MicrotasksScope(Local<Context> context, Type type);
|
|
127
122
|
MicrotasksScope(Isolate* isolate, MicrotaskQueue* microtask_queue, Type type);
|
|
128
123
|
~MicrotasksScope();
|