libv8-node 22.7.0.4-arm64-darwin → 24.1.0.0-arm64-darwin

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (80) hide show
  1. checksums.yaml +4 -4
  2. data/lib/libv8/node/version.rb +3 -3
  3. data/vendor/v8/arm64-darwin/libv8/obj/libv8_monolith.a +0 -0
  4. data/vendor/v8/include/cppgc/allocation.h +11 -13
  5. data/vendor/v8/include/cppgc/default-platform.h +3 -2
  6. data/vendor/v8/include/cppgc/garbage-collected.h +8 -0
  7. data/vendor/v8/include/cppgc/heap-consistency.h +1 -1
  8. data/vendor/v8/include/cppgc/heap-statistics.h +2 -0
  9. data/vendor/v8/include/cppgc/internal/api-constants.h +2 -14
  10. data/vendor/v8/include/cppgc/internal/base-page-handle.h +2 -4
  11. data/vendor/v8/include/cppgc/internal/caged-heap-local-data.h +0 -4
  12. data/vendor/v8/include/cppgc/internal/caged-heap.h +0 -4
  13. data/vendor/v8/include/cppgc/internal/compiler-specific.h +9 -1
  14. data/vendor/v8/include/cppgc/internal/conditional-stack-allocated.h +41 -0
  15. data/vendor/v8/include/cppgc/internal/gc-info.h +12 -10
  16. data/vendor/v8/include/cppgc/internal/logging.h +3 -3
  17. data/vendor/v8/include/cppgc/internal/member-storage.h +69 -20
  18. data/vendor/v8/include/cppgc/internal/name-trait.h +5 -1
  19. data/vendor/v8/include/cppgc/internal/persistent-node.h +8 -3
  20. data/vendor/v8/include/cppgc/internal/pointer-policies.h +48 -11
  21. data/vendor/v8/include/cppgc/macros.h +21 -0
  22. data/vendor/v8/include/cppgc/member.h +70 -36
  23. data/vendor/v8/include/cppgc/name-provider.h +10 -0
  24. data/vendor/v8/include/cppgc/platform.h +11 -0
  25. data/vendor/v8/include/cppgc/type-traits.h +1 -0
  26. data/vendor/v8/include/cppgc/visitor.h +25 -1
  27. data/vendor/v8/include/libplatform/libplatform-export.h +2 -2
  28. data/vendor/v8/include/libplatform/v8-tracing.h +0 -1
  29. data/vendor/v8/include/v8-array-buffer.h +143 -46
  30. data/vendor/v8/include/v8-callbacks.h +94 -31
  31. data/vendor/v8/include/v8-context.h +48 -15
  32. data/vendor/v8/include/v8-cppgc.h +5 -56
  33. data/vendor/v8/include/v8-data.h +5 -0
  34. data/vendor/v8/include/v8-date.h +9 -0
  35. data/vendor/v8/include/v8-debug.h +11 -0
  36. data/vendor/v8/include/v8-embedder-heap.h +1 -29
  37. data/vendor/v8/include/v8-exception.h +72 -0
  38. data/vendor/v8/include/v8-external-memory-accounter.h +60 -0
  39. data/vendor/v8/include/v8-fast-api-calls.h +41 -206
  40. data/vendor/v8/include/v8-function-callback.h +190 -78
  41. data/vendor/v8/include/v8-function.h +11 -3
  42. data/vendor/v8/include/v8-handle-base.h +20 -2
  43. data/vendor/v8/include/v8-initialization.h +26 -1
  44. data/vendor/v8/include/v8-inspector.h +10 -3
  45. data/vendor/v8/include/v8-internal.h +638 -315
  46. data/vendor/v8/include/v8-isolate.h +275 -189
  47. data/vendor/v8/include/v8-local-handle.h +69 -42
  48. data/vendor/v8/include/v8-maybe.h +2 -1
  49. data/vendor/v8/include/v8-memory-span.h +149 -24
  50. data/vendor/v8/include/v8-message.h +9 -22
  51. data/vendor/v8/include/v8-metrics.h +14 -0
  52. data/vendor/v8/include/v8-microtask-queue.h +0 -5
  53. data/vendor/v8/include/v8-object.h +291 -37
  54. data/vendor/v8/include/v8-persistent-handle.h +17 -36
  55. data/vendor/v8/include/v8-platform.h +66 -45
  56. data/vendor/v8/include/v8-primitive.h +221 -5
  57. data/vendor/v8/include/v8-profiler.h +51 -2
  58. data/vendor/v8/include/v8-promise.h +2 -2
  59. data/vendor/v8/include/v8-proxy.h +0 -1
  60. data/vendor/v8/include/v8-regexp.h +0 -1
  61. data/vendor/v8/include/v8-sandbox.h +173 -0
  62. data/vendor/v8/include/v8-script.h +65 -17
  63. data/vendor/v8/include/v8-snapshot.h +38 -2
  64. data/vendor/v8/include/v8-source-location.h +6 -1
  65. data/vendor/v8/include/v8-template.h +111 -263
  66. data/vendor/v8/include/v8-trace-categories.h +23 -0
  67. data/vendor/v8/include/v8-traced-handle.h +20 -32
  68. data/vendor/v8/include/v8-typed-array.h +6 -10
  69. data/vendor/v8/include/v8-unwinder-state.h +2 -3
  70. data/vendor/v8/include/v8-unwinder.h +2 -1
  71. data/vendor/v8/include/v8-util.h +1 -117
  72. data/vendor/v8/include/v8-value-serializer-version.h +3 -3
  73. data/vendor/v8/include/v8-value.h +21 -2
  74. data/vendor/v8/include/v8-version.h +4 -4
  75. data/vendor/v8/include/v8-wasm.h +27 -0
  76. data/vendor/v8/include/v8-weak-callback-info.h +20 -12
  77. data/vendor/v8/include/v8.h +3 -3
  78. data/vendor/v8/include/v8config.h +83 -45
  79. metadata +7 -7
  80. data/vendor/v8/include/cppgc/ephemeron-pair.h +0 -30
