libv8-node 18.13.0.1-arm64-darwin → 20.2.0.0-arm64-darwin

Sign up to get free protection for your applications and to get access to all the features.
Files changed (70) 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/common.h +0 -1
  5. data/vendor/v8/include/cppgc/cross-thread-persistent.h +11 -10
  6. data/vendor/v8/include/cppgc/heap-consistency.h +46 -3
  7. data/vendor/v8/include/cppgc/heap-handle.h +48 -0
  8. data/vendor/v8/include/cppgc/heap-statistics.h +2 -2
  9. data/vendor/v8/include/cppgc/heap.h +3 -7
  10. data/vendor/v8/include/cppgc/internal/api-constants.h +14 -1
  11. data/vendor/v8/include/cppgc/internal/base-page-handle.h +45 -0
  12. data/vendor/v8/include/cppgc/internal/caged-heap-local-data.h +40 -8
  13. data/vendor/v8/include/cppgc/internal/caged-heap.h +61 -0
  14. data/vendor/v8/include/cppgc/internal/gc-info.h +35 -34
  15. data/vendor/v8/include/cppgc/internal/member-storage.h +248 -0
  16. data/vendor/v8/include/cppgc/internal/name-trait.h +21 -6
  17. data/vendor/v8/include/cppgc/internal/persistent-node.h +11 -13
  18. data/vendor/v8/include/cppgc/internal/pointer-policies.h +65 -8
  19. data/vendor/v8/include/cppgc/internal/write-barrier.h +153 -101
  20. data/vendor/v8/include/cppgc/liveness-broker.h +8 -7
  21. data/vendor/v8/include/cppgc/macros.h +10 -1
  22. data/vendor/v8/include/cppgc/member.h +424 -111
  23. data/vendor/v8/include/cppgc/name-provider.h +4 -4
  24. data/vendor/v8/include/cppgc/persistent.h +27 -24
  25. data/vendor/v8/include/cppgc/platform.h +7 -5
  26. data/vendor/v8/include/cppgc/sentinel-pointer.h +1 -1
  27. data/vendor/v8/include/cppgc/trace-trait.h +4 -0
  28. data/vendor/v8/include/cppgc/type-traits.h +13 -3
  29. data/vendor/v8/include/cppgc/visitor.h +104 -57
  30. data/vendor/v8/include/libplatform/v8-tracing.h +2 -2
  31. data/vendor/v8/include/v8-array-buffer.h +59 -0
  32. data/vendor/v8/include/v8-callbacks.h +32 -5
  33. data/vendor/v8/include/v8-context.h +63 -11
  34. data/vendor/v8/include/v8-cppgc.h +22 -0
  35. data/vendor/v8/include/v8-data.h +1 -1
  36. data/vendor/v8/include/v8-date.h +5 -0
  37. data/vendor/v8/include/v8-embedder-heap.h +0 -164
  38. data/vendor/v8/include/v8-exception.h +1 -1
  39. data/vendor/v8/include/v8-fast-api-calls.h +49 -31
  40. data/vendor/v8/include/v8-function-callback.h +69 -42
  41. data/vendor/v8/include/v8-function.h +9 -0
  42. data/vendor/v8/include/v8-initialization.h +23 -49
  43. data/vendor/v8/include/v8-inspector.h +32 -11
  44. data/vendor/v8/include/v8-internal.h +480 -183
  45. data/vendor/v8/include/v8-isolate.h +52 -77
  46. data/vendor/v8/include/v8-local-handle.h +86 -53
  47. data/vendor/v8/include/v8-locker.h +0 -11
  48. data/vendor/v8/include/v8-maybe.h +24 -1
  49. data/vendor/v8/include/v8-message.h +2 -4
  50. data/vendor/v8/include/v8-metrics.h +48 -40
  51. data/vendor/v8/include/v8-microtask-queue.h +6 -1
  52. data/vendor/v8/include/v8-object.h +29 -18
  53. data/vendor/v8/include/v8-persistent-handle.h +25 -18
  54. data/vendor/v8/include/v8-platform.h +133 -35
  55. data/vendor/v8/include/v8-primitive.h +27 -20
  56. data/vendor/v8/include/v8-profiler.h +133 -53
  57. data/vendor/v8/include/v8-regexp.h +2 -1
  58. data/vendor/v8/include/v8-script.h +91 -7
  59. data/vendor/v8/include/v8-snapshot.h +4 -8
  60. data/vendor/v8/include/v8-template.h +16 -77
  61. data/vendor/v8/include/v8-traced-handle.h +22 -28
  62. data/vendor/v8/include/v8-unwinder-state.h +4 -4
  63. data/vendor/v8/include/v8-util.h +11 -7
  64. data/vendor/v8/include/v8-value-serializer.h +46 -23
  65. data/vendor/v8/include/v8-value.h +31 -4
  66. data/vendor/v8/include/v8-version.h +4 -4
  67. data/vendor/v8/include/v8-wasm.h +7 -63
  68. data/vendor/v8/include/v8-weak-callback-info.h +0 -7
  69. data/vendor/v8/include/v8config.h +353 -15
  70. metadata +5 -1
