libv8-node 15.14.0.1-x86_64-darwin-19 → 16.10.0.0-x86_64-darwin-19

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 +1 -1
  4. data/lib/libv8/node/version.rb +3 -3
  5. data/vendor/v8/include/cppgc/allocation.h +104 -45
  6. data/vendor/v8/include/cppgc/common.h +9 -6
  7. data/vendor/v8/include/cppgc/cross-thread-persistent.h +384 -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 +236 -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 +2 -1
  19. data/vendor/v8/include/cppgc/internal/compiler-specific.h +2 -2
  20. data/vendor/v8/include/cppgc/internal/gc-info.h +44 -13
  21. data/vendor/v8/include/cppgc/internal/name-trait.h +111 -0
  22. data/vendor/v8/include/cppgc/internal/persistent-node.h +57 -1
  23. data/vendor/v8/include/cppgc/internal/pointer-policies.h +69 -28
  24. data/vendor/v8/include/cppgc/internal/prefinalizer-handler.h +1 -1
  25. data/vendor/v8/include/cppgc/internal/write-barrier.h +353 -35
  26. data/vendor/v8/include/cppgc/liveness-broker.h +7 -1
  27. data/vendor/v8/include/cppgc/macros.h +2 -0
  28. data/vendor/v8/include/cppgc/member.h +85 -25
  29. data/vendor/v8/include/cppgc/name-provider.h +65 -0
  30. data/vendor/v8/include/cppgc/object-size-trait.h +58 -0
  31. data/vendor/v8/include/cppgc/persistent.h +33 -9
  32. data/vendor/v8/include/cppgc/platform.h +48 -25
  33. data/vendor/v8/include/cppgc/prefinalizer.h +1 -1
  34. data/vendor/v8/include/cppgc/process-heap-statistics.h +36 -0
  35. data/vendor/v8/include/cppgc/sentinel-pointer.h +32 -0
  36. data/vendor/v8/include/cppgc/source-location.h +2 -1
  37. data/vendor/v8/include/cppgc/testing.h +99 -0
  38. data/vendor/v8/include/cppgc/trace-trait.h +8 -3
  39. data/vendor/v8/include/cppgc/type-traits.h +157 -19
  40. data/vendor/v8/include/cppgc/visitor.h +187 -23
  41. data/vendor/v8/include/libplatform/libplatform.h +11 -0
  42. data/vendor/v8/include/libplatform/v8-tracing.h +2 -0
  43. data/vendor/v8/include/v8-cppgc.h +258 -159
  44. data/vendor/v8/include/v8-fast-api-calls.h +562 -159
  45. data/vendor/v8/include/v8-inspector.h +23 -2
  46. data/vendor/v8/include/v8-internal.h +99 -27
  47. data/vendor/v8/include/v8-metrics.h +77 -8
  48. data/vendor/v8/include/v8-platform.h +47 -22
  49. data/vendor/v8/include/v8-profiler.h +75 -11
  50. data/vendor/v8/include/v8-unwinder-state.h +30 -0
  51. data/vendor/v8/include/v8-util.h +1 -1
  52. data/vendor/v8/include/v8-version.h +4 -4
  53. data/vendor/v8/include/v8.h +1192 -642
  54. data/vendor/v8/include/v8config.h +40 -9
  55. data/vendor/v8/{out.gn → x86_64-darwin-19}/libv8/obj/libv8_monolith.a +0 -0
  56. metadata +18 -6
  57. data/vendor/v8/include/cppgc/internal/process-heap.h +0 -34
@@ -6,6 +6,7 @@
6
6
  #define V8_V8_PROFILER_H_
7
7
 
8
8
  #include <limits.h>
9
+
9
10
  #include <memory>
10
11
  #include <unordered_set>
11
12
  #include <vector>
@@ -248,6 +249,26 @@ enum CpuProfilingLoggingMode {
248
249
  kEagerLogging,
249
250
  };
250
251
 
252
+ // Enum for returning profiling status. Once StartProfiling is called,
253
+ // we want to return to clients whether the profiling was able to start
254
+ // correctly, or return a descriptive error.
255
+ enum class CpuProfilingStatus {
256
+ kStarted,
257
+ kAlreadyStarted,
258
+ kErrorTooManyProfilers
259
+ };
260
+
261
+ /**
262
+ * Delegate for when max samples reached and samples are discarded.
263
+ */
264
+ class V8_EXPORT DiscardedSamplesDelegate {
265
+ public:
266
+ DiscardedSamplesDelegate() {}
267
+
268
+ virtual ~DiscardedSamplesDelegate() = default;
269
+ virtual void Notify() = 0;
270
+ };
271
+
251
272
  /**
252
273
  * Optional profiling attributes.
253
274
  */