@@ -5,8 +5,16 @@
5
5
  #ifndef V8CONFIG_H_
6
6
  #define V8CONFIG_H_
7
7
 
8
+ // gcc 10 defines __cplusplus to "an unspecified value strictly larger than
9
+ // 201703L" for its experimental -std=gnu++2a config.
10
+ // TODO(leszeks): Change to `__cplusplus <= 202002L` once we only support
11
+ // compilers with full C++20 support.
12
+ #if __cplusplus <= 201703L
13
+ #error "C++20 or later required."
14
+ #endif
15
+
8
16
  #ifdef V8_GN_HEADER
9
- #if __cplusplus >= 201703L && !__has_include("v8-gn.h")
17
+ #if !__has_include("v8-gn.h")
10
18
  #error Missing v8-gn.h. The configuration for v8 is missing from the include \
11
19
  path. Add it with -I<path> to the command line
12
20
  #endif
@@ -23,6 +31,8 @@ path. Add it with -I<path> to the command line
23
31
  # include <TargetConditionals.h>
24
32
  #elif defined(__linux__)
25
33
  # include <features.h>
34
+ #elif defined(__MVS__)
35
+ # include "zos-base.h"
26
36
  #endif
27
37
 
28
38
 
@@ -83,6 +93,7 @@ path. Add it with -I<path> to the command line
83
93
  // V8_OS_STARBOARD - Starboard (platform abstraction for Cobalt)
84
94
  // V8_OS_AIX - AIX
85
95
  // V8_OS_WIN - Microsoft Windows
96
+ // V8_OS_ZOS - z/OS
86
97
 
87
98
  #if defined(__ANDROID__)
88
99
  # define V8_OS_ANDROID 1
@@ -163,6 +174,11 @@ path. Add it with -I<path> to the command line
163
174
  #elif defined(_WIN32)
164
175
  # define V8_OS_WIN 1
165
176
  # define V8_OS_STRING "windows"
177
+
178
+ #elif defined(__MVS__)
179
+ # define V8_OS_POSIX 1
180
+ # define V8_OS_ZOS 1
181
+ # define V8_OS_STRING "zos"
166
182
  #endif
167
183
 
168
184
  // -----------------------------------------------------------------------------
@@ -355,6 +371,7 @@ path. Add it with -I<path> to the command line
355
371
  # define V8_HAS_ATTRIBUTE_UNUSED (__has_attribute(unused))
356
372
  # define V8_HAS_ATTRIBUTE_USED (__has_attribute(used))
357
373
  # define V8_HAS_ATTRIBUTE_RETAIN (__has_attribute(retain))
374
+ # define V8_HAS_ATTRIBUTE_OPTNONE (__has_attribute(optnone))
358
375
  // Support for the "preserve_most" attribute is limited:
359
376
  // - 32-bit platforms do not implement it,
360
377
  // - component builds fail because _dl_runtime_resolve clobbers registers,
@@ -376,8 +393,14 @@ path. Add it with -I<path> to the command line
376
393
  # define V8_HAS_ATTRIBUTE_WEAK (__has_attribute(weak))
377
394
 
378
395
  # define V8_HAS_CPP_ATTRIBUTE_NODISCARD (V8_HAS_CPP_ATTRIBUTE(nodiscard))
396
+ #if defined(V8_CC_MSVC)
397
+ # define V8_HAS_CPP_ATTRIBUTE_NO_UNIQUE_ADDRESS \
398
+ (V8_HAS_CPP_ATTRIBUTE(msvc::no_unique_address) || \
399
+ V8_HAS_CPP_ATTRIBUTE(no_unique_address))
400
+ #else
379
401
  # define V8_HAS_CPP_ATTRIBUTE_NO_UNIQUE_ADDRESS \
380
402
  (V8_HAS_CPP_ATTRIBUTE(no_unique_address))
403
+ #endif
381
404
 
382
405
  # define V8_HAS_BUILTIN_ADD_OVERFLOW (__has_builtin(__builtin_add_overflow))
383
406
  # define V8_HAS_BUILTIN_ASSUME (__has_builtin(__builtin_assume))
@@ -477,22 +500,42 @@ path. Add it with -I<path> to the command line
477
500
  # define V8_INLINE inline
478
501
  #endif
479
502
 
503
+ // A macro to force better inlining of calls in a statement. Don't bother for
504
+ // debug builds.
505
+ // Use like:
506
+ // V8_INLINE_STATEMENT foo = bar(); // Will force inlining the bar() call.
507
+ #if !defined(DEBUG) && defined(__clang__) && V8_HAS_ATTRIBUTE_ALWAYS_INLINE
508
+ # define V8_INLINE_STATEMENT [[clang::always_inline]]
509
+ #else
510
+ # define V8_INLINE_STATEMENT
511
+ #endif
512
+
513
+ #if V8_HAS_BUILTIN_ASSUME
480
514
  #ifdef DEBUG
481
- // In debug mode, check assumptions instead of actually adding annotations.
482
- # define V8_ASSUME DCHECK
483
- #elif V8_HAS_BUILTIN_ASSUME
515
+ // In debug mode, check assumptions in addition to adding annotations.
516
+ // This helps GCC (and maybe other compilers) figure out that certain
517
+ // situations are unreachable.
518
+ # define V8_ASSUME(condition) \
519
+ do { \
520
+ DCHECK(condition); \
521
+ __builtin_assume(condition); \
522
+ } while (false)
523
+ #else // DEBUG
484
524
  # define V8_ASSUME __builtin_assume
525
+ #endif // DEBUG
485
526
  #elif V8_HAS_BUILTIN_UNREACHABLE
486
527
  # define V8_ASSUME(condition) \
487
528
  do { \
529
+ DCHECK(condition); \
488
530
  if (!(condition)) __builtin_unreachable(); \
489
531
  } while (false)
490
532
  #else
491
533
  # define V8_ASSUME USE
492
534
  #endif
493
535
 
494
- // Prefer c++20 std::assume_aligned
495
- #if __cplusplus >= 202002L && defined(__cpp_lib_assume_aligned)
536
+ // Prefer c++20 std::assume_aligned. Don't use it on MSVC though, because it's
537
+ // not happy with our large 4GB alignment values.
538
+ #if __cplusplus >= 202002L && defined(__cpp_lib_assume_aligned) && !V8_CC_MSVC
496
539
  # define V8_ASSUME_ALIGNED(ptr, alignment) \
497
540
  std::assume_aligned<(alignment)>(ptr)
498
541
  #elif V8_HAS_BUILTIN_ASSUME_ALIGNED
@@ -549,11 +592,15 @@ path. Add it with -I<path> to the command line
549
592
  // functions.
550
593
  // Use like:
551
594
  // V8_NOINLINE V8_PRESERVE_MOST void UnlikelyMethod();
595
+ #if V8_OS_WIN
596
+ # define V8_PRESERVE_MOST
597
+ #else
552
598
  #if V8_HAS_ATTRIBUTE_PRESERVE_MOST
553
599
  # define V8_PRESERVE_MOST __attribute__((preserve_most))
