libv8-node 15.14.0.1-x86_64-linux-musl → 17.9.1.0-x86_64-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/include/cppgc/allocation.h +110 -44
  6. data/vendor/v8/include/cppgc/common.h +9 -6
  7. data/vendor/v8/include/cppgc/cross-thread-persistent.h +465 -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 +253 -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 +4 -3
  19. data/vendor/v8/include/cppgc/internal/compiler-specific.h +2 -2
  20. data/vendor/v8/include/cppgc/internal/finalizer-trait.h +2 -0
  21. data/vendor/v8/include/cppgc/internal/gc-info.h +124 -13
  22. data/vendor/v8/include/cppgc/internal/name-trait.h +122 -0
  23. data/vendor/v8/include/cppgc/internal/persistent-node.h +94 -6
  24. data/vendor/v8/include/cppgc/internal/pointer-policies.h +81 -29
  25. data/vendor/v8/include/cppgc/internal/prefinalizer-handler.h +1 -1
  26. data/vendor/v8/include/cppgc/internal/write-barrier.h +398 -35
  27. data/vendor/v8/include/cppgc/liveness-broker.h +11 -2
  28. data/vendor/v8/include/cppgc/macros.h +2 -0
  29. data/vendor/v8/include/cppgc/member.h +87 -25
  30. data/vendor/v8/include/cppgc/name-provider.h +65 -0
  31. data/vendor/v8/include/cppgc/object-size-trait.h +58 -0
  32. data/vendor/v8/include/cppgc/persistent.h +41 -11
  33. data/vendor/v8/include/cppgc/platform.h +49 -25
  34. data/vendor/v8/include/cppgc/prefinalizer.h +2 -2
  35. data/vendor/v8/include/cppgc/process-heap-statistics.h +36 -0
  36. data/vendor/v8/include/cppgc/sentinel-pointer.h +32 -0
  37. data/vendor/v8/include/cppgc/source-location.h +2 -1
  38. data/vendor/v8/include/cppgc/testing.h +99 -0
  39. data/vendor/v8/include/cppgc/trace-trait.h +8 -3
  40. data/vendor/v8/include/cppgc/type-traits.h +157 -19
  41. data/vendor/v8/include/cppgc/visitor.h +194 -28
  42. data/vendor/v8/include/libplatform/libplatform.h +11 -0
  43. data/vendor/v8/include/libplatform/v8-tracing.h +2 -0
  44. data/vendor/v8/include/v8-array-buffer.h +433 -0
  45. data/vendor/v8/include/v8-callbacks.h +377 -0
  46. data/vendor/v8/include/v8-container.h +129 -0
  47. data/vendor/v8/include/v8-context.h +418 -0
  48. data/vendor/v8/include/v8-cppgc.h +261 -159
  49. data/vendor/v8/include/v8-data.h +65 -0
  50. data/vendor/v8/include/v8-date.h +43 -0
  51. data/vendor/v8/include/v8-debug.h +151 -0
  52. data/vendor/v8/include/v8-embedder-heap.h +238 -0
  53. data/vendor/v8/include/v8-exception.h +224 -0
  54. data/vendor/v8/include/v8-extension.h +62 -0
  55. data/vendor/v8/include/v8-external.h +37 -0
  56. data/vendor/v8/include/v8-fast-api-calls.h +652 -152
  57. data/vendor/v8/include/v8-forward.h +81 -0
  58. data/vendor/v8/include/v8-function-callback.h +475 -0
  59. data/vendor/v8/include/v8-function.h +122 -0
  60. data/vendor/v8/include/v8-initialization.h +282 -0
  61. data/vendor/v8/include/v8-inspector.h +33 -25
  62. data/vendor/v8/include/v8-internal.h +178 -31
  63. data/vendor/v8/include/v8-isolate.h +1662 -0
  64. data/vendor/v8/include/v8-json.h +47 -0
  65. data/vendor/v8/include/v8-local-handle.h +459 -0
  66. data/vendor/v8/include/v8-locker.h +148 -0
  67. data/vendor/v8/include/v8-maybe.h +137 -0
  68. data/vendor/v8/include/v8-memory-span.h +43 -0
  69. data/vendor/v8/include/v8-message.h +241 -0
  70. data/vendor/v8/include/v8-metrics.h +114 -9
  71. data/vendor/v8/include/v8-microtask-queue.h +152 -0
  72. data/vendor/v8/include/v8-microtask.h +28 -0
  73. data/vendor/v8/include/v8-object.h +770 -0
  74. data/vendor/v8/include/v8-persistent-handle.h +590 -0
  75. data/vendor/v8/include/v8-platform.h +74 -25
  76. data/vendor/v8/include/v8-primitive-object.h +118 -0
  77. data/vendor/v8/include/v8-primitive.h +858 -0
  78. data/vendor/v8/include/v8-profiler.h +72 -9
  79. data/vendor/v8/include/v8-promise.h +174 -0
  80. data/vendor/v8/include/v8-proxy.h +50 -0
  81. data/vendor/v8/include/v8-regexp.h +105 -0
  82. data/vendor/v8/include/v8-script.h +771 -0
  83. data/vendor/v8/include/v8-snapshot.h +198 -0
  84. data/vendor/v8/include/v8-statistics.h +215 -0
  85. data/vendor/v8/include/v8-template.h +1052 -0
  86. data/vendor/v8/include/v8-traced-handle.h +605 -0
  87. data/vendor/v8/include/v8-typed-array.h +282 -0
  88. data/vendor/v8/include/v8-unwinder-state.h +31 -0
  89. data/vendor/v8/include/v8-unwinder.h +129 -0
  90. data/vendor/v8/include/v8-util.h +8 -2
  91. data/vendor/v8/include/v8-value-serializer.h +249 -0
  92. data/vendor/v8/include/v8-value.h +526 -0
  93. data/vendor/v8/include/v8-version.h +3 -3
  94. data/vendor/v8/include/v8-wasm.h +245 -0
  95. data/vendor/v8/include/v8-weak-callback-info.h +73 -0
  96. data/vendor/v8/include/v8.h +41 -12050
  97. data/vendor/v8/include/v8config.h +87 -11
  98. data/vendor/v8/{out.gn → x86_64-linux-musl}/libv8/obj/libv8_monolith.a +0 -0
  99. metadata +63 -9
  100. data/vendor/v8/include/cppgc/internal/process-heap.h +0 -34
