libv8-node 15.14.0.1-aarch64-linux-musl → 16.17.0.0-aarch64-linux-musl

Sign up to get free protection for your applications and to get access to all the features.
Files changed (57) hide show
  1. checksums.yaml +4 -4
  2. data/ext/libv8-node/location.rb +1 -1
  3. data/ext/libv8-node/paths.rb +5 -1
  4. data/lib/libv8/node/version.rb +3 -3
  5. data/vendor/v8/{out.gn → aarch64-linux-musl}/libv8/obj/libv8_monolith.a +0 -0
  6. data/vendor/v8/include/cppgc/allocation.h +105 -45
  7. data/vendor/v8/include/cppgc/common.h +9 -6
  8. data/vendor/v8/include/cppgc/cross-thread-persistent.h +413 -0
  9. data/vendor/v8/include/cppgc/custom-space.h +37 -2
  10. data/vendor/v8/include/cppgc/default-platform.h +47 -48
  11. data/vendor/v8/include/cppgc/ephemeron-pair.h +30 -0
  12. data/vendor/v8/include/cppgc/explicit-management.h +82 -0
  13. data/vendor/v8/include/cppgc/garbage-collected.h +4 -3
  14. data/vendor/v8/include/cppgc/heap-consistency.h +253 -0
  15. data/vendor/v8/include/cppgc/heap-state.h +70 -0
  16. data/vendor/v8/include/cppgc/heap-statistics.h +120 -0
  17. data/vendor/v8/include/cppgc/heap.h +68 -6
  18. data/vendor/v8/include/cppgc/internal/api-constants.h +3 -3
  19. data/vendor/v8/include/cppgc/internal/caged-heap-local-data.h +2 -1
  20. data/vendor/v8/include/cppgc/internal/compiler-specific.h +2 -2
  21. data/vendor/v8/include/cppgc/internal/gc-info.h +44 -13
  22. data/vendor/v8/include/cppgc/internal/name-trait.h +111 -0
  23. data/vendor/v8/include/cppgc/internal/persistent-node.h +58 -2
  24. data/vendor/v8/include/cppgc/internal/pointer-policies.h +69 -28
  25. data/vendor/v8/include/cppgc/internal/prefinalizer-handler.h +1 -1
  26. data/vendor/v8/include/cppgc/internal/write-barrier.h +390 -35
  27. data/vendor/v8/include/cppgc/liveness-broker.h +11 -2
  28. data/vendor/v8/include/cppgc/macros.h +2 -0
  29. data/vendor/v8/include/cppgc/member.h +87 -25
  30. data/vendor/v8/include/cppgc/name-provider.h +65 -0
  31. data/vendor/v8/include/cppgc/object-size-trait.h +58 -0
  32. data/vendor/v8/include/cppgc/persistent.h +40 -10
  33. data/vendor/v8/include/cppgc/platform.h +49 -25
  34. data/vendor/v8/include/cppgc/prefinalizer.h +1 -1
  35. data/vendor/v8/include/cppgc/process-heap-statistics.h +36 -0
  36. data/vendor/v8/include/cppgc/sentinel-pointer.h +32 -0
  37. data/vendor/v8/include/cppgc/source-location.h +2 -1
  38. data/vendor/v8/include/cppgc/testing.h +99 -0
  39. data/vendor/v8/include/cppgc/trace-trait.h +8 -3
  40. data/vendor/v8/include/cppgc/type-traits.h +157 -19
  41. data/vendor/v8/include/cppgc/visitor.h +194 -28
  42. data/vendor/v8/include/libplatform/libplatform.h +11 -0
  43. data/vendor/v8/include/libplatform/v8-tracing.h +2 -0
  44. data/vendor/v8/include/v8-cppgc.h +258 -159
  45. data/vendor/v8/include/v8-fast-api-calls.h +603 -155
  46. data/vendor/v8/include/v8-inspector.h +22 -4
  47. data/vendor/v8/include/v8-internal.h +111 -27
  48. data/vendor/v8/include/v8-metrics.h +77 -8
  49. data/vendor/v8/include/v8-platform.h +47 -22
  50. data/vendor/v8/include/v8-profiler.h +75 -11
  51. data/vendor/v8/include/v8-unwinder-state.h +30 -0
  52. data/vendor/v8/include/v8-util.h +1 -1
  53. data/vendor/v8/include/v8-version.h +4 -4
  54. data/vendor/v8/include/v8.h +1196 -642
  55. data/vendor/v8/include/v8config.h +87 -11
  56. metadata +17 -5
  57. data/vendor/v8/include/cppgc/internal/process-heap.h +0 -34