554
600
  #else
555
601
  # define V8_PRESERVE_MOST /* NOT SUPPORTED */
556
602
  #endif
603
+ #endif
557
604
 
558
605
 
559
606
  // A macro (V8_DEPRECATED) to mark classes or functions as deprecated.
@@ -666,7 +713,15 @@ path. Add it with -I<path> to the command line
666
713
  // [[no_unique_address]] comes in C++20 but supported in clang with
667
714
  // -std >= c++11.
668
715
  #if V8_HAS_CPP_ATTRIBUTE_NO_UNIQUE_ADDRESS
716
+ #if defined(V8_CC_MSVC) && V8_HAS_CPP_ATTRIBUTE(msvc::no_unique_address)
717
+ // Unfortunately MSVC ignores [[no_unique_address]] (see
718
+ // https://devblogs.microsoft.com/cppblog/msvc-cpp20-and-the-std-cpp20-switch/#msvc-extensions-and-abi),
719
+ // and clang-cl matches it for ABI compatibility reasons. We need to prefer
720
+ // [[msvc::no_unique_address]] when available if we actually want any effect.
721
+ #define V8_NO_UNIQUE_ADDRESS [[msvc::no_unique_address]]
722
+ #else
669
723
  #define V8_NO_UNIQUE_ADDRESS [[no_unique_address]]
724
+ #endif
670
725
  #else
671
726
  #define V8_NO_UNIQUE_ADDRESS /* NOT SUPPORTED */
672
727
  #endif
@@ -743,15 +798,11 @@ V8 shared library set USING_V8_SHARED.
743
798
  #else // V8_OS_WIN
744
799
 
745
800
  // Setup for Linux shared library export.
746
- #if V8_HAS_ATTRIBUTE_VISIBILITY
747
- # ifdef BUILDING_V8_SHARED
748
- # define V8_EXPORT __attribute__ ((visibility("default")))
749
- # else
750
- # define V8_EXPORT
751
- # endif
801
+ #if V8_HAS_ATTRIBUTE_VISIBILITY && (defined(BUILDING_V8_SHARED) || USING_V8_SHARED)
802
+ # define V8_EXPORT __attribute__((visibility("default")))
752
803
  #else
753
804
  # define V8_EXPORT
754
- #endif
805
+ # endif // V8_HAS_ATTRIBUTE_VISIBILITY && ...
755
806
 
756
807
  #endif // V8_OS_WIN
757
808
 
@@ -789,16 +840,9 @@ V8 shared library set USING_V8_SHARED.
789
840
  #elif defined(__PPC64__) || defined(_ARCH_PPC64)
790
841
  #define V8_HOST_ARCH_PPC64 1
791
842
  #define V8_HOST_ARCH_64_BIT 1
792
- #elif defined(__PPC__) || defined(_ARCH_PPC)
793
- #define V8_HOST_ARCH_PPC 1
794
- #define V8_HOST_ARCH_32_BIT 1
795
- #elif defined(__s390__) || defined(__s390x__)
796
- #define V8_HOST_ARCH_S390 1
797
- #if defined(__s390x__)
843
+ #elif defined(__s390x__)
844
+ #define V8_HOST_ARCH_S390X 1
798
845
  #define V8_HOST_ARCH_64_BIT 1
799
- #else
800
- #define V8_HOST_ARCH_32_BIT 1
801
- #endif
802
846
  #elif defined(__riscv) || defined(__riscv__)
803
847
  #if __riscv_xlen == 64
804
848
  #define V8_HOST_ARCH_RISCV64 1
@@ -818,10 +862,10 @@ V8 shared library set USING_V8_SHARED.
818
862
  // The macros may be set externally. If not, detect in the same way as the host
819
863
  // architecture, that is, target the native environment as presented by the
820
864
  // compiler.
821
- #if !V8_TARGET_ARCH_X64 && !V8_TARGET_ARCH_IA32 && !V8_TARGET_ARCH_ARM && \
822
- !V8_TARGET_ARCH_ARM64 && !V8_TARGET_ARCH_MIPS64 && !V8_TARGET_ARCH_PPC && \
823
- !V8_TARGET_ARCH_PPC64 && !V8_TARGET_ARCH_S390 && \
824
- !V8_TARGET_ARCH_RISCV64 && !V8_TARGET_ARCH_LOONG64 && \
865
+ #if !V8_TARGET_ARCH_X64 && !V8_TARGET_ARCH_IA32 && !V8_TARGET_ARCH_ARM && \
866
+ !V8_TARGET_ARCH_ARM64 && !V8_TARGET_ARCH_MIPS64 && \
867
+ !V8_TARGET_ARCH_PPC64 && !V8_TARGET_ARCH_S390X && \
868
+ !V8_TARGET_ARCH_RISCV64 && !V8_TARGET_ARCH_LOONG64 && \
825
869
  !V8_TARGET_ARCH_RISCV32