@@ -0,0 +1,526 @@
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_VALUE_H_
6
+ #define INCLUDE_V8_VALUE_H_
7
+
8
+ #include "v8-data.h" // NOLINT(build/include_directory)
9
+ #include "v8-internal.h" // NOLINT(build/include_directory)
10
+ #include "v8-local-handle.h" // NOLINT(build/include_directory)
11
+ #include "v8-maybe.h" // NOLINT(build/include_directory)
12
+ #include "v8config.h" // NOLINT(build/include_directory)
13
+
14
+ /**
15
+ * The v8 JavaScript engine.
16
+ */
17
+ namespace v8 {
18
+
19
+ class BigInt;
20
+ class Int32;
21
+ class Integer;
22
+ class Number;
23
+ class Object;
24
+ class String;
25
+ class Uint32;
26
+
27
+ /**
28
+ * The superclass of all JavaScript values and objects.
29
+ */
30
+ class V8_EXPORT Value : public Data {
31
+ public:
32
+ /**
33
+ * Returns true if this value is the undefined value. See ECMA-262
34
+ * 4.3.10.
35
+ *
36
+ * This is equivalent to `value === undefined` in JS.
37
+ */
38
+ V8_INLINE bool IsUndefined() const;
39
+
40
+ /**
41
+ * Returns true if this value is the null value. See ECMA-262
42
+ * 4.3.11.
43
+ *
44
+ * This is equivalent to `value === null` in JS.
45
+ */
46
+ V8_INLINE bool IsNull() const;
47
+
48
+ /**
49
+ * Returns true if this value is either the null or the undefined value.
50
+ * See ECMA-262
51
+ * 4.3.11. and 4.3.12
52
+ *
53
+ * This is equivalent to `value == null` in JS.
54
+ */
55
+ V8_INLINE bool IsNullOrUndefined() const;
56
+
57
+ /**
58
+ * Returns true if this value is true.
59
+ *
60
+ * This is not the same as `BooleanValue()`. The latter performs a
61
+ * conversion to boolean, i.e. the result of `Boolean(value)` in JS, whereas
62
+ * this checks `value === true`.
63
+ */
64
+ bool IsTrue() const;
65
+
66
+ /**
67
+ * Returns true if this value is false.
68
+ *
69
+ * This is not the same as `!BooleanValue()`. The latter performs a
70
+ * conversion to boolean, i.e. the result of `!Boolean(value)` in JS, whereas
71
+ * this checks `value === false`.
72
+ */
73
+ bool IsFalse() const;
74
+
75
+ /**
76
+ * Returns true if this value is a symbol or a string.
77
+ *
78
+ * This is equivalent to
79
+ * `typeof value === 'string' || typeof value === 'symbol'` in JS.
80
+ */
81
+ bool IsName() const;
82
+
83
+ /**
84
+ * Returns true if this value is an instance of the String type.
85
+ * See ECMA-262 8.4.
86
+ *
87
+ * This is equivalent to `typeof value === 'string'` in JS.
88
+ */
89
+ V8_INLINE bool IsString() const;
90
+
91
+ /**
92
+ * Returns true if this value is a symbol.
93
+ *
94
+ * This is equivalent to `typeof value === 'symbol'` in JS.
95
+ */
96
+ bool IsSymbol() const;
97
+
98
+ /**
99
+ * Returns true if this value is a function.
100
+ *
101
+ * This is equivalent to `typeof value === 'function'` in JS.
102
+ */
103
+ bool IsFunction() const;
104
+
105
+ /**
106
+ * Returns true if this value is an array. Note that it will return false for
107
+ * an Proxy for an array.
108
+ */
109
+ bool IsArray() const;
110
+
111
+ /**
112
+ * Returns true if this value is an object.
113
+ */
114
+ bool IsObject() const;
115
+
116
+ /**
117
+ * Returns true if this value is a bigint.
118
+ *
119
+ * This is equivalent to `typeof value === 'bigint'` in JS.
120
+ */
121
+ bool IsBigInt() const;
122
+
123
+ /**
124
+ * Returns true if this value is boolean.
125
+ *
126
+ * This is equivalent to `typeof value === 'boolean'` in JS.
127
+ */
128
+ bool IsBoolean() const;
129
+
130
+ /**
131
+ * Returns true if this value is a number.
132
+ *
133
+ * This is equivalent to `typeof value === 'number'` in JS.
134
+ */
135
+ bool IsNumber() const;
136
+
137
+ /**
138
+ * Returns true if this value is an `External` object.
139
+ */
140
+ bool IsExternal() const;
141
+
142
+ /**
143
+ * Returns true if this value is a 32-bit signed integer.
144
+ */
145
+ bool IsInt32() const;
146
+
147
+ /**
148
+ * Returns true if this value is a 32-bit unsigned integer.
149
+ */
150
+ bool IsUint32() const;
151
+
152
+ /**
153
+ * Returns true if this value is a Date.
154
+ */
155
+ bool IsDate() const;
156
+
157
+ /**
158
+ * Returns true if this value is an Arguments object.
159
+ */
160
+ bool IsArgumentsObject() const;
161
+
162
+ /**
163
+ * Returns true if this value is a BigInt object.
164
+ */
165
+ bool IsBigIntObject() const;
166
+
167
+ /**
168
+ * Returns true if this value is a Boolean object.
169
+ */
170
+ bool IsBooleanObject() const;
171
+
172
+ /**
173
+ * Returns true if this value is a Number object.
174
+ */
175
+ bool IsNumberObject() const;
176
+
177
+ /**
178
+ * Returns true if this value is a String object.
179
+ */
180
+ bool IsStringObject() const;
181
+
182
+ /**
183
+ * Returns true if this value is a Symbol object.
184
+ */
185
+ bool IsSymbolObject() const;
186
+
187
+ /**
188
+ * Returns true if this value is a NativeError.
189
+ */
190
+ bool IsNativeError() const;
191
+
192
+ /**
193
+ * Returns true if this value is a RegExp.
194
+ */
195
+ bool IsRegExp() const;
196
+
197
+ /**
198
+ * Returns true if this value is an async function.
199
+ */
200
+ bool IsAsyncFunction() const;
201
+
202
+ /**
203
+ * Returns true if this value is a Generator function.
204
+ */
205
+ bool IsGeneratorFunction() const;
206
+
207
+ /**
208
+ * Returns true if this value is a Generator object (iterator).
209
+ */
210
+ bool IsGeneratorObject() const;
211
+
212
+ /**
213
+ * Returns true if this value is a Promise.
214
+ */
215
+ bool IsPromise() const;
216
+
217
+ /**
218
+ * Returns true if this value is a Map.
219
+ */
220
+ bool IsMap() const;
221
+
222
+ /**
223
+ * Returns true if this value is a Set.
224
+ */
225
+ bool IsSet() const;
226
+
227
+ /**
228
+ * Returns true if this value is a Map Iterator.
229
+ */
230
+ bool IsMapIterator() const;
231
+
232
+ /**
233
+ * Returns true if this value is a Set Iterator.
234
+ */
235
+ bool IsSetIterator() const;
236
+
237
+ /**
238
+ * Returns true if this value is a WeakMap.
239
+ */
240
+ bool IsWeakMap() const;
241
+
242
+ /**
243
+ * Returns true if this value is a WeakSet.
244
+ */
245
+ bool IsWeakSet() const;
246
+
247
+ /**
248
+ * Returns true if this value is an ArrayBuffer.
249
+ */
250
+ bool IsArrayBuffer() const;
251
+
252
+ /**
253
+ * Returns true if this value is an ArrayBufferView.
254
+ */
255
+ bool IsArrayBufferView() const;
256
+
257
+ /**
258
+ * Returns true if this value is one of TypedArrays.
259
+ */
260
+ bool IsTypedArray() const;
261
+
262
+ /**
263
+ * Returns true if this value is an Uint8Array.
264
+ */
265
+ bool IsUint8Array() const;
266
+
267
+ /**
268
+ * Returns true if this value is an Uint8ClampedArray.
269
+ */
270
+ bool IsUint8ClampedArray() const;
271
+
272
+ /**
273
+ * Returns true if this value is an Int8Array.
274
+ */
275
+ bool IsInt8Array() const;
276
+
277
+ /**
278
+ * Returns true if this value is an Uint16Array.
279
+ */
280
+ bool IsUint16Array() const;
281
+
282
+ /**
283
+ * Returns true if this value is an Int16Array.
284
+ */
285
+ bool IsInt16Array() const;
286
+
287
+ /**
288
+ * Returns true if this value is an Uint32Array.
289
+ */
290
+ bool IsUint32Array() const;
291
+
292
+ /**
293
+ * Returns true if this value is an Int32Array.
294
+ */
295
+ bool IsInt32Array() const;
296
+
297
+ /**
298
+ * Returns true if this value is a Float32Array.
299
+ */
300
+ bool IsFloat32Array() const;
301
+
302
+ /**
303
+ * Returns true if this value is a Float64Array.
304
+ */
305
+ bool IsFloat64Array() const;
306
+
307
+ /**
308
+ * Returns true if this value is a BigInt64Array.
309
+ */
310
+ bool IsBigInt64Array() const;
311
+
312
+ /**
313
+ * Returns true if this value is a BigUint64Array.
314
+ */
315
+ bool IsBigUint64Array() const;
316
+
317
+ /**
318
+ * Returns true if this value is a DataView.
319
+ */
320
+ bool IsDataView() const;
321
+
322
+ /**
323
+ * Returns true if this value is a SharedArrayBuffer.
324
+ */
325
+ bool IsSharedArrayBuffer() const;
326
+
327
+ /**
328
+ * Returns true if this value is a JavaScript Proxy.
329
+ */
330
+ bool IsProxy() const;
331
+
332
+ /**
333
+ * Returns true if this value is a WasmMemoryObject.
334
+ */
335
+ bool IsWasmMemoryObject() const;
336
+
337
+ /**
338
+ * Returns true if this value is a WasmModuleObject.
339
+ */
340
+ bool IsWasmModuleObject() const;
341
+
342
+ /**
343
+ * Returns true if the value is a Module Namespace Object.
344
+ */
345
+ bool IsModuleNamespaceObject() const;
346
+
347
+ /**
348
+ * Perform the equivalent of `BigInt(value)` in JS.
349
+ */
350
+ V8_WARN_UNUSED_RESULT MaybeLocal<BigInt> ToBigInt(
351
+ Local<Context> context) const;
352
+ /**
353
+ * Perform the equivalent of `Number(value)` in JS.
354
+ */
355
+ V8_WARN_UNUSED_RESULT MaybeLocal<Number> ToNumber(
356
+ Local<Context> context) const;
357
+ /**
358
+ * Perform the equivalent of `String(value)` in JS.
359
+ */
360
+ V8_WARN_UNUSED_RESULT MaybeLocal<String> ToString(
361
+ Local<Context> context) const;
362
+ /**
363
+ * Provide a string representation of this value usable for debugging.
364
+ * This operation has no observable side effects and will succeed
365
+ * unless e.g. execution is being terminated.
366
+ */
367
+ V8_WARN_UNUSED_RESULT MaybeLocal<String> ToDetailString(
368
+ Local<Context> context) const;
369
+ /**
370
+ * Perform the equivalent of `Object(value)` in JS.
371
+ */
372
+ V8_WARN_UNUSED_RESULT MaybeLocal<Object> ToObject(
373
+ Local<Context> context) const;
374
+ /**
375
+ * Perform the equivalent of `Number(value)` in JS and convert the result
376
+ * to an integer. Negative values are rounded up, positive values are rounded
377
+ * down. NaN is converted to 0. Infinite values yield undefined results.
378
+ */
379
+ V8_WARN_UNUSED_RESULT MaybeLocal<Integer> ToInteger(
380
+ Local<Context> context) const;
381
+ /**
382
+ * Perform the equivalent of `Number(value)` in JS and convert the result
383
+ * to an unsigned 32-bit integer by performing the steps in
384
+ * https://tc39.es/ecma262/#sec-touint32.
385
+ */
386
+ V8_WARN_UNUSED_RESULT MaybeLocal<Uint32> ToUint32(
387
+ Local<Context> context) const;
388
+ /**
389
+ * Perform the equivalent of `Number(value)` in JS and convert the result
390
+ * to a signed 32-bit integer by performing the steps in
391
+ * https://tc39.es/ecma262/#sec-toint32.
392
+ */
393
+ V8_WARN_UNUSED_RESULT MaybeLocal<Int32> ToInt32(Local<Context> context) const;
394
+
395
+ /**
396
+ * Perform the equivalent of `Boolean(value)` in JS. This can never fail.
397
+ */
398
+ Local<Boolean> ToBoolean(Isolate* isolate) const;
399
+
400
+ /**
401
+ * Attempts to convert a string to an array index.
402
+ * Returns an empty handle if the conversion fails.
403
+ */
404
+ V8_WARN_UNUSED_RESULT MaybeLocal<Uint32> ToArrayIndex(
405
+ Local<Context> context) const;
406
+
407
+ /** Returns the equivalent of `ToBoolean()->Value()`. */
408
+ bool BooleanValue(Isolate* isolate) const;
409
+
410
+ /** Returns the equivalent of `ToNumber()->Value()`. */
411
+ V8_WARN_UNUSED_RESULT Maybe<double> NumberValue(Local<Context> context) const;
412
+ /** Returns the equivalent of `ToInteger()->Value()`. */
413
+ V8_WARN_UNUSED_RESULT Maybe<int64_t> IntegerValue(
414
+ Local<Context> context) const;
415
+ /** Returns the equivalent of `ToUint32()->Value()`. */
416
+ V8_WARN_UNUSED_RESULT Maybe<uint32_t> Uint32Value(
417
+ Local<Context> context) const;
418
+ /** Returns the equivalent of `ToInt32()->Value()`. */
419
+ V8_WARN_UNUSED_RESULT Maybe<int32_t> Int32Value(Local<Context> context) const;
420
+
421
+ /** JS == */
422
+ V8_WARN_UNUSED_RESULT Maybe<bool> Equals(Local<Context> context,
423
+ Local<Value> that) const;
424
+ bool StrictEquals(Local<Value> that) const;
425
+ bool SameValue(Local<Value> that) const;
426
+
427
+ template <class T>
428
+ V8_INLINE static Value* Cast(T* value) {
429
+ return static_cast<Value*>(value);
430
+ }
431
+
432
+ Local<String> TypeOf(Isolate*);
433
+
434
+ Maybe<bool> InstanceOf(Local<Context> context, Local<Object> object);
435
+
436
+ private:
437
+ V8_INLINE bool QuickIsUndefined() const;
438
+ V8_INLINE bool QuickIsNull() const;
439
+ V8_INLINE bool QuickIsNullOrUndefined() const;
440
+ V8_INLINE bool QuickIsString() const;
441
+ bool FullIsUndefined() const;
442
+ bool FullIsNull() const;
443
+ bool FullIsString() const;
444
+
445
+ static void CheckCast(Data* that);
446
+ };
447
+
448
+ template <>
449
+ V8_INLINE Value* Value::Cast(Data* value) {
450
+ #ifdef V8_ENABLE_CHECKS
451
+ CheckCast(value);
452
+ #endif
453
+ return static_cast<Value*>(value);
454
+ }
455
+
456
+ bool Value::IsUndefined() const {
457
+ #ifdef V8_ENABLE_CHECKS
458
+ return FullIsUndefined();
459
+ #else
460
+ return QuickIsUndefined();
461
+ #endif
462
+ }
463
+
464
+ bool Value::QuickIsUndefined() const {
465
+ using A = internal::Address;
466
+ using I = internal::Internals;
467
+ A obj = *reinterpret_cast<const A*>(this);
468
+ if (!I::HasHeapObjectTag(obj)) return false;
469
+ if (I::GetInstanceType(obj) != I::kOddballType) return false;
470
+ return (I::GetOddballKind(obj) == I::kUndefinedOddballKind);
471
+ }
472
+
473
+ bool Value::IsNull() const {
474
+ #ifdef V8_ENABLE_CHECKS
475
+ return FullIsNull();
476
+ #else
477
+ return QuickIsNull();
478
+ #endif
479
+ }
480
+
481
+ bool Value::QuickIsNull() const {
482
+ using A = internal::Address;
483
+ using I = internal::Internals;
484
+ A obj = *reinterpret_cast<const A*>(this);
485
+ if (!I::HasHeapObjectTag(obj)) return false;
486
+ if (I::GetInstanceType(obj) != I::kOddballType) return false;
487
+ return (I::GetOddballKind(obj) == I::kNullOddballKind);
488
+ }
489
+
490
+ bool Value::IsNullOrUndefined() const {
491
+ #ifdef V8_ENABLE_CHECKS
492
+ return FullIsNull() || FullIsUndefined();
493
+ #else
494
+ return QuickIsNullOrUndefined();
495
+ #endif
496
+ }
497
+
498
+ bool Value::QuickIsNullOrUndefined() const {
499
+ using A = internal::Address;
500
+ using I = internal::Internals;
501
+ A obj = *reinterpret_cast<const A*>(this);
502
+ if (!I::HasHeapObjectTag(obj)) return false;
503
+ if (I::GetInstanceType(obj) != I::kOddballType) return false;
504
+ int kind = I::GetOddballKind(obj);
505
+ return kind == I::kNullOddballKind || kind == I::kUndefinedOddballKind;
506
+ }
507
+
508
+ bool Value::IsString() const {
509
+ #ifdef V8_ENABLE_CHECKS
510
+ return FullIsString();
511
+ #else
512
+ return QuickIsString();
513
+ #endif
514
+ }
515
+
516
+ bool Value::QuickIsString() const {
517
+ using A = internal::Address;
518
+ using I = internal::Internals;
519
+ A obj = *reinterpret_cast<const A*>(this);
520
+ if (!I::HasHeapObjectTag(obj)) return false;
521
+ return (I::GetInstanceType(obj) < I::kFirstNonstringType);
522
+ }
523
+
524
+ } // namespace v8
525
+
526
+ #endif // INCLUDE_V8_VALUE_H_
@@ -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
11
+ #define V8_MAJOR_VERSION 9
12
12
  #define V8_MINOR_VERSION 6
13
- #define V8_BUILD_NUMBER 395
14
- #define V8_PATCH_LEVEL 17
13
+ #define V8_BUILD_NUMBER 180
14
+ #define V8_PATCH_LEVEL 15
15
15
 
16
16
  // Use 1 for candidates and 0 otherwise.
17
17
  // (Boolean macro values are not supported by all preprocessors.)