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.
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/{out.gn → aarch64-linux-musl}/libv8/obj/libv8_monolith.a +0 -0
  6. data/vendor/v8/include/cppgc/allocation.h +110 -44
  7. data/vendor/v8/include/cppgc/common.h +9 -6
  8. data/vendor/v8/include/cppgc/cross-thread-persistent.h +465 -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 +4 -3
  20. data/vendor/v8/include/cppgc/internal/compiler-specific.h +2 -2
  21. data/vendor/v8/include/cppgc/internal/finalizer-trait.h +2 -0
  22. data/vendor/v8/include/cppgc/internal/gc-info.h +124 -13
  23. data/vendor/v8/include/cppgc/internal/name-trait.h +122 -0
  24. data/vendor/v8/include/cppgc/internal/persistent-node.h +94 -6
  25. data/vendor/v8/include/cppgc/internal/pointer-policies.h +81 -29
  26. data/vendor/v8/include/cppgc/internal/prefinalizer-handler.h +1 -1
  27. data/vendor/v8/include/cppgc/internal/write-barrier.h +398 -35
  28. data/vendor/v8/include/cppgc/liveness-broker.h +11 -2
  29. data/vendor/v8/include/cppgc/macros.h +2 -0
  30. data/vendor/v8/include/cppgc/member.h +87 -25
  31. data/vendor/v8/include/cppgc/name-provider.h +65 -0
  32. data/vendor/v8/include/cppgc/object-size-trait.h +58 -0
  33. data/vendor/v8/include/cppgc/persistent.h +41 -11
  34. data/vendor/v8/include/cppgc/platform.h +49 -25
  35. data/vendor/v8/include/cppgc/prefinalizer.h +2 -2
  36. data/vendor/v8/include/cppgc/process-heap-statistics.h +36 -0
  37. data/vendor/v8/include/cppgc/sentinel-pointer.h +32 -0
  38. data/vendor/v8/include/cppgc/source-location.h +2 -1
  39. data/vendor/v8/include/cppgc/testing.h +99 -0
  40. data/vendor/v8/include/cppgc/trace-trait.h +8 -3
  41. data/vendor/v8/include/cppgc/type-traits.h +157 -19
  42. data/vendor/v8/include/cppgc/visitor.h +194 -28
  43. data/vendor/v8/include/libplatform/libplatform.h +11 -0
  44. data/vendor/v8/include/libplatform/v8-tracing.h +2 -0
  45. data/vendor/v8/include/v8-array-buffer.h +433 -0
  46. data/vendor/v8/include/v8-callbacks.h +377 -0
  47. data/vendor/v8/include/v8-container.h +129 -0
  48. data/vendor/v8/include/v8-context.h +418 -0
  49. data/vendor/v8/include/v8-cppgc.h +261 -159
  50. data/vendor/v8/include/v8-data.h +65 -0
  51. data/vendor/v8/include/v8-date.h +43 -0
  52. data/vendor/v8/include/v8-debug.h +151 -0
  53. data/vendor/v8/include/v8-embedder-heap.h +238 -0
  54. data/vendor/v8/include/v8-exception.h +224 -0
  55. data/vendor/v8/include/v8-extension.h +62 -0
  56. data/vendor/v8/include/v8-external.h +37 -0
  57. data/vendor/v8/include/v8-fast-api-calls.h +652 -152
  58. data/vendor/v8/include/v8-forward.h +81 -0
  59. data/vendor/v8/include/v8-function-callback.h +475 -0
  60. data/vendor/v8/include/v8-function.h +122 -0
  61. data/vendor/v8/include/v8-initialization.h +282 -0
  62. data/vendor/v8/include/v8-inspector.h +33 -25
  63. data/vendor/v8/include/v8-internal.h +178 -31
  64. data/vendor/v8/include/v8-isolate.h +1662 -0
  65. data/vendor/v8/include/v8-json.h +47 -0
  66. data/vendor/v8/include/v8-local-handle.h +459 -0
  67. data/vendor/v8/include/v8-locker.h +148 -0
  68. data/vendor/v8/include/v8-maybe.h +137 -0
  69. data/vendor/v8/include/v8-memory-span.h +43 -0
  70. data/vendor/v8/include/v8-message.h +241 -0
  71. data/vendor/v8/include/v8-metrics.h +114 -9
  72. data/vendor/v8/include/v8-microtask-queue.h +152 -0
  73. data/vendor/v8/include/v8-microtask.h +28 -0
  74. data/vendor/v8/include/v8-object.h +770 -0
  75. data/vendor/v8/include/v8-persistent-handle.h +590 -0
  76. data/vendor/v8/include/v8-platform.h +74 -25
  77. data/vendor/v8/include/v8-primitive-object.h +118 -0
  78. data/vendor/v8/include/v8-primitive.h +858 -0
  79. data/vendor/v8/include/v8-profiler.h +72 -9
  80. data/vendor/v8/include/v8-promise.h +174 -0
  81. data/vendor/v8/include/v8-proxy.h +50 -0
  82. data/vendor/v8/include/v8-regexp.h +105 -0
  83. data/vendor/v8/include/v8-script.h +771 -0
  84. data/vendor/v8/include/v8-snapshot.h +198 -0
  85. data/vendor/v8/include/v8-statistics.h +215 -0
  86. data/vendor/v8/include/v8-template.h +1052 -0
  87. data/vendor/v8/include/v8-traced-handle.h +605 -0
  88. data/vendor/v8/include/v8-typed-array.h +282 -0
  89. data/vendor/v8/include/v8-unwinder-state.h +31 -0
  90. data/vendor/v8/include/v8-unwinder.h +129 -0
  91. data/vendor/v8/include/v8-util.h +8 -2
  92. data/vendor/v8/include/v8-value-serializer.h +249 -0
  93. data/vendor/v8/include/v8-value.h +526 -0
  94. data/vendor/v8/include/v8-version.h +3 -3
  95. data/vendor/v8/include/v8-wasm.h +245 -0
  96. data/vendor/v8/include/v8-weak-callback-info.h +73 -0
  97. data/vendor/v8/include/v8.h +41 -12050
  98. data/vendor/v8/include/v8config.h +87 -11
  99. metadata +65 -11
  100. data/vendor/v8/include/cppgc/internal/process-heap.h +0 -34