826
870
  #if defined(_M_X64) || defined(__x86_64__)
827
871
  #define V8_TARGET_ARCH_X64 1
@@ -837,13 +881,8 @@ V8 shared library set USING_V8_SHARED.
837
881
  #define V8_TARGET_ARCH_LOONG64 1
838
882
  #elif defined(_ARCH_PPC64)
839
883
  #define V8_TARGET_ARCH_PPC64 1
840
- #elif defined(_ARCH_PPC)
841
- #define V8_TARGET_ARCH_PPC 1
842
- #elif defined(__s390__)
843
- #define V8_TARGET_ARCH_S390 1
844
- #if defined(__s390x__)
884
+ #elif defined(__s390x__)
845
885
  #define V8_TARGET_ARCH_S390X 1
846
- #endif
847
886
  #elif defined(__riscv) || defined(__riscv__)
848
887
  #if __riscv_xlen == 64
849
888
  #define V8_TARGET_ARCH_RISCV64 1
@@ -876,16 +915,10 @@ V8 shared library set USING_V8_SHARED.
876
915
  #define V8_TARGET_ARCH_64_BIT 1
877
916
  #elif V8_TARGET_ARCH_LOONG64
878
917
  #define V8_TARGET_ARCH_64_BIT 1
879
- #elif V8_TARGET_ARCH_PPC
880
- #define V8_TARGET_ARCH_32_BIT 1
881
918
  #elif V8_TARGET_ARCH_PPC64
882
919
  #define V8_TARGET_ARCH_64_BIT 1
883
- #elif V8_TARGET_ARCH_S390
884
- #if V8_TARGET_ARCH_S390X
920
+ #elif V8_TARGET_ARCH_S390X
885
921
  #define V8_TARGET_ARCH_64_BIT 1
886
- #else
887
- #define V8_TARGET_ARCH_32_BIT 1
888
- #endif
889
922
  #elif V8_TARGET_ARCH_RISCV64
890
923
  #define V8_TARGET_ARCH_64_BIT 1
891
924
  #elif V8_TARGET_ARCH_RISCV32
@@ -942,14 +975,14 @@ V8 shared library set USING_V8_SHARED.
942
975
  #else
943
976
  #define V8_TARGET_LITTLE_ENDIAN 1
944
977
  #endif
945
- #elif defined(__BIG_ENDIAN__) // FOR PPCGR on AIX
978
+ #elif V8_TARGET_ARCH_PPC64
979
+ #if V8_OS_AIX
946
980
  #define V8_TARGET_BIG_ENDIAN 1
947
- #elif V8_TARGET_ARCH_PPC_LE
981
+ #else
948
982
  #define V8_TARGET_LITTLE_ENDIAN 1
949
- #elif V8_TARGET_ARCH_PPC_BE
950
- #define V8_TARGET_BIG_ENDIAN 1
951
- #elif V8_TARGET_ARCH_S390
952
- #if V8_TARGET_ARCH_S390_LE_SIM
983
+ #endif
984
+ #elif V8_TARGET_ARCH_S390X
985
+ #if V8_TARGET_ARCH_S390X_LE_SIM
953
986
  #define V8_TARGET_LITTLE_ENDIAN 1
954
987
  #else
955
988
  #define V8_TARGET_BIG_ENDIAN 1
@@ -973,5 +1006,10 @@ V8 shared library set USING_V8_SHARED.
973
1006
  #else
974
1007
  #define V8_STATIC_ROOTS_BOOL true
975
1008
  #endif
1009
+ #ifdef V8_TARGET_BIG_ENDIAN
1010
+ #define V8_TARGET_BIG_ENDIAN_BOOL true
1011
+ #else
1012
+ #define V8_TARGET_BIG_ENDIAN_BOOL false
1013
+ #endif
976
1014
 
977
1015
  #endif // V8CONFIG_H_
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: libv8-node
3
3
  version: !ruby/object:Gem::Version
