libv8-node 15.12.0.0.beta1-aarch64-linux-musl → 17.9.1.0-aarch64-linux-musl
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-musl}/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 +65 -11
- data/vendor/v8/include/cppgc/internal/process-heap.h +0 -34
@@ -175,9 +175,14 @@ class JobDelegate {
|
|
175
175
|
* Returns a task_id unique among threads currently running this job, such
|
176
176
|
* that GetTaskId() < worker count. To achieve this, the same task_id may be
|
177
177
|
* reused by a different thread after a worker_task returns.
|
178
|
-
* TODO(etiennep): Make pure virtual once custom embedders implement it.
|
179
178
|
*/
|
180
|
-
virtual uint8_t GetTaskId()
|
179
|
+
virtual uint8_t GetTaskId() = 0;
|
180
|
+
|
181
|
+
/**
|
182
|
+
* Returns true if the current task is called from the thread currently
|
183
|
+
* running JobHandle::Join().
|
184
|
+
*/
|
185
|
+
virtual bool IsJoiningThread() const = 0;
|
181
186
|
};
|
182
187
|
|
183
188
|
/**
|
@@ -210,17 +215,34 @@ class JobHandle {
|
|
210
215
|
*/
|
211
216
|
virtual void Cancel() = 0;
|
212
217
|
|
218
|
+
/*
|
219
|
+
* Forces all existing workers to yield ASAP but doesn’t wait for them.
|
220
|
+
* Warning, this is dangerous if the Job's callback is bound to or has access
|
221
|
+
* to state which may be deleted after this call.
|
222
|
+
*/
|
223
|
+
virtual void CancelAndDetach() = 0;
|
224
|
+
|
213
225
|
/**
|
214
|
-
* Returns true if there's
|
215
|
-
* TODO(etiennep): Make pure virtual once custom embedders implement it.
|
226
|
+
* Returns true if there's any work pending or any worker running.
|
216
227
|
*/
|
217
|
-
virtual bool
|
228
|
+
virtual bool IsActive() = 0;
|
218
229
|
|
219
230
|
/**
|
220
231
|
* Returns true if associated with a Job and other methods may be called.
|
221
|
-
* Returns false after Join() or Cancel() was called.
|
232
|
+
* Returns false after Join() or Cancel() was called. This may return true
|
233
|
+
* even if no workers are running and IsCompleted() returns true
|
234
|
+
*/
|
235
|
+
virtual bool IsValid() = 0;
|
236
|
+
|
237
|
+
/**
|
238
|
+
* Returns true if job priority can be changed.
|
222
239
|
*/
|
223
|
-
virtual bool
|
240
|
+
virtual bool UpdatePriorityEnabled() const { return false; }
|
241
|
+
|
242
|
+
/**
|
243
|
+
* Update this Job's priority.
|
244
|
+
*/
|
245
|
+
virtual void UpdatePriority(TaskPriority new_priority) {}
|
224
246
|
};
|
225
247
|
|
226
248
|
/**
|
@@ -233,23 +255,13 @@ class JobTask {
|
|
233
255
|
virtual void Run(JobDelegate* delegate) = 0;
|
234
256
|
|
235
257
|
/**
|
236
|
-
* Controls the maximum number of threads calling Run() concurrently
|
237
|
-
*
|
238
|
-
*
|
239
|
-
*
|
258
|
+
* Controls the maximum number of threads calling Run() concurrently, given
|
259
|
+
* the number of threads currently assigned to this job and executing Run().
|
260
|
+
* Run() is only invoked if the number of threads previously running Run() was
|
261
|
+
* less than the value returned. Since GetMaxConcurrency() is a leaf function,
|
262
|
+
* it must not call back any JobHandle methods.
|
240
263
|
*/
|
241
|
-
virtual size_t GetMaxConcurrency() const = 0;
|
242
|
-
|
243
|
-
/*
|
244
|
-
* Meant to replace the version above, given the number of threads currently
|
245
|
-
* assigned to this job and executing Run(). This is useful when the result
|
246
|
-
* must include local work items not visible globaly by other workers.
|
247
|
-
* TODO(etiennep): Replace the version above by this once custom embedders are
|
248
|
-
* migrated.
|
249
|
-
*/
|
250
|
-
size_t GetMaxConcurrency(size_t worker_count) const {
|
251
|
-
return GetMaxConcurrency();
|
252
|
-
}
|
264
|
+
virtual size_t GetMaxConcurrency(size_t worker_count) const = 0;
|
253
265
|
};
|
254
266
|
|
255
267
|
/**
|
@@ -382,7 +394,6 @@ class PageAllocator {
|
|
382
394
|
kNoAccess,
|
383
395
|
kRead,
|
384
396
|
kReadWrite,
|
385
|
-
// TODO(hpayer): Remove this flag. Memory should never be rwx.
|
386
397
|
kReadWriteExecute,
|
387
398
|
kReadExecute,
|
388
399
|
// Set this when reserving memory that will later require kReadWriteExecute
|
@@ -419,10 +430,28 @@ class PageAllocator {
|
|
419
430
|
/**
|
420
431
|
* Frees memory in the given [address, address + size) range. address and size
|
421
432
|
* should be operating system page-aligned. The next write to this
|
422
|
-
* memory area brings the memory transparently back.
|
433
|
+
* memory area brings the memory transparently back. This should be treated as
|
434
|
+
* a hint to the OS that the pages are no longer needed. It does not guarantee
|
435
|
+
* that the pages will be discarded immediately or at all.
|
423
436
|
*/
|
424
437
|
virtual bool DiscardSystemPages(void* address, size_t size) { return true; }
|
425
438
|
|
439
|
+
/**
|
440
|
+
* Decommits any wired memory pages in the given range, allowing the OS to
|
441
|
+
* reclaim them, and marks the region as inacessible (kNoAccess). The address
|
442
|
+
* range stays reserved and can be accessed again later by changing its
|
443
|
+
* permissions. However, in that case the memory content is guaranteed to be
|
444
|
+
* zero-initialized again. The memory must have been previously allocated by a
|
445
|
+
* call to AllocatePages. Returns true on success, false otherwise.
|
446
|
+
*/
|
447
|
+
#ifdef V8_VIRTUAL_MEMORY_CAGE
|
448
|
+
// Implementing this API is required when the virtual memory cage is enabled.
|
449
|
+
virtual bool DecommitPages(void* address, size_t size) = 0;
|
450
|
+
#else
|
451
|
+
// Otherwise, it is optional for now.
|
452
|
+
virtual bool DecommitPages(void* address, size_t size) { return false; }
|
453
|
+
#endif
|
454
|
+
|
426
455
|
/**
|
427
456
|
* INTERNAL ONLY: This interface has not been stabilised and may change
|
428
457
|
* without notice from one release to another without being deprecated first.
|
@@ -487,6 +516,18 @@ class PageAllocator {
|
|
487
516
|
virtual bool CanAllocateSharedPages() { return false; }
|
488
517
|
};
|
489
518
|
|
519
|
+
/**
|
520
|
+
* V8 Allocator used for allocating zone backings.
|
521
|
+
*/
|
522
|
+
class ZoneBackingAllocator {
|
523
|
+
public:
|
524
|
+
using MallocFn = void* (*)(size_t);
|
525
|
+
using FreeFn = void (*)(void*);
|
526
|
+
|
527
|
+
virtual MallocFn GetMallocFn() const { return ::malloc; }
|
528
|
+
virtual FreeFn GetFreeFn() const { return ::free; }
|
529
|
+
};
|
530
|
+
|
490
531
|
/**
|
491
532
|
* V8 Platform abstraction layer.
|
492
533
|
*
|
@@ -505,6 +546,14 @@ class Platform {
|
|
505
546
|
return nullptr;
|
506
547
|
}
|
507
548
|
|
549
|
+
/**
|
550
|
+
* Allows the embedder to specify a custom allocator used for zones.
|
551
|
+
*/
|
552
|
+
virtual ZoneBackingAllocator* GetZoneBackingAllocator() {
|
553
|
+
static ZoneBackingAllocator default_allocator;
|
554
|
+
return &default_allocator;
|
555
|
+
}
|
556
|
+
|
508
557
|
/**
|
509
558
|
* Enables the embedder to respond in cases where V8 can't allocate large
|
510
559
|
* blocks of memory. V8 retries the failed allocation once after calling this
|
@@ -0,0 +1,118 @@
|
|
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_V8_PRIMITIVE_OBJECT_H_
|
6
|
+
#define INCLUDE_V8_PRIMITIVE_OBJECT_H_
|
7
|
+
|
8
|
+
#include "v8-local-handle.h" // NOLINT(build/include_directory)
|
9
|
+
#include "v8-object.h" // NOLINT(build/include_directory)
|
10
|
+
#include "v8config.h" // NOLINT(build/include_directory)
|
11
|
+
|
12
|
+
namespace v8 {
|
13
|
+
|
14
|
+
class Isolate;
|
15
|
+
|
16
|
+
/**
|
17
|
+
* A Number object (ECMA-262, 4.3.21).
|
18
|
+
*/
|
19
|
+
class V8_EXPORT NumberObject : public Object {
|
20
|
+
public:
|
21
|
+
static Local<Value> New(Isolate* isolate, double value);
|
22
|
+
|
23
|
+
double ValueOf() const;
|
24
|
+
|
25
|
+
V8_INLINE static NumberObject* Cast(Value* value) {
|
26
|
+
#ifdef V8_ENABLE_CHECKS
|
27
|
+
CheckCast(value);
|
28
|
+
#endif
|
29
|
+
return static_cast<NumberObject*>(value);
|
30
|
+
}
|
31
|
+
|
32
|
+
private:
|
33
|
+
static void CheckCast(Value* obj);
|
34
|
+
};
|
35
|
+
|
36
|
+
/**
|
37
|
+
* A BigInt object (https://tc39.github.io/proposal-bigint)
|
38
|
+
*/
|
39
|
+
class V8_EXPORT BigIntObject : public Object {
|
40
|
+
public:
|
41
|
+
static Local<Value> New(Isolate* isolate, int64_t value);
|
42
|
+
|
43
|
+
Local<BigInt> ValueOf() const;
|
44
|
+
|
45
|
+
V8_INLINE static BigIntObject* Cast(Value* value) {
|
46
|
+
#ifdef V8_ENABLE_CHECKS
|
47
|
+
CheckCast(value);
|
48
|
+
#endif
|
49
|
+
return static_cast<BigIntObject*>(value);
|
50
|
+
}
|
51
|
+
|
52
|
+
private:
|
53
|
+
static void CheckCast(Value* obj);
|
54
|
+
};
|
55
|
+
|
56
|
+
/**
|
57
|
+
* A Boolean object (ECMA-262, 4.3.15).
|
58
|
+
*/
|
59
|
+
class V8_EXPORT BooleanObject : public Object {
|
60
|
+
public:
|
61
|
+
static Local<Value> New(Isolate* isolate, bool value);
|
62
|
+
|
63
|
+
bool ValueOf() const;
|
64
|
+
|
65
|
+
V8_INLINE static BooleanObject* Cast(Value* value) {
|
66
|
+
#ifdef V8_ENABLE_CHECKS
|
67
|
+
CheckCast(value);
|
68
|
+
#endif
|
69
|
+
return static_cast<BooleanObject*>(value);
|
70
|
+
}
|
71
|
+
|
72
|
+
private:
|
73
|
+
static void CheckCast(Value* obj);
|
74
|
+
};
|
75
|
+
|
76
|
+
/**
|
77
|
+
* A String object (ECMA-262, 4.3.18).
|
78
|
+
*/
|
79
|
+
class V8_EXPORT StringObject : public Object {
|
80
|
+
public:
|
81
|
+
static Local<Value> New(Isolate* isolate, Local<String> value);
|
82
|
+
|
83
|
+
Local<String> ValueOf() const;
|
84
|
+
|
85
|
+
V8_INLINE static StringObject* Cast(Value* value) {
|
86
|
+
#ifdef V8_ENABLE_CHECKS
|
87
|
+
CheckCast(value);
|
88
|
+
#endif
|
89
|
+
return static_cast<StringObject*>(value);
|
90
|
+
}
|
91
|
+
|
92
|
+
private:
|
93
|
+
static void CheckCast(Value* obj);
|
94
|
+
};
|
95
|
+
|
96
|
+
/**
|
97
|
+
* A Symbol object (ECMA-262 edition 6).
|
98
|
+
*/
|
99
|
+
class V8_EXPORT SymbolObject : public Object {
|
100
|
+
public:
|
101
|
+
static Local<Value> New(Isolate* isolate, Local<Symbol> value);
|
102
|
+
|
103
|
+
Local<Symbol> ValueOf() const;
|
104
|
+
|
105
|
+
V8_INLINE static SymbolObject* Cast(Value* value) {
|
106
|
+
#ifdef V8_ENABLE_CHECKS
|
107
|
+
CheckCast(value);
|
108
|
+
#endif
|
109
|
+
return static_cast<SymbolObject*>(value);
|
110
|
+
}
|
111
|
+
|
112
|
+
private:
|
113
|
+
static void CheckCast(Value* obj);
|
114
|
+
};
|
115
|
+
|
116
|
+
} // namespace v8
|
117
|
+
|
118
|
+
#endif // INCLUDE_V8_PRIMITIVE_OBJECT_H_
|