libv8-node 19.9.0.0-x86_64-darwin → 20.2.0.0-x86_64-darwin

Sign up to get free protection for your applications and to get access to all the features.
Files changed (48) hide show
  1. checksums.yaml +4 -4
  2. data/lib/libv8/node/version.rb +3 -3
  3. data/vendor/v8/include/cppgc/cross-thread-persistent.h +4 -2
  4. data/vendor/v8/include/cppgc/heap-consistency.h +2 -2
  5. data/vendor/v8/include/cppgc/heap-handle.h +5 -0
  6. data/vendor/v8/include/cppgc/internal/api-constants.h +4 -1
  7. data/vendor/v8/include/cppgc/internal/gc-info.h +35 -33
  8. data/vendor/v8/include/cppgc/internal/member-storage.h +19 -7
  9. data/vendor/v8/include/cppgc/internal/pointer-policies.h +38 -2
  10. data/vendor/v8/include/cppgc/internal/write-barrier.h +15 -5
  11. data/vendor/v8/include/cppgc/macros.h +10 -1
  12. data/vendor/v8/include/cppgc/member.h +167 -129
  13. data/vendor/v8/include/cppgc/persistent.h +22 -15
  14. data/vendor/v8/include/cppgc/platform.h +6 -4
  15. data/vendor/v8/include/cppgc/type-traits.h +4 -3
  16. data/vendor/v8/include/cppgc/visitor.h +16 -1
  17. data/vendor/v8/include/libplatform/v8-tracing.h +2 -2
  18. data/vendor/v8/include/v8-array-buffer.h +59 -0
  19. data/vendor/v8/include/v8-callbacks.h +14 -1
  20. data/vendor/v8/include/v8-context.h +50 -3
  21. data/vendor/v8/include/v8-cppgc.h +10 -0
  22. data/vendor/v8/include/v8-data.h +1 -1
  23. data/vendor/v8/include/v8-embedder-heap.h +0 -169
  24. data/vendor/v8/include/v8-fast-api-calls.h +7 -3
  25. data/vendor/v8/include/v8-function-callback.h +69 -42
  26. data/vendor/v8/include/v8-function.h +1 -0
  27. data/vendor/v8/include/v8-inspector.h +20 -5
  28. data/vendor/v8/include/v8-internal.h +242 -150
  29. data/vendor/v8/include/v8-isolate.h +30 -40
  30. data/vendor/v8/include/v8-local-handle.h +81 -48
  31. data/vendor/v8/include/v8-metrics.h +28 -2
  32. data/vendor/v8/include/v8-microtask-queue.h +5 -0
  33. data/vendor/v8/include/v8-object.h +21 -3
  34. data/vendor/v8/include/v8-persistent-handle.h +25 -16
  35. data/vendor/v8/include/v8-platform.h +79 -10
  36. data/vendor/v8/include/v8-primitive.h +19 -12
  37. data/vendor/v8/include/v8-profiler.h +49 -31
  38. data/vendor/v8/include/v8-script.h +29 -1
  39. data/vendor/v8/include/v8-snapshot.h +4 -8
  40. data/vendor/v8/include/v8-template.h +3 -1
  41. data/vendor/v8/include/v8-traced-handle.h +22 -28
  42. data/vendor/v8/include/v8-util.h +9 -3
  43. data/vendor/v8/include/v8-value.h +31 -4
  44. data/vendor/v8/include/v8-version.h +4 -4
  45. data/vendor/v8/include/v8-wasm.h +2 -1
  46. data/vendor/v8/include/v8config.h +73 -2
  47. data/vendor/v8/x86_64-darwin/libv8/obj/libv8_monolith.a +0 -0
  48. metadata +1 -1