4
- version: 22.7.0.4
4
+ version: 24.1.0.0
5
5
  platform: arm64-darwin
6
6
  authors:
7
7
  - ''
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2024-09-16 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: rake
@@ -57,7 +56,6 @@ files:
57
56
  - vendor/v8/include/cppgc/cross-thread-persistent.h
58
57
  - vendor/v8/include/cppgc/custom-space.h
59
58
  - vendor/v8/include/cppgc/default-platform.h
60
- - vendor/v8/include/cppgc/ephemeron-pair.h
61
59
  - vendor/v8/include/cppgc/explicit-management.h
62
60
  - vendor/v8/include/cppgc/garbage-collected.h
63
61
  - vendor/v8/include/cppgc/heap-consistency.h
@@ -71,6 +69,7 @@ files:
71
69
  - vendor/v8/include/cppgc/internal/caged-heap-local-data.h
72
70
  - vendor/v8/include/cppgc/internal/caged-heap.h
73
71
  - vendor/v8/include/cppgc/internal/compiler-specific.h
72
+ - vendor/v8/include/cppgc/internal/conditional-stack-allocated.h
74
73
  - vendor/v8/include/cppgc/internal/finalizer-trait.h
75
74
  - vendor/v8/include/cppgc/internal/gc-info.h
76
75
  - vendor/v8/include/cppgc/internal/logging.h
@@ -109,6 +108,7 @@ files:
109
108
  - vendor/v8/include/v8-embedder-state-scope.h
110
109
  - vendor/v8/include/v8-exception.h
111
110
  - vendor/v8/include/v8-extension.h
111
+ - vendor/v8/include/v8-external-memory-accounter.h
112
112
  - vendor/v8/include/v8-external.h
113
113
  - vendor/v8/include/v8-fast-api-calls.h
114
114
  - vendor/v8/include/v8-forward.h
@@ -138,11 +138,13 @@ files:
138
138
  - vendor/v8/include/v8-promise.h
139
139
  - vendor/v8/include/v8-proxy.h
140
140
  - vendor/v8/include/v8-regexp.h
141
+ - vendor/v8/include/v8-sandbox.h
141
142
  - vendor/v8/include/v8-script.h
142
143
  - vendor/v8/include/v8-snapshot.h
143
144
  - vendor/v8/include/v8-source-location.h
144
145
  - vendor/v8/include/v8-statistics.h
145
146
  - vendor/v8/include/v8-template.h
147
+ - vendor/v8/include/v8-trace-categories.h
146
148
  - vendor/v8/include/v8-traced-handle.h
147
149
  - vendor/v8/include/v8-typed-array.h
148
150
  - vendor/v8/include/v8-unwinder-state.h
@@ -163,7 +165,6 @@ homepage: https://github.com/rubyjs/libv8-node
163
165
  licenses:
164
166
  - MIT
165
167
  metadata: {}
166
- post_install_message:
167
168
  rdoc_options: []
168
169
  require_paths:
169
170
  - lib
@@ -179,8 +180,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
179
180
  - !ruby/object:Gem::Version
180
181
  version: '0'
181
182
  requirements: []
182
- rubygems_version: 3.5.18
183
- signing_key:
183
+ rubygems_version: 3.6.9
184
184
  specification_version: 4
185
185
  summary: Node.JS's V8 JavaScript engine
186
186
  test_files: []
@@ -1,30 +0,0 @@
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_CPPGC_EPHEMERON_PAIR_H_
6
- #define INCLUDE_CPPGC_EPHEMERON_PAIR_H_
7
-
8
- #include "cppgc/liveness-broker.h"
9
- #include "cppgc/member.h"
10
-
11
- namespace cppgc {
12
-
13
- /**
14
- * An ephemeron pair is used to conditionally retain an object.
15
- * The `value` will be kept alive only if the `key` is alive.
16
- */
17
- template <typename K, typename V>
18
- struct EphemeronPair {
19
- EphemeronPair(K* k, V* v) : key(k), value(v) {}
20
- WeakMember<K> key;
21
- Member<V> value;
22
-
23
- void ClearValueIfKeyIsDead(const LivenessBroker& broker) {
24
- if (!broker.IsHeapObjectAlive(key)) value = nullptr;
25
- }
26
- };
27
-
28
- } // namespace cppgc
29
-
30
- #endif // INCLUDE_CPPGC_EPHEMERON_PAIR_H_