@@ -0,0 +1,152 @@
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_MICROTASKS_QUEUE_H_
6
+ #define INCLUDE_V8_MICROTASKS_QUEUE_H_
7
+
8
+ #include <stddef.h>
9
+
10
+ #include <memory>
11
+
12
+ #include "v8-local-handle.h" // NOLINT(build/include_directory)
13
+ #include "v8-microtask.h" // NOLINT(build/include_directory)
14
+ #include "v8config.h" // NOLINT(build/include_directory)
15
+
16
+ namespace v8 {
17
+
18
+ class Function;
19
+
20
+ namespace internal {
21
+ class Isolate;
22
+ class MicrotaskQueue;
23
+ } // namespace internal
24
+
25
+ /**
26
+ * Represents the microtask queue, where microtasks are stored and processed.
27
+ * https://html.spec.whatwg.org/multipage/webappapis.html#microtask-queue
28
+ * https://html.spec.whatwg.org/multipage/webappapis.html#enqueuejob(queuename,-job,-arguments)
29
+ * https://html.spec.whatwg.org/multipage/webappapis.html#perform-a-microtask-checkpoint
30
+ *
31
+ * A MicrotaskQueue instance may be associated to multiple Contexts by passing
32
+ * it to Context::New(), and they can be detached by Context::DetachGlobal().
33
+ * The embedder must keep the MicrotaskQueue instance alive until all associated
34
+ * Contexts are gone or detached.
35
+ *
36
+ * Use the same instance of MicrotaskQueue for all Contexts that may access each
37
+ * other synchronously. E.g. for Web embedding, use the same instance for all
38
+ * origins that share the same URL scheme and eTLD+1.
39
+ */
40
+ class V8_EXPORT MicrotaskQueue {
41
+ public:
42
+ /**
43
+ * Creates an empty MicrotaskQueue instance.
44
+ */
45
+ static std::unique_ptr<MicrotaskQueue> New(
46
+ Isolate* isolate, MicrotasksPolicy policy = MicrotasksPolicy::kAuto);
47
+
48
+ virtual ~MicrotaskQueue() = default;
49
+
50
+ /**
51
+ * Enqueues the callback to the queue.
52
+ */
53
+ virtual void EnqueueMicrotask(Isolate* isolate,
54
+ Local<Function> microtask) = 0;
55
+
56
+ /**
57
+ * Enqueues the callback to the queue.
58
+ */
59
+ virtual void EnqueueMicrotask(v8::Isolate* isolate,
60
+ MicrotaskCallback callback,
61
+ void* data = nullptr) = 0;
62
+
63
+ /**
64
+ * Adds a callback to notify the embedder after microtasks were run. The
65
+ * callback is triggered by explicit RunMicrotasks call or automatic
66
+ * microtasks execution (see Isolate::SetMicrotasksPolicy).
67
+ *
68
+ * Callback will trigger even if microtasks were attempted to run,
69
+ * but the microtasks queue was empty and no single microtask was actually
70
+ * executed.
71
+ *
72
+ * Executing scripts inside the callback will not re-trigger microtasks and
73
+ * the callback.
74
+ */
75
+ virtual void AddMicrotasksCompletedCallback(
76
+ MicrotasksCompletedCallbackWithData callback, void* data = nullptr) = 0;
77
+
78
+ /**
79
+ * Removes callback that was installed by AddMicrotasksCompletedCallback.
80
+ */
81
+ virtual void RemoveMicrotasksCompletedCallback(
82
+ MicrotasksCompletedCallbackWithData callback, void* data = nullptr) = 0;
83
+
84
+ /**
85
+ * Runs microtasks if no microtask is running on this MicrotaskQueue instance.
86
+ */
87
+ virtual void PerformCheckpoint(Isolate* isolate) = 0;
88
+
89
+ /**
90
+ * Returns true if a microtask is running on this MicrotaskQueue instance.
91
+ */
92
+ virtual bool IsRunningMicrotasks() const = 0;
93
+
94
+ /**
95
+ * Returns the current depth of nested MicrotasksScope that has
96
+ * kRunMicrotasks.
97
+ */
98
+ virtual int GetMicrotasksScopeDepth() const = 0;
99
+
100
+ MicrotaskQueue(const MicrotaskQueue&) = delete;
101
+ MicrotaskQueue& operator=(const MicrotaskQueue&) = delete;
102
+
103
+ private:
104
+ friend class internal::MicrotaskQueue;
105
+ MicrotaskQueue() = default;
106
+ };
107
+
108
+ /**
109
+ * This scope is used to control microtasks when MicrotasksPolicy::kScoped
110
+ * is used on Isolate. In this mode every non-primitive call to V8 should be
111
+ * done inside some MicrotasksScope.
112
+ * Microtasks are executed when topmost MicrotasksScope marked as kRunMicrotasks
113
+ * exits.
114
+ * kDoNotRunMicrotasks should be used to annotate calls not intended to trigger
115
+ * microtasks.
116
+ */
117
+ class V8_EXPORT V8_NODISCARD MicrotasksScope {
118
+ public:
119
+ enum Type { kRunMicrotasks, kDoNotRunMicrotasks };
120
+
121
+ MicrotasksScope(Isolate* isolate, Type type);
122
+ MicrotasksScope(Isolate* isolate, MicrotaskQueue* microtask_queue, Type type);
123
+ ~MicrotasksScope();
124
+
125
+ /**
126
+ * Runs microtasks if no kRunMicrotasks scope is currently active.
127
+ */
128
+ static void PerformCheckpoint(Isolate* isolate);
129
+
130
+ /**
131
+ * Returns current depth of nested kRunMicrotasks scopes.
132
+ */
133
+ static int GetCurrentDepth(Isolate* isolate);
134
+
135
+ /**
136
+ * Returns true while microtasks are being executed.
137
+ */
138
+ static bool IsRunningMicrotasks(Isolate* isolate);
139
+
140
+ // Prevent copying.
141
+ MicrotasksScope(const MicrotasksScope&) = delete;
142
+ MicrotasksScope& operator=(const MicrotasksScope&) = delete;
143
+
144
+ private:
145
+ internal::Isolate* const isolate_;
146
+ internal::MicrotaskQueue* const microtask_queue_;
147
+ bool run_;
148
+ };
149
+
150
+ } // namespace v8
151
+
152
+ #endif // INCLUDE_V8_MICROTASKS_QUEUE_H_
@@ -0,0 +1,28 @@
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_MICROTASK_H_
6
+ #define INCLUDE_V8_MICROTASK_H_
7
+
8
+ namespace v8 {
9
+
10
+ class Isolate;
11
+
12
+ // --- Microtasks Callbacks ---
13
+ using MicrotasksCompletedCallbackWithData = void (*)(Isolate*, void*);
14
+ using MicrotaskCallback = void (*)(void* data);
15
+
16
+ /**
17
+ * Policy for running microtasks:
18
+ * - explicit: microtasks are invoked with the
19
+ * Isolate::PerformMicrotaskCheckpoint() method;
20
+ * - scoped: microtasks invocation is controlled by MicrotasksScope objects;
21
+ * - auto: microtasks are invoked when the script call depth decrements
22
+ * to zero.
23
+ */
24
+ enum class MicrotasksPolicy { kExplicit, kScoped, kAuto };
25
+
26
+ } // namespace v8
27
+
28
+ #endif // INCLUDE_V8_MICROTASK_H_