@@ -244,6 +244,11 @@ class V8_EXPORT Value : public Data {
244
244
  */
245
245
  bool IsWeakSet() const;
246
246
 
247
+ /**
248
+ * Returns true if this value is a WeakRef.
249
+ */
250
+ bool IsWeakRef() const;
251
+
247
252
  /**
248
253
  * Returns true if this value is an ArrayBuffer.
249
254
  */
@@ -339,6 +344,11 @@ class V8_EXPORT Value : public Data {
339
344
  */
340
345
  bool IsWasmModuleObject() const;
341
346
 
347
+ /**
348
+ * Returns true if this value is the WasmNull object.
349
+ */
350
+ bool IsWasmNull() const;
351
+
342
352
  /**
343
353
  * Returns true if the value is a Module Namespace Object.
344
354
  */
@@ -464,10 +474,14 @@ bool Value::IsUndefined() const {
464
474
  bool Value::QuickIsUndefined() const {
465
475
  using A = internal::Address;
466
476
  using I = internal::Internals;
467
- A obj = *reinterpret_cast<const A*>(this);
477
+ A obj = internal::ValueHelper::ValueAsAddress(this);
478
+ #if V8_STATIC_ROOTS_BOOL
479
+ return I::is_identical(obj, I::StaticReadOnlyRoot::kUndefinedValue);
480
+ #else
468
481
  if (!I::HasHeapObjectTag(obj)) return false;
469
482
  if (I::GetInstanceType(obj) != I::kOddballType) return false;
470
483
  return (I::GetOddballKind(obj) == I::kUndefinedOddballKind);
484
+ #endif // V8_STATIC_ROOTS_BOOL
471
485
  }
472
486
 
473
487
  bool Value::IsNull() const {
@@ -481,10 +495,14 @@ bool Value::IsNull() const {
481
495
  bool Value::QuickIsNull() const {
482
496
  using A = internal::Address;
483
497
  using I = internal::Internals;
484
- A obj = *reinterpret_cast<const A*>(this);
498
+ A obj = internal::ValueHelper::ValueAsAddress(this);
499
+ #if V8_STATIC_ROOTS_BOOL
500
+ return I::is_identical(obj, I::StaticReadOnlyRoot::kNullValue);
501
+ #else
485
502
  if (!I::HasHeapObjectTag(obj)) return false;
486
503
  if (I::GetInstanceType(obj) != I::kOddballType) return false;
487
504
  return (I::GetOddballKind(obj) == I::kNullOddballKind);
505
+ #endif // V8_STATIC_ROOTS_BOOL
488
506
  }
489
507
 
490
508
  bool Value::IsNullOrUndefined() const {
@@ -496,13 +514,17 @@ bool Value::IsNullOrUndefined() const {
496
514
  }
497
515
 
498
516
  bool Value::QuickIsNullOrUndefined() const {
517
+ #if V8_STATIC_ROOTS_BOOL
518
+ return QuickIsNull() || QuickIsUndefined();
519
+ #else
499
520
  using A = internal::Address;
500
521
  using I = internal::Internals;
501
- A obj = *reinterpret_cast<const A*>(this);
522
+ A obj = internal::ValueHelper::ValueAsAddress(this);
502
523
  if (!I::HasHeapObjectTag(obj)) return false;
503
524
  if (I::GetInstanceType(obj) != I::kOddballType) return false;
504
525
  int kind = I::GetOddballKind(obj);
505
526
  return kind == I::kNullOddballKind || kind == I::kUndefinedOddballKind;
527
+ #endif // V8_STATIC_ROOTS_BOOL
506
528
  }
507
529
 
508
530
  bool Value::IsString() const {
@@ -516,9 +538,14 @@ bool Value::IsString() const {
516
538
  bool Value::QuickIsString() const {
517
539
  using A = internal::Address;
518
540
  using I = internal::Internals;
519
- A obj = *reinterpret_cast<const A*>(this);
541
+ A obj = internal::ValueHelper::ValueAsAddress(this);
520
542
  if (!I::HasHeapObjectTag(obj)) return false;
543
+ #if V8_STATIC_ROOTS_BOOL && !V8_MAP_PACKING
544
+ return I::CheckInstanceMapRange(obj, I::StaticReadOnlyRoot::kFirstStringMap,
545
+ I::StaticReadOnlyRoot::kLastStringMap);
546
+ #else
521
547
  return (I::GetInstanceType(obj) < I::kFirstNonstringType);
548
+ #endif // V8_STATIC_ROOTS_BOOL
522
549
  }
523
550
 
524
551
  } // namespace v8
@@ -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 10
12
- #define V8_MINOR_VERSION 8
13
- #define V8_BUILD_NUMBER 168
14
- #define V8_PATCH_LEVEL 25
11
+ #define V8_MAJOR_VERSION 11
12
+ #define V8_MINOR_VERSION 3
13
+ #define V8_BUILD_NUMBER 244
14
+ #define V8_PATCH_LEVEL 8
15
15
 
16
16
  // Use 1 for candidates and 0 otherwise.
17
17
  // (Boolean macro values are not supported by all preprocessors.)
@@ -144,7 +144,7 @@ class V8_EXPORT WasmStreaming final {
144
144
  /**
145
145
  * {Finish} should be called after all received bytes where passed to
146
146
  * {OnBytesReceived} to tell V8 that there will be no more bytes. {Finish}
147
- * does not have to be called after {Abort} has been called already.
147
+ * must not be called after {Abort} has been called already.
148
148
  * If {can_use_compiled_module} is true and {SetCompiledModuleBytes} was
149
149
  * previously called, the compiled module bytes can be used.
150
150
  * If {can_use_compiled_module} is false, the compiled module bytes previously
@@ -156,6 +156,7 @@ class V8_EXPORT WasmStreaming final {
156
156
  * Abort streaming compilation. If {exception} has a value, then the promise
157
157
  * associated with streaming compilation is rejected with that value. If
158
158
  * {exception} does not have value, the promise does not get rejected.
159
+ * {Abort} must not be called repeatedly, or after {Finish}.
159
160
  */
160
161
  void Abort(MaybeLocal<Value> exception);
161
162
 
@@ -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,6 +311,9 @@ 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
@@ -334,9 +343,27 @@ path. Add it with -I<path> to the command line
334
343
  #endif
335
344
 
336
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))
337
349
  # define V8_HAS_ATTRIBUTE_NONNULL (__has_attribute(nonnull))
338
350
  # define V8_HAS_ATTRIBUTE_NOINLINE (__has_attribute(noinline))
339
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
340
367
  # define V8_HAS_ATTRIBUTE_VISIBILITY (__has_attribute(visibility))
341
368
  # define V8_HAS_ATTRIBUTE_WARN_UNUSED_RESULT \
342
369
  (__has_attribute(warn_unused_result))
@@ -355,6 +382,9 @@ path. Add it with -I<path> to the command line
355
382
  # define V8_HAS_BUILTIN_EXPECT (__has_builtin(__builtin_expect))
356
383
  # define V8_HAS_BUILTIN_FRAME_ADDRESS (__has_builtin(__builtin_frame_address))
357
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))
358
388
  # define V8_HAS_BUILTIN_SADD_OVERFLOW (__has_builtin(__builtin_sadd_overflow))
359
389
  # define V8_HAS_BUILTIN_SSUB_OVERFLOW (__has_builtin(__builtin_ssub_overflow))
360
390
  # define V8_HAS_BUILTIN_UADD_OVERFLOW (__has_builtin(__builtin_uadd_overflow))
@@ -450,6 +480,26 @@ path. Add it with -I<path> to the command line
450
480
  #endif
451
481
 
452
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
+
453
503
  // A macro to mark specific arguments as non-null.
454
504
  // Use like:
455
505
  // int add(int* x, int y, int* z) V8_NONNULL(1, 3) { return *x + y + *z; }
@@ -472,6 +522,21 @@ path. Add it with -I<path> to the command line
472
522
  #endif
473
523
 
474
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
+
475
540
  // A macro (V8_DEPRECATED) to mark classes or functions as deprecated.
476
541
  #if defined(V8_DEPRECATION_WARNINGS)
477
542
  # define V8_DEPRECATED(message) [[deprecated(message)]]
@@ -869,4 +934,10 @@ V8 shared library set USING_V8_SHARED.
869
934
 
870
935
  #undef V8_HAS_CPP_ATTRIBUTE
871
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
+
872
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: 19.9.0.0
4
+ version: 20.2.0.0
5
5
  platform: x86_64-darwin
6
6
  authors:
7
7
  - ''