@@ -173,6 +173,7 @@ path. Add it with -I<path> to the command line
173
173
  // V8_TARGET_OS_LINUX
174
174
  // V8_TARGET_OS_MACOS
175
175
  // V8_TARGET_OS_WIN
176
+ // V8_TARGET_OS_CHROMEOS
176
177
  //
177
178
  // If not set explicitly, these fall back to corresponding V8_OS_ values.
178
179
 
@@ -184,7 +185,8 @@ path. Add it with -I<path> to the command line
184
185
  && !defined(V8_TARGET_OS_IOS) \
185
186
  && !defined(V8_TARGET_OS_LINUX) \
186
187
  && !defined(V8_TARGET_OS_MACOS) \
187
- && !defined(V8_TARGET_OS_WIN)
188
+ && !defined(V8_TARGET_OS_WIN) \
189
+ && !defined(V8_TARGET_OS_CHROMEOS)
188
190
  # error No known target OS defined.
189
191
  # endif
190
192
 
@@ -195,7 +197,8 @@ path. Add it with -I<path> to the command line
195
197
  || defined(V8_TARGET_OS_IOS) \
196
198
  || defined(V8_TARGET_OS_LINUX) \
197
199
  || defined(V8_TARGET_OS_MACOS) \
198
- || defined(V8_TARGET_OS_WIN)
200
+ || defined(V8_TARGET_OS_WIN) \
201
+ || defined(V8_TARGET_OS_CHROMEOS)
199
202
  # error A target OS is defined but V8_HAVE_TARGET_OS is unset.
200
203
  # endif
201
204
 
@@ -288,6 +291,9 @@ path. Add it with -I<path> to the command line
288
291
  //
289
292
  // V8_HAS_ATTRIBUTE_ALWAYS_INLINE - __attribute__((always_inline))
290
293
  // supported
294
+ // V8_HAS_ATTRIBUTE_CONSTINIT - __attribute__((require_constant_
295
+ // initialization))
296
+ // supported
291
297
  // V8_HAS_ATTRIBUTE_NONNULL - __attribute__((nonnull)) supported
292
298
  // V8_HAS_ATTRIBUTE_NOINLINE - __attribute__((noinline)) supported
293
299
  // V8_HAS_ATTRIBUTE_UNUSED - __attribute__((unused)) supported
@@ -305,9 +311,13 @@ path. Add it with -I<path> to the command line
305
311
  // V8_HAS_BUILTIN_EXPECT - __builtin_expect() supported
306
312
  // V8_HAS_BUILTIN_FRAME_ADDRESS - __builtin_frame_address() supported
307
313
  // V8_HAS_BUILTIN_POPCOUNT - __builtin_popcount() supported
314
+ // V8_HAS_BUILTIN_ADD_OVERFLOW - __builtin_add_overflow() supported
315
+ // V8_HAS_BUILTIN_SUB_OVERFLOW - __builtin_sub_overflow() supported
316
+ // V8_HAS_BUILTIN_MUL_OVERFLOW - __builtin_mul_overflow() supported
308
317
  // V8_HAS_BUILTIN_SADD_OVERFLOW - __builtin_sadd_overflow() supported
309
318
  // V8_HAS_BUILTIN_SSUB_OVERFLOW - __builtin_ssub_overflow() supported
310
319
  // V8_HAS_BUILTIN_UADD_OVERFLOW - __builtin_uadd_overflow() supported
320
+ // V8_HAS_BUILTIN_SMUL_OVERFLOW - __builtin_smul_overflow() supported
311
321
  // V8_HAS_COMPUTED_GOTO - computed goto/labels as values
312
322
  // supported
313
323
  // V8_HAS_DECLSPEC_NOINLINE - __declspec(noinline) supported
@@ -333,9 +343,27 @@ path. Add it with -I<path> to the command line
333
343
  #endif
334
344
 
335
345
  # define V8_HAS_ATTRIBUTE_ALWAYS_INLINE (__has_attribute(always_inline))
346
+ # define V8_HAS_ATTRIBUTE_CONSTINIT \
347
+ (__has_attribute(require_constant_initialization))
348
+ # define V8_HAS_ATTRIBUTE_CONST (__has_attribute(const))
336
349
  # define V8_HAS_ATTRIBUTE_NONNULL (__has_attribute(nonnull))