@@ -5,6 +5,7 @@
5
5
  #ifndef INCLUDE_CPPGC_SOURCE_LOCATION_H_
6
6
  #define INCLUDE_CPPGC_SOURCE_LOCATION_H_
7
7
 
8
+ #include <cstddef>
8
9
  #include <string>
9
10
 
10
11
  #include "v8config.h" // NOLINT(build/include_directory)
@@ -25,7 +26,7 @@ namespace cppgc {
25
26
 
26
27
  /**
27
28
  * Encapsulates source location information. Mimics C++20's
28
- * std::source_location.
29
+ * `std::source_location`.
29
30
  */
30
31
  class V8_EXPORT SourceLocation final {
31
32
  public:
@@ -0,0 +1,99 @@
1
+ // Copyright 2021 the V8 project authors. All rights reserved.
2
+ // Use of this source code is governed by a BSD-style license that can be
3
+ // found in the LICENSE file.
4
+
5
+ #ifndef INCLUDE_CPPGC_TESTING_H_
6
+ #define INCLUDE_CPPGC_TESTING_H_
7
+
8
+ #include "cppgc/common.h"
9
+ #include "cppgc/macros.h"
10
+ #include "v8config.h" // NOLINT(build/include_directory)
11
+
12
+ namespace cppgc {
13
+
14
+ class HeapHandle;
15
+
16
+ /**
17
+ * Namespace contains testing helpers.
18
+ */
19
+ namespace testing {
20
+
21
+ /**
22
+ * Overrides the state of the stack with the provided value. Takes precedence
23
+ * over other parameters that set the stack state. Must no be nested.
24
+ */
25
+ class V8_EXPORT V8_NODISCARD OverrideEmbedderStackStateScope final {
26
+ CPPGC_STACK_ALLOCATED();
27
+
28
+ public:
29
+ /**
30
+ * Constructs a scoped object that automatically enters and leaves the scope.
31
+ *
32
+ * \param heap_handle The corresponding heap.
33
+ */
34
+ explicit OverrideEmbedderStackStateScope(HeapHandle& heap_handle,
35
+ EmbedderStackState state);
36
+ ~OverrideEmbedderStackStateScope();
37
+
38
+ OverrideEmbedderStackStateScope(const OverrideEmbedderStackStateScope&) =
39
+ delete;
40
+ OverrideEmbedderStackStateScope& operator=(
41
+ const OverrideEmbedderStackStateScope&) = delete;
42
+
43
+ private:
44
+ HeapHandle& heap_handle_;
45
+ };
46
+
47
+ /**
48
+ * Testing interface for managed heaps that allows for controlling garbage
49
+ * collection timings. Embedders should use this class when testing the
50
+ * interaction of their code with incremental/concurrent garbage collection.
51
+ */
52
+ class V8_EXPORT StandaloneTestingHeap final {
53
+ public:
54
+ explicit StandaloneTestingHeap(HeapHandle&);
55
+
56
+ /**
57
+ * Start an incremental garbage collection.
58
+ */
59
+ void StartGarbageCollection();
60
+
61
+ /**
62
+ * Perform an incremental step. This will also schedule concurrent steps if
63
+ * needed.
64
+ *
65
+ * \param stack_state The state of the stack during the step.
66
+ */
67
+ bool PerformMarkingStep(EmbedderStackState stack_state);
68
+
69
+ /**
70
+ * Finalize the current garbage collection cycle atomically.
71
+ * Assumes that garbage collection is in progress.
72
+ *
73
+ * \param stack_state The state of the stack for finalizing the garbage
74
+ * collection cycle.
75
+ */
76
+ void FinalizeGarbageCollection(EmbedderStackState stack_state);
77
+
78
+ /**
79
+ * Toggle main thread marking on/off. Allows to stress concurrent marking
80
+ * (e.g. to better detect data races).
81
+ *
82
+ * \param should_mark Denotes whether the main thread should contribute to
83
+ * marking. Defaults to true.
84
+ */
85
+ void ToggleMainThreadMarking(bool should_mark);
86
+
87
+ /**
88
+ * Force enable compaction for the next garbage collection cycle.
89
+ */
90
+ void ForceCompactionForNextGarbageCollection();
91
+
92
+ private:
93
+ HeapHandle& heap_handle_;
94
+ };
95
+
96
+ } // namespace testing
97
+ } // namespace cppgc
98
+
99
+ #endif // INCLUDE_CPPGC_TESTING_H_
@@ -55,8 +55,6 @@ struct V8_EXPORT TraceTraitFromInnerAddressImpl {
55
55
  static TraceDescriptor GetTraceDescriptor(const void* address);
56
56
  };
57
57
 
58
- } // namespace internal
59
-
60
58
  /**
61
59
  * Trait specifying how the garbage collector processes an object of type T.
62
60
  *
@@ -64,7 +62,7 @@ struct V8_EXPORT TraceTraitFromInnerAddressImpl {
64
62
  * type.
65
63
  */
66
64
  template <typename T>
67
- struct TraceTrait {
65
+ struct TraceTraitBase {
68
66
  static_assert(internal::IsTraceableV<T>, "T must have a Trace() method");
69
67
 
70
68
  /**
@@ -89,10 +87,17 @@ struct TraceTrait {
89
87
  }
90
88
  };
91
89
 
90
+ } // namespace internal
91
+
92
+ template <typename T>
93
+ struct TraceTrait : public internal::TraceTraitBase<T> {};
94
+
92
95
  namespace internal {
93
96
 
94
97
  template <typename T>
95
98
  struct TraceTraitImpl<T, false> {
99
+ static_assert(IsGarbageCollectedTypeV<T>,
100
+ "T must be of type GarbageCollected or GarbageCollectedMixin");
96
101
  static TraceDescriptor GetTraceDescriptor(const void* self) {
97
102
  return {self, TraceTrait<T>::Trace};
98
103
  }
@@ -5,6 +5,9 @@
5
5
  #ifndef INCLUDE_CPPGC_TYPE_TRAITS_H_
6
6
  #define INCLUDE_CPPGC_TYPE_TRAITS_H_
7
7
 
8
+ // This file should stay with minimal dependencies to allow embedder to check
9
+ // against Oilpan types without including any other parts.
10
+ #include <cstddef>
8
11
  #include <type_traits>
9
12
 
10
13
  namespace cppgc {
@@ -12,6 +15,14 @@ namespace cppgc {
12
15
  class Visitor;
13
16
 
14
17
  namespace internal {
18
+ template <typename T, typename WeaknessTag, typename WriteBarrierPolicy,
19
+ typename CheckingPolicy>
20
+ class BasicMember;
21
+ struct DijkstraWriteBarrierPolicy;
22
+ struct NoWriteBarrierPolicy;
23
+ class StrongMemberTag;
24
+ class UntracedMemberTag;
25
+ class WeakMemberTag;
15
26
 
16
27
  // Pre-C++17 custom implementation of std::void_t.
17
28
  template <typename... Ts>
@@ -25,18 +36,6 @@ using void_t = typename make_void<Ts...>::type;
25
36
  template <typename T>
26
37
  struct IsWeak : std::false_type {};
27
38
 
28
- template <typename T, template <typename... V> class U>
29
- struct IsSubclassOfTemplate {
30
- private:
31
- template <typename... W>
32
- static std::true_type SubclassCheck(U<W...>*);
33
- static std::false_type SubclassCheck(...);
34
-
35
- public:
36
- static constexpr bool value =
37
- decltype(SubclassCheck(std::declval<T*>()))::value;
38
- };
39
-
40
39
  // IsTraceMethodConst is used to verify that all Trace methods are marked as
41
40
  // const. It is equivalent to IsTraceable but for a non-const object.
42
41
  template <typename T, typename = void>
@@ -67,12 +66,12 @@ template <typename T>
67
66
  constexpr bool IsTraceableV = IsTraceable<T>::value;
68
67
 
69
68
  template <typename T, typename = void>
70
- struct IsGarbageCollectedMixinType : std::false_type {
69
+ struct HasGarbageCollectedMixinTypeMarker : std::false_type {
71
70
  static_assert(sizeof(T), "T must be fully defined");
72
71
  };
73
72
 
74
73
  template <typename T>
75
- struct IsGarbageCollectedMixinType<
74
+ struct HasGarbageCollectedMixinTypeMarker<
76
75
  T,
77
76
  void_t<typename std::remove_const_t<T>::IsGarbageCollectedMixinTypeMarker>>
78
77
  : std::true_type {
@@ -80,30 +79,169 @@ struct IsGarbageCollectedMixinType<
80
79
  };
81
80
 
82
81
  template <typename T, typename = void>
83
- struct IsGarbageCollectedType : IsGarbageCollectedMixinType<T> {
82
+ struct HasGarbageCollectedTypeMarker : std::false_type {
84
83
  static_assert(sizeof(T), "T must be fully defined");
85
84
  };
86
85
 
87
86
  template <typename T>
88
- struct IsGarbageCollectedType<
87
+ struct HasGarbageCollectedTypeMarker<
89
88
  T, void_t<typename std::remove_const_t<T>::IsGarbageCollectedTypeMarker>>
90
89
  : std::true_type {
91
90
  static_assert(sizeof(T), "T must be fully defined");
92
91
  };
93
92
 
93
+ template <typename T, bool = HasGarbageCollectedTypeMarker<T>::value,
94
+ bool = HasGarbageCollectedMixinTypeMarker<T>::value>
95
+ struct IsGarbageCollectedMixinType : std::false_type {
96
+ static_assert(sizeof(T), "T must be fully defined");
97
+ };
98
+
94
99
  template <typename T>
95
- constexpr bool IsGarbageCollectedTypeV =
96
- internal::IsGarbageCollectedType<T>::value;
100
+ struct IsGarbageCollectedMixinType<T, false, true> : std::true_type {
101
+ static_assert(sizeof(T), "T must be fully defined");
102
+ };
103
+
104
+ template <typename T, bool = HasGarbageCollectedTypeMarker<T>::value>
105
+ struct IsGarbageCollectedType : std::false_type {
106
+ static_assert(sizeof(T), "T must be fully defined");
107
+ };
97
108
 
109
+ template <typename T>
110
+ struct IsGarbageCollectedType<T, true> : std::true_type {
111
+ static_assert(sizeof(T), "T must be fully defined");
112
+ };
113
+
114
+ template <typename T>
115
+ struct IsGarbageCollectedOrMixinType
116
+ : std::integral_constant<bool, IsGarbageCollectedType<T>::value ||
117
+ IsGarbageCollectedMixinType<T>::value> {
118
+ static_assert(sizeof(T), "T must be fully defined");
119
+ };
120
+
121
+ template <typename T, bool = (HasGarbageCollectedTypeMarker<T>::value &&
122
+ HasGarbageCollectedMixinTypeMarker<T>::value)>
123
+ struct IsGarbageCollectedWithMixinType : std::false_type {
124
+ static_assert(sizeof(T), "T must be fully defined");
125
+ };
126
+
127
+ template <typename T>
128
+ struct IsGarbageCollectedWithMixinType<T, true> : std::true_type {
129
+ static_assert(sizeof(T), "T must be fully defined");
130
+ };
131
+
132
+ template <typename BasicMemberCandidate, typename WeaknessTag,
133
+ typename WriteBarrierPolicy>
134
+ struct IsSubclassOfBasicMemberTemplate {
135
+ private:
136
+ template <typename T, typename CheckingPolicy>
137
+ static std::true_type SubclassCheck(
138
+ BasicMember<T, WeaknessTag, WriteBarrierPolicy, CheckingPolicy>*);
139
+ static std::false_type SubclassCheck(...);
140
+
141
+ public:
142
+ static constexpr bool value =
143
+ decltype(SubclassCheck(std::declval<BasicMemberCandidate*>()))::value;
144
+ };
145
+
146
+ template <typename T,
147
+ bool = IsSubclassOfBasicMemberTemplate<
148
+ T, StrongMemberTag, DijkstraWriteBarrierPolicy>::value>
149
+ struct IsMemberType : std::false_type {};
150
+
151
+ template <typename T>
152
+ struct IsMemberType<T, true> : std::true_type {};
153
+
154
+ template <typename T, bool = IsSubclassOfBasicMemberTemplate<
155
+ T, WeakMemberTag, DijkstraWriteBarrierPolicy>::value>
156
+ struct IsWeakMemberType : std::false_type {};
157
+
158
+ template <typename T>
159
+ struct IsWeakMemberType<T, true> : std::true_type {};
160
+
161
+ template <typename T, bool = IsSubclassOfBasicMemberTemplate<
162
+ T, UntracedMemberTag, NoWriteBarrierPolicy>::value>
163
+ struct IsUntracedMemberType : std::false_type {};
164
+
165
+ template <typename T>
166
+ struct IsUntracedMemberType<T, true> : std::true_type {};
167
+
168
+ template <typename T>
169
+ struct IsComplete {
170
+ private:
171
+ template <typename U, size_t = sizeof(U)>
172
+ static std::true_type IsSizeOfKnown(U*);
173
+ static std::false_type IsSizeOfKnown(...);
174
+
175
+ public:
176
+ static constexpr bool value =
177
+ decltype(IsSizeOfKnown(std::declval<T*>()))::value;
178
+ };
179
+
180
+ } // namespace internal
181
+
182
+ /**
183
+ * Value is true for types that inherit from `GarbageCollectedMixin` but not
184
+ * `GarbageCollected<T>` (i.e., they are free mixins), and false otherwise.
185
+ */
98
186
  template <typename T>
99
187
  constexpr bool IsGarbageCollectedMixinTypeV =
100
188
  internal::IsGarbageCollectedMixinType<T>::value;
101
189
 
102
- } // namespace internal
190
+ /**
191
+ * Value is true for types that inherit from `GarbageCollected<T>`, and false
192
+ * otherwise.
193
+ */
194
+ template <typename T>
195
+ constexpr bool IsGarbageCollectedTypeV =
196
+ internal::IsGarbageCollectedType<T>::value;
197
+
198
+ /**
199
+ * Value is true for types that inherit from either `GarbageCollected<T>` or
200
+ * `GarbageCollectedMixin`, and false otherwise.
201
+ */
202
+ template <typename T>
203
+ constexpr bool IsGarbageCollectedOrMixinTypeV =
204
+ internal::IsGarbageCollectedOrMixinType<T>::value;
205
+
206
+ /**
207
+ * Value is true for types that inherit from `GarbageCollected<T>` and
208
+ * `GarbageCollectedMixin`, and false otherwise.
209
+ */
210
+ template <typename T>
211
+ constexpr bool IsGarbageCollectedWithMixinTypeV =
212
+ internal::IsGarbageCollectedWithMixinType<T>::value;
213
+
214
+ /**
215
+ * Value is true for types of type `Member<T>`, and false otherwise.
216
+ */
217
+ template <typename T>
218
+ constexpr bool IsMemberTypeV = internal::IsMemberType<T>::value;
219
+
220
+ /**
221
+ * Value is true for types of type `UntracedMember<T>`, and false otherwise.
222
+ */
223
+ template <typename T>
224
+ constexpr bool IsUntracedMemberTypeV = internal::IsUntracedMemberType<T>::value;
103
225
 
226
+ /**
227
+ * Value is true for types of type `WeakMember<T>`, and false otherwise.
228
+ */
229
+ template <typename T>
230
+ constexpr bool IsWeakMemberTypeV = internal::IsWeakMemberType<T>::value;
231
+
232
+ /**
233
+ * Value is true for types that are considered weak references, and false
234
+ * otherwise.
235
+ */
104
236
  template <typename T>
105
237
  constexpr bool IsWeakV = internal::IsWeak<T>::value;
106
238
 
239
+ /**
240
+ * Value is true for types that are complete, and false otherwise.
241
+ */
242
+ template <typename T>
243
+ constexpr bool IsCompleteV = internal::IsComplete<T>::value;
244
+
107
245
  } // namespace cppgc
108
246
 
109
247
  #endif // INCLUDE_CPPGC_TYPE_TRAITS_H_