libv8-node 15.14.0.1-aarch64-linux → 17.9.1.0-aarch64-linux
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ext/libv8-node/location.rb +1 -1
- data/ext/libv8-node/paths.rb +5 -1
- data/lib/libv8/node/version.rb +3 -3
- data/vendor/v8/{out.gn → aarch64-linux}/libv8/obj/libv8_monolith.a +0 -0
- data/vendor/v8/include/cppgc/allocation.h +110 -44
- data/vendor/v8/include/cppgc/common.h +9 -6
- data/vendor/v8/include/cppgc/cross-thread-persistent.h +465 -0
- data/vendor/v8/include/cppgc/custom-space.h +37 -2
- data/vendor/v8/include/cppgc/default-platform.h +47 -48
- data/vendor/v8/include/cppgc/ephemeron-pair.h +30 -0
- data/vendor/v8/include/cppgc/explicit-management.h +82 -0
- data/vendor/v8/include/cppgc/garbage-collected.h +4 -3
- data/vendor/v8/include/cppgc/heap-consistency.h +253 -0
- data/vendor/v8/include/cppgc/heap-state.h +70 -0
- data/vendor/v8/include/cppgc/heap-statistics.h +120 -0
- data/vendor/v8/include/cppgc/heap.h +68 -6
- data/vendor/v8/include/cppgc/internal/api-constants.h +3 -3
- data/vendor/v8/include/cppgc/internal/caged-heap-local-data.h +4 -3
- data/vendor/v8/include/cppgc/internal/compiler-specific.h +2 -2
- data/vendor/v8/include/cppgc/internal/finalizer-trait.h +2 -0
- data/vendor/v8/include/cppgc/internal/gc-info.h +124 -13
- data/vendor/v8/include/cppgc/internal/name-trait.h +122 -0
- data/vendor/v8/include/cppgc/internal/persistent-node.h +94 -6
- data/vendor/v8/include/cppgc/internal/pointer-policies.h +81 -29
- data/vendor/v8/include/cppgc/internal/prefinalizer-handler.h +1 -1
- data/vendor/v8/include/cppgc/internal/write-barrier.h +398 -35
- data/vendor/v8/include/cppgc/liveness-broker.h +11 -2
- data/vendor/v8/include/cppgc/macros.h +2 -0
- data/vendor/v8/include/cppgc/member.h +87 -25
- data/vendor/v8/include/cppgc/name-provider.h +65 -0
- data/vendor/v8/include/cppgc/object-size-trait.h +58 -0
- data/vendor/v8/include/cppgc/persistent.h +41 -11
- data/vendor/v8/include/cppgc/platform.h +49 -25
- data/vendor/v8/include/cppgc/prefinalizer.h +2 -2
- data/vendor/v8/include/cppgc/process-heap-statistics.h +36 -0
- data/vendor/v8/include/cppgc/sentinel-pointer.h +32 -0
- data/vendor/v8/include/cppgc/source-location.h +2 -1
- data/vendor/v8/include/cppgc/testing.h +99 -0
- data/vendor/v8/include/cppgc/trace-trait.h +8 -3
- data/vendor/v8/include/cppgc/type-traits.h +157 -19
- data/vendor/v8/include/cppgc/visitor.h +194 -28
- data/vendor/v8/include/libplatform/libplatform.h +11 -0
- data/vendor/v8/include/libplatform/v8-tracing.h +2 -0
- data/vendor/v8/include/v8-array-buffer.h +433 -0
- data/vendor/v8/include/v8-callbacks.h +377 -0
- data/vendor/v8/include/v8-container.h +129 -0
- data/vendor/v8/include/v8-context.h +418 -0
- data/vendor/v8/include/v8-cppgc.h +261 -159
- data/vendor/v8/include/v8-data.h +65 -0
- data/vendor/v8/include/v8-date.h +43 -0
- data/vendor/v8/include/v8-debug.h +151 -0
- data/vendor/v8/include/v8-embedder-heap.h +238 -0
- data/vendor/v8/include/v8-exception.h +224 -0
- data/vendor/v8/include/v8-extension.h +62 -0
- data/vendor/v8/include/v8-external.h +37 -0
- data/vendor/v8/include/v8-fast-api-calls.h +652 -152
- data/vendor/v8/include/v8-forward.h +81 -0
- data/vendor/v8/include/v8-function-callback.h +475 -0
- data/vendor/v8/include/v8-function.h +122 -0
- data/vendor/v8/include/v8-initialization.h +282 -0
- data/vendor/v8/include/v8-inspector.h +33 -25
- data/vendor/v8/include/v8-internal.h +178 -31
- data/vendor/v8/include/v8-isolate.h +1662 -0
- data/vendor/v8/include/v8-json.h +47 -0
- data/vendor/v8/include/v8-local-handle.h +459 -0
- data/vendor/v8/include/v8-locker.h +148 -0
- data/vendor/v8/include/v8-maybe.h +137 -0
- data/vendor/v8/include/v8-memory-span.h +43 -0
- data/vendor/v8/include/v8-message.h +241 -0
- data/vendor/v8/include/v8-metrics.h +114 -9
- data/vendor/v8/include/v8-microtask-queue.h +152 -0
- data/vendor/v8/include/v8-microtask.h +28 -0
- data/vendor/v8/include/v8-object.h +770 -0
- data/vendor/v8/include/v8-persistent-handle.h +590 -0
- data/vendor/v8/include/v8-platform.h +74 -25
- data/vendor/v8/include/v8-primitive-object.h +118 -0
- data/vendor/v8/include/v8-primitive.h +858 -0
- data/vendor/v8/include/v8-profiler.h +72 -9
- data/vendor/v8/include/v8-promise.h +174 -0
- data/vendor/v8/include/v8-proxy.h +50 -0
- data/vendor/v8/include/v8-regexp.h +105 -0
- data/vendor/v8/include/v8-script.h +771 -0
- data/vendor/v8/include/v8-snapshot.h +198 -0
- data/vendor/v8/include/v8-statistics.h +215 -0
- data/vendor/v8/include/v8-template.h +1052 -0
- data/vendor/v8/include/v8-traced-handle.h +605 -0
- data/vendor/v8/include/v8-typed-array.h +282 -0
- data/vendor/v8/include/v8-unwinder-state.h +31 -0
- data/vendor/v8/include/v8-unwinder.h +129 -0
- data/vendor/v8/include/v8-util.h +8 -2
- data/vendor/v8/include/v8-value-serializer.h +249 -0
- data/vendor/v8/include/v8-value.h +526 -0
- data/vendor/v8/include/v8-version.h +3 -3
- data/vendor/v8/include/v8-wasm.h +245 -0
- data/vendor/v8/include/v8-weak-callback-info.h +73 -0
- data/vendor/v8/include/v8.h +41 -12050
- data/vendor/v8/include/v8config.h +87 -11
- metadata +60 -6
- data/vendor/v8/include/cppgc/internal/process-heap.h +0 -34
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b0a9774d31edc0753dbcc5e2f0405ca98090199187eb4d5208f7fb186e11d5e1
|
4
|
+
data.tar.gz: ba5f096814e984f3f1085d6aa73e043bfb9fd4cd65d4844ac8fee8bdf5417198
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1ff9d63102cb2e10ecf41905dde25100c749aa2f24896f7f533fecf26c22601fc30cfcbdc9179a6218883b244c128faddd0860800db88b59366ef527dd45bcb2
|
7
|
+
data.tar.gz: ad32644a23d97bb64ba2f36f52cc4ae62db98b088801b107ea85b52f01f1a2bfd478f32d6f260ddf389d684a229cfd62419269aaa5b0fab1ea7f7420b3217824
|
data/ext/libv8-node/location.rb
CHANGED
@@ -18,7 +18,7 @@ module Libv8::Node
|
|
18
18
|
|
19
19
|
def self.load!
|
20
20
|
File.open(Pathname(__FILE__).dirname.join('.location.yml')) do |f|
|
21
|
-
YAML.load(f) # rubocop:disable Security/YAMLLoad
|
21
|
+
YAML.respond_to?(:unsafe_load) ? YAML.unsafe_load(f) : YAML.load(f) # rubocop:disable Security/YAMLLoad
|
22
22
|
end
|
23
23
|
end
|
24
24
|
|
data/ext/libv8-node/paths.rb
CHANGED
@@ -13,12 +13,16 @@ module Libv8::Node
|
|
13
13
|
|
14
14
|
def object_paths
|
15
15
|
[Shellwords.escape(File.join(vendored_source_path,
|
16
|
-
|
16
|
+
platform,
|
17
17
|
'libv8',
|
18
18
|
'obj',
|
19
19
|
"libv8_monolith.#{config['LIBEXT']}"))]
|
20
20
|
end
|
21
21
|
|
22
|
+
def platform
|
23
|
+
Gem::Platform.local.tap { |p| RUBY_PLATFORM =~ /musl/ && p.version.nil? and p.instance_eval { @version = "musl" } }.to_s.gsub(/-darwin-?\d+/, '-darwin')
|
24
|
+
end
|
25
|
+
|
22
26
|
def config
|
23
27
|
RbConfig::MAKEFILE_CONFIG
|
24
28
|
end
|
data/lib/libv8/node/version.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
module Libv8; end
|
2
2
|
|
3
3
|
module Libv8::Node
|
4
|
-
VERSION = '
|
5
|
-
NODE_VERSION = '
|
6
|
-
LIBV8_VERSION = '
|
4
|
+
VERSION = '17.9.1.0'.freeze
|
5
|
+
NODE_VERSION = '17.9.1'.freeze
|
6
|
+
LIBV8_VERSION = '9.6.180.15'.freeze # from v8/include/v8-version.h
|
7
7
|
end
|
Binary file
|
@@ -5,24 +5,21 @@
|
|
5
5
|
#ifndef INCLUDE_CPPGC_ALLOCATION_H_
|
6
6
|
#define INCLUDE_CPPGC_ALLOCATION_H_
|
7
7
|
|
8
|
-
#include <stdint.h>
|
9
|
-
|
10
8
|
#include <atomic>
|
9
|
+
#include <cstddef>
|
10
|
+
#include <cstdint>
|
11
|
+
#include <new>
|
12
|
+
#include <type_traits>
|
13
|
+
#include <utility>
|
11
14
|
|
12
15
|
#include "cppgc/custom-space.h"
|
13
|
-
#include "cppgc/garbage-collected.h"
|
14
16
|
#include "cppgc/internal/api-constants.h"
|
15
17
|
#include "cppgc/internal/gc-info.h"
|
18
|
+
#include "cppgc/type-traits.h"
|
19
|
+
#include "v8config.h" // NOLINT(build/include_directory)
|
16
20
|
|
17
21
|
namespace cppgc {
|
18
22
|
|
19
|
-
template <typename T>
|
20
|
-
class MakeGarbageCollectedTraitBase;
|
21
|
-
|
22
|
-
namespace internal {
|
23
|
-
class ObjectAllocator;
|
24
|
-
} // namespace internal
|
25
|
-
|
26
23
|
/**
|
27
24
|
* AllocationHandle is used to allocate garbage-collected objects.
|
28
25
|
*/
|
@@ -39,11 +36,37 @@ class V8_EXPORT MakeGarbageCollectedTraitInternal {
|
|
39
36
|
const_cast<uint16_t*>(reinterpret_cast<const uint16_t*>(
|
40
37
|
reinterpret_cast<const uint8_t*>(payload) -
|
41
38
|
api_constants::kFullyConstructedBitFieldOffsetFromPayload)));
|
39
|
+
// It's safe to split use load+store here (instead of a read-modify-write
|
40
|
+
// operation), since it's guaranteed that this 16-bit bitfield is only
|
41
|
+
// modified by a single thread. This is cheaper in terms of code bloat (on
|
42
|
+
// ARM) and performance.
|
42
43
|
uint16_t value = atomic_mutable_bitfield->load(std::memory_order_relaxed);
|
43
|
-
value
|
44
|
+
value |= api_constants::kFullyConstructedBitMask;
|
44
45
|
atomic_mutable_bitfield->store(value, std::memory_order_release);
|
45
46
|
}
|
46
47
|
|
48
|
+
template <typename U, typename CustomSpace>
|
49
|
+
struct SpacePolicy {
|
50
|
+
static void* Allocate(AllocationHandle& handle, size_t size) {
|
51
|
+
// Custom space.
|
52
|
+
static_assert(std::is_base_of<CustomSpaceBase, CustomSpace>::value,
|
53
|
+
"Custom space must inherit from CustomSpaceBase.");
|
54
|
+
return MakeGarbageCollectedTraitInternal::Allocate(
|
55
|
+
handle, size, internal::GCInfoTrait<U>::Index(),
|
56
|
+
CustomSpace::kSpaceIndex);
|
57
|
+
}
|
58
|
+
};
|
59
|
+
|
60
|
+
template <typename U>
|
61
|
+
struct SpacePolicy<U, void> {
|
62
|
+
static void* Allocate(AllocationHandle& handle, size_t size) {
|
63
|
+
// Default space.
|
64
|
+
return MakeGarbageCollectedTraitInternal::Allocate(
|
65
|
+
handle, size, internal::GCInfoTrait<U>::Index());
|
66
|
+
}
|
67
|
+
};
|
68
|
+
|
69
|
+
private:
|
47
70
|
static void* Allocate(cppgc::AllocationHandle& handle, size_t size,
|
48
71
|
GCInfoIndex index);
|
49
72
|
static void* Allocate(cppgc::AllocationHandle& handle, size_t size,
|
@@ -65,26 +88,12 @@ template <typename T>
|
|
65
88
|
class MakeGarbageCollectedTraitBase
|
66
89
|
: private internal::MakeGarbageCollectedTraitInternal {
|
67
90
|
private:
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
return internal::MakeGarbageCollectedTraitInternal::Allocate(
|
75
|
-
handle, size, internal::GCInfoTrait<T>::Index(),
|
76
|
-
CustomSpace::kSpaceIndex);
|
77
|
-
}
|
78
|
-
};
|
79
|
-
|
80
|
-
template <typename U>
|
81
|
-
struct SpacePolicy<U, void> {
|
82
|
-
static void* Allocate(AllocationHandle& handle, size_t size) {
|
83
|
-
// Default space.
|
84
|
-
return internal::MakeGarbageCollectedTraitInternal::Allocate(
|
85
|
-
handle, size, internal::GCInfoTrait<T>::Index());
|
86
|
-
}
|
87
|
-
};
|
91
|
+
static_assert(internal::IsGarbageCollectedType<T>::value,
|
92
|
+
"T needs to be a garbage collected object");
|
93
|
+
static_assert(!IsGarbageCollectedWithMixinTypeV<T> ||
|
94
|
+
sizeof(T) <=
|
95
|
+
internal::api_constants::kLargeObjectSizeThreshold,
|
96
|
+
"GarbageCollectedMixin may not be a large object");
|
88
97
|
|
89
98
|
protected:
|
90
99
|
/**
|
@@ -95,9 +104,15 @@ class MakeGarbageCollectedTraitBase
|
|
95
104
|
* \param size The size that should be reserved for the object.
|
96
105
|
* \returns the memory to construct an object of type T on.
|
97
106
|
*/
|
98
|
-
static void* Allocate(AllocationHandle& handle, size_t size) {
|
99
|
-
|
100
|
-
|
107
|
+
V8_INLINE static void* Allocate(AllocationHandle& handle, size_t size) {
|
108
|
+
static_assert(
|
109
|
+
std::is_base_of<typename T::ParentMostGarbageCollectedType, T>::value,
|
110
|
+
"U of GarbageCollected<U> must be a base of T. Check "
|
111
|
+
"GarbageCollected<T> base class inheritance.");
|
112
|
+
return SpacePolicy<
|
113
|
+
typename internal::GCInfoFolding<
|
114
|
+
T, typename T::ParentMostGarbageCollectedType>::ResultType,
|
115
|
+
typename SpaceTrait<T>::Space>::Allocate(handle, size);
|
101
116
|
}
|
102
117
|
|
103
118
|
/**
|
@@ -106,39 +121,70 @@ class MakeGarbageCollectedTraitBase
|
|
106
121
|
*
|
107
122
|
* \param payload The base pointer the object is allocated at.
|
108
123
|
*/
|
109
|
-
static void MarkObjectAsFullyConstructed(const void* payload) {
|
124
|
+
V8_INLINE static void MarkObjectAsFullyConstructed(const void* payload) {
|
110
125
|
internal::MakeGarbageCollectedTraitInternal::MarkObjectAsFullyConstructed(
|
111
126
|
payload);
|
112
127
|
}
|
113
128
|
};
|
114
129
|
|
130
|
+
/**
|
131
|
+
* Passed to MakeGarbageCollected to specify how many bytes should be appended
|
132
|
+
* to the allocated object.
|
133
|
+
*
|
134
|
+
* Example:
|
135
|
+
* \code
|
136
|
+
* class InlinedArray final : public GarbageCollected<InlinedArray> {
|
137
|
+
* public:
|
138
|
+
* explicit InlinedArray(size_t bytes) : size(bytes), byte_array(this + 1) {}
|
139
|
+
* void Trace(Visitor*) const {}
|
140
|
+
|
141
|
+
* size_t size;
|
142
|
+
* char* byte_array;
|
143
|
+
* };
|
144
|
+
*
|
145
|
+
* auto* inlined_array = MakeGarbageCollected<InlinedArray(
|
146
|
+
* GetAllocationHandle(), AdditionalBytes(4), 4);
|
147
|
+
* for (size_t i = 0; i < 4; i++) {
|
148
|
+
* Process(inlined_array->byte_array[i]);
|
149
|
+
* }
|
150
|
+
* \endcode
|
151
|
+
*/
|
152
|
+
struct AdditionalBytes {
|
153
|
+
constexpr explicit AdditionalBytes(size_t bytes) : value(bytes) {}
|
154
|
+
const size_t value;
|
155
|
+
};
|
156
|
+
|
115
157
|
/**
|
116
158
|
* Default trait class that specifies how to construct an object of type T.
|
117
159
|
* Advanced users may override how an object is constructed using the utilities
|
118
160
|
* that are provided through MakeGarbageCollectedTraitBase.
|
119
161
|
*
|
120
162
|
* Any trait overriding construction must
|
121
|
-
* - allocate through MakeGarbageCollectedTraitBase<T>::Allocate
|
163
|
+
* - allocate through `MakeGarbageCollectedTraitBase<T>::Allocate`;
|
122
164
|
* - mark the object as fully constructed using
|
123
|
-
* MakeGarbageCollectedTraitBase<T>::MarkObjectAsFullyConstructed
|
165
|
+
* `MakeGarbageCollectedTraitBase<T>::MarkObjectAsFullyConstructed`;
|
124
166
|
*/
|
125
167
|
template <typename T>
|
126
168
|
class MakeGarbageCollectedTrait : public MakeGarbageCollectedTraitBase<T> {
|
127
169
|
public:
|
128
170
|
template <typename... Args>
|
129
171
|
static T* Call(AllocationHandle& handle, Args&&... args) {
|
130
|
-
static_assert(internal::IsGarbageCollectedType<T>::value,
|
131
|
-
"T needs to be a garbage collected object");
|
132
|
-
static_assert(
|
133
|
-
!internal::IsGarbageCollectedMixinType<T>::value ||
|
134
|
-
sizeof(T) <= internal::api_constants::kLargeObjectSizeThreshold,
|
135
|
-
"GarbageCollectedMixin may not be a large object");
|
136
172
|
void* memory =
|
137
173
|
MakeGarbageCollectedTraitBase<T>::Allocate(handle, sizeof(T));
|
138
174
|
T* object = ::new (memory) T(std::forward<Args>(args)...);
|
139
175
|
MakeGarbageCollectedTraitBase<T>::MarkObjectAsFullyConstructed(object);
|
140
176
|
return object;
|
141
177
|
}
|
178
|
+
|
179
|
+
template <typename... Args>
|
180
|
+
static T* Call(AllocationHandle& handle, AdditionalBytes additional_bytes,
|
181
|
+
Args&&... args) {
|
182
|
+
void* memory = MakeGarbageCollectedTraitBase<T>::Allocate(
|
183
|
+
handle, sizeof(T) + additional_bytes.value);
|
184
|
+
T* object = ::new (memory) T(std::forward<Args>(args)...);
|
185
|
+
MakeGarbageCollectedTraitBase<T>::MarkObjectAsFullyConstructed(object);
|
186
|
+
return object;
|
187
|
+
}
|
142
188
|
};
|
143
189
|
|
144
190
|
/**
|
@@ -161,13 +207,33 @@ struct PostConstructionCallbackTrait {
|
|
161
207
|
* \returns an instance of type T.
|
162
208
|
*/
|
163
209
|
template <typename T, typename... Args>
|
164
|
-
T* MakeGarbageCollected(AllocationHandle& handle, Args&&... args) {
|
210
|
+
V8_INLINE T* MakeGarbageCollected(AllocationHandle& handle, Args&&... args) {
|
165
211
|
T* object =
|
166
212
|
MakeGarbageCollectedTrait<T>::Call(handle, std::forward<Args>(args)...);
|
167
213
|
PostConstructionCallbackTrait<T>::Call(object);
|
168
214
|
return object;
|
169
215
|
}
|
170
216
|
|
217
|
+
/**
|
218
|
+
* Constructs a managed object of type T where T transitively inherits from
|
219
|
+
* GarbageCollected. Created objects will have additional bytes appended to
|
220
|
+
* it. Allocated memory would suffice for `sizeof(T) + additional_bytes`.
|
221
|
+
*
|
222
|
+
* \param additional_bytes Denotes how many bytes to append to T.
|
223
|
+
* \param args List of arguments with which an instance of T will be
|
224
|
+
* constructed.
|
225
|
+
* \returns an instance of type T.
|
226
|
+
*/
|
227
|
+
template <typename T, typename... Args>
|
228
|
+
V8_INLINE T* MakeGarbageCollected(AllocationHandle& handle,
|
229
|
+
AdditionalBytes additional_bytes,
|
230
|
+
Args&&... args) {
|
231
|
+
T* object = MakeGarbageCollectedTrait<T>::Call(handle, additional_bytes,
|
232
|
+
std::forward<Args>(args)...);
|
233
|
+
PostConstructionCallbackTrait<T>::Call(object);
|
234
|
+
return object;
|
235
|
+
}
|
236
|
+
|
171
237
|
} // namespace cppgc
|
172
238
|
|
173
239
|
#endif // INCLUDE_CPPGC_ALLOCATION_H_
|
@@ -10,15 +10,18 @@
|
|
10
10
|
|
11
11
|
namespace cppgc {
|
12
12
|
|
13
|
-
|
13
|
+
/**
|
14
|
+
* Indicator for the stack state of the embedder.
|
15
|
+
*/
|
14
16
|
enum class EmbedderStackState {
|
17
|
+
/**
|
18
|
+
* Stack may contain interesting heap pointers.
|
19
|
+
*/
|
15
20
|
kMayContainHeapPointers,
|
21
|
+
/**
|
22
|
+
* Stack does not contain any interesting heap pointers.
|
23
|
+
*/
|
16
24
|
kNoHeapPointers,
|
17
|
-
kUnknown V8_ENUM_DEPRECATE_SOON("Use kMayContainHeapPointers") =
|
18
|
-
kMayContainHeapPointers,
|
19
|
-
kNonEmpty V8_ENUM_DEPRECATE_SOON("Use kMayContainHeapPointers") =
|
20
|
-
kMayContainHeapPointers,
|
21
|
-
kEmpty V8_ENUM_DEPRECATE_SOON("Use kNoHeapPointers") = kNoHeapPointers,
|
22
25
|
};
|
23
26
|
|
24
27
|
} // namespace cppgc
|