@@ -268,6 +289,8 @@ class V8_EXPORT CpuProfilingOptions {
268
289
  * interval, set via SetSamplingInterval(). If
269
290
  * zero, the sampling interval will be equal to
270
291
  * the profiler's sampling interval.
292
+ * \param filter_context Deprecated option to filter by context, currently a
293
+ * no-op.
271
294
  */
272
295
  CpuProfilingOptions(
273
296
  CpuProfilingMode mode = kLeafNodeLineNumbers,
@@ -281,13 +304,9 @@ class V8_EXPORT CpuProfilingOptions {
281
304
  private:
282
305
  friend class internal::CpuProfile;
283
306
 
284
- bool has_filter_context() const { return !filter_context_.IsEmpty(); }
285
- void* raw_filter_context() const;
286
-
287
307
  CpuProfilingMode mode_;
288
308
  unsigned max_samples_;
289
309
  int sampling_interval_us_;
290
- CopyablePersistentTraits<Context>::CopyablePersistent filter_context_;
291
310
  };
292
311
 
293
312
  /**
@@ -338,7 +357,9 @@ class V8_EXPORT CpuProfiler {
338
357
  * profiles may be collected at once. Attempts to start collecting several
339
358
  * profiles with the same title are silently ignored.
340
359
  */
341
- void StartProfiling(Local<String> title, CpuProfilingOptions options);
360
+ CpuProfilingStatus StartProfiling(
361
+ Local<String> title, CpuProfilingOptions options,
362
+ std::unique_ptr<DiscardedSamplesDelegate> delegate = nullptr);
342
363
 
343
364
  /**
344
365
  * Starts profiling with the same semantics as above, except with expanded
@@ -351,7 +372,7 @@ class V8_EXPORT CpuProfiler {
351
372
  * recorded by the profiler. Samples obtained after this limit will be
352
373
  * discarded.
353
374
  */
354
- void StartProfiling(
375
+ CpuProfilingStatus StartProfiling(
355
376
  Local<String> title, CpuProfilingMode mode, bool record_samples = false,
356
377
  unsigned max_samples = CpuProfilingOptions::kNoSampleLimit);
357
378
  /**
@@ -359,7 +380,8 @@ class V8_EXPORT CpuProfiler {
359
380
  * kLeafNodeLineNumbers mode, which was the previous default behavior of the
360
381
  * profiler.
361
382
  */
362
- void StartProfiling(Local<String> title, bool record_samples = false);
383
+ CpuProfilingStatus StartProfiling(Local<String> title,
384
+ bool record_samples = false);
363
385
 
364
386
  /**
365
387
  * Stops collecting CPU profile with a given title and returns it.
@@ -470,7 +492,7 @@ class V8_EXPORT HeapGraphNode {
470
492
  /**
471
493
  * An interface for exporting data from V8, using "push" model.
472
494
  */
473
- class V8_EXPORT OutputStream { // NOLINT
495
+ class V8_EXPORT OutputStream {
474
496
  public:
475
497
  enum WriteResult {
476
498
  kContinue = 0,
@@ -497,7 +519,6 @@ class V8_EXPORT OutputStream { // NOLINT
497
519
  }
498
520
  };
499
521
 
500
-
501
522
  /**
502
523
  * HeapSnapshots record the state of the JS heap at some moment.
503
524
  */
@@ -564,7 +585,7 @@ class V8_EXPORT HeapSnapshot {
564
585
  * An interface for reporting progress and controlling long-running
565
586
  * activities.
566
587
  */
567
- class V8_EXPORT ActivityControl { // NOLINT
588
+ class V8_EXPORT ActivityControl {
568
589
  public:
569
590
  enum ControlOption {
570
591
  kContinue = 0,
@@ -578,7 +599,6 @@ class V8_EXPORT ActivityControl { // NOLINT
578
599
  virtual ControlOption ReportProgressValue(int done, int total) = 0;
579
600
  };
580
601
 
581
-
582
602
  /**
583
603
  * AllocationProfile is a sampled profile of allocations done by the program.
584
604
  * This is structured as a call-graph.
@@ -712,6 +732,19 @@ class V8_EXPORT EmbedderGraph {
712
732
  public:
713
733
  class Node {
714
734
  public:
735
+ /**
736
+ * Detachedness specifies whether an object is attached or detached from the
737
+ * main application state. While unkown in general, there may be objects
738
+ * that specifically know their state. V8 passes this information along in
739
+ * the snapshot. Users of the snapshot may use it to annotate the object
740
+ * graph.
741
+ */
742
+ enum class Detachedness : uint8_t {
743
+ kUnknown = 0,
744
+ kAttached = 1,
745
+ kDetached = 2,
746
+ };
747
+
715
748
  Node() = default;
716
749
  virtual ~Node() = default;
717
750
  virtual const char* Name() = 0;
@@ -736,6 +769,14 @@ class V8_EXPORT EmbedderGraph {
736
769
  */
737
770
  virtual NativeObject GetNativeObject() { return nullptr; }
738
771
 
772
+ /**
773
+ * Detachedness state of a given object. While unkown in general, there may
774
+ * be objects that specifically know their state. V8 passes this information
775
+ * along in the snapshot. Users of the snapshot may use it to annotate the
776
+ * object graph.
777
+ */
778
+ virtual Detachedness GetDetachedness() { return Detachedness::kUnknown; }
779
+
739
780
  Node(const Node&) = delete;
740
781
  Node& operator=(const Node&) = delete;
741
782
  };
@@ -786,6 +827,18 @@ class V8_EXPORT HeapProfiler {
786
827
  v8::EmbedderGraph* graph,
787
828
  void* data);
788
829
 
830
+ /**
831
+ * Callback function invoked during heap snapshot generation to retrieve
832
+ * the detachedness state of an object referenced by a TracedReference.
833
+ *
834
+ * The callback takes Local<Value> as parameter to allow the embedder to
835
+ * unpack the TracedReference into a Local and reuse that Local for different
836
+ * purposes.
837
+ */
838
+ using GetDetachednessCallback = EmbedderGraph::Node::Detachedness (*)(
839
+ v8::Isolate* isolate, const v8::Local<v8::Value>& v8_value,
840
+ uint16_t class_id, void* data);
841
+
789
842
  /** Returns the number of snapshots taken. */
790
843
  int GetSnapshotCount();
791
844
 
@@ -847,6 +900,15 @@ class V8_EXPORT HeapProfiler {
847
900
  ObjectNameResolver* global_object_name_resolver = nullptr,
848
901
  bool treat_global_objects_as_roots = true);
849
902
 
903
+ /**
904
+ * Takes a heap snapshot and returns it.
905
+ */
906
+ const HeapSnapshot* TakeHeapSnapshotV8_92(
907
+ ActivityControl* control = nullptr,
908
+ ObjectNameResolver* global_object_name_resolver = nullptr,
909
+ bool treat_global_objects_as_roots = true,
910
+ bool capture_numeric_value = false);
911
+
850
912
  /**
851
913
  * Starts tracking of heap objects population statistics. After calling
852
914
  * this method, all heap objects relocations done by the garbage collector
@@ -936,6 +998,8 @@ class V8_EXPORT HeapProfiler {
936
998
  void RemoveBuildEmbedderGraphCallback(BuildEmbedderGraphCallback callback,
937
999
  void* data);
938
1000
 
1001
+ void SetGetDetachednessCallback(GetDetachednessCallback callback, void* data);
1002
+
939
1003
  /**
940
1004
  * Default value of persistent handle class ID. Must not be used to
941
1005
  * define a class. Can be used to reset a class of a persistent
@@ -0,0 +1,30 @@
1
+ // Copyright 2020 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_UNWINDER_STATE_H_
6
+ #define INCLUDE_V8_UNWINDER_STATE_H_
7
+
8
+ namespace v8 {
9
+
10
+ #ifdef V8_TARGET_ARCH_ARM
11
+ struct CalleeSavedRegisters {
12
+ void* arm_r4;
13
+ void* arm_r5;
14
+ void* arm_r6;
15
+ void* arm_r7;
16
+ void* arm_r8;
17
+ void* arm_r9;
18
+ void* arm_r10;
19
+ };
20
+ #elif V8_TARGET_ARCH_X64 || V8_TARGET_ARCH_IA32 || V8_TARGET_ARCH_ARM64 || \
21
+ V8_TARGET_ARCH_MIPS || V8_TARGET_ARCH_MIPS64 || V8_TARGET_ARCH_PPC || \
22
+ V8_TARGET_ARCH_PPC64 || V8_TARGET_ARCH_RISCV64 || V8_TARGET_ARCH_S390
23
+ struct CalleeSavedRegisters {};
24
+ #else
25
+ #error Target architecture was not detected as supported by v8
26
+ #endif
27
+
28
+ } // namespace v8
29
+
30
+ #endif // INCLUDE_V8_UNWINDER _STATE_H_
@@ -43,7 +43,7 @@ class StdMapTraits {
43
43
 
44
44
  static bool Empty(Impl* impl) { return impl->empty(); }
45
45
  static size_t Size(Impl* impl) { return impl->size(); }
46
- static void Swap(Impl& a, Impl& b) { std::swap(a, b); } // NOLINT
46
+ static void Swap(Impl& a, Impl& b) { std::swap(a, b); }
47
47
  static Iterator Begin(Impl* impl) { return impl->begin(); }
48
48
  static Iterator End(Impl* impl) { return impl->end(); }
49
49
  static K Key(Iterator it) { return it->first; }
@@ -8,10 +8,10 @@
8
8
  // These macros define the version number for the current version.
9
9
  // NOTE these macros are used by some of the tool scripts and the build
10
10
  // system so their names cannot be changed without changing the scripts.
11
- #define V8_MAJOR_VERSION 8
12
- #define V8_MINOR_VERSION 6
13
- #define V8_BUILD_NUMBER 395
14
- #define V8_PATCH_LEVEL 17
11
+ #define V8_MAJOR_VERSION 9
12
+ #define V8_MINOR_VERSION 3
13
+ #define V8_BUILD_NUMBER 345
14
+ #define V8_PATCH_LEVEL 19
15
15
 
16
16
  // Use 1 for candidates and 0 otherwise.
17
17
  // (Boolean macro values are not supported by all preprocessors.)