337
350
  # define V8_HAS_ATTRIBUTE_NOINLINE (__has_attribute(noinline))
338
351
  # define V8_HAS_ATTRIBUTE_UNUSED (__has_attribute(unused))
352
+ // Support for the "preserve_most" attribute is limited:
353
+ // - 32-bit platforms do not implement it,
354
+ // - component builds fail because _dl_runtime_resolve clobbers registers,
355
+ // - we see crashes on arm64 on Windows (https://crbug.com/1409934), which can
356
+ // hopefully be fixed in the future.
357
+ // Additionally, the initial implementation in clang <= 16 overwrote the return
358
+ // register(s) in the epilogue of a preserve_most function, so we only use
359
+ // preserve_most in clang >= 17 (see https://reviews.llvm.org/D143425).
360
+ #if (defined(_M_X64) || defined(__x86_64__) /* x64 (everywhere) */ \
361
+ || ((defined(__AARCH64EL__) || defined(_M_ARM64)) /* arm64, but ... */ \
362
+ && !defined(_WIN32))) /* not on windows */ \
363
+ && !defined(COMPONENT_BUILD) /* no component build */\
364
+ && __clang_major__ >= 17 /* clang >= 17 */
365
+ # define V8_HAS_ATTRIBUTE_PRESERVE_MOST (__has_attribute(preserve_most))
366
+ #endif
339
367
  # define V8_HAS_ATTRIBUTE_VISIBILITY (__has_attribute(visibility))
340
368
  # define V8_HAS_ATTRIBUTE_WARN_UNUSED_RESULT \
341
369
  (__has_attribute(warn_unused_result))
@@ -344,6 +372,7 @@ path. Add it with -I<path> to the command line
344
372
  # define V8_HAS_CPP_ATTRIBUTE_NO_UNIQUE_ADDRESS \
345
373
  (V8_HAS_CPP_ATTRIBUTE(no_unique_address))
346
374
 
375
+ # define V8_HAS_BUILTIN_ASSUME (__has_builtin(__builtin_assume))
347
376
  # define V8_HAS_BUILTIN_ASSUME_ALIGNED (__has_builtin(__builtin_assume_aligned))
348
377
  # define V8_HAS_BUILTIN_BSWAP16 (__has_builtin(__builtin_bswap16))
349
378
  # define V8_HAS_BUILTIN_BSWAP32 (__has_builtin(__builtin_bswap32))
@@ -353,9 +382,14 @@ path. Add it with -I<path> to the command line
353
382
  # define V8_HAS_BUILTIN_EXPECT (__has_builtin(__builtin_expect))
354
383
  # define V8_HAS_BUILTIN_FRAME_ADDRESS (__has_builtin(__builtin_frame_address))
355
384
  # define V8_HAS_BUILTIN_POPCOUNT (__has_builtin(__builtin_popcount))
385
+ # define V8_HAS_BUILTIN_ADD_OVERFLOW (__has_builtin(__builtin_add_overflow))
386
+ # define V8_HAS_BUILTIN_SUB_OVERFLOW (__has_builtin(__builtin_sub_overflow))
387
+ # define V8_HAS_BUILTIN_MUL_OVERFLOW (__has_builtin(__builtin_mul_overflow))
356
388
  # define V8_HAS_BUILTIN_SADD_OVERFLOW (__has_builtin(__builtin_sadd_overflow))
357
389
  # define V8_HAS_BUILTIN_SSUB_OVERFLOW (__has_builtin(__builtin_ssub_overflow))
358
390
  # define V8_HAS_BUILTIN_UADD_OVERFLOW (__has_builtin(__builtin_uadd_overflow))
391
+ # define V8_HAS_BUILTIN_SMUL_OVERFLOW (__has_builtin(__builtin_smul_overflow))
392
+ # define V8_HAS_BUILTIN_UNREACHABLE (__has_builtin(__builtin_unreachable))
359
393
 
360
394
  // Clang has no __has_feature for computed gotos.
361
395
  // GCC doc: https://gcc.gnu.org/onlinedocs/gcc/Labels-as-Values.html
@@ -394,6 +428,7 @@ path. Add it with -I<path> to the command line
394
428
  # define V8_HAS_BUILTIN_EXPECT 1
395
429
  # define V8_HAS_BUILTIN_FRAME_ADDRESS 1
396
430
  # define V8_HAS_BUILTIN_POPCOUNT 1
431
+ # define V8_HAS_BUILTIN_UNREACHABLE 1
397
432
 
398
433
  // GCC doc: https://gcc.gnu.org/onlinedocs/gcc/Labels-as-Values.html
399
434
  #define V8_HAS_COMPUTED_GOTO 1
@@ -425,6 +460,18 @@ path. Add it with -I<path> to the command line
425
460
  # define V8_INLINE inline
426
461
  #endif
427
462
 
463
+ #ifdef DEBUG
464
+ // In debug mode, check assumptions instead of actually adding annotations.
465
+ # define V8_ASSUME(condition) DCHECK(condition)
466
+ #elif V8_HAS_BUILTIN_ASSUME
467
+ # define V8_ASSUME(condition) __builtin_assume(condition)
468
+ #elif V8_HAS_BUILTIN_UNREACHABLE
469
+ # define V8_ASSUME(condition) \
470
+ do { if (!(condition)) __builtin_unreachable(); } while (false)
471
+ #else
472
+ # define V8_ASSUME(condition)
473
+ #endif
474
+
428
475
  #if V8_HAS_BUILTIN_ASSUME_ALIGNED
429
476
  # define V8_ASSUME_ALIGNED(ptr, alignment) \
430
477
  __builtin_assume_aligned((ptr), (alignment))
@@ -433,6 +480,26 @@ path. Add it with -I<path> to the command line
433
480
  #endif
434
481
 
435
482
 
483
+ // A macro to mark functions whose values don't change (e.g. across calls)
484
+ // and thereby compiler is free to hoist and fold multiple calls together.
485
+ // Use like:
486
+ // V8_CONST int foo() { ... }
487
+ #if V8_HAS_ATTRIBUTE_CONST
488
+ # define V8_CONST __attribute__((const))
489
+ #else
490
+ # define V8_CONST
491
+ #endif
492
+
493
+ // A macro to mark a declaration as requiring constant initialization.
494
+ // Use like:
495
+ // int* foo V8_CONSTINIT;
496
+ #if V8_HAS_ATTRIBUTE_CONSTINIT
497
+ # define V8_CONSTINIT __attribute__((require_constant_initialization))
498
+ #else
499
+ # define V8_CONSTINIT
500
+ #endif
501
+
502
+
436
503
  // A macro to mark specific arguments as non-null.
437
504
  // Use like:
438
505
  // int add(int* x, int y, int* z) V8_NONNULL(1, 3) { return *x + y + *z; }
@@ -455,6 +522,21 @@ path. Add it with -I<path> to the command line
455
522
  #endif
456
523
 
457
524
 
525
+ // A macro used to change the calling conventions to preserve all registers (no
526
+ // caller-saved registers). Use this for cold functions called from hot
527
+ // functions.
528
+ // Note: The attribute is considered experimental, so apply with care. Also,
529
+ // "preserve_most" is currently not handling the return value correctly, so only
530
+ // use it for functions returning void (see https://reviews.llvm.org/D141020).
531
+ // Use like:
532
+ // V8_NOINLINE V8_PRESERVE_MOST void UnlikelyMethod();
533
+ #if V8_HAS_ATTRIBUTE_PRESERVE_MOST
534
+ # define V8_PRESERVE_MOST __attribute__((preserve_most))
535
+ #else
536
+ # define V8_PRESERVE_MOST /* NOT SUPPORTED */
537
+ #endif
538
+
539
+
458
540
  // A macro (V8_DEPRECATED) to mark classes or functions as deprecated.
459
541
  #if defined(V8_DEPRECATION_WARNINGS)
460
542
  # define V8_DEPRECATED(message) [[deprecated(message)]]
@@ -471,6 +553,34 @@ path. Add it with -I<path> to the command line
471
553
  #endif
472
554
 
473
555
 
556
+ #if defined(V8_IMMINENT_DEPRECATION_WARNINGS) || \
557
+ defined(V8_DEPRECATION_WARNINGS)
558
+ #if defined(V8_CC_MSVC)
559
+ # define START_ALLOW_USE_DEPRECATED() \
560
+ __pragma(warning(push)) \
561
+ __pragma(warning(disable : 4996))
562
+ # define END_ALLOW_USE_DEPRECATED() __pragma(warning(pop))
563
+ #else // !defined(V8_CC_MSVC)
564
+ # define START_ALLOW_USE_DEPRECATED() \
565
+ _Pragma("GCC diagnostic push") \
566
+ _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"")
567
+ #define END_ALLOW_USE_DEPRECATED() _Pragma("GCC diagnostic pop")
568
+ #endif // !defined(V8_CC_MSVC)
569
+ #else // !(defined(V8_IMMINENT_DEPRECATION_WARNINGS) ||
570
+ // defined(V8_DEPRECATION_WARNINGS))
571
+ #define START_ALLOW_USE_DEPRECATED()
572
+ #define END_ALLOW_USE_DEPRECATED()
573
+ #endif // !(defined(V8_IMMINENT_DEPRECATION_WARNINGS) ||
574
+ // defined(V8_DEPRECATION_WARNINGS))
575
+ #define ALLOW_COPY_AND_MOVE_WITH_DEPRECATED_FIELDS(ClassName) \
576
+ START_ALLOW_USE_DEPRECATED() \
577
+ ClassName(const ClassName&) = default; \
578
+ ClassName(ClassName&&) = default; \
579
+ ClassName& operator=(const ClassName&) = default; \
580
+ ClassName& operator=(ClassName&&) = default; \
581
+ END_ALLOW_USE_DEPRECATED()
582
+
583
+
474
584
  #if defined(__GNUC__) && !defined(__clang__) && (__GNUC__ < 6)
475
585
  # define V8_ENUM_DEPRECATED(message)
476
586
  # define V8_ENUM_DEPRECATE_SOON(message)
@@ -534,6 +644,37 @@ path. Add it with -I<path> to the command line
534
644
  #define V8_NO_UNIQUE_ADDRESS /* NOT SUPPORTED */
535
645
  #endif
536
646
 
647
+ // Marks a type as being eligible for the "trivial" ABI despite having a
648
+ // non-trivial destructor or copy/move constructor. Such types can be relocated
649
+ // after construction by simply copying their memory, which makes them eligible
650
+ // to be passed in registers. The canonical example is std::unique_ptr.
651
+ //
652
+ // Use with caution; this has some subtle effects on constructor/destructor
653
+ // ordering and will be very incorrect if the type relies on its address
654
+ // remaining constant. When used as a function argument (by value), the value
655
+ // may be constructed in the caller's stack frame, passed in a register, and
656
+ // then used and destructed in the callee's stack frame. A similar thing can
657
+ // occur when values are returned.
658
+ //
659
+ // TRIVIAL_ABI is not needed for types which have a trivial destructor and
660
+ // copy/move constructors, since those are automatically trivial by the ABI
661
+ // spec.
662
+ //
663
+ // It is also not likely to be effective on types too large to be passed in one
664
+ // or two registers on typical target ABIs.
665
+ //
666
+ // See also:
667
+ // https://clang.llvm.org/docs/AttributeReference.html#trivial-abi
668
+ // https://libcxx.llvm.org/docs/DesignDocs/UniquePtrTrivialAbi.html
669
+ #if defined(__clang__) && defined(__has_attribute)
670
+ #if __has_attribute(trivial_abi)
671
+ #define V8_TRIVIAL_ABI [[clang::trivial_abi]]
672
+ #endif // __has_attribute(trivial_abi)
673
+ #endif // defined(__clang__) && defined(__has_attribute)
674
+ #if !defined(V8_TRIVIAL_ABI)
675
+ #define V8_TRIVIAL_ABI
676
+ #endif //!defined(V8_TRIVIAL_ABI)
677
+
537
678
  // Helper macro to define no_sanitize attributes only with clang.
538
679
  #if defined(__clang__) && defined(__has_attribute)
539
680
  #if __has_attribute(no_sanitize)
@@ -580,26 +721,223 @@ V8 shared library set USING_V8_SHARED.
580
721
 
581
722
  #endif // V8_OS_WIN
582
723
 
583
- // The sandbox is available (i.e. defined) when pointer compression
584
- // is enabled, but it is only used when V8_SANDBOX is enabled as
585
- // well. This allows better test coverage of the sandbox.
586
- #if defined(V8_COMPRESS_POINTERS)
587
- #define V8_SANDBOX_IS_AVAILABLE
724
+ // clang-format on
725
+
726
+ // Processor architecture detection. For more info on what's defined, see:
727
+ // http://msdn.microsoft.com/en-us/library/b0084kay.aspx
728
+ // http://www.agner.org/optimize/calling_conventions.pdf
729
+ // or with gcc, run: "echo | gcc -E -dM -"
730
+ // The V8_HOST_ARCH_* macros correspond to the architecture on which V8, as a
731
+ // virtual machine and compiler, runs. Don't confuse this with the architecture
732
+ // on which V8 is built.
733
+ #if defined(_M_X64) || defined(__x86_64__)
734
+ #define V8_HOST_ARCH_X64 1
735
+ #if defined(__x86_64__) && __SIZEOF_POINTER__ == 4 // Check for x32.
736
+ #define V8_HOST_ARCH_32_BIT 1
737
+ #else
738
+ #define V8_HOST_ARCH_64_BIT 1
739
+ #endif
740
+ #elif defined(_M_IX86) || defined(__i386__)
741
+ #define V8_HOST_ARCH_IA32 1
742
+ #define V8_HOST_ARCH_32_BIT 1
743
+ #elif defined(__AARCH64EL__) || defined(_M_ARM64)
744
+ #define V8_HOST_ARCH_ARM64 1
745
+ #define V8_HOST_ARCH_64_BIT 1
746
+ #elif defined(__ARMEL__)
747
+ #define V8_HOST_ARCH_ARM 1
748
+ #define V8_HOST_ARCH_32_BIT 1
749
+ #elif defined(__mips64)
750
+ #define V8_HOST_ARCH_MIPS64 1
751
+ #define V8_HOST_ARCH_64_BIT 1
752
+ #elif defined(__loongarch64)
753
+ #define V8_HOST_ARCH_LOONG64 1
754
+ #define V8_HOST_ARCH_64_BIT 1
755
+ #elif defined(__PPC64__) || defined(_ARCH_PPC64)
756
+ #define V8_HOST_ARCH_PPC64 1
757
+ #define V8_HOST_ARCH_64_BIT 1
758
+ #elif defined(__PPC__) || defined(_ARCH_PPC)
759
+ #define V8_HOST_ARCH_PPC 1
760
+ #define V8_HOST_ARCH_32_BIT 1
761
+ #elif defined(__s390__) || defined(__s390x__)
762
+ #define V8_HOST_ARCH_S390 1
763
+ #if defined(__s390x__)
764
+ #define V8_HOST_ARCH_64_BIT 1
765
+ #else
766
+ #define V8_HOST_ARCH_32_BIT 1
767
+ #endif
768
+ #elif defined(__riscv) || defined(__riscv__)
769
+ #if __riscv_xlen == 64
770
+ #define V8_HOST_ARCH_RISCV64 1
771
+ #define V8_HOST_ARCH_64_BIT 1
772
+ #elif __riscv_xlen == 32
773
+ #define V8_HOST_ARCH_RISCV32 1
774
+ #define V8_HOST_ARCH_32_BIT 1
775
+ #else
776
+ #error "Cannot detect Riscv's bitwidth"
777
+ #endif
778
+ #else
779
+ #error "Host architecture was not detected as supported by v8"
780
+ #endif
781
+
782
+ // Target architecture detection. This corresponds to the architecture for which
783
+ // V8's JIT will generate code (the last stage of the canadian cross-compiler).
784
+ // The macros may be set externally. If not, detect in the same way as the host
785
+ // architecture, that is, target the native environment as presented by the
786
+ // compiler.
787
+ #if !V8_TARGET_ARCH_X64 && !V8_TARGET_ARCH_IA32 && !V8_TARGET_ARCH_ARM && \
788
+ !V8_TARGET_ARCH_ARM64 && !V8_TARGET_ARCH_MIPS64 && !V8_TARGET_ARCH_PPC && \
789
+ !V8_TARGET_ARCH_PPC64 && !V8_TARGET_ARCH_S390 && \
790
+ !V8_TARGET_ARCH_RISCV64 && !V8_TARGET_ARCH_LOONG64 && \
791
+ !V8_TARGET_ARCH_RISCV32
792
+ #if defined(_M_X64) || defined(__x86_64__)
793
+ #define V8_TARGET_ARCH_X64 1
794
+ #elif defined(_M_IX86) || defined(__i386__)
795
+ #define V8_TARGET_ARCH_IA32 1
796
+ #elif defined(__AARCH64EL__) || defined(_M_ARM64)
797
+ #define V8_TARGET_ARCH_ARM64 1
798
+ #elif defined(__ARMEL__)
799
+ #define V8_TARGET_ARCH_ARM 1
800
+ #elif defined(__mips64)
801
+ #define V8_TARGET_ARCH_MIPS64 1
802
+ #elif defined(__loongarch64)
803
+ #define V8_TARGET_ARCH_LOONG64 1
804
+ #elif defined(_ARCH_PPC64)
805
+ #define V8_TARGET_ARCH_PPC64 1
806
+ #elif defined(_ARCH_PPC)
807
+ #define V8_TARGET_ARCH_PPC 1
808
+ #elif defined(__s390__)
809
+ #define V8_TARGET_ARCH_S390 1
810
+ #if defined(__s390x__)
811
+ #define V8_TARGET_ARCH_S390X 1
812
+ #endif
813
+ #elif defined(__riscv) || defined(__riscv__)
814
+ #if __riscv_xlen == 64
815
+ #define V8_TARGET_ARCH_RISCV64 1
816
+ #elif __riscv_xlen == 32
817
+ #define V8_TARGET_ARCH_RISCV32 1
818
+ #endif
819
+ #else
820
+ #error Target architecture was not detected as supported by v8
821
+ #endif
588
822
  #endif
589
823
 
590
- #if defined(V8_SANDBOX) && !defined(V8_SANDBOX_IS_AVAILABLE)
591
- #error Inconsistent configuration: sandbox is enabled but not available
824
+ // Determine architecture pointer size.
825
+ #if V8_TARGET_ARCH_IA32
826
+ #define V8_TARGET_ARCH_32_BIT 1
827
+ #elif V8_TARGET_ARCH_X64
828
+ #if !V8_TARGET_ARCH_32_BIT && !V8_TARGET_ARCH_64_BIT
829
+ #if defined(__x86_64__) && __SIZEOF_POINTER__ == 4 // Check for x32.
830
+ #define V8_TARGET_ARCH_32_BIT 1
831
+ #else
832
+ #define V8_TARGET_ARCH_64_BIT 1
833
+ #endif
834
+ #endif
835
+ #elif V8_TARGET_ARCH_ARM
836
+ #define V8_TARGET_ARCH_32_BIT 1
837
+ #elif V8_TARGET_ARCH_ARM64
838
+ #define V8_TARGET_ARCH_64_BIT 1
839
+ #elif V8_TARGET_ARCH_MIPS
840
+ #define V8_TARGET_ARCH_32_BIT 1
841
+ #elif V8_TARGET_ARCH_MIPS64
842
+ #define V8_TARGET_ARCH_64_BIT 1
843
+ #elif V8_TARGET_ARCH_LOONG64
844
+ #define V8_TARGET_ARCH_64_BIT 1
845
+ #elif V8_TARGET_ARCH_PPC
846
+ #define V8_TARGET_ARCH_32_BIT 1
847
+ #elif V8_TARGET_ARCH_PPC64
848
+ #define V8_TARGET_ARCH_64_BIT 1
849
+ #elif V8_TARGET_ARCH_S390
850
+ #if V8_TARGET_ARCH_S390X
851
+ #define V8_TARGET_ARCH_64_BIT 1
852
+ #else
853
+ #define V8_TARGET_ARCH_32_BIT 1
854
+ #endif
855
+ #elif V8_TARGET_ARCH_RISCV64
856
+ #define V8_TARGET_ARCH_64_BIT 1
857
+ #elif V8_TARGET_ARCH_RISCV32
858
+ #define V8_TARGET_ARCH_32_BIT 1
859
+ #else
860
+ #error Unknown target architecture pointer size
592
861
  #endif
593
862
 
594
- // From C++17 onwards, static constexpr member variables are defined to be
595
- // "inline", and adding a separate definition for them can trigger deprecation
596
- // warnings. For C++14 and below, however, these definitions are required.
597
- #if __cplusplus < 201703L && (!defined(_MSVC_LANG) || _MSVC_LANG < 201703L)
598
- #define V8_STATIC_CONSTEXPR_VARIABLES_NEED_DEFINITIONS
863
+ // Check for supported combinations of host and target architectures.
864
+ #if V8_TARGET_ARCH_IA32 && !V8_HOST_ARCH_IA32
865
+ #error Target architecture ia32 is only supported on ia32 host
866
+ #endif
867
+ #if (V8_TARGET_ARCH_X64 && V8_TARGET_ARCH_64_BIT && \
868
+ !((V8_HOST_ARCH_X64 || V8_HOST_ARCH_ARM64) && V8_HOST_ARCH_64_BIT))
869
+ #error Target architecture x64 is only supported on x64 and arm64 host
870
+ #endif
871
+ #if (V8_TARGET_ARCH_X64 && V8_TARGET_ARCH_32_BIT && \
872
+ !(V8_HOST_ARCH_X64 && V8_HOST_ARCH_32_BIT))
873
+ #error Target architecture x32 is only supported on x64 host with x32 support
874
+ #endif
875
+ #if (V8_TARGET_ARCH_ARM && !(V8_HOST_ARCH_IA32 || V8_HOST_ARCH_ARM))
876
+ #error Target architecture arm is only supported on arm and ia32 host
877
+ #endif
878
+ #if (V8_TARGET_ARCH_ARM64 && !(V8_HOST_ARCH_X64 || V8_HOST_ARCH_ARM64))
879
+ #error Target architecture arm64 is only supported on arm64 and x64 host
880
+ #endif
881
+ #if (V8_TARGET_ARCH_MIPS64 && !(V8_HOST_ARCH_X64 || V8_HOST_ARCH_MIPS64))
882
+ #error Target architecture mips64 is only supported on mips64 and x64 host
883
+ #endif
884
+ #if (V8_TARGET_ARCH_RISCV64 && !(V8_HOST_ARCH_X64 || V8_HOST_ARCH_RISCV64))
885
+ #error Target architecture riscv64 is only supported on riscv64 and x64 host
886
+ #endif
887
+ #if (V8_TARGET_ARCH_RISCV32 && !(V8_HOST_ARCH_IA32 || V8_HOST_ARCH_RISCV32))
888
+ #error Target architecture riscv32 is only supported on riscv32 and ia32 host
889
+ #endif
890
+ #if (V8_TARGET_ARCH_LOONG64 && !(V8_HOST_ARCH_X64 || V8_HOST_ARCH_LOONG64))
891
+ #error Target architecture loong64 is only supported on loong64 and x64 host
599
892
  #endif
600
893
 
601
- // clang-format on
894
+ // Determine architecture endianness.
895
+ #if V8_TARGET_ARCH_IA32
896
+ #define V8_TARGET_LITTLE_ENDIAN 1
897
+ #elif V8_TARGET_ARCH_X64
898
+ #define V8_TARGET_LITTLE_ENDIAN 1
899
+ #elif V8_TARGET_ARCH_ARM
900
+ #define V8_TARGET_LITTLE_ENDIAN 1
901
+ #elif V8_TARGET_ARCH_ARM64
902
+ #define V8_TARGET_LITTLE_ENDIAN 1
903
+ #elif V8_TARGET_ARCH_LOONG64
904
+ #define V8_TARGET_LITTLE_ENDIAN 1
905
+ #elif V8_TARGET_ARCH_MIPS64
906
+ #if defined(__MIPSEB__) || defined(V8_TARGET_ARCH_MIPS64_BE)
907
+ #define V8_TARGET_BIG_ENDIAN 1
908
+ #else
909
+ #define V8_TARGET_LITTLE_ENDIAN 1
910
+ #endif
911
+ #elif defined(__BIG_ENDIAN__) // FOR PPCGR on AIX
912
+ #define V8_TARGET_BIG_ENDIAN 1
913
+ #elif V8_TARGET_ARCH_PPC_LE
914
+ #define V8_TARGET_LITTLE_ENDIAN 1
915
+ #elif V8_TARGET_ARCH_PPC_BE
916
+ #define V8_TARGET_BIG_ENDIAN 1
917
+ #elif V8_TARGET_ARCH_S390
918
+ #if V8_TARGET_ARCH_S390_LE_SIM
919
+ #define V8_TARGET_LITTLE_ENDIAN 1
920
+ #else
921
+ #define V8_TARGET_BIG_ENDIAN 1
922
+ #endif
923
+ #elif V8_TARGET_ARCH_RISCV32 || V8_TARGET_ARCH_RISCV64
924
+ #define V8_TARGET_LITTLE_ENDIAN 1
925
+ #elif defined(__BYTE_ORDER__)
926
+ #if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
927
+ #define V8_TARGET_BIG_ENDIAN 1
928
+ #else
929
+ #define V8_TARGET_LITTLE_ENDIAN 1
930
+ #endif
931
+ #else
932
+ #error Unknown target architecture endianness
933
+ #endif
602
934
 
603
935
  #undef V8_HAS_CPP_ATTRIBUTE
604
936
 
937
+ #if !defined(V8_STATIC_ROOTS)
938
+ #define V8_STATIC_ROOTS_BOOL false
939
+ #else
940
+ #define V8_STATIC_ROOTS_BOOL true
941
+ #endif
942
+
605
943
  #endif // V8CONFIG_H_
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: libv8-node
3
3
  version: !ruby/object:Gem::Version
4
- version: 18.13.0.1
4
+ version: 20.2.0.0
5
5
  platform: arm64-darwin
6
6
  authors:
7
7
  - ''
@@ -61,16 +61,20 @@ files:
61
61
  - vendor/v8/include/cppgc/explicit-management.h
62
62
  - vendor/v8/include/cppgc/garbage-collected.h
63
63
  - vendor/v8/include/cppgc/heap-consistency.h
64
+ - vendor/v8/include/cppgc/heap-handle.h
64
65
  - vendor/v8/include/cppgc/heap-state.h
65
66
  - vendor/v8/include/cppgc/heap-statistics.h
66
67
  - vendor/v8/include/cppgc/heap.h
67
68
  - vendor/v8/include/cppgc/internal/api-constants.h
68
69
  - vendor/v8/include/cppgc/internal/atomic-entry-flag.h
70
+ - vendor/v8/include/cppgc/internal/base-page-handle.h
69
71
  - vendor/v8/include/cppgc/internal/caged-heap-local-data.h
72
+ - vendor/v8/include/cppgc/internal/caged-heap.h
70
73
  - vendor/v8/include/cppgc/internal/compiler-specific.h
71
74
  - vendor/v8/include/cppgc/internal/finalizer-trait.h
72
75
  - vendor/v8/include/cppgc/internal/gc-info.h
73
76
  - vendor/v8/include/cppgc/internal/logging.h
77
+ - vendor/v8/include/cppgc/internal/member-storage.h
74
78
  - vendor/v8/include/cppgc/internal/name-trait.h
75
79
  - vendor/v8/include/cppgc/internal/persistent-node.h
76
80
  - vendor/v8/include/cppgc/internal/pointer-policies.h