libv8-node 15.14.0.1-x86_64-linux-musl → 17.9.1.0-x86_64-linux-musl

Sign up to get free protection for your applications and to get access to all the features.
Files changed (100) 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/include/cppgc/allocation.h +110 -44
  6. data/vendor/v8/include/cppgc/common.h +9 -6
  7. data/vendor/v8/include/cppgc/cross-thread-persistent.h +465 -0
  8. data/vendor/v8/include/cppgc/custom-space.h +37 -2
  9. data/vendor/v8/include/cppgc/default-platform.h +47 -48
  10. data/vendor/v8/include/cppgc/ephemeron-pair.h +30 -0
  11. data/vendor/v8/include/cppgc/explicit-management.h +82 -0
  12. data/vendor/v8/include/cppgc/garbage-collected.h +4 -3
  13. data/vendor/v8/include/cppgc/heap-consistency.h +253 -0
  14. data/vendor/v8/include/cppgc/heap-state.h +70 -0
  15. data/vendor/v8/include/cppgc/heap-statistics.h +120 -0
  16. data/vendor/v8/include/cppgc/heap.h +68 -6
  17. data/vendor/v8/include/cppgc/internal/api-constants.h +3 -3
  18. data/vendor/v8/include/cppgc/internal/caged-heap-local-data.h +4 -3
  19. data/vendor/v8/include/cppgc/internal/compiler-specific.h +2 -2
  20. data/vendor/v8/include/cppgc/internal/finalizer-trait.h +2 -0
  21. data/vendor/v8/include/cppgc/internal/gc-info.h +124 -13
  22. data/vendor/v8/include/cppgc/internal/name-trait.h +122 -0
  23. data/vendor/v8/include/cppgc/internal/persistent-node.h +94 -6
  24. data/vendor/v8/include/cppgc/internal/pointer-policies.h +81 -29
  25. data/vendor/v8/include/cppgc/internal/prefinalizer-handler.h +1 -1
  26. data/vendor/v8/include/cppgc/internal/write-barrier.h +398 -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 +41 -11
  33. data/vendor/v8/include/cppgc/platform.h +49 -25
  34. data/vendor/v8/include/cppgc/prefinalizer.h +2 -2
  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-array-buffer.h +433 -0
  45. data/vendor/v8/include/v8-callbacks.h +377 -0
  46. data/vendor/v8/include/v8-container.h +129 -0
  47. data/vendor/v8/include/v8-context.h +418 -0
  48. data/vendor/v8/include/v8-cppgc.h +261 -159
  49. data/vendor/v8/include/v8-data.h +65 -0
  50. data/vendor/v8/include/v8-date.h +43 -0
  51. data/vendor/v8/include/v8-debug.h +151 -0
  52. data/vendor/v8/include/v8-embedder-heap.h +238 -0
  53. data/vendor/v8/include/v8-exception.h +224 -0
  54. data/vendor/v8/include/v8-extension.h +62 -0
  55. data/vendor/v8/include/v8-external.h +37 -0
  56. data/vendor/v8/include/v8-fast-api-calls.h +652 -152
  57. data/vendor/v8/include/v8-forward.h +81 -0
  58. data/vendor/v8/include/v8-function-callback.h +475 -0
  59. data/vendor/v8/include/v8-function.h +122 -0
  60. data/vendor/v8/include/v8-initialization.h +282 -0
  61. data/vendor/v8/include/v8-inspector.h +33 -25
  62. data/vendor/v8/include/v8-internal.h +178 -31
  63. data/vendor/v8/include/v8-isolate.h +1662 -0
  64. data/vendor/v8/include/v8-json.h +47 -0
  65. data/vendor/v8/include/v8-local-handle.h +459 -0
  66. data/vendor/v8/include/v8-locker.h +148 -0
  67. data/vendor/v8/include/v8-maybe.h +137 -0
  68. data/vendor/v8/include/v8-memory-span.h +43 -0
  69. data/vendor/v8/include/v8-message.h +241 -0
  70. data/vendor/v8/include/v8-metrics.h +114 -9
  71. data/vendor/v8/include/v8-microtask-queue.h +152 -0
  72. data/vendor/v8/include/v8-microtask.h +28 -0
  73. data/vendor/v8/include/v8-object.h +770 -0
  74. data/vendor/v8/include/v8-persistent-handle.h +590 -0
  75. data/vendor/v8/include/v8-platform.h +74 -25
  76. data/vendor/v8/include/v8-primitive-object.h +118 -0
  77. data/vendor/v8/include/v8-primitive.h +858 -0
  78. data/vendor/v8/include/v8-profiler.h +72 -9
  79. data/vendor/v8/include/v8-promise.h +174 -0
  80. data/vendor/v8/include/v8-proxy.h +50 -0
  81. data/vendor/v8/include/v8-regexp.h +105 -0
  82. data/vendor/v8/include/v8-script.h +771 -0
  83. data/vendor/v8/include/v8-snapshot.h +198 -0
  84. data/vendor/v8/include/v8-statistics.h +215 -0
  85. data/vendor/v8/include/v8-template.h +1052 -0
  86. data/vendor/v8/include/v8-traced-handle.h +605 -0
  87. data/vendor/v8/include/v8-typed-array.h +282 -0
  88. data/vendor/v8/include/v8-unwinder-state.h +31 -0
  89. data/vendor/v8/include/v8-unwinder.h +129 -0
  90. data/vendor/v8/include/v8-util.h +8 -2
  91. data/vendor/v8/include/v8-value-serializer.h +249 -0
  92. data/vendor/v8/include/v8-value.h +526 -0
  93. data/vendor/v8/include/v8-version.h +3 -3
  94. data/vendor/v8/include/v8-wasm.h +245 -0
  95. data/vendor/v8/include/v8-weak-callback-info.h +73 -0
  96. data/vendor/v8/include/v8.h +41 -12050
  97. data/vendor/v8/include/v8config.h +87 -11
  98. data/vendor/v8/{out.gn → x86_64-linux-musl}/libv8/obj/libv8_monolith.a +0 -0
  99. metadata +63 -9
  100. 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_