/src/node/deps/v8/include/v8-internal.h
Line | Count | Source (jump to first uncovered line) |
1 | | // Copyright 2018 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_INTERNAL_H_ |
6 | | #define INCLUDE_V8_INTERNAL_H_ |
7 | | |
8 | | #include <stddef.h> |
9 | | #include <stdint.h> |
10 | | #include <string.h> |
11 | | |
12 | | #include <atomic> |
13 | | #include <iterator> |
14 | | #include <memory> |
15 | | #include <type_traits> |
16 | | |
17 | | #include "v8config.h" // NOLINT(build/include_directory) |
18 | | |
19 | | namespace v8 { |
20 | | |
21 | | class Array; |
22 | | class Context; |
23 | | class Data; |
24 | | class Isolate; |
25 | | |
26 | | namespace internal { |
27 | | |
28 | | class Heap; |
29 | | class Isolate; |
30 | | |
31 | | typedef uintptr_t Address; |
32 | | static constexpr Address kNullAddress = 0; |
33 | | |
34 | | constexpr int KB = 1024; |
35 | | constexpr int MB = KB * 1024; |
36 | | constexpr int GB = MB * 1024; |
37 | | #ifdef V8_TARGET_ARCH_X64 |
38 | | constexpr size_t TB = size_t{GB} * 1024; |
39 | | #endif |
40 | | |
41 | | /** |
42 | | * Configuration of tagging scheme. |
43 | | */ |
44 | | const int kApiSystemPointerSize = sizeof(void*); |
45 | | const int kApiDoubleSize = sizeof(double); |
46 | | const int kApiInt32Size = sizeof(int32_t); |
47 | | const int kApiInt64Size = sizeof(int64_t); |
48 | | const int kApiSizetSize = sizeof(size_t); |
49 | | |
50 | | // Tag information for HeapObject. |
51 | | const int kHeapObjectTag = 1; |
52 | | const int kWeakHeapObjectTag = 3; |
53 | | const int kHeapObjectTagSize = 2; |
54 | | const intptr_t kHeapObjectTagMask = (1 << kHeapObjectTagSize) - 1; |
55 | | const intptr_t kHeapObjectReferenceTagMask = 1 << (kHeapObjectTagSize - 1); |
56 | | |
57 | | // Tag information for fowarding pointers stored in object headers. |
58 | | // 0b00 at the lowest 2 bits in the header indicates that the map word is a |
59 | | // forwarding pointer. |
60 | | const int kForwardingTag = 0; |
61 | | const int kForwardingTagSize = 2; |
62 | | const intptr_t kForwardingTagMask = (1 << kForwardingTagSize) - 1; |
63 | | |
64 | | // Tag information for Smi. |
65 | | const int kSmiTag = 0; |
66 | | const int kSmiTagSize = 1; |
67 | | const intptr_t kSmiTagMask = (1 << kSmiTagSize) - 1; |
68 | | |
69 | | template <size_t tagged_ptr_size> |
70 | | struct SmiTagging; |
71 | | |
72 | | constexpr intptr_t kIntptrAllBitsSet = intptr_t{-1}; |
73 | | constexpr uintptr_t kUintptrAllBitsSet = |
74 | | static_cast<uintptr_t>(kIntptrAllBitsSet); |
75 | | |
76 | | // Smi constants for systems where tagged pointer is a 32-bit value. |
77 | | template <> |
78 | | struct SmiTagging<4> { |
79 | | enum { kSmiShiftSize = 0, kSmiValueSize = 31 }; |
80 | | |
81 | | static constexpr intptr_t kSmiMinValue = |
82 | | static_cast<intptr_t>(kUintptrAllBitsSet << (kSmiValueSize - 1)); |
83 | | static constexpr intptr_t kSmiMaxValue = -(kSmiMinValue + 1); |
84 | | |
85 | 0 | V8_INLINE static constexpr int SmiToInt(Address value) { |
86 | 0 | int shift_bits = kSmiTagSize + kSmiShiftSize; |
87 | 0 | // Truncate and shift down (requires >> to be sign extending). |
88 | 0 | return static_cast<int32_t>(static_cast<uint32_t>(value)) >> shift_bits; |
89 | 0 | } |
90 | 0 | V8_INLINE static constexpr bool IsValidSmi(intptr_t value) { |
91 | 0 | // Is value in range [kSmiMinValue, kSmiMaxValue]. |
92 | 0 | // Use unsigned operations in order to avoid undefined behaviour in case of |
93 | 0 | // signed integer overflow. |
94 | 0 | return (static_cast<uintptr_t>(value) - |
95 | 0 | static_cast<uintptr_t>(kSmiMinValue)) <= |
96 | 0 | (static_cast<uintptr_t>(kSmiMaxValue) - |
97 | 0 | static_cast<uintptr_t>(kSmiMinValue)); |
98 | 0 | } |
99 | | }; |
100 | | |
101 | | // Smi constants for systems where tagged pointer is a 64-bit value. |
102 | | template <> |
103 | | struct SmiTagging<8> { |
104 | | enum { kSmiShiftSize = 31, kSmiValueSize = 32 }; |
105 | | |
106 | | static constexpr intptr_t kSmiMinValue = |
107 | | static_cast<intptr_t>(kUintptrAllBitsSet << (kSmiValueSize - 1)); |
108 | | static constexpr intptr_t kSmiMaxValue = -(kSmiMinValue + 1); |
109 | | |
110 | 156k | V8_INLINE static constexpr int SmiToInt(Address value) { |
111 | 156k | int shift_bits = kSmiTagSize + kSmiShiftSize; |
112 | | // Shift down and throw away top 32 bits. |
113 | 156k | return static_cast<int>(static_cast<intptr_t>(value) >> shift_bits); |
114 | 156k | } |
115 | 526k | V8_INLINE static constexpr bool IsValidSmi(intptr_t value) { |
116 | | // To be representable as a long smi, the value must be a 32-bit integer. |
117 | 526k | return (value == static_cast<int32_t>(value)); |
118 | 526k | } |
119 | | }; |
120 | | |
121 | | #ifdef V8_COMPRESS_POINTERS |
122 | | // See v8:7703 or src/common/ptr-compr-inl.h for details about pointer |
123 | | // compression. |
124 | | constexpr size_t kPtrComprCageReservationSize = size_t{1} << 32; |
125 | | constexpr size_t kPtrComprCageBaseAlignment = size_t{1} << 32; |
126 | | |
127 | | static_assert( |
128 | | kApiSystemPointerSize == kApiInt64Size, |
129 | | "Pointer compression can be enabled only for 64-bit architectures"); |
130 | | const int kApiTaggedSize = kApiInt32Size; |
131 | | #else |
132 | | const int kApiTaggedSize = kApiSystemPointerSize; |
133 | | #endif |
134 | | |
135 | 0 | constexpr bool PointerCompressionIsEnabled() { |
136 | 0 | return kApiTaggedSize != kApiSystemPointerSize; |
137 | 0 | } |
138 | | |
139 | | #ifdef V8_31BIT_SMIS_ON_64BIT_ARCH |
140 | | using PlatformSmiTagging = SmiTagging<kApiInt32Size>; |
141 | | #else |
142 | | using PlatformSmiTagging = SmiTagging<kApiTaggedSize>; |
143 | | #endif |
144 | | |
145 | | // TODO(ishell): Consinder adding kSmiShiftBits = kSmiShiftSize + kSmiTagSize |
146 | | // since it's used much more often than the inividual constants. |
147 | | const int kSmiShiftSize = PlatformSmiTagging::kSmiShiftSize; |
148 | | const int kSmiValueSize = PlatformSmiTagging::kSmiValueSize; |
149 | | const int kSmiMinValue = static_cast<int>(PlatformSmiTagging::kSmiMinValue); |
150 | | const int kSmiMaxValue = static_cast<int>(PlatformSmiTagging::kSmiMaxValue); |
151 | 0 | constexpr bool SmiValuesAre31Bits() { return kSmiValueSize == 31; } |
152 | 0 | constexpr bool SmiValuesAre32Bits() { return kSmiValueSize == 32; } |
153 | 0 | constexpr bool Is64() { return kApiSystemPointerSize == sizeof(int64_t); } |
154 | | |
155 | 526k | V8_INLINE static constexpr Address IntToSmi(int value) { |
156 | 526k | return (static_cast<Address>(value) << (kSmiTagSize + kSmiShiftSize)) | |
157 | 526k | kSmiTag; |
158 | 526k | } Unexecuted instantiation: node_snapshot_stub.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: fuzz_ParseTxtReply.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: environment.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: hooks.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: async_wrap.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: base_object.cc:v8::internal::IntToSmi(int) cares_wrap.cc:v8::internal::IntToSmi(int) Line | Count | Source | 155 | 758 | V8_INLINE static constexpr Address IntToSmi(int value) { | 156 | 758 | return (static_cast<Address>(value) << (kSmiTagSize + kSmiShiftSize)) | | 157 | 758 | kSmiTag; | 158 | 758 | } |
Unexecuted instantiation: cleanup_queue.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: env.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: heap_utils.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: module_wrap.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: node.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: node_api.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: node_binding.cc:v8::internal::IntToSmi(int) node_blob.cc:v8::internal::IntToSmi(int) Line | Count | Source | 155 | 2 | V8_INLINE static constexpr Address IntToSmi(int value) { | 156 | 2 | return (static_cast<Address>(value) << (kSmiTagSize + kSmiShiftSize)) | | 157 | 2 | kSmiTag; | 158 | 2 | } |
node_buffer.cc:v8::internal::IntToSmi(int) Line | Count | Source | 155 | 276k | V8_INLINE static constexpr Address IntToSmi(int value) { | 156 | 276k | return (static_cast<Address>(value) << (kSmiTagSize + kSmiShiftSize)) | | 157 | 276k | kSmiTag; | 158 | 276k | } |
Unexecuted instantiation: node_builtins.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: node_config.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: node_constants.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: node_contextify.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: node_credentials.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: node_dir.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: node_dotenv.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: node_env_var.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: node_errors.cc:v8::internal::IntToSmi(int) node_file.cc:v8::internal::IntToSmi(int) Line | Count | Source | 155 | 9 | V8_INLINE static constexpr Address IntToSmi(int value) { | 156 | 9 | return (static_cast<Address>(value) << (kSmiTagSize + kSmiShiftSize)) | | 157 | 9 | kSmiTag; | 158 | 9 | } |
Unexecuted instantiation: node_http_parser.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: node_http2.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: node_i18n.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: node_main_instance.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: node_messaging.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: node_metadata.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: node_modules.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: node_options.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: node_os.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: node_perf.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: node_platform.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: node_process_events.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: node_process_methods.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: node_process_object.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: node_realm.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: node_report.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: node_report_module.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: node_report_utils.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: node_sea.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: node_serdes.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: node_shadow_realm.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: node_snapshotable.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: node_sockaddr.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: node_stat_watcher.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: node_symbols.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: node_task_queue.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: node_trace_events.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: node_types.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: node_url.cc:v8::internal::IntToSmi(int) node_util.cc:v8::internal::IntToSmi(int) Line | Count | Source | 155 | 164k | V8_INLINE static constexpr Address IntToSmi(int value) { | 156 | 164k | return (static_cast<Address>(value) << (kSmiTagSize + kSmiShiftSize)) | | 157 | 164k | kSmiTag; | 158 | 164k | } |
Unexecuted instantiation: node_v8.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: node_wasi.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: node_wasm_web_api.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: node_watchdog.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: node_worker.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: node_zlib.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: permission.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: worker_permission.cc:v8::internal::IntToSmi(int) pipe_wrap.cc:v8::internal::IntToSmi(int) Line | Count | Source | 155 | 82.3k | V8_INLINE static constexpr Address IntToSmi(int value) { | 156 | 82.3k | return (static_cast<Address>(value) << (kSmiTagSize + kSmiShiftSize)) | | 157 | 82.3k | kSmiTag; | 158 | 82.3k | } |
Unexecuted instantiation: process_wrap.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: signal_wrap.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: spawn_sync.cc:v8::internal::IntToSmi(int) stream_base.cc:v8::internal::IntToSmi(int) Line | Count | Source | 155 | 1.05k | V8_INLINE static constexpr Address IntToSmi(int value) { | 156 | 1.05k | return (static_cast<Address>(value) << (kSmiTagSize + kSmiShiftSize)) | | 157 | 1.05k | kSmiTag; | 158 | 1.05k | } |
Unexecuted instantiation: stream_pipe.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: stream_wrap.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: string_bytes.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: string_decoder.cc:v8::internal::IntToSmi(int) tcp_wrap.cc:v8::internal::IntToSmi(int) Line | Count | Source | 155 | 1.51k | V8_INLINE static constexpr Address IntToSmi(int value) { | 156 | 1.51k | return (static_cast<Address>(value) << (kSmiTagSize + kSmiShiftSize)) | | 157 | 1.51k | kSmiTag; | 158 | 1.51k | } |
Unexecuted instantiation: timers.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: agent.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: node_trace_buffer.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: node_trace_writer.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: trace_event.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: traced_value.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: tty_wrap.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: udp_wrap.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: util.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: uv.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: node_large_page.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: inspector_agent.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: inspector_io.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: inspector_profiler.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: inspector_js_api.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: inspector_socket_server.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: main_thread_interface.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: node_string.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: runtime_agent.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: tracing_agent.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: worker_agent.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: worker_inspector.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: crypto_context.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: crypto_util.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: crypto_keys.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: crypto_tls.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: crypto_x509.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: node_crypto.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: quic.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: node_javascript.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: Protocol.cpp:v8::internal::IntToSmi(int) Unexecuted instantiation: NodeWorker.cpp:v8::internal::IntToSmi(int) Unexecuted instantiation: NodeTracing.cpp:v8::internal::IntToSmi(int) Unexecuted instantiation: NodeRuntime.cpp:v8::internal::IntToSmi(int) Unexecuted instantiation: async_resource.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: callback.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: embed_helpers.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: encoding.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: exceptions.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: utils.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: connect_wrap.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: connection_wrap.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: queue.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: debug_utils.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: encoding_binding.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: fs_event_wrap.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: handle_wrap.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: histogram.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: internal_only_v8.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: js_native_api_v8.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: js_stream.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: js_udp_wrap.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: json_parser.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: node_external_reference.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: child_process_permission.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: fs_permission.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: inspector_permission.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: timer_wrap.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: inspector_socket.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: crypto_aes.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: crypto_bio.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: crypto_common.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: crypto_dsa.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: crypto_hkdf.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: crypto_pbkdf2.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: crypto_sig.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: crypto_timing.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: crypto_cipher.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: crypto_ec.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: crypto_hmac.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: crypto_random.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: crypto_rsa.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: crypto_spkac.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: crypto_clienthello.cc:v8::internal::IntToSmi(int) crypto_dh.cc:v8::internal::IntToSmi(int) Line | Count | Source | 155 | 2 | V8_INLINE static constexpr Address IntToSmi(int value) { | 156 | 2 | return (static_cast<Address>(value) << (kSmiTagSize + kSmiShiftSize)) | | 157 | 2 | kSmiTag; | 158 | 2 | } |
Unexecuted instantiation: crypto_hash.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: crypto_keygen.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: crypto_scrypt.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: bindingdata.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: endpoint.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: packet.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: session.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: sessionticket.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: streams.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: tlscontext.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: tokens.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: transportparams.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: path.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: application.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: cid.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: data.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: http3.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: logstream.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: preferredaddress.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: fuzz_sign_verify.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: fuzz_path_resolve.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: fuzz_createPrivateKeyDER.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: fuzz_querystring_parse.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: fuzz_path_relative.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: fuzz_ParseMxReply.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: fuzz_tls_socket_request.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: fuzz_LoadBIO.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: fuzz_createPrivateKeyJWK.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: fuzz_buffer_equals.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: fuzz_path_toNamespacedPath.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: fuzz_fs_write_open_read.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: fuzz_path_isAbsolute.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: fuzz_zlib_brotliDecompress.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: fuzz_diffieHellmanJWK.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: fuzz_zlib_createBrotliDecompress.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: fuzz_ParseSoaReply.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: fuzz_env.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: fuzz_ClientHelloParser.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: fuzz_ParseCaaReply.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: fuzz_path_basename.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: fuzz_ParseGeneralReply.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: fuzz_strings.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: fuzz_string_decoder.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: fuzz_path_parse.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: fuzz_blob.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: fuzz_diffieHellmanPEM.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: fuzz_path_join.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: fuzz_ParseSrvReply.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: fuzz_path_extname.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: fuzz_path_format.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: fuzz_path_dirname.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: fuzz_buffer_compare.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: fuzz_stream1.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: fuzz_zlib_gzip_createUnzip.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: fuzz_ParseNaptrReply.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: fuzz_createPrivateKeyPEM.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: fuzz_fs_write_read_append.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: fuzz_path_normalize.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: fuzz_zlib_brotliCompress.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: fuzz_httpparser1.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: fuzz_ParsePublicKey.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: fuzz_x509.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: fuzz_diffieHellmanDER.cc:v8::internal::IntToSmi(int) Unexecuted instantiation: fuzz_buffer_includes.cc:v8::internal::IntToSmi(int) |
159 | | |
160 | | /* |
161 | | * Sandbox related types, constants, and functions. |
162 | | */ |
163 | 0 | constexpr bool SandboxIsEnabled() { |
164 | 0 | #ifdef V8_ENABLE_SANDBOX |
165 | 0 | return true; |
166 | 0 | #else |
167 | 0 | return false; |
168 | 0 | #endif |
169 | 0 | } |
170 | | |
171 | | // SandboxedPointers are guaranteed to point into the sandbox. This is achieved |
172 | | // for example by storing them as offset rather than as raw pointers. |
173 | | using SandboxedPointer_t = Address; |
174 | | |
175 | | #ifdef V8_ENABLE_SANDBOX |
176 | | |
177 | | // Size of the sandbox, excluding the guard regions surrounding it. |
178 | | #if defined(V8_TARGET_OS_ANDROID) |
179 | | // On Android, most 64-bit devices seem to be configured with only 39 bits of |
180 | | // virtual address space for userspace. As such, limit the sandbox to 128GB (a |
181 | | // quarter of the total available address space). |
182 | | constexpr size_t kSandboxSizeLog2 = 37; // 128 GB |
183 | | #elif defined(V8_TARGET_ARCH_LOONG64) |
184 | | // Some Linux distros on LoongArch64 configured with only 40 bits of virtual |
185 | | // address space for userspace. Limit the sandbox to 256GB here. |
186 | | constexpr size_t kSandboxSizeLog2 = 38; // 256 GB |
187 | | #else |
188 | | // Everywhere else use a 1TB sandbox. |
189 | | constexpr size_t kSandboxSizeLog2 = 40; // 1 TB |
190 | | #endif // V8_TARGET_OS_ANDROID |
191 | | constexpr size_t kSandboxSize = 1ULL << kSandboxSizeLog2; |
192 | | |
193 | | // Required alignment of the sandbox. For simplicity, we require the |
194 | | // size of the guard regions to be a multiple of this, so that this specifies |
195 | | // the alignment of the sandbox including and excluding surrounding guard |
196 | | // regions. The alignment requirement is due to the pointer compression cage |
197 | | // being located at the start of the sandbox. |
198 | | constexpr size_t kSandboxAlignment = kPtrComprCageBaseAlignment; |
199 | | |
200 | | // Sandboxed pointers are stored inside the heap as offset from the sandbox |
201 | | // base shifted to the left. This way, it is guaranteed that the offset is |
202 | | // smaller than the sandbox size after shifting it to the right again. This |
203 | | // constant specifies the shift amount. |
204 | | constexpr uint64_t kSandboxedPointerShift = 64 - kSandboxSizeLog2; |
205 | | |
206 | | // Size of the guard regions surrounding the sandbox. This assumes a worst-case |
207 | | // scenario of a 32-bit unsigned index used to access an array of 64-bit |
208 | | // values. |
209 | | constexpr size_t kSandboxGuardRegionSize = 32ULL * GB; |
210 | | |
211 | | static_assert((kSandboxGuardRegionSize % kSandboxAlignment) == 0, |
212 | | "The size of the guard regions around the sandbox must be a " |
213 | | "multiple of its required alignment."); |
214 | | |
215 | | // On OSes where reserving virtual memory is too expensive to reserve the |
216 | | // entire address space backing the sandbox, notably Windows pre 8.1, we create |
217 | | // a partially reserved sandbox that doesn't actually reserve most of the |
218 | | // memory, and so doesn't have the desired security properties as unrelated |
219 | | // memory allocations could end up inside of it, but which still ensures that |
220 | | // objects that should be located inside the sandbox are allocated within |
221 | | // kSandboxSize bytes from the start of the sandbox. The minimum size of the |
222 | | // region that is actually reserved for such a sandbox is specified by this |
223 | | // constant and should be big enough to contain the pointer compression cage as |
224 | | // well as the ArrayBuffer partition. |
225 | | constexpr size_t kSandboxMinimumReservationSize = 8ULL * GB; |
226 | | |
227 | | static_assert(kSandboxMinimumReservationSize > kPtrComprCageReservationSize, |
228 | | "The minimum reservation size for a sandbox must be larger than " |
229 | | "the pointer compression cage contained within it."); |
230 | | |
231 | | // The maximum buffer size allowed inside the sandbox. This is mostly dependent |
232 | | // on the size of the guard regions around the sandbox: an attacker must not be |
233 | | // able to construct a buffer that appears larger than the guard regions and |
234 | | // thereby "reach out of" the sandbox. |
235 | | constexpr size_t kMaxSafeBufferSizeForSandbox = 32ULL * GB - 1; |
236 | | static_assert(kMaxSafeBufferSizeForSandbox <= kSandboxGuardRegionSize, |
237 | | "The maximum allowed buffer size must not be larger than the " |
238 | | "sandbox's guard regions"); |
239 | | |
240 | | constexpr size_t kBoundedSizeShift = 29; |
241 | | static_assert(1ULL << (64 - kBoundedSizeShift) == |
242 | | kMaxSafeBufferSizeForSandbox + 1, |
243 | | "The maximum size of a BoundedSize must be synchronized with the " |
244 | | "kMaxSafeBufferSizeForSandbox"); |
245 | | |
246 | | #endif // V8_ENABLE_SANDBOX |
247 | | |
248 | | #ifdef V8_COMPRESS_POINTERS |
249 | | |
250 | | #ifdef V8_TARGET_OS_ANDROID |
251 | | // The size of the virtual memory reservation for an external pointer table. |
252 | | // This determines the maximum number of entries in a table. Using a maximum |
253 | | // size allows omitting bounds checks on table accesses if the indices are |
254 | | // guaranteed (e.g. through shifting) to be below the maximum index. This |
255 | | // value must be a power of two. |
256 | | constexpr size_t kExternalPointerTableReservationSize = 512 * MB; |
257 | | |
258 | | // The external pointer table indices stored in HeapObjects as external |
259 | | // pointers are shifted to the left by this amount to guarantee that they are |
260 | | // smaller than the maximum table size. |
261 | | constexpr uint32_t kExternalPointerIndexShift = 6; |
262 | | #else |
263 | | constexpr size_t kExternalPointerTableReservationSize = 1024 * MB; |
264 | | constexpr uint32_t kExternalPointerIndexShift = 5; |
265 | | #endif // V8_TARGET_OS_ANDROID |
266 | | |
267 | | // The maximum number of entries in an external pointer table. |
268 | | constexpr int kExternalPointerTableEntrySize = 8; |
269 | | constexpr int kExternalPointerTableEntrySizeLog2 = 3; |
270 | | constexpr size_t kMaxExternalPointers = |
271 | | kExternalPointerTableReservationSize / kExternalPointerTableEntrySize; |
272 | | static_assert((1 << (32 - kExternalPointerIndexShift)) == kMaxExternalPointers, |
273 | | "kExternalPointerTableReservationSize and " |
274 | | "kExternalPointerIndexShift don't match"); |
275 | | |
276 | | #else // !V8_COMPRESS_POINTERS |
277 | | |
278 | | // Needed for the V8.SandboxedExternalPointersCount histogram. |
279 | | constexpr size_t kMaxExternalPointers = 0; |
280 | | |
281 | | #endif // V8_COMPRESS_POINTERS |
282 | | |
283 | | // A ExternalPointerHandle represents a (opaque) reference to an external |
284 | | // pointer that can be stored inside the sandbox. A ExternalPointerHandle has |
285 | | // meaning only in combination with an (active) Isolate as it references an |
286 | | // external pointer stored in the currently active Isolate's |
287 | | // ExternalPointerTable. Internally, an ExternalPointerHandles is simply an |
288 | | // index into an ExternalPointerTable that is shifted to the left to guarantee |
289 | | // that it is smaller than the size of the table. |
290 | | using ExternalPointerHandle = uint32_t; |
291 | | |
292 | | // ExternalPointers point to objects located outside the sandbox. When the V8 |
293 | | // sandbox is enabled, these are stored on heap as ExternalPointerHandles, |
294 | | // otherwise they are simply raw pointers. |
295 | | #ifdef V8_ENABLE_SANDBOX |
296 | | using ExternalPointer_t = ExternalPointerHandle; |
297 | | #else |
298 | | using ExternalPointer_t = Address; |
299 | | #endif |
300 | | |
301 | | constexpr ExternalPointer_t kNullExternalPointer = 0; |
302 | | constexpr ExternalPointerHandle kNullExternalPointerHandle = 0; |
303 | | |
304 | | // |
305 | | // External Pointers. |
306 | | // |
307 | | // When the sandbox is enabled, external pointers are stored in an external |
308 | | // pointer table and are referenced from HeapObjects through an index (a |
309 | | // "handle"). When stored in the table, the pointers are tagged with per-type |
310 | | // tags to prevent type confusion attacks between different external objects. |
311 | | // Besides type information bits, these tags also contain the GC marking bit |
312 | | // which indicates whether the pointer table entry is currently alive. When a |
313 | | // pointer is written into the table, the tag is ORed into the top bits. When |
314 | | // that pointer is later loaded from the table, it is ANDed with the inverse of |
315 | | // the expected tag. If the expected and actual type differ, this will leave |
316 | | // some of the top bits of the pointer set, rendering the pointer inaccessible. |
317 | | // The AND operation also removes the GC marking bit from the pointer. |
318 | | // |
319 | | // The tags are constructed such that UNTAG(TAG(0, T1), T2) != 0 for any two |
320 | | // (distinct) tags T1 and T2. In practice, this is achieved by generating tags |
321 | | // that all have the same number of zeroes and ones but different bit patterns. |
322 | | // With N type tag bits, this allows for (N choose N/2) possible type tags. |
323 | | // Besides the type tag bits, the tags also have the GC marking bit set so that |
324 | | // the marking bit is automatically set when a pointer is written into the |
325 | | // external pointer table (in which case it is clearly alive) and is cleared |
326 | | // when the pointer is loaded. The exception to this is the free entry tag, |
327 | | // which doesn't have the mark bit set, as the entry is not alive. This |
328 | | // construction allows performing the type check and removing GC marking bits |
329 | | // from the pointer in one efficient operation (bitwise AND). The number of |
330 | | // available bits is limited in the following way: on x64, bits [47, 64) are |
331 | | // generally available for tagging (userspace has 47 address bits available). |
332 | | // On Arm64, userspace typically has a 40 or 48 bit address space. However, due |
333 | | // to top-byte ignore (TBI) and memory tagging (MTE), the top byte is unusable |
334 | | // for type checks as type-check failures would go unnoticed or collide with |
335 | | // MTE bits. Some bits of the top byte can, however, still be used for the GC |
336 | | // marking bit. The bits available for the type tags are therefore limited to |
337 | | // [48, 56), i.e. (8 choose 4) = 70 different types. |
338 | | // The following options exist to increase the number of possible types: |
339 | | // - Using multiple ExternalPointerTables since tags can safely be reused |
340 | | // across different tables |
341 | | // - Using "extended" type checks, where additional type information is stored |
342 | | // either in an adjacent pointer table entry or at the pointed-to location |
343 | | // - Using a different tagging scheme, for example based on XOR which would |
344 | | // allow for 2**8 different tags but require a separate operation to remove |
345 | | // the marking bit |
346 | | // |
347 | | // The external pointer sandboxing mechanism ensures that every access to an |
348 | | // external pointer field will result in a valid pointer of the expected type |
349 | | // even in the presence of an attacker able to corrupt memory inside the |
350 | | // sandbox. However, if any data related to the external object is stored |
351 | | // inside the sandbox it may still be corrupted and so must be validated before |
352 | | // use or moved into the external object. Further, an attacker will always be |
353 | | // able to substitute different external pointers of the same type for each |
354 | | // other. Therefore, code using external pointers must be written in a |
355 | | // "substitution-safe" way, i.e. it must always be possible to substitute |
356 | | // external pointers of the same type without causing memory corruption outside |
357 | | // of the sandbox. Generally this is achieved by referencing any group of |
358 | | // related external objects through a single external pointer. |
359 | | // |
360 | | // Currently we use bit 62 for the marking bit which should always be unused as |
361 | | // it's part of the non-canonical address range. When Arm's top-byte ignore |
362 | | // (TBI) is enabled, this bit will be part of the ignored byte, and we assume |
363 | | // that the Embedder is not using this byte (really only this one bit) for any |
364 | | // other purpose. This bit also does not collide with the memory tagging |
365 | | // extension (MTE) which would use bits [56, 60). |
366 | | // |
367 | | // External pointer tables are also available even when the sandbox is off but |
368 | | // pointer compression is on. In that case, the mechanism can be used to easy |
369 | | // alignment requirements as it turns unaligned 64-bit raw pointers into |
370 | | // aligned 32-bit indices. To "opt-in" to the external pointer table mechanism |
371 | | // for this purpose, instead of using the ExternalPointer accessors one needs to |
372 | | // use ExternalPointerHandles directly and use them to access the pointers in an |
373 | | // ExternalPointerTable. |
374 | | constexpr uint64_t kExternalPointerMarkBit = 1ULL << 62; |
375 | | constexpr uint64_t kExternalPointerTagMask = 0x40ff000000000000; |
376 | | constexpr uint64_t kExternalPointerTagMaskWithoutMarkBit = 0xff000000000000; |
377 | | constexpr uint64_t kExternalPointerTagShift = 48; |
378 | | |
379 | | // All possible 8-bit type tags. |
380 | | // These are sorted so that tags can be grouped together and it can efficiently |
381 | | // be checked if a tag belongs to a given group. See for example the |
382 | | // IsSharedExternalPointerType routine. |
383 | | constexpr uint64_t kAllExternalPointerTypeTags[] = { |
384 | | 0b00001111, 0b00010111, 0b00011011, 0b00011101, 0b00011110, 0b00100111, |
385 | | 0b00101011, 0b00101101, 0b00101110, 0b00110011, 0b00110101, 0b00110110, |
386 | | 0b00111001, 0b00111010, 0b00111100, 0b01000111, 0b01001011, 0b01001101, |
387 | | 0b01001110, 0b01010011, 0b01010101, 0b01010110, 0b01011001, 0b01011010, |
388 | | 0b01011100, 0b01100011, 0b01100101, 0b01100110, 0b01101001, 0b01101010, |
389 | | 0b01101100, 0b01110001, 0b01110010, 0b01110100, 0b01111000, 0b10000111, |
390 | | 0b10001011, 0b10001101, 0b10001110, 0b10010011, 0b10010101, 0b10010110, |
391 | | 0b10011001, 0b10011010, 0b10011100, 0b10100011, 0b10100101, 0b10100110, |
392 | | 0b10101001, 0b10101010, 0b10101100, 0b10110001, 0b10110010, 0b10110100, |
393 | | 0b10111000, 0b11000011, 0b11000101, 0b11000110, 0b11001001, 0b11001010, |
394 | | 0b11001100, 0b11010001, 0b11010010, 0b11010100, 0b11011000, 0b11100001, |
395 | | 0b11100010, 0b11100100, 0b11101000, 0b11110000}; |
396 | | |
397 | | #define TAG(i) \ |
398 | | ((kAllExternalPointerTypeTags[i] << kExternalPointerTagShift) | \ |
399 | | kExternalPointerMarkBit) |
400 | | |
401 | | // clang-format off |
402 | | |
403 | | // When adding new tags, please ensure that the code using these tags is |
404 | | // "substitution-safe", i.e. still operate safely if external pointers of the |
405 | | // same type are swapped by an attacker. See comment above for more details. |
406 | | |
407 | | // Shared external pointers are owned by the shared Isolate and stored in the |
408 | | // shared external pointer table associated with that Isolate, where they can |
409 | | // be accessed from multiple threads at the same time. The objects referenced |
410 | | // in this way must therefore always be thread-safe. |
411 | | #define SHARED_EXTERNAL_POINTER_TAGS(V) \ |
412 | | V(kFirstSharedTag, TAG(0)) \ |
413 | | V(kWaiterQueueNodeTag, TAG(0)) \ |
414 | | V(kExternalStringResourceTag, TAG(1)) \ |
415 | | V(kExternalStringResourceDataTag, TAG(2)) \ |
416 | | V(kLastSharedTag, TAG(2)) |
417 | | |
418 | | // External pointers using these tags are kept in a per-Isolate external |
419 | | // pointer table and can only be accessed when this Isolate is active. |
420 | | #define PER_ISOLATE_EXTERNAL_POINTER_TAGS(V) \ |
421 | | V(kForeignForeignAddressTag, TAG(10)) \ |
422 | | V(kNativeContextMicrotaskQueueTag, TAG(11)) \ |
423 | | V(kEmbedderDataSlotPayloadTag, TAG(12)) \ |
424 | | /* This tag essentially stands for a `void*` pointer in the V8 API, and */ \ |
425 | | /* it is the Embedder's responsibility to ensure type safety (against */ \ |
426 | | /* substitution) and lifetime validity of these objects. */ \ |
427 | | V(kExternalObjectValueTag, TAG(13)) \ |
428 | | V(kCallHandlerInfoCallbackTag, TAG(14)) \ |
429 | | V(kAccessorInfoGetterTag, TAG(15)) \ |
430 | | V(kAccessorInfoSetterTag, TAG(16)) \ |
431 | | V(kWasmInternalFunctionCallTargetTag, TAG(17)) \ |
432 | | V(kWasmTypeInfoNativeTypeTag, TAG(18)) \ |
433 | | V(kWasmExportedFunctionDataSignatureTag, TAG(19)) \ |
434 | | V(kWasmContinuationJmpbufTag, TAG(20)) \ |
435 | | V(kWasmIndirectFunctionTargetTag, TAG(21)) \ |
436 | | V(kArrayBufferExtensionTag, TAG(22)) |
437 | | |
438 | | // All external pointer tags. |
439 | | #define ALL_EXTERNAL_POINTER_TAGS(V) \ |
440 | | SHARED_EXTERNAL_POINTER_TAGS(V) \ |
441 | | PER_ISOLATE_EXTERNAL_POINTER_TAGS(V) |
442 | | |
443 | | #define EXTERNAL_POINTER_TAG_ENUM(Name, Tag) Name = Tag, |
444 | | #define MAKE_TAG(HasMarkBit, TypeTag) \ |
445 | | ((static_cast<uint64_t>(TypeTag) << kExternalPointerTagShift) | \ |
446 | | (HasMarkBit ? kExternalPointerMarkBit : 0)) |
447 | | enum ExternalPointerTag : uint64_t { |
448 | | // Empty tag value. Mostly used as placeholder. |
449 | | kExternalPointerNullTag = MAKE_TAG(1, 0b00000000), |
450 | | // External pointer tag that will match any external pointer. Use with care! |
451 | | kAnyExternalPointerTag = MAKE_TAG(1, 0b11111111), |
452 | | // The free entry tag has all type bits set so every type check with a |
453 | | // different type fails. It also doesn't have the mark bit set as free |
454 | | // entries are (by definition) not alive. |
455 | | kExternalPointerFreeEntryTag = MAKE_TAG(0, 0b11111111), |
456 | | // Evacuation entries are used during external pointer table compaction. |
457 | | kExternalPointerEvacuationEntryTag = MAKE_TAG(1, 0b11100111), |
458 | | |
459 | | ALL_EXTERNAL_POINTER_TAGS(EXTERNAL_POINTER_TAG_ENUM) |
460 | | }; |
461 | | |
462 | | #undef MAKE_TAG |
463 | | #undef TAG |
464 | | #undef EXTERNAL_POINTER_TAG_ENUM |
465 | | |
466 | | // clang-format on |
467 | | |
468 | | // True if the external pointer must be accessed from the shared isolate's |
469 | | // external pointer table. |
470 | | V8_INLINE static constexpr bool IsSharedExternalPointerType( |
471 | 0 | ExternalPointerTag tag) { |
472 | 0 | return tag >= kFirstSharedTag && tag <= kLastSharedTag; |
473 | 0 | } Unexecuted instantiation: node_snapshot_stub.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: fuzz_ParseTxtReply.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: environment.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: hooks.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: async_wrap.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: base_object.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: cares_wrap.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: cleanup_queue.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: env.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: heap_utils.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: module_wrap.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: node.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: node_api.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: node_binding.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: node_blob.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: node_buffer.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: node_builtins.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: node_config.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: node_constants.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: node_contextify.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: node_credentials.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: node_dir.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: node_dotenv.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: node_env_var.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: node_errors.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: node_file.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: node_http_parser.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: node_http2.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: node_i18n.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: node_main_instance.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: node_messaging.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: node_metadata.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: node_modules.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: node_options.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: node_os.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: node_perf.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: node_platform.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: node_process_events.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: node_process_methods.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: node_process_object.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: node_realm.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: node_report.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: node_report_module.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: node_report_utils.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: node_sea.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: node_serdes.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: node_shadow_realm.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: node_snapshotable.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: node_sockaddr.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: node_stat_watcher.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: node_symbols.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: node_task_queue.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: node_trace_events.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: node_types.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: node_url.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: node_util.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: node_v8.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: node_wasi.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: node_wasm_web_api.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: node_watchdog.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: node_worker.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: node_zlib.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: permission.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: worker_permission.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: pipe_wrap.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: process_wrap.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: signal_wrap.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: spawn_sync.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: stream_base.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: stream_pipe.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: stream_wrap.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: string_bytes.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: string_decoder.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: tcp_wrap.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: timers.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: agent.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: node_trace_buffer.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: node_trace_writer.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: trace_event.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: traced_value.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: tty_wrap.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: udp_wrap.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: util.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: uv.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: node_large_page.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: inspector_agent.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: inspector_io.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: inspector_profiler.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: inspector_js_api.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: inspector_socket_server.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: main_thread_interface.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: node_string.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: runtime_agent.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: tracing_agent.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: worker_agent.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: worker_inspector.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: crypto_context.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: crypto_util.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: crypto_keys.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: crypto_tls.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: crypto_x509.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: node_crypto.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: quic.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: node_javascript.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: Protocol.cpp:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: NodeWorker.cpp:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: NodeTracing.cpp:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: NodeRuntime.cpp:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: async_resource.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: callback.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: embed_helpers.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: encoding.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: exceptions.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: utils.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: connect_wrap.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: connection_wrap.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: queue.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: debug_utils.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: encoding_binding.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: fs_event_wrap.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: handle_wrap.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: histogram.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: internal_only_v8.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: js_native_api_v8.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: js_stream.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: js_udp_wrap.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: json_parser.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: node_external_reference.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: child_process_permission.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: fs_permission.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: inspector_permission.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: timer_wrap.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: inspector_socket.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: crypto_aes.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: crypto_bio.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: crypto_common.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: crypto_dsa.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: crypto_hkdf.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: crypto_pbkdf2.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: crypto_sig.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: crypto_timing.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: crypto_cipher.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: crypto_ec.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: crypto_hmac.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: crypto_random.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: crypto_rsa.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: crypto_spkac.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: crypto_clienthello.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: crypto_dh.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: crypto_hash.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: crypto_keygen.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: crypto_scrypt.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: bindingdata.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: endpoint.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: packet.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: session.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: sessionticket.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: streams.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: tlscontext.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: tokens.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: transportparams.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: path.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: application.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: cid.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: data.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: http3.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: logstream.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: preferredaddress.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: fuzz_sign_verify.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: fuzz_path_resolve.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: fuzz_createPrivateKeyDER.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: fuzz_querystring_parse.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: fuzz_path_relative.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: fuzz_ParseMxReply.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: fuzz_tls_socket_request.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: fuzz_LoadBIO.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: fuzz_createPrivateKeyJWK.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: fuzz_buffer_equals.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: fuzz_path_toNamespacedPath.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: fuzz_fs_write_open_read.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: fuzz_path_isAbsolute.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: fuzz_zlib_brotliDecompress.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: fuzz_diffieHellmanJWK.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: fuzz_zlib_createBrotliDecompress.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: fuzz_ParseSoaReply.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: fuzz_env.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: fuzz_ClientHelloParser.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: fuzz_ParseCaaReply.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: fuzz_path_basename.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: fuzz_ParseGeneralReply.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: fuzz_strings.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: fuzz_string_decoder.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: fuzz_path_parse.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: fuzz_blob.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: fuzz_diffieHellmanPEM.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: fuzz_path_join.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: fuzz_ParseSrvReply.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: fuzz_path_extname.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: fuzz_path_format.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: fuzz_path_dirname.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: fuzz_buffer_compare.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: fuzz_stream1.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: fuzz_zlib_gzip_createUnzip.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: fuzz_ParseNaptrReply.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: fuzz_createPrivateKeyPEM.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: fuzz_fs_write_read_append.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: fuzz_path_normalize.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: fuzz_zlib_brotliCompress.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: fuzz_httpparser1.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: fuzz_ParsePublicKey.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: fuzz_x509.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: fuzz_diffieHellmanDER.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: fuzz_buffer_includes.cc:v8::internal::IsSharedExternalPointerType(v8::internal::ExternalPointerTag) |
474 | | |
475 | | // True if the external pointer may live in a read-only object, in which case |
476 | | // the table entry will be in the shared read-only segment of the external |
477 | | // pointer table. |
478 | | V8_INLINE static constexpr bool IsMaybeReadOnlyExternalPointerType( |
479 | 0 | ExternalPointerTag tag) { |
480 | 0 | return tag == kAccessorInfoGetterTag || tag == kAccessorInfoSetterTag || |
481 | 0 | tag == kCallHandlerInfoCallbackTag; |
482 | 0 | } Unexecuted instantiation: node_snapshot_stub.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: fuzz_ParseTxtReply.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: environment.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: hooks.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: async_wrap.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: base_object.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: cares_wrap.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: cleanup_queue.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: env.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: heap_utils.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: module_wrap.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: node.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: node_api.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: node_binding.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: node_blob.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: node_buffer.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: node_builtins.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: node_config.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: node_constants.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: node_contextify.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: node_credentials.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: node_dir.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: node_dotenv.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: node_env_var.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: node_errors.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: node_file.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: node_http_parser.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: node_http2.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: node_i18n.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: node_main_instance.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: node_messaging.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: node_metadata.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: node_modules.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: node_options.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: node_os.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: node_perf.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: node_platform.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: node_process_events.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: node_process_methods.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: node_process_object.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: node_realm.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: node_report.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: node_report_module.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: node_report_utils.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: node_sea.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: node_serdes.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: node_shadow_realm.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: node_snapshotable.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: node_sockaddr.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: node_stat_watcher.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: node_symbols.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: node_task_queue.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: node_trace_events.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: node_types.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: node_url.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: node_util.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: node_v8.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: node_wasi.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: node_wasm_web_api.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: node_watchdog.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: node_worker.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: node_zlib.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: permission.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: worker_permission.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: pipe_wrap.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: process_wrap.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: signal_wrap.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: spawn_sync.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: stream_base.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: stream_pipe.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: stream_wrap.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: string_bytes.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: string_decoder.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: tcp_wrap.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: timers.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: agent.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: node_trace_buffer.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: node_trace_writer.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: trace_event.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: traced_value.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: tty_wrap.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: udp_wrap.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: util.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: uv.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: node_large_page.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: inspector_agent.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: inspector_io.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: inspector_profiler.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: inspector_js_api.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: inspector_socket_server.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: main_thread_interface.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: node_string.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: runtime_agent.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: tracing_agent.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: worker_agent.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: worker_inspector.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: crypto_context.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: crypto_util.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: crypto_keys.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: crypto_tls.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: crypto_x509.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: node_crypto.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: quic.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: node_javascript.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: Protocol.cpp:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: NodeWorker.cpp:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: NodeTracing.cpp:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: NodeRuntime.cpp:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: async_resource.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: callback.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: embed_helpers.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: encoding.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: exceptions.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: utils.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: connect_wrap.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: connection_wrap.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: queue.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: debug_utils.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: encoding_binding.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: fs_event_wrap.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: handle_wrap.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: histogram.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: internal_only_v8.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: js_native_api_v8.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: js_stream.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: js_udp_wrap.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: json_parser.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: node_external_reference.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: child_process_permission.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: fs_permission.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: inspector_permission.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: timer_wrap.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: inspector_socket.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: crypto_aes.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: crypto_bio.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: crypto_common.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: crypto_dsa.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: crypto_hkdf.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: crypto_pbkdf2.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: crypto_sig.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: crypto_timing.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: crypto_cipher.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: crypto_ec.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: crypto_hmac.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: crypto_random.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: crypto_rsa.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: crypto_spkac.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: crypto_clienthello.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: crypto_dh.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: crypto_hash.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: crypto_keygen.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: crypto_scrypt.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: bindingdata.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: endpoint.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: packet.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: session.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: sessionticket.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: streams.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: tlscontext.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: tokens.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: transportparams.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: path.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: application.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: cid.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: data.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: http3.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: logstream.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: preferredaddress.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: fuzz_sign_verify.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: fuzz_path_resolve.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: fuzz_createPrivateKeyDER.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: fuzz_querystring_parse.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: fuzz_path_relative.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: fuzz_ParseMxReply.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: fuzz_tls_socket_request.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: fuzz_LoadBIO.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: fuzz_createPrivateKeyJWK.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: fuzz_buffer_equals.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: fuzz_path_toNamespacedPath.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: fuzz_fs_write_open_read.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: fuzz_path_isAbsolute.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: fuzz_zlib_brotliDecompress.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: fuzz_diffieHellmanJWK.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: fuzz_zlib_createBrotliDecompress.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: fuzz_ParseSoaReply.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: fuzz_env.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: fuzz_ClientHelloParser.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: fuzz_ParseCaaReply.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: fuzz_path_basename.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: fuzz_ParseGeneralReply.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: fuzz_strings.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: fuzz_string_decoder.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: fuzz_path_parse.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: fuzz_blob.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: fuzz_diffieHellmanPEM.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: fuzz_path_join.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: fuzz_ParseSrvReply.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: fuzz_path_extname.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: fuzz_path_format.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: fuzz_path_dirname.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: fuzz_buffer_compare.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: fuzz_stream1.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: fuzz_zlib_gzip_createUnzip.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: fuzz_ParseNaptrReply.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: fuzz_createPrivateKeyPEM.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: fuzz_fs_write_read_append.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: fuzz_path_normalize.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: fuzz_zlib_brotliCompress.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: fuzz_httpparser1.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: fuzz_ParsePublicKey.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: fuzz_x509.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: fuzz_diffieHellmanDER.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) Unexecuted instantiation: fuzz_buffer_includes.cc:v8::internal::IsMaybeReadOnlyExternalPointerType(v8::internal::ExternalPointerTag) |
483 | | |
484 | | // Sanity checks. |
485 | | #define CHECK_SHARED_EXTERNAL_POINTER_TAGS(Tag, ...) \ |
486 | | static_assert(IsSharedExternalPointerType(Tag)); |
487 | | #define CHECK_NON_SHARED_EXTERNAL_POINTER_TAGS(Tag, ...) \ |
488 | | static_assert(!IsSharedExternalPointerType(Tag)); |
489 | | |
490 | | SHARED_EXTERNAL_POINTER_TAGS(CHECK_SHARED_EXTERNAL_POINTER_TAGS) |
491 | | PER_ISOLATE_EXTERNAL_POINTER_TAGS(CHECK_NON_SHARED_EXTERNAL_POINTER_TAGS) |
492 | | |
493 | | #undef CHECK_NON_SHARED_EXTERNAL_POINTER_TAGS |
494 | | #undef CHECK_SHARED_EXTERNAL_POINTER_TAGS |
495 | | |
496 | | #undef SHARED_EXTERNAL_POINTER_TAGS |
497 | | #undef EXTERNAL_POINTER_TAGS |
498 | | |
499 | | // |
500 | | // Indirect Pointers. |
501 | | // |
502 | | // When the sandbox is enabled, indirect pointers are used to reference |
503 | | // HeapObjects that live outside of the sandbox (but are still managed by V8's |
504 | | // garbage collector). When object A references an object B through an indirect |
505 | | // pointer, object A will contain a IndirectPointerHandle, i.e. a shifted |
506 | | // 32-bit index, which identifies an entry in a pointer table (either the |
507 | | // trusted pointer table for TrustedObjects, or the code pointer table if it is |
508 | | // a Code object). This table entry then contains the actual pointer to object |
509 | | // B. Further, object B owns this pointer table entry, and it is responsible |
510 | | // for updating the "self-pointer" in the entry when it is relocated in memory. |
511 | | // This way, in contrast to "normal" pointers, indirect pointers never need to |
512 | | // be tracked by the GC (i.e. there is no remembered set for them). |
513 | | // These pointers do not exist when the sandbox is disabled. |
514 | | |
515 | | // An IndirectPointerHandle represents a 32-bit index into a pointer table. |
516 | | using IndirectPointerHandle = uint32_t; |
517 | | |
518 | | // A null handle always references an entry that contains nullptr. |
519 | | constexpr IndirectPointerHandle kNullIndirectPointerHandle = 0; |
520 | | |
521 | | // When the sandbox is enabled, indirect pointers are used to implement: |
522 | | // - TrustedPointers: an indirect pointer using the trusted pointer table (TPT) |
523 | | // and referencing a TrustedObject in one of the trusted heap spaces. |
524 | | // - CodePointers, an indirect pointer using the code pointer table (CPT) and |
525 | | // referencing a Code object together with its instruction stream. |
526 | | |
527 | | // |
528 | | // Trusted Pointers. |
529 | | // |
530 | | // A pointer to a TrustedObject. |
531 | | // When the sandbox is enabled, these are indirect pointers using the trusted |
532 | | // pointer table (TPT). They are used to reference trusted objects (located in |
533 | | // one of V8's trusted heap spaces, outside of the sandbox) from inside the |
534 | | // sandbox in a memory-safe way. When the sandbox is disabled, these are |
535 | | // regular tagged pointers. |
536 | | using TrustedPointerHandle = IndirectPointerHandle; |
537 | | |
538 | | // The size of the virtual memory reservation for the trusted pointer table. |
539 | | // As with the external pointer table, a maximum table size in combination with |
540 | | // shifted indices allows omitting bounds checks. |
541 | | constexpr size_t kTrustedPointerTableReservationSize = 64 * MB; |
542 | | |
543 | | // The trusted pointer handles are stores shifted to the left by this amount |
544 | | // to guarantee that they are smaller than the maximum table size. |
545 | | constexpr uint32_t kTrustedPointerHandleShift = 9; |
546 | | |
547 | | // A null handle always references an entry that contains nullptr. |
548 | | constexpr TrustedPointerHandle kNullTrustedPointerHandle = |
549 | | kNullIndirectPointerHandle; |
550 | | |
551 | | // The maximum number of entries in an trusted pointer table. |
552 | | constexpr int kTrustedPointerTableEntrySize = 8; |
553 | | constexpr int kTrustedPointerTableEntrySizeLog2 = 3; |
554 | | constexpr size_t kMaxTrustedPointers = |
555 | | kTrustedPointerTableReservationSize / kTrustedPointerTableEntrySize; |
556 | | static_assert((1 << (32 - kTrustedPointerHandleShift)) == kMaxTrustedPointers, |
557 | | "kTrustedPointerTableReservationSize and " |
558 | | "kTrustedPointerHandleShift don't match"); |
559 | | |
560 | | // |
561 | | // Code Pointers. |
562 | | // |
563 | | // A pointer to a Code object. |
564 | | // Essentially a specialized version of a trusted pointer that (when the |
565 | | // sandbox is enabled) uses the code pointer table (CPT) instead of the TPT. |
566 | | // Each entry in the CPT contains both a pointer to a Code object as well as a |
567 | | // pointer to the Code's entrypoint. This allows calling/jumping into Code with |
568 | | // one fewer memory access (compared to the case where the entrypoint pointer |
569 | | // first needs to be loaded from the Code object). As such, a CodePointerHandle |
570 | | // can be used both to obtain the referenced Code object and to directly load |
571 | | // its entrypoint. |
572 | | // |
573 | | // When the sandbox is disabled, these are regular tagged pointers. |
574 | | using CodePointerHandle = IndirectPointerHandle; |
575 | | |
576 | | // The size of the virtual memory reservation for the code pointer table. |
577 | | // As with the other tables, a maximum table size in combination with shifted |
578 | | // indices allows omitting bounds checks. |
579 | | constexpr size_t kCodePointerTableReservationSize = 16 * MB; |
580 | | |
581 | | // Code pointer handles are shifted by a different amount than indirect pointer |
582 | | // handles as the tables have a different maximum size. |
583 | | constexpr uint32_t kCodePointerHandleShift = 12; |
584 | | |
585 | | // A null handle always references an entry that contains nullptr. |
586 | | constexpr CodePointerHandle kNullCodePointerHandle = kNullIndirectPointerHandle; |
587 | | |
588 | | // It can sometimes be necessary to distinguish a code pointer handle from a |
589 | | // trusted pointer handle. A typical example would be a union trusted pointer |
590 | | // field that can refer to both Code objects and other trusted objects. To |
591 | | // support these use-cases, we use a simple marking scheme where some of the |
592 | | // low bits of a code pointer handle are set, while they will be unset on a |
593 | | // trusted pointer handle. This way, the correct table to resolve the handle |
594 | | // can be determined even in the absence of a type tag. |
595 | | constexpr uint32_t kCodePointerHandleMarker = 0x1; |
596 | | static_assert(kCodePointerHandleShift > 0); |
597 | | static_assert(kTrustedPointerHandleShift > 0); |
598 | | |
599 | | // The maximum number of entries in a code pointer table. |
600 | | constexpr int kCodePointerTableEntrySize = 16; |
601 | | constexpr int kCodePointerTableEntrySizeLog2 = 4; |
602 | | constexpr size_t kMaxCodePointers = |
603 | | kCodePointerTableReservationSize / kCodePointerTableEntrySize; |
604 | | static_assert( |
605 | | (1 << (32 - kCodePointerHandleShift)) == kMaxCodePointers, |
606 | | "kCodePointerTableReservationSize and kCodePointerHandleShift don't match"); |
607 | | |
608 | | constexpr int kCodePointerTableEntryEntrypointOffset = 0; |
609 | | constexpr int kCodePointerTableEntryCodeObjectOffset = 8; |
610 | | |
611 | | // Constants that can be used to mark places that should be modified once |
612 | | // certain types of objects are moved out of the sandbox and into trusted space. |
613 | | constexpr bool kRuntimeGeneratedCodeObjectsLiveInTrustedSpace = true; |
614 | | constexpr bool kBuiltinCodeObjectsLiveInTrustedSpace = false; |
615 | | constexpr bool kAllCodeObjectsLiveInTrustedSpace = |
616 | | kRuntimeGeneratedCodeObjectsLiveInTrustedSpace && |
617 | | kBuiltinCodeObjectsLiveInTrustedSpace; |
618 | | |
619 | | constexpr bool kInterpreterDataObjectsLiveInTrustedSpace = false; |
620 | | |
621 | | // {obj} must be the raw tagged pointer representation of a HeapObject |
622 | | // that's guaranteed to never be in ReadOnlySpace. |
623 | | V8_EXPORT internal::Isolate* IsolateFromNeverReadOnlySpaceObject(Address obj); |
624 | | |
625 | | // Returns if we need to throw when an error occurs. This infers the language |
626 | | // mode based on the current context and the closure. This returns true if the |
627 | | // language mode is strict. |
628 | | V8_EXPORT bool ShouldThrowOnError(internal::Isolate* isolate); |
629 | | /** |
630 | | * This class exports constants and functionality from within v8 that |
631 | | * is necessary to implement inline functions in the v8 api. Don't |
632 | | * depend on functions and constants defined here. |
633 | | */ |
634 | | class Internals { |
635 | | #ifdef V8_MAP_PACKING |
636 | | V8_INLINE static constexpr Address UnpackMapWord(Address mapword) { |
637 | | // TODO(wenyuzhao): Clear header metadata. |
638 | | return mapword ^ kMapWordXorMask; |
639 | | } |
640 | | #endif |
641 | | |
642 | | public: |
643 | | // These values match non-compiler-dependent values defined within |
644 | | // the implementation of v8. |
645 | | static const int kHeapObjectMapOffset = 0; |
646 | | static const int kMapInstanceTypeOffset = 1 * kApiTaggedSize + kApiInt32Size; |
647 | | static const int kStringResourceOffset = |
648 | | 1 * kApiTaggedSize + 2 * kApiInt32Size; |
649 | | |
650 | | static const int kOddballKindOffset = 4 * kApiTaggedSize + kApiDoubleSize; |
651 | | static const int kJSObjectHeaderSize = 3 * kApiTaggedSize; |
652 | | static const int kFixedArrayHeaderSize = 2 * kApiTaggedSize; |
653 | | static const int kEmbedderDataArrayHeaderSize = 2 * kApiTaggedSize; |
654 | | static const int kEmbedderDataSlotSize = kApiSystemPointerSize; |
655 | | #ifdef V8_ENABLE_SANDBOX |
656 | | static const int kEmbedderDataSlotExternalPointerOffset = kApiTaggedSize; |
657 | | #else |
658 | | static const int kEmbedderDataSlotExternalPointerOffset = 0; |
659 | | #endif |
660 | | static const int kNativeContextEmbedderDataOffset = 6 * kApiTaggedSize; |
661 | | static const int kStringRepresentationAndEncodingMask = 0x0f; |
662 | | static const int kStringEncodingMask = 0x8; |
663 | | static const int kExternalTwoByteRepresentationTag = 0x02; |
664 | | static const int kExternalOneByteRepresentationTag = 0x0a; |
665 | | |
666 | | static const uint32_t kNumIsolateDataSlots = 4; |
667 | | static const int kStackGuardSize = 8 * kApiSystemPointerSize; |
668 | | static const int kNumberOfBooleanFlags = 6; |
669 | | static const int kErrorMessageParamSize = 1; |
670 | | static const int kTablesAlignmentPaddingSize = 1; |
671 | | static const int kBuiltinTier0EntryTableSize = 7 * kApiSystemPointerSize; |
672 | | static const int kBuiltinTier0TableSize = 7 * kApiSystemPointerSize; |
673 | | static const int kLinearAllocationAreaSize = 3 * kApiSystemPointerSize; |
674 | | static const int kThreadLocalTopSize = 30 * kApiSystemPointerSize; |
675 | | static const int kHandleScopeDataSize = |
676 | | 2 * kApiSystemPointerSize + 2 * kApiInt32Size; |
677 | | |
678 | | // ExternalPointerTable and TrustedPointerTable layout guarantees. |
679 | | static const int kExternalPointerTableBasePointerOffset = 0; |
680 | | static const int kExternalPointerTableSize = 2 * kApiSystemPointerSize; |
681 | | static const int kTrustedPointerTableSize = 2 * kApiSystemPointerSize; |
682 | | static const int kTrustedPointerTableBasePointerOffset = 0; |
683 | | |
684 | | // IsolateData layout guarantees. |
685 | | static const int kIsolateCageBaseOffset = 0; |
686 | | static const int kIsolateStackGuardOffset = |
687 | | kIsolateCageBaseOffset + kApiSystemPointerSize; |
688 | | static const int kVariousBooleanFlagsOffset = |
689 | | kIsolateStackGuardOffset + kStackGuardSize; |
690 | | static const int kErrorMessageParamOffset = |
691 | | kVariousBooleanFlagsOffset + kNumberOfBooleanFlags; |
692 | | static const int kBuiltinTier0EntryTableOffset = kErrorMessageParamOffset + |
693 | | kErrorMessageParamSize + |
694 | | kTablesAlignmentPaddingSize; |
695 | | static const int kBuiltinTier0TableOffset = |
696 | | kBuiltinTier0EntryTableOffset + kBuiltinTier0EntryTableSize; |
697 | | static const int kNewAllocationInfoOffset = |
698 | | kBuiltinTier0TableOffset + kBuiltinTier0TableSize; |
699 | | static const int kOldAllocationInfoOffset = |
700 | | kNewAllocationInfoOffset + kLinearAllocationAreaSize; |
701 | | |
702 | | static const int kFastCCallAlignmentPaddingSize = |
703 | | kApiSystemPointerSize == 8 ? 0 : kApiSystemPointerSize; |
704 | | static const int kIsolateFastCCallCallerFpOffset = |
705 | | kOldAllocationInfoOffset + kLinearAllocationAreaSize + |
706 | | kFastCCallAlignmentPaddingSize; |
707 | | static const int kIsolateFastCCallCallerPcOffset = |
708 | | kIsolateFastCCallCallerFpOffset + kApiSystemPointerSize; |
709 | | static const int kIsolateFastApiCallTargetOffset = |
710 | | kIsolateFastCCallCallerPcOffset + kApiSystemPointerSize; |
711 | | static const int kIsolateLongTaskStatsCounterOffset = |
712 | | kIsolateFastApiCallTargetOffset + kApiSystemPointerSize; |
713 | | static const int kIsolateThreadLocalTopOffset = |
714 | | kIsolateLongTaskStatsCounterOffset + kApiSizetSize; |
715 | | static const int kIsolateHandleScopeDataOffset = |
716 | | kIsolateThreadLocalTopOffset + kThreadLocalTopSize; |
717 | | static const int kIsolateEmbedderDataOffset = |
718 | | kIsolateHandleScopeDataOffset + kHandleScopeDataSize; |
719 | | #ifdef V8_COMPRESS_POINTERS |
720 | | static const int kIsolateExternalPointerTableOffset = |
721 | | kIsolateEmbedderDataOffset + kNumIsolateDataSlots * kApiSystemPointerSize; |
722 | | static const int kIsolateSharedExternalPointerTableAddressOffset = |
723 | | kIsolateExternalPointerTableOffset + kExternalPointerTableSize; |
724 | | #ifdef V8_ENABLE_SANDBOX |
725 | | static const int kIsolateTrustedCageBaseOffset = |
726 | | kIsolateSharedExternalPointerTableAddressOffset + kApiSystemPointerSize; |
727 | | static const int kIsolateTrustedPointerTableOffset = |
728 | | kIsolateTrustedCageBaseOffset + kApiSystemPointerSize; |
729 | | static const int kIsolateApiCallbackThunkArgumentOffset = |
730 | | kIsolateTrustedPointerTableOffset + kTrustedPointerTableSize; |
731 | | #else |
732 | | static const int kIsolateApiCallbackThunkArgumentOffset = |
733 | | kIsolateSharedExternalPointerTableAddressOffset + kApiSystemPointerSize; |
734 | | #endif // V8_ENABLE_SANDBOX |
735 | | #else |
736 | | static const int kIsolateApiCallbackThunkArgumentOffset = |
737 | | kIsolateEmbedderDataOffset + kNumIsolateDataSlots * kApiSystemPointerSize; |
738 | | #endif // V8_COMPRESS_POINTERS |
739 | | static const int kContinuationPreservedEmbedderDataOffset = |
740 | | kIsolateApiCallbackThunkArgumentOffset + kApiSystemPointerSize; |
741 | | |
742 | | static const int kWasm64OOBOffsetAlignmentPaddingSize = 0; |
743 | | static const int kWasm64OOBOffsetOffset = |
744 | | kContinuationPreservedEmbedderDataOffset + kApiSystemPointerSize + |
745 | | kWasm64OOBOffsetAlignmentPaddingSize; |
746 | | static const int kIsolateRootsOffset = |
747 | | kWasm64OOBOffsetOffset + sizeof(int64_t); |
748 | | |
749 | | #if V8_STATIC_ROOTS_BOOL |
750 | | |
751 | | // These constants need to be initialized in api.cc. |
752 | | #define EXPORTED_STATIC_ROOTS_PTR_LIST(V) \ |
753 | | V(UndefinedValue) \ |
754 | | V(NullValue) \ |
755 | | V(TrueValue) \ |
756 | | V(FalseValue) \ |
757 | | V(EmptyString) \ |
758 | | V(TheHoleValue) |
759 | | |
760 | | using Tagged_t = uint32_t; |
761 | | struct StaticReadOnlyRoot { |
762 | | #define DEF_ROOT(name) V8_EXPORT static const Tagged_t k##name; |
763 | | EXPORTED_STATIC_ROOTS_PTR_LIST(DEF_ROOT) |
764 | | #undef DEF_ROOT |
765 | | |
766 | | V8_EXPORT static const Tagged_t kFirstStringMap; |
767 | | V8_EXPORT static const Tagged_t kLastStringMap; |
768 | | }; |
769 | | |
770 | | #endif // V8_STATIC_ROOTS_BOOL |
771 | | |
772 | | static const int kUndefinedValueRootIndex = 4; |
773 | | static const int kTheHoleValueRootIndex = 5; |
774 | | static const int kNullValueRootIndex = 6; |
775 | | static const int kTrueValueRootIndex = 7; |
776 | | static const int kFalseValueRootIndex = 8; |
777 | | static const int kEmptyStringRootIndex = 9; |
778 | | |
779 | | static const int kNodeClassIdOffset = 1 * kApiSystemPointerSize; |
780 | | static const int kNodeFlagsOffset = 1 * kApiSystemPointerSize + 3; |
781 | | static const int kNodeStateMask = 0x3; |
782 | | static const int kNodeStateIsWeakValue = 2; |
783 | | |
784 | | static const int kTracedNodeClassIdOffset = kApiSystemPointerSize; |
785 | | |
786 | | static const int kFirstNonstringType = 0x80; |
787 | | static const int kOddballType = 0x83; |
788 | | static const int kForeignType = 0xcc; |
789 | | static const int kJSSpecialApiObjectType = 0x410; |
790 | | static const int kJSObjectType = 0x421; |
791 | | static const int kFirstJSApiObjectType = 0x422; |
792 | | static const int kLastJSApiObjectType = 0x80A; |
793 | | |
794 | | static const int kUndefinedOddballKind = 4; |
795 | | static const int kNullOddballKind = 3; |
796 | | |
797 | | // Constants used by PropertyCallbackInfo to check if we should throw when an |
798 | | // error occurs. |
799 | | static const int kThrowOnError = 0; |
800 | | static const int kDontThrow = 1; |
801 | | static const int kInferShouldThrowMode = 2; |
802 | | |
803 | | // Soft limit for AdjustAmountofExternalAllocatedMemory. Trigger an |
804 | | // incremental GC once the external memory reaches this limit. |
805 | | static constexpr int kExternalAllocationSoftLimit = 64 * 1024 * 1024; |
806 | | |
807 | | #ifdef V8_MAP_PACKING |
808 | | static const uintptr_t kMapWordMetadataMask = 0xffffULL << 48; |
809 | | // The lowest two bits of mapwords are always `0b10` |
810 | | static const uintptr_t kMapWordSignature = 0b10; |
811 | | // XORing a (non-compressed) map with this mask ensures that the two |
812 | | // low-order bits are 0b10. The 0 at the end makes this look like a Smi, |
813 | | // although real Smis have all lower 32 bits unset. We only rely on these |
814 | | // values passing as Smis in very few places. |
815 | | static const int kMapWordXorMask = 0b11; |
816 | | #endif |
817 | | |
818 | | V8_EXPORT static void CheckInitializedImpl(v8::Isolate* isolate); |
819 | 47.0M | V8_INLINE static void CheckInitialized(v8::Isolate* isolate) { |
820 | | #ifdef V8_ENABLE_CHECKS |
821 | | CheckInitializedImpl(isolate); |
822 | | #endif |
823 | 47.0M | } |
824 | | |
825 | 17.0M | V8_INLINE static constexpr bool HasHeapObjectTag(Address value) { |
826 | 17.0M | return (value & kHeapObjectTagMask) == static_cast<Address>(kHeapObjectTag); |
827 | 17.0M | } |
828 | | |
829 | 156k | V8_INLINE static constexpr int SmiValue(Address value) { |
830 | 156k | return PlatformSmiTagging::SmiToInt(value); |
831 | 156k | } |
832 | | |
833 | 526k | V8_INLINE static constexpr Address IntToSmi(int value) { |
834 | 526k | return internal::IntToSmi(value); |
835 | 526k | } |
836 | | |
837 | 526k | V8_INLINE static constexpr bool IsValidSmi(intptr_t value) { |
838 | 526k | return PlatformSmiTagging::IsValidSmi(value); |
839 | 526k | } |
840 | | |
841 | | #if V8_STATIC_ROOTS_BOOL |
842 | | V8_INLINE static bool is_identical(Address obj, Tagged_t constant) { |
843 | | return static_cast<Tagged_t>(obj) == constant; |
844 | | } |
845 | | |
846 | | V8_INLINE static bool CheckInstanceMapRange(Address obj, Tagged_t first_map, |
847 | | Tagged_t last_map) { |
848 | | auto map = ReadRawField<Tagged_t>(obj, kHeapObjectMapOffset); |
849 | | #ifdef V8_MAP_PACKING |
850 | | map = UnpackMapWord(map); |
851 | | #endif |
852 | | return map >= first_map && map <= last_map; |
853 | | } |
854 | | #endif |
855 | | |
856 | 17.0M | V8_INLINE static int GetInstanceType(Address obj) { |
857 | 17.0M | Address map = ReadTaggedPointerField(obj, kHeapObjectMapOffset); |
858 | | #ifdef V8_MAP_PACKING |
859 | | map = UnpackMapWord(map); |
860 | | #endif |
861 | 17.0M | return ReadRawField<uint16_t>(map, kMapInstanceTypeOffset); |
862 | 17.0M | } |
863 | | |
864 | 0 | V8_INLINE static Address LoadMap(Address obj) { |
865 | 0 | if (!HasHeapObjectTag(obj)) return kNullAddress; |
866 | 0 | Address map = ReadTaggedPointerField(obj, kHeapObjectMapOffset); |
867 | 0 | #ifdef V8_MAP_PACKING |
868 | 0 | map = UnpackMapWord(map); |
869 | 0 | #endif |
870 | 0 | return map; |
871 | 0 | } |
872 | | |
873 | 156k | V8_INLINE static int GetOddballKind(Address obj) { |
874 | 156k | return SmiValue(ReadTaggedSignedField(obj, kOddballKindOffset)); |
875 | 156k | } |
876 | | |
877 | 0 | V8_INLINE static bool IsExternalTwoByteString(int instance_type) { |
878 | 0 | int representation = (instance_type & kStringRepresentationAndEncodingMask); |
879 | 0 | return representation == kExternalTwoByteRepresentationTag; |
880 | 0 | } |
881 | | |
882 | 298k | V8_INLINE static constexpr bool CanHaveInternalField(int instance_type) { |
883 | 298k | static_assert(kJSObjectType + 1 == kFirstJSApiObjectType); |
884 | 298k | static_assert(kJSObjectType < kLastJSApiObjectType); |
885 | 298k | static_assert(kFirstJSApiObjectType < kLastJSApiObjectType); |
886 | | // Check for IsJSObject() || IsJSSpecialApiObject() || IsJSApiObject() |
887 | 298k | return instance_type == kJSSpecialApiObjectType || |
888 | | // inlined version of base::IsInRange |
889 | 298k | (static_cast<unsigned>(static_cast<unsigned>(instance_type) - |
890 | 298k | static_cast<unsigned>(kJSObjectType)) <= |
891 | 298k | static_cast<unsigned>(kLastJSApiObjectType - kJSObjectType)); |
892 | 298k | } |
893 | | |
894 | 0 | V8_INLINE static uint8_t GetNodeFlag(Address* obj, int shift) { |
895 | 0 | uint8_t* addr = reinterpret_cast<uint8_t*>(obj) + kNodeFlagsOffset; |
896 | 0 | return *addr & static_cast<uint8_t>(1U << shift); |
897 | 0 | } |
898 | | |
899 | 0 | V8_INLINE static void UpdateNodeFlag(Address* obj, bool value, int shift) { |
900 | 0 | uint8_t* addr = reinterpret_cast<uint8_t*>(obj) + kNodeFlagsOffset; |
901 | 0 | uint8_t mask = static_cast<uint8_t>(1U << shift); |
902 | 0 | *addr = static_cast<uint8_t>((*addr & ~mask) | (value << shift)); |
903 | 0 | } |
904 | | |
905 | 2.37M | V8_INLINE static uint8_t GetNodeState(Address* obj) { |
906 | 2.37M | uint8_t* addr = reinterpret_cast<uint8_t*>(obj) + kNodeFlagsOffset; |
907 | 2.37M | return *addr & kNodeStateMask; |
908 | 2.37M | } |
909 | | |
910 | 0 | V8_INLINE static void UpdateNodeState(Address* obj, uint8_t value) { |
911 | 0 | uint8_t* addr = reinterpret_cast<uint8_t*>(obj) + kNodeFlagsOffset; |
912 | 0 | *addr = static_cast<uint8_t>((*addr & ~kNodeStateMask) | value); |
913 | 0 | } |
914 | | |
915 | | V8_INLINE static void SetEmbedderData(v8::Isolate* isolate, uint32_t slot, |
916 | 0 | void* data) { |
917 | 0 | Address addr = reinterpret_cast<Address>(isolate) + |
918 | 0 | kIsolateEmbedderDataOffset + slot * kApiSystemPointerSize; |
919 | 0 | *reinterpret_cast<void**>(addr) = data; |
920 | 0 | } |
921 | | |
922 | | V8_INLINE static void* GetEmbedderData(const v8::Isolate* isolate, |
923 | 0 | uint32_t slot) { |
924 | 0 | Address addr = reinterpret_cast<Address>(isolate) + |
925 | 0 | kIsolateEmbedderDataOffset + slot * kApiSystemPointerSize; |
926 | 0 | return *reinterpret_cast<void* const*>(addr); |
927 | 0 | } |
928 | | |
929 | 0 | V8_INLINE static void IncrementLongTasksStatsCounter(v8::Isolate* isolate) { |
930 | 0 | Address addr = |
931 | 0 | reinterpret_cast<Address>(isolate) + kIsolateLongTaskStatsCounterOffset; |
932 | 0 | ++(*reinterpret_cast<size_t*>(addr)); |
933 | 0 | } |
934 | | |
935 | 47.7M | V8_INLINE static Address* GetRootSlot(v8::Isolate* isolate, int index) { |
936 | 47.7M | Address addr = reinterpret_cast<Address>(isolate) + kIsolateRootsOffset + |
937 | 47.7M | index * kApiSystemPointerSize; |
938 | 47.7M | return reinterpret_cast<Address*>(addr); |
939 | 47.7M | } |
940 | | |
941 | 607k | V8_INLINE static Address GetRoot(v8::Isolate* isolate, int index) { |
942 | | #if V8_STATIC_ROOTS_BOOL |
943 | | Address base = *reinterpret_cast<Address*>( |
944 | | reinterpret_cast<uintptr_t>(isolate) + kIsolateCageBaseOffset); |
945 | | switch (index) { |
946 | | #define DECOMPRESS_ROOT(name) \ |
947 | | case k##name##RootIndex: \ |
948 | | return base + StaticReadOnlyRoot::k##name; |
949 | | EXPORTED_STATIC_ROOTS_PTR_LIST(DECOMPRESS_ROOT) |
950 | | #undef DECOMPRESS_ROOT |
951 | | default: |
952 | | break; |
953 | | } |
954 | | #undef EXPORTED_STATIC_ROOTS_PTR_LIST |
955 | | #endif // V8_STATIC_ROOTS_BOOL |
956 | 607k | return *GetRootSlot(isolate, index); |
957 | 607k | } |
958 | | |
959 | | #ifdef V8_ENABLE_SANDBOX |
960 | | V8_INLINE static Address* GetExternalPointerTableBase(v8::Isolate* isolate) { |
961 | | Address addr = reinterpret_cast<Address>(isolate) + |
962 | | kIsolateExternalPointerTableOffset + |
963 | | kExternalPointerTableBasePointerOffset; |
964 | | return *reinterpret_cast<Address**>(addr); |
965 | | } |
966 | | |
967 | | V8_INLINE static Address* GetSharedExternalPointerTableBase( |
968 | | v8::Isolate* isolate) { |
969 | | Address addr = reinterpret_cast<Address>(isolate) + |
970 | | kIsolateSharedExternalPointerTableAddressOffset; |
971 | | addr = *reinterpret_cast<Address*>(addr); |
972 | | addr += kExternalPointerTableBasePointerOffset; |
973 | | return *reinterpret_cast<Address**>(addr); |
974 | | } |
975 | | #endif |
976 | | |
977 | | template <typename T> |
978 | 128M | V8_INLINE static T ReadRawField(Address heap_object_ptr, int offset) { |
979 | 128M | Address addr = heap_object_ptr + offset - kHeapObjectTag; |
980 | | #ifdef V8_COMPRESS_POINTERS |
981 | | if (sizeof(T) > kApiTaggedSize) { |
982 | | // TODO(ishell, v8:8875): When pointer compression is enabled 8-byte size |
983 | | // fields (external pointers, doubles and BigInt data) are only |
984 | | // kTaggedSize aligned so we have to use unaligned pointer friendly way of |
985 | | // accessing them in order to avoid undefined behavior in C++ code. |
986 | | T r; |
987 | | memcpy(&r, reinterpret_cast<void*>(addr), sizeof(T)); |
988 | | return r; |
989 | | } |
990 | | #endif |
991 | 128M | return *reinterpret_cast<const T*>(addr); |
992 | 128M | } unsigned short v8::internal::Internals::ReadRawField<unsigned short>(unsigned long, int) Line | Count | Source | 978 | 17.0M | V8_INLINE static T ReadRawField(Address heap_object_ptr, int offset) { | 979 | 17.0M | Address addr = heap_object_ptr + offset - kHeapObjectTag; | 980 | | #ifdef V8_COMPRESS_POINTERS | 981 | | if (sizeof(T) > kApiTaggedSize) { | 982 | | // TODO(ishell, v8:8875): When pointer compression is enabled 8-byte size | 983 | | // fields (external pointers, doubles and BigInt data) are only | 984 | | // kTaggedSize aligned so we have to use unaligned pointer friendly way of | 985 | | // accessing them in order to avoid undefined behavior in C++ code. | 986 | | T r; | 987 | | memcpy(&r, reinterpret_cast<void*>(addr), sizeof(T)); | 988 | | return r; | 989 | | } | 990 | | #endif | 991 | 17.0M | return *reinterpret_cast<const T*>(addr); | 992 | 17.0M | } |
unsigned long v8::internal::Internals::ReadRawField<unsigned long>(unsigned long, int) Line | Count | Source | 978 | 111M | V8_INLINE static T ReadRawField(Address heap_object_ptr, int offset) { | 979 | 111M | Address addr = heap_object_ptr + offset - kHeapObjectTag; | 980 | | #ifdef V8_COMPRESS_POINTERS | 981 | | if (sizeof(T) > kApiTaggedSize) { | 982 | | // TODO(ishell, v8:8875): When pointer compression is enabled 8-byte size | 983 | | // fields (external pointers, doubles and BigInt data) are only | 984 | | // kTaggedSize aligned so we have to use unaligned pointer friendly way of | 985 | | // accessing them in order to avoid undefined behavior in C++ code. | 986 | | T r; | 987 | | memcpy(&r, reinterpret_cast<void*>(addr), sizeof(T)); | 988 | | return r; | 989 | | } | 990 | | #endif | 991 | 111M | return *reinterpret_cast<const T*>(addr); | 992 | 111M | } |
|
993 | | |
994 | | V8_INLINE static Address ReadTaggedPointerField(Address heap_object_ptr, |
995 | 63.9M | int offset) { |
996 | | #ifdef V8_COMPRESS_POINTERS |
997 | | uint32_t value = ReadRawField<uint32_t>(heap_object_ptr, offset); |
998 | | Address base = GetPtrComprCageBaseFromOnHeapAddress(heap_object_ptr); |
999 | | return base + static_cast<Address>(static_cast<uintptr_t>(value)); |
1000 | | #else |
1001 | 63.9M | return ReadRawField<Address>(heap_object_ptr, offset); |
1002 | 63.9M | #endif |
1003 | 63.9M | } |
1004 | | |
1005 | | V8_INLINE static Address ReadTaggedSignedField(Address heap_object_ptr, |
1006 | 156k | int offset) { |
1007 | | #ifdef V8_COMPRESS_POINTERS |
1008 | | uint32_t value = ReadRawField<uint32_t>(heap_object_ptr, offset); |
1009 | | return static_cast<Address>(static_cast<uintptr_t>(value)); |
1010 | | #else |
1011 | 156k | return ReadRawField<Address>(heap_object_ptr, offset); |
1012 | 156k | #endif |
1013 | 156k | } |
1014 | | |
1015 | 47.1M | V8_INLINE static v8::Isolate* GetIsolateForSandbox(Address obj) { |
1016 | | #ifdef V8_ENABLE_SANDBOX |
1017 | | return reinterpret_cast<v8::Isolate*>( |
1018 | | internal::IsolateFromNeverReadOnlySpaceObject(obj)); |
1019 | | #else |
1020 | | // Not used in non-sandbox mode. |
1021 | 47.1M | return nullptr; |
1022 | 47.1M | #endif |
1023 | 47.1M | } |
1024 | | |
1025 | | template <ExternalPointerTag tag> |
1026 | | V8_INLINE static Address ReadExternalPointerField(v8::Isolate* isolate, |
1027 | | Address heap_object_ptr, |
1028 | 47.1M | int offset) { |
1029 | | #ifdef V8_ENABLE_SANDBOX |
1030 | | static_assert(tag != kExternalPointerNullTag); |
1031 | | // See src/sandbox/external-pointer-table-inl.h. Logic duplicated here so |
1032 | | // it can be inlined and doesn't require an additional call. |
1033 | | Address* table = IsSharedExternalPointerType(tag) |
1034 | | ? GetSharedExternalPointerTableBase(isolate) |
1035 | | : GetExternalPointerTableBase(isolate); |
1036 | | internal::ExternalPointerHandle handle = |
1037 | | ReadRawField<ExternalPointerHandle>(heap_object_ptr, offset); |
1038 | | uint32_t index = handle >> kExternalPointerIndexShift; |
1039 | | std::atomic<Address>* ptr = |
1040 | | reinterpret_cast<std::atomic<Address>*>(&table[index]); |
1041 | | Address entry = std::atomic_load_explicit(ptr, std::memory_order_relaxed); |
1042 | | return entry & ~tag; |
1043 | | #else |
1044 | 47.1M | return ReadRawField<Address>(heap_object_ptr, offset); |
1045 | 47.1M | #endif // V8_ENABLE_SANDBOX |
1046 | 47.1M | } Unexecuted instantiation: unsigned long v8::internal::Internals::ReadExternalPointerField<(v8::internal::ExternalPointerTag)4618159942891732992>(v8::Isolate*, unsigned long, int) unsigned long v8::internal::Internals::ReadExternalPointerField<(v8::internal::ExternalPointerTag)4627730092099895296>(v8::Isolate*, unsigned long, int) Line | Count | Source | 1028 | 47.1M | int offset) { | 1029 | | #ifdef V8_ENABLE_SANDBOX | 1030 | | static_assert(tag != kExternalPointerNullTag); | 1031 | | // See src/sandbox/external-pointer-table-inl.h. Logic duplicated here so | 1032 | | // it can be inlined and doesn't require an additional call. | 1033 | | Address* table = IsSharedExternalPointerType(tag) | 1034 | | ? GetSharedExternalPointerTableBase(isolate) | 1035 | | : GetExternalPointerTableBase(isolate); | 1036 | | internal::ExternalPointerHandle handle = | 1037 | | ReadRawField<ExternalPointerHandle>(heap_object_ptr, offset); | 1038 | | uint32_t index = handle >> kExternalPointerIndexShift; | 1039 | | std::atomic<Address>* ptr = | 1040 | | reinterpret_cast<std::atomic<Address>*>(&table[index]); | 1041 | | Address entry = std::atomic_load_explicit(ptr, std::memory_order_relaxed); | 1042 | | return entry & ~tag; | 1043 | | #else | 1044 | 47.1M | return ReadRawField<Address>(heap_object_ptr, offset); | 1045 | 47.1M | #endif // V8_ENABLE_SANDBOX | 1046 | 47.1M | } |
|
1047 | | |
1048 | | #ifdef V8_COMPRESS_POINTERS |
1049 | | V8_INLINE static Address GetPtrComprCageBaseFromOnHeapAddress(Address addr) { |
1050 | | return addr & -static_cast<intptr_t>(kPtrComprCageBaseAlignment); |
1051 | | } |
1052 | | |
1053 | | V8_INLINE static Address DecompressTaggedField(Address heap_object_ptr, |
1054 | | uint32_t value) { |
1055 | | Address base = GetPtrComprCageBaseFromOnHeapAddress(heap_object_ptr); |
1056 | | return base + static_cast<Address>(static_cast<uintptr_t>(value)); |
1057 | | } |
1058 | | |
1059 | | #endif // V8_COMPRESS_POINTERS |
1060 | | }; |
1061 | | |
1062 | | // Only perform cast check for types derived from v8::Data since |
1063 | | // other types do not implement the Cast method. |
1064 | | template <bool PerformCheck> |
1065 | | struct CastCheck { |
1066 | | template <class T> |
1067 | | static void Perform(T* data); |
1068 | | }; |
1069 | | |
1070 | | template <> |
1071 | | template <class T> |
1072 | 0 | void CastCheck<true>::Perform(T* data) { |
1073 | 0 | T::Cast(data); |
1074 | 0 | } Unexecuted instantiation: void v8::internal::CastCheck<true>::Perform<v8::Private>(v8::Private*) Unexecuted instantiation: void v8::internal::CastCheck<true>::Perform<v8::Symbol>(v8::Symbol*) Unexecuted instantiation: void v8::internal::CastCheck<true>::Perform<v8::String>(v8::String*) Unexecuted instantiation: void v8::internal::CastCheck<true>::Perform<v8::FunctionTemplate>(v8::FunctionTemplate*) Unexecuted instantiation: void v8::internal::CastCheck<true>::Perform<v8::ObjectTemplate>(v8::ObjectTemplate*) Unexecuted instantiation: void v8::internal::CastCheck<true>::Perform<v8::Uint32Array>(v8::Uint32Array*) Unexecuted instantiation: void v8::internal::CastCheck<true>::Perform<v8::Uint8Array>(v8::Uint8Array*) Unexecuted instantiation: void v8::internal::CastCheck<true>::Perform<v8::Float64Array>(v8::Float64Array*) Unexecuted instantiation: void v8::internal::CastCheck<true>::Perform<v8::Array>(v8::Array*) Unexecuted instantiation: void v8::internal::CastCheck<true>::Perform<v8::Object>(v8::Object*) Unexecuted instantiation: void v8::internal::CastCheck<true>::Perform<v8::Int32Array>(v8::Int32Array*) Unexecuted instantiation: void v8::internal::CastCheck<true>::Perform<v8::BigInt64Array>(v8::BigInt64Array*) Unexecuted instantiation: void v8::internal::CastCheck<true>::Perform<v8::Function>(v8::Function*) Unexecuted instantiation: void v8::internal::CastCheck<true>::Perform<v8::Context>(v8::Context*) |
1075 | | |
1076 | | template <> |
1077 | | template <class T> |
1078 | | void CastCheck<false>::Perform(T* data) {} |
1079 | | |
1080 | | template <class T> |
1081 | 0 | V8_INLINE void PerformCastCheck(T* data) { |
1082 | 0 | CastCheck<std::is_base_of<Data, T>::value && |
1083 | 0 | !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data); |
1084 | 0 | } Unexecuted instantiation: void v8::internal::PerformCastCheck<v8::Private>(v8::Private*) Unexecuted instantiation: void v8::internal::PerformCastCheck<v8::Symbol>(v8::Symbol*) Unexecuted instantiation: void v8::internal::PerformCastCheck<v8::String>(v8::String*) Unexecuted instantiation: void v8::internal::PerformCastCheck<v8::FunctionTemplate>(v8::FunctionTemplate*) Unexecuted instantiation: void v8::internal::PerformCastCheck<v8::ObjectTemplate>(v8::ObjectTemplate*) Unexecuted instantiation: void v8::internal::PerformCastCheck<v8::Uint32Array>(v8::Uint32Array*) Unexecuted instantiation: void v8::internal::PerformCastCheck<v8::Uint8Array>(v8::Uint8Array*) Unexecuted instantiation: void v8::internal::PerformCastCheck<v8::Float64Array>(v8::Float64Array*) Unexecuted instantiation: void v8::internal::PerformCastCheck<v8::Array>(v8::Array*) Unexecuted instantiation: void v8::internal::PerformCastCheck<v8::Object>(v8::Object*) Unexecuted instantiation: void v8::internal::PerformCastCheck<v8::Int32Array>(v8::Int32Array*) Unexecuted instantiation: void v8::internal::PerformCastCheck<v8::BigInt64Array>(v8::BigInt64Array*) Unexecuted instantiation: void v8::internal::PerformCastCheck<v8::Function>(v8::Function*) Unexecuted instantiation: void v8::internal::PerformCastCheck<v8::Context>(v8::Context*) |
1085 | | |
1086 | | // A base class for backing stores, which is needed due to vagaries of |
1087 | | // how static casts work with std::shared_ptr. |
1088 | | class BackingStoreBase {}; |
1089 | | |
1090 | | // The maximum value in enum GarbageCollectionReason, defined in heap.h. |
1091 | | // This is needed for histograms sampling garbage collection reasons. |
1092 | | constexpr int kGarbageCollectionReasonMaxValue = 27; |
1093 | | |
1094 | | // Base class for the address block allocator compatible with standard |
1095 | | // containers, which registers its allocated range as strong roots. |
1096 | | class V8_EXPORT StrongRootAllocatorBase { |
1097 | | public: |
1098 | 0 | Heap* heap() const { return heap_; } |
1099 | | |
1100 | 0 | bool operator==(const StrongRootAllocatorBase& other) const { |
1101 | 0 | return heap_ == other.heap_; |
1102 | 0 | } |
1103 | 0 | bool operator!=(const StrongRootAllocatorBase& other) const { |
1104 | 0 | return heap_ != other.heap_; |
1105 | 0 | } |
1106 | | |
1107 | | protected: |
1108 | 0 | explicit StrongRootAllocatorBase(Heap* heap) : heap_(heap) {} |
1109 | | explicit StrongRootAllocatorBase(v8::Isolate* isolate); |
1110 | | |
1111 | | // Allocate/deallocate a range of n elements of type internal::Address. |
1112 | | Address* allocate_impl(size_t n); |
1113 | | void deallocate_impl(Address* p, size_t n) noexcept; |
1114 | | |
1115 | | private: |
1116 | | Heap* heap_; |
1117 | | }; |
1118 | | |
1119 | | // The general version of this template behaves just as std::allocator, with |
1120 | | // the exception that the constructor takes the isolate as parameter. Only |
1121 | | // specialized versions, e.g., internal::StrongRootAllocator<internal::Address> |
1122 | | // and internal::StrongRootAllocator<v8::Local<T>> register the allocated range |
1123 | | // as strong roots. |
1124 | | template <typename T> |
1125 | | class StrongRootAllocator : public StrongRootAllocatorBase, |
1126 | | private std::allocator<T> { |
1127 | | public: |
1128 | | using value_type = T; |
1129 | | |
1130 | | explicit StrongRootAllocator(Heap* heap) : StrongRootAllocatorBase(heap) {} |
1131 | | explicit StrongRootAllocator(v8::Isolate* isolate) |
1132 | | : StrongRootAllocatorBase(isolate) {} |
1133 | | template <typename U> |
1134 | | StrongRootAllocator(const StrongRootAllocator<U>& other) noexcept |
1135 | | : StrongRootAllocatorBase(other) {} |
1136 | | |
1137 | | using std::allocator<T>::allocate; |
1138 | | using std::allocator<T>::deallocate; |
1139 | | }; |
1140 | | |
1141 | | // A class of iterators that wrap some different iterator type. |
1142 | | // If specified, ElementType is the type of element accessed by the wrapper |
1143 | | // iterator; in this case, the actual reference and pointer types of Iterator |
1144 | | // must be convertible to ElementType& and ElementType*, respectively. |
1145 | | template <typename Iterator, typename ElementType = void> |
1146 | | class WrappedIterator { |
1147 | | public: |
1148 | | static_assert( |
1149 | | !std::is_void_v<ElementType> || |
1150 | | (std::is_convertible_v<typename std::iterator_traits<Iterator>::pointer, |
1151 | | ElementType*> && |
1152 | | std::is_convertible_v<typename std::iterator_traits<Iterator>::reference, |
1153 | | ElementType&>)); |
1154 | | |
1155 | | using iterator_category = |
1156 | | typename std::iterator_traits<Iterator>::iterator_category; |
1157 | | using difference_type = |
1158 | | typename std::iterator_traits<Iterator>::difference_type; |
1159 | | using value_type = |
1160 | | std::conditional_t<std::is_void_v<ElementType>, |
1161 | | typename std::iterator_traits<Iterator>::value_type, |
1162 | | ElementType>; |
1163 | | using pointer = |
1164 | | std::conditional_t<std::is_void_v<ElementType>, |
1165 | | typename std::iterator_traits<Iterator>::pointer, |
1166 | | ElementType*>; |
1167 | | using reference = |
1168 | | std::conditional_t<std::is_void_v<ElementType>, |
1169 | | typename std::iterator_traits<Iterator>::reference, |
1170 | | ElementType&>; |
1171 | | |
1172 | | constexpr WrappedIterator() noexcept : it_() {} |
1173 | 0 | constexpr explicit WrappedIterator(Iterator it) noexcept : it_(it) {} |
1174 | | |
1175 | | template <typename OtherIterator, typename OtherElementType, |
1176 | | std::enable_if_t<std::is_convertible_v<OtherIterator, Iterator>, |
1177 | | bool> = true> |
1178 | | constexpr WrappedIterator( |
1179 | | const WrappedIterator<OtherIterator, OtherElementType>& it) noexcept |
1180 | | : it_(it.base()) {} |
1181 | | |
1182 | 0 | constexpr reference operator*() const noexcept { return *it_; } |
1183 | | constexpr pointer operator->() const noexcept { return it_.operator->(); } |
1184 | | |
1185 | 0 | constexpr WrappedIterator& operator++() noexcept { |
1186 | 0 | ++it_; |
1187 | 0 | return *this; |
1188 | 0 | } |
1189 | | constexpr WrappedIterator operator++(int) noexcept { |
1190 | | WrappedIterator result(*this); |
1191 | | ++(*this); |
1192 | | return result; |
1193 | | } |
1194 | | |
1195 | | constexpr WrappedIterator& operator--() noexcept { |
1196 | | --it_; |
1197 | | return *this; |
1198 | | } |
1199 | | constexpr WrappedIterator operator--(int) noexcept { |
1200 | | WrappedIterator result(*this); |
1201 | | --(*this); |
1202 | | return result; |
1203 | | } |
1204 | | constexpr WrappedIterator operator+(difference_type n) const noexcept { |
1205 | | WrappedIterator result(*this); |
1206 | | result += n; |
1207 | | return result; |
1208 | | } |
1209 | | constexpr WrappedIterator& operator+=(difference_type n) noexcept { |
1210 | | it_ += n; |
1211 | | return *this; |
1212 | | } |
1213 | | constexpr WrappedIterator operator-(difference_type n) const noexcept { |
1214 | | return *this + (-n); |
1215 | | } |
1216 | | constexpr WrappedIterator& operator-=(difference_type n) noexcept { |
1217 | | *this += -n; |
1218 | | return *this; |
1219 | | } |
1220 | | constexpr reference operator[](difference_type n) const noexcept { |
1221 | | return it_[n]; |
1222 | | } |
1223 | | |
1224 | 0 | constexpr Iterator base() const noexcept { return it_; } Unexecuted instantiation: v8::internal::WrappedIterator<std::__1::__wrap_iter<v8::internal::LocalUnchecked<v8::Object>*>, v8::Local<v8::Object> >::base() const Unexecuted instantiation: v8::internal::WrappedIterator<std::__1::__wrap_iter<v8::internal::LocalUnchecked<v8::Object> const*>, v8::Local<v8::Object> const>::base() const Unexecuted instantiation: v8::internal::WrappedIterator<std::__1::__wrap_iter<v8::internal::LocalUnchecked<v8::Message>*>, v8::Local<v8::Message> >::base() const |
1225 | | |
1226 | | private: |
1227 | | template <typename OtherIterator, typename OtherElementType> |
1228 | | friend class WrappedIterator; |
1229 | | |
1230 | | private: |
1231 | | Iterator it_; |
1232 | | }; |
1233 | | |
1234 | | template <typename Iterator, typename ElementType, typename OtherIterator, |
1235 | | typename OtherElementType> |
1236 | | constexpr bool operator==( |
1237 | | const WrappedIterator<Iterator, ElementType>& x, |
1238 | 0 | const WrappedIterator<OtherIterator, OtherElementType>& y) noexcept { |
1239 | 0 | return x.base() == y.base(); |
1240 | 0 | } |
1241 | | |
1242 | | template <typename Iterator, typename ElementType, typename OtherIterator, |
1243 | | typename OtherElementType> |
1244 | | constexpr bool operator<( |
1245 | | const WrappedIterator<Iterator, ElementType>& x, |
1246 | | const WrappedIterator<OtherIterator, OtherElementType>& y) noexcept { |
1247 | | return x.base() < y.base(); |
1248 | | } |
1249 | | |
1250 | | template <typename Iterator, typename ElementType, typename OtherIterator, |
1251 | | typename OtherElementType> |
1252 | | constexpr bool operator!=( |
1253 | | const WrappedIterator<Iterator, ElementType>& x, |
1254 | 0 | const WrappedIterator<OtherIterator, OtherElementType>& y) noexcept { |
1255 | 0 | return !(x == y); |
1256 | 0 | } |
1257 | | |
1258 | | template <typename Iterator, typename ElementType, typename OtherIterator, |
1259 | | typename OtherElementType> |
1260 | | constexpr bool operator>( |
1261 | | const WrappedIterator<Iterator, ElementType>& x, |
1262 | | const WrappedIterator<OtherIterator, OtherElementType>& y) noexcept { |
1263 | | return y < x; |
1264 | | } |
1265 | | |
1266 | | template <typename Iterator, typename ElementType, typename OtherIterator, |
1267 | | typename OtherElementType> |
1268 | | constexpr bool operator>=( |
1269 | | const WrappedIterator<Iterator, ElementType>& x, |
1270 | | const WrappedIterator<OtherIterator, OtherElementType>& y) noexcept { |
1271 | | return !(x < y); |
1272 | | } |
1273 | | |
1274 | | template <typename Iterator, typename ElementType, typename OtherIterator, |
1275 | | typename OtherElementType> |
1276 | | constexpr bool operator<=( |
1277 | | const WrappedIterator<Iterator, ElementType>& x, |
1278 | | const WrappedIterator<OtherIterator, OtherElementType>& y) noexcept { |
1279 | | return !(y < x); |
1280 | | } |
1281 | | |
1282 | | template <typename Iterator, typename ElementType, typename OtherIterator, |
1283 | | typename OtherElementType> |
1284 | | constexpr auto operator-( |
1285 | | const WrappedIterator<Iterator, ElementType>& x, |
1286 | | const WrappedIterator<OtherIterator, OtherElementType>& y) noexcept |
1287 | | -> decltype(x.base() - y.base()) { |
1288 | | return x.base() - y.base(); |
1289 | | } |
1290 | | |
1291 | | template <typename Iterator, typename ElementType> |
1292 | | constexpr WrappedIterator<Iterator> operator+( |
1293 | | typename WrappedIterator<Iterator, ElementType>::difference_type n, |
1294 | | const WrappedIterator<Iterator, ElementType>& x) noexcept { |
1295 | | x += n; |
1296 | | return x; |
1297 | | } |
1298 | | |
1299 | | // Helper functions about values contained in handles. |
1300 | | // A value is either an indirect pointer or a direct pointer, depending on |
1301 | | // whether direct local support is enabled. |
1302 | | class ValueHelper final { |
1303 | | public: |
1304 | | #ifdef V8_ENABLE_DIRECT_LOCAL |
1305 | | static constexpr Address kTaggedNullAddress = 1; |
1306 | | static constexpr Address kEmpty = kTaggedNullAddress; |
1307 | | #else |
1308 | | static constexpr Address kEmpty = kNullAddress; |
1309 | | #endif // V8_ENABLE_DIRECT_LOCAL |
1310 | | |
1311 | | template <typename T> |
1312 | 11.5M | V8_INLINE static bool IsEmpty(T* value) { |
1313 | 11.5M | return reinterpret_cast<Address>(value) == kEmpty; |
1314 | 11.5M | } bool v8::internal::ValueHelper::IsEmpty<v8::Value>(v8::Value*) Line | Count | Source | 1312 | 5.90k | V8_INLINE static bool IsEmpty(T* value) { | 1313 | 5.90k | return reinterpret_cast<Address>(value) == kEmpty; | 1314 | 5.90k | } |
Unexecuted instantiation: bool v8::internal::ValueHelper::IsEmpty<v8::Int8Array>(v8::Int8Array*) bool v8::internal::ValueHelper::IsEmpty<v8::Uint8Array>(v8::Uint8Array*) Line | Count | Source | 1312 | 854k | V8_INLINE static bool IsEmpty(T* value) { | 1313 | 854k | return reinterpret_cast<Address>(value) == kEmpty; | 1314 | 854k | } |
Unexecuted instantiation: bool v8::internal::ValueHelper::IsEmpty<v8::Int16Array>(v8::Int16Array*) Unexecuted instantiation: bool v8::internal::ValueHelper::IsEmpty<v8::Uint16Array>(v8::Uint16Array*) bool v8::internal::ValueHelper::IsEmpty<v8::Int32Array>(v8::Int32Array*) Line | Count | Source | 1312 | 693k | V8_INLINE static bool IsEmpty(T* value) { | 1313 | 693k | return reinterpret_cast<Address>(value) == kEmpty; | 1314 | 693k | } |
bool v8::internal::ValueHelper::IsEmpty<v8::Uint32Array>(v8::Uint32Array*) Line | Count | Source | 1312 | 1.70M | V8_INLINE static bool IsEmpty(T* value) { | 1313 | 1.70M | return reinterpret_cast<Address>(value) == kEmpty; | 1314 | 1.70M | } |
Unexecuted instantiation: bool v8::internal::ValueHelper::IsEmpty<v8::Float32Array>(v8::Float32Array*) bool v8::internal::ValueHelper::IsEmpty<v8::Float64Array>(v8::Float64Array*) Line | Count | Source | 1312 | 1.22M | V8_INLINE static bool IsEmpty(T* value) { | 1313 | 1.22M | return reinterpret_cast<Address>(value) == kEmpty; | 1314 | 1.22M | } |
bool v8::internal::ValueHelper::IsEmpty<v8::BigInt64Array>(v8::BigInt64Array*) Line | Count | Source | 1312 | 488k | V8_INLINE static bool IsEmpty(T* value) { | 1313 | 488k | return reinterpret_cast<Address>(value) == kEmpty; | 1314 | 488k | } |
bool v8::internal::ValueHelper::IsEmpty<v8::Array>(v8::Array*) Line | Count | Source | 1312 | 122k | V8_INLINE static bool IsEmpty(T* value) { | 1313 | 122k | return reinterpret_cast<Address>(value) == kEmpty; | 1314 | 122k | } |
bool v8::internal::ValueHelper::IsEmpty<v8::Object>(v8::Object*) Line | Count | Source | 1312 | 3.06M | V8_INLINE static bool IsEmpty(T* value) { | 1313 | 3.06M | return reinterpret_cast<Address>(value) == kEmpty; | 1314 | 3.06M | } |
bool v8::internal::ValueHelper::IsEmpty<v8::Function>(v8::Function*) Line | Count | Source | 1312 | 3.03M | V8_INLINE static bool IsEmpty(T* value) { | 1313 | 3.03M | return reinterpret_cast<Address>(value) == kEmpty; | 1314 | 3.03M | } |
bool v8::internal::ValueHelper::IsEmpty<v8::Context>(v8::Context*) Line | Count | Source | 1312 | 391k | V8_INLINE static bool IsEmpty(T* value) { | 1313 | 391k | return reinterpret_cast<Address>(value) == kEmpty; | 1314 | 391k | } |
Unexecuted instantiation: bool v8::internal::ValueHelper::IsEmpty<v8::Promise>(v8::Promise*) Unexecuted instantiation: bool v8::internal::ValueHelper::IsEmpty<v8::Module>(v8::Module*) Unexecuted instantiation: bool v8::internal::ValueHelper::IsEmpty<v8::ArrayBuffer>(v8::ArrayBuffer*) bool v8::internal::ValueHelper::IsEmpty<v8::UnboundScript>(v8::UnboundScript*) Line | Count | Source | 1312 | 1.90k | V8_INLINE static bool IsEmpty(T* value) { | 1313 | 1.90k | return reinterpret_cast<Address>(value) == kEmpty; | 1314 | 1.90k | } |
Unexecuted instantiation: bool v8::internal::ValueHelper::IsEmpty<v8::SharedArrayBuffer>(v8::SharedArrayBuffer*) Unexecuted instantiation: bool v8::internal::ValueHelper::IsEmpty<v8::WasmMemoryObject>(v8::WasmMemoryObject*) Unexecuted instantiation: bool v8::internal::ValueHelper::IsEmpty<v8::ArrayBufferView>(v8::ArrayBufferView*) Unexecuted instantiation: bool v8::internal::ValueHelper::IsEmpty<v8::FunctionTemplate>(v8::FunctionTemplate*) |
1315 | | |
1316 | | // Returns a handle's "value" for all kinds of abstract handles. For Local, |
1317 | | // it is equivalent to `*handle`. The variadic parameters support handle |
1318 | | // types with extra type parameters, like `Persistent<T, M>`. |
1319 | | template <template <typename T, typename... Ms> typename H, typename T, |
1320 | | typename... Ms> |
1321 | | V8_INLINE static T* HandleAsValue(const H<T, Ms...>& handle) { |
1322 | | return handle.template value<T>(); |
1323 | | } |
1324 | | |
1325 | | #ifdef V8_ENABLE_DIRECT_LOCAL |
1326 | | |
1327 | | template <typename T> |
1328 | | V8_INLINE static Address ValueAsAddress(const T* value) { |
1329 | | return reinterpret_cast<Address>(value); |
1330 | | } |
1331 | | |
1332 | | template <typename T, bool check_null = true, typename S> |
1333 | | V8_INLINE static T* SlotAsValue(S* slot) { |
1334 | | if (check_null && slot == nullptr) { |
1335 | | return reinterpret_cast<T*>(kTaggedNullAddress); |
1336 | | } |
1337 | | return *reinterpret_cast<T**>(slot); |
1338 | | } |
1339 | | |
1340 | | #else // !V8_ENABLE_DIRECT_LOCAL |
1341 | | |
1342 | | template <typename T> |
1343 | 75.8M | V8_INLINE static Address ValueAsAddress(const T* value) { |
1344 | 75.8M | return *reinterpret_cast<const Address*>(value); |
1345 | 75.8M | } unsigned long v8::internal::ValueHelper::ValueAsAddress<v8::Value>(v8::Value const*) Line | Count | Source | 1343 | 17.0M | V8_INLINE static Address ValueAsAddress(const T* value) { | 1344 | 17.0M | return *reinterpret_cast<const Address*>(value); | 1345 | 17.0M | } |
Unexecuted instantiation: unsigned long v8::internal::ValueHelper::ValueAsAddress<v8::Data>(v8::Data const*) Unexecuted instantiation: unsigned long v8::internal::ValueHelper::ValueAsAddress<v8::String>(v8::String const*) unsigned long v8::internal::ValueHelper::ValueAsAddress<v8::Object>(v8::Object const*) Line | Count | Source | 1343 | 3.35M | V8_INLINE static Address ValueAsAddress(const T* value) { | 1344 | 3.35M | return *reinterpret_cast<const Address*>(value); | 1345 | 3.35M | } |
unsigned long v8::internal::ValueHelper::ValueAsAddress<v8::Context>(v8::Context const*) Line | Count | Source | 1343 | 47.3M | V8_INLINE static Address ValueAsAddress(const T* value) { | 1344 | 47.3M | return *reinterpret_cast<const Address*>(value); | 1345 | 47.3M | } |
Unexecuted instantiation: unsigned long v8::internal::ValueHelper::ValueAsAddress<v8::Int8Array>(v8::Int8Array const*) unsigned long v8::internal::ValueHelper::ValueAsAddress<v8::Uint8Array>(v8::Uint8Array const*) Line | Count | Source | 1343 | 854k | V8_INLINE static Address ValueAsAddress(const T* value) { | 1344 | 854k | return *reinterpret_cast<const Address*>(value); | 1345 | 854k | } |
Unexecuted instantiation: unsigned long v8::internal::ValueHelper::ValueAsAddress<v8::Int16Array>(v8::Int16Array const*) Unexecuted instantiation: unsigned long v8::internal::ValueHelper::ValueAsAddress<v8::Uint16Array>(v8::Uint16Array const*) unsigned long v8::internal::ValueHelper::ValueAsAddress<v8::Int32Array>(v8::Int32Array const*) Line | Count | Source | 1343 | 693k | V8_INLINE static Address ValueAsAddress(const T* value) { | 1344 | 693k | return *reinterpret_cast<const Address*>(value); | 1345 | 693k | } |
unsigned long v8::internal::ValueHelper::ValueAsAddress<v8::Uint32Array>(v8::Uint32Array const*) Line | Count | Source | 1343 | 1.70M | V8_INLINE static Address ValueAsAddress(const T* value) { | 1344 | 1.70M | return *reinterpret_cast<const Address*>(value); | 1345 | 1.70M | } |
Unexecuted instantiation: unsigned long v8::internal::ValueHelper::ValueAsAddress<v8::Float32Array>(v8::Float32Array const*) unsigned long v8::internal::ValueHelper::ValueAsAddress<v8::Float64Array>(v8::Float64Array const*) Line | Count | Source | 1343 | 1.22M | V8_INLINE static Address ValueAsAddress(const T* value) { | 1344 | 1.22M | return *reinterpret_cast<const Address*>(value); | 1345 | 1.22M | } |
unsigned long v8::internal::ValueHelper::ValueAsAddress<v8::BigInt64Array>(v8::BigInt64Array const*) Line | Count | Source | 1343 | 488k | V8_INLINE static Address ValueAsAddress(const T* value) { | 1344 | 488k | return *reinterpret_cast<const Address*>(value); | 1345 | 488k | } |
unsigned long v8::internal::ValueHelper::ValueAsAddress<v8::Array>(v8::Array const*) Line | Count | Source | 1343 | 122k | V8_INLINE static Address ValueAsAddress(const T* value) { | 1344 | 122k | return *reinterpret_cast<const Address*>(value); | 1345 | 122k | } |
unsigned long v8::internal::ValueHelper::ValueAsAddress<v8::Function>(v8::Function const*) Line | Count | Source | 1343 | 3.03M | V8_INLINE static Address ValueAsAddress(const T* value) { | 1344 | 3.03M | return *reinterpret_cast<const Address*>(value); | 1345 | 3.03M | } |
Unexecuted instantiation: unsigned long v8::internal::ValueHelper::ValueAsAddress<v8::Private>(v8::Private const*) Unexecuted instantiation: unsigned long v8::internal::ValueHelper::ValueAsAddress<v8::Symbol>(v8::Symbol const*) Unexecuted instantiation: unsigned long v8::internal::ValueHelper::ValueAsAddress<v8::FunctionTemplate>(v8::FunctionTemplate const*) Unexecuted instantiation: unsigned long v8::internal::ValueHelper::ValueAsAddress<v8::ObjectTemplate>(v8::ObjectTemplate const*) Unexecuted instantiation: unsigned long v8::internal::ValueHelper::ValueAsAddress<v8::Promise>(v8::Promise const*) Unexecuted instantiation: unsigned long v8::internal::ValueHelper::ValueAsAddress<v8::Module>(v8::Module const*) Unexecuted instantiation: unsigned long v8::internal::ValueHelper::ValueAsAddress<v8::ArrayBuffer>(v8::ArrayBuffer const*) unsigned long v8::internal::ValueHelper::ValueAsAddress<v8::UnboundScript>(v8::UnboundScript const*) Line | Count | Source | 1343 | 1.90k | V8_INLINE static Address ValueAsAddress(const T* value) { | 1344 | 1.90k | return *reinterpret_cast<const Address*>(value); | 1345 | 1.90k | } |
Unexecuted instantiation: unsigned long v8::internal::ValueHelper::ValueAsAddress<v8::SharedArrayBuffer>(v8::SharedArrayBuffer const*) Unexecuted instantiation: unsigned long v8::internal::ValueHelper::ValueAsAddress<v8::WasmMemoryObject>(v8::WasmMemoryObject const*) Unexecuted instantiation: unsigned long v8::internal::ValueHelper::ValueAsAddress<v8::ArrayBufferView>(v8::ArrayBufferView const*) |
1346 | | |
1347 | | template <typename T, bool check_null = true, typename S> |
1348 | 765M | V8_INLINE static T* SlotAsValue(S* slot) { |
1349 | 765M | return reinterpret_cast<T*>(slot); |
1350 | 765M | } Unexecuted instantiation: v8::Data* v8::internal::ValueHelper::SlotAsValue<v8::Data, false, unsigned long>(unsigned long*) v8::Value* v8::internal::ValueHelper::SlotAsValue<v8::Value, false, unsigned long>(unsigned long*) Line | Count | Source | 1348 | 129M | V8_INLINE static T* SlotAsValue(S* slot) { | 1349 | 129M | return reinterpret_cast<T*>(slot); | 1350 | 129M | } |
v8::Object* v8::internal::ValueHelper::SlotAsValue<v8::Object, false, unsigned long>(unsigned long*) Line | Count | Source | 1348 | 279M | V8_INLINE static T* SlotAsValue(S* slot) { | 1349 | 279M | return reinterpret_cast<T*>(slot); | 1350 | 279M | } |
v8::Context* v8::internal::ValueHelper::SlotAsValue<v8::Context, false, unsigned long>(unsigned long*) Line | Count | Source | 1348 | 167M | V8_INLINE static T* SlotAsValue(S* slot) { | 1349 | 167M | return reinterpret_cast<T*>(slot); | 1350 | 167M | } |
Unexecuted instantiation: v8::Date* v8::internal::ValueHelper::SlotAsValue<v8::Date, false, unsigned long>(unsigned long*) v8::FunctionTemplate* v8::internal::ValueHelper::SlotAsValue<v8::FunctionTemplate, false, unsigned long>(unsigned long*) Line | Count | Source | 1348 | 50.3M | V8_INLINE static T* SlotAsValue(S* slot) { | 1349 | 50.3M | return reinterpret_cast<T*>(slot); | 1350 | 50.3M | } |
v8::Template* v8::internal::ValueHelper::SlotAsValue<v8::Template, false, unsigned long>(unsigned long*) Line | Count | Source | 1348 | 20.6M | V8_INLINE static T* SlotAsValue(S* slot) { | 1349 | 20.6M | return reinterpret_cast<T*>(slot); | 1350 | 20.6M | } |
v8::Function* v8::internal::ValueHelper::SlotAsValue<v8::Function, false, unsigned long>(unsigned long*) Line | Count | Source | 1348 | 19.9M | V8_INLINE static T* SlotAsValue(S* slot) { | 1349 | 19.9M | return reinterpret_cast<T*>(slot); | 1350 | 19.9M | } |
v8::ObjectTemplate* v8::internal::ValueHelper::SlotAsValue<v8::ObjectTemplate, false, unsigned long>(unsigned long*) Line | Count | Source | 1348 | 25.8M | V8_INLINE static T* SlotAsValue(S* slot) { | 1349 | 25.8M | return reinterpret_cast<T*>(slot); | 1350 | 25.8M | } |
v8::Array* v8::internal::ValueHelper::SlotAsValue<v8::Array, false, unsigned long>(unsigned long*) Line | Count | Source | 1348 | 1.71M | V8_INLINE static T* SlotAsValue(S* slot) { | 1349 | 1.71M | return reinterpret_cast<T*>(slot); | 1350 | 1.71M | } |
v8::Number* v8::internal::ValueHelper::SlotAsValue<v8::Number, false, unsigned long>(unsigned long*) Line | Count | Source | 1348 | 9 | V8_INLINE static T* SlotAsValue(S* slot) { | 1349 | 9 | return reinterpret_cast<T*>(slot); | 1350 | 9 | } |
Unexecuted instantiation: v8::Int8Array* v8::internal::ValueHelper::SlotAsValue<v8::Int8Array, true, unsigned long>(unsigned long*) v8::Uint8Array* v8::internal::ValueHelper::SlotAsValue<v8::Uint8Array, true, unsigned long>(unsigned long*) Line | Count | Source | 1348 | 488k | V8_INLINE static T* SlotAsValue(S* slot) { | 1349 | 488k | return reinterpret_cast<T*>(slot); | 1350 | 488k | } |
Unexecuted instantiation: v8::Int16Array* v8::internal::ValueHelper::SlotAsValue<v8::Int16Array, true, unsigned long>(unsigned long*) Unexecuted instantiation: v8::Uint16Array* v8::internal::ValueHelper::SlotAsValue<v8::Uint16Array, true, unsigned long>(unsigned long*) v8::Int32Array* v8::internal::ValueHelper::SlotAsValue<v8::Int32Array, true, unsigned long>(unsigned long*) Line | Count | Source | 1348 | 327k | V8_INLINE static T* SlotAsValue(S* slot) { | 1349 | 327k | return reinterpret_cast<T*>(slot); | 1350 | 327k | } |
v8::Uint32Array* v8::internal::ValueHelper::SlotAsValue<v8::Uint32Array, true, unsigned long>(unsigned long*) Line | Count | Source | 1348 | 854k | V8_INLINE static T* SlotAsValue(S* slot) { | 1349 | 854k | return reinterpret_cast<T*>(slot); | 1350 | 854k | } |
Unexecuted instantiation: v8::Float32Array* v8::internal::ValueHelper::SlotAsValue<v8::Float32Array, true, unsigned long>(unsigned long*) v8::Float64Array* v8::internal::ValueHelper::SlotAsValue<v8::Float64Array, true, unsigned long>(unsigned long*) Line | Count | Source | 1348 | 610k | V8_INLINE static T* SlotAsValue(S* slot) { | 1349 | 610k | return reinterpret_cast<T*>(slot); | 1350 | 610k | } |
v8::BigInt64Array* v8::internal::ValueHelper::SlotAsValue<v8::BigInt64Array, true, unsigned long>(unsigned long*) Line | Count | Source | 1348 | 244k | V8_INLINE static T* SlotAsValue(S* slot) { | 1349 | 244k | return reinterpret_cast<T*>(slot); | 1350 | 244k | } |
v8::Object* v8::internal::ValueHelper::SlotAsValue<v8::Object, true, unsigned long>(unsigned long*) Line | Count | Source | 1348 | 1.00M | V8_INLINE static T* SlotAsValue(S* slot) { | 1349 | 1.00M | return reinterpret_cast<T*>(slot); | 1350 | 1.00M | } |
v8::Int32* v8::internal::ValueHelper::SlotAsValue<v8::Int32, false, unsigned long>(unsigned long*) Line | Count | Source | 1348 | 115k | V8_INLINE static T* SlotAsValue(S* slot) { | 1349 | 115k | return reinterpret_cast<T*>(slot); | 1350 | 115k | } |
v8::Context* v8::internal::ValueHelper::SlotAsValue<v8::Context, true, unsigned long>(unsigned long*) Line | Count | Source | 1348 | 137k | V8_INLINE static T* SlotAsValue(S* slot) { | 1349 | 137k | return reinterpret_cast<T*>(slot); | 1350 | 137k | } |
Unexecuted instantiation: v8::Private* v8::internal::ValueHelper::SlotAsValue<v8::Private, false, unsigned long>(unsigned long*) v8::Symbol* v8::internal::ValueHelper::SlotAsValue<v8::Symbol, false, unsigned long>(unsigned long*) Line | Count | Source | 1348 | 2.19M | V8_INLINE static T* SlotAsValue(S* slot) { | 1349 | 2.19M | return reinterpret_cast<T*>(slot); | 1350 | 2.19M | } |
v8::String* v8::internal::ValueHelper::SlotAsValue<v8::String, false, unsigned long>(unsigned long*) Line | Count | Source | 1348 | 31.0M | V8_INLINE static T* SlotAsValue(S* slot) { | 1349 | 31.0M | return reinterpret_cast<T*>(slot); | 1350 | 31.0M | } |
v8::ArrayBuffer* v8::internal::ValueHelper::SlotAsValue<v8::ArrayBuffer, false, unsigned long>(unsigned long*) Line | Count | Source | 1348 | 2.85M | V8_INLINE static T* SlotAsValue(S* slot) { | 1349 | 2.85M | return reinterpret_cast<T*>(slot); | 1350 | 2.85M | } |
v8::Int32Array* v8::internal::ValueHelper::SlotAsValue<v8::Int32Array, false, unsigned long>(unsigned long*) Line | Count | Source | 1348 | 366k | V8_INLINE static T* SlotAsValue(S* slot) { | 1349 | 366k | return reinterpret_cast<T*>(slot); | 1350 | 366k | } |
v8::Uint32Array* v8::internal::ValueHelper::SlotAsValue<v8::Uint32Array, false, unsigned long>(unsigned long*) Line | Count | Source | 1348 | 860k | V8_INLINE static T* SlotAsValue(S* slot) { | 1349 | 860k | return reinterpret_cast<T*>(slot); | 1350 | 860k | } |
v8::Script* v8::internal::ValueHelper::SlotAsValue<v8::Script, false, unsigned long>(unsigned long*) Line | Count | Source | 1348 | 3.98k | V8_INLINE static T* SlotAsValue(S* slot) { | 1349 | 3.98k | return reinterpret_cast<T*>(slot); | 1350 | 3.98k | } |
Unexecuted instantiation: v8::Promise* v8::internal::ValueHelper::SlotAsValue<v8::Promise, false, unsigned long>(unsigned long*) v8::Uint8Array* v8::internal::ValueHelper::SlotAsValue<v8::Uint8Array, false, unsigned long>(unsigned long*) Line | Count | Source | 1348 | 614k | V8_INLINE static T* SlotAsValue(S* slot) { | 1349 | 614k | return reinterpret_cast<T*>(slot); | 1350 | 614k | } |
v8::Float64Array* v8::internal::ValueHelper::SlotAsValue<v8::Float64Array, false, unsigned long>(unsigned long*) Line | Count | Source | 1348 | 610k | V8_INLINE static T* SlotAsValue(S* slot) { | 1349 | 610k | return reinterpret_cast<T*>(slot); | 1350 | 610k | } |
Unexecuted instantiation: v8::Array* v8::internal::ValueHelper::SlotAsValue<v8::Array, true, unsigned long>(unsigned long*) v8::Function* v8::internal::ValueHelper::SlotAsValue<v8::Function, true, unsigned long>(unsigned long*) Line | Count | Source | 1348 | 2 | V8_INLINE static T* SlotAsValue(S* slot) { | 1349 | 2 | return reinterpret_cast<T*>(slot); | 1350 | 2 | } |
v8::Uint32* v8::internal::ValueHelper::SlotAsValue<v8::Uint32, false, unsigned long>(unsigned long*) Line | Count | Source | 1348 | 1.30k | V8_INLINE static T* SlotAsValue(S* slot) { | 1349 | 1.30k | return reinterpret_cast<T*>(slot); | 1350 | 1.30k | } |
Unexecuted instantiation: v8::Promise* v8::internal::ValueHelper::SlotAsValue<v8::Promise, true, unsigned long>(unsigned long*) v8::Name* v8::internal::ValueHelper::SlotAsValue<v8::Name, false, unsigned long>(unsigned long*) Line | Count | Source | 1348 | 1.14M | V8_INLINE static T* SlotAsValue(S* slot) { | 1349 | 1.14M | return reinterpret_cast<T*>(slot); | 1350 | 1.14M | } |
Unexecuted instantiation: v8::Module* v8::internal::ValueHelper::SlotAsValue<v8::Module, false, unsigned long>(unsigned long*) Unexecuted instantiation: v8::Module* v8::internal::ValueHelper::SlotAsValue<v8::Module, true, unsigned long>(unsigned long*) v8::PrimitiveArray* v8::internal::ValueHelper::SlotAsValue<v8::PrimitiveArray, false, unsigned long>(unsigned long*) Line | Count | Source | 1348 | 264k | V8_INLINE static T* SlotAsValue(S* slot) { | 1349 | 264k | return reinterpret_cast<T*>(slot); | 1350 | 264k | } |
v8::ArrayBufferView* v8::internal::ValueHelper::SlotAsValue<v8::ArrayBufferView, false, unsigned long>(unsigned long*) Line | Count | Source | 1348 | 508k | V8_INLINE static T* SlotAsValue(S* slot) { | 1349 | 508k | return reinterpret_cast<T*>(slot); | 1350 | 508k | } |
Unexecuted instantiation: v8::UnboundModuleScript* v8::internal::ValueHelper::SlotAsValue<v8::UnboundModuleScript, false, unsigned long>(unsigned long*) Unexecuted instantiation: v8::FixedArray* v8::internal::ValueHelper::SlotAsValue<v8::FixedArray, false, unsigned long>(unsigned long*) Unexecuted instantiation: v8::ModuleRequest* v8::internal::ValueHelper::SlotAsValue<v8::ModuleRequest, false, unsigned long>(unsigned long*) v8::Boolean* v8::internal::ValueHelper::SlotAsValue<v8::Boolean, false, unsigned long>(unsigned long*) Line | Count | Source | 1348 | 122k | V8_INLINE static T* SlotAsValue(S* slot) { | 1349 | 122k | return reinterpret_cast<T*>(slot); | 1350 | 122k | } |
Unexecuted instantiation: v8::Promise::Resolver* v8::internal::ValueHelper::SlotAsValue<v8::Promise::Resolver, false, unsigned long>(unsigned long*) Unexecuted instantiation: v8::SharedArrayBuffer* v8::internal::ValueHelper::SlotAsValue<v8::SharedArrayBuffer, false, unsigned long>(unsigned long*) v8::Value* v8::internal::ValueHelper::SlotAsValue<v8::Value, true, unsigned long>(unsigned long*) Line | Count | Source | 1348 | 2 | V8_INLINE static T* SlotAsValue(S* slot) { | 1349 | 2 | return reinterpret_cast<T*>(slot); | 1350 | 2 | } |
Unexecuted instantiation: v8::ArrayBuffer* v8::internal::ValueHelper::SlotAsValue<v8::ArrayBuffer, true, unsigned long>(unsigned long*) v8::Integer* v8::internal::ValueHelper::SlotAsValue<v8::Integer, false, unsigned long>(unsigned long*) Line | Count | Source | 1348 | 1.00k | V8_INLINE static T* SlotAsValue(S* slot) { | 1349 | 1.00k | return reinterpret_cast<T*>(slot); | 1350 | 1.00k | } |
Unexecuted instantiation: v8::Set* v8::internal::ValueHelper::SlotAsValue<v8::Set, false, unsigned long>(unsigned long*) v8::UnboundScript* v8::internal::ValueHelper::SlotAsValue<v8::UnboundScript, false, unsigned long>(unsigned long*) Line | Count | Source | 1348 | 2.85k | V8_INLINE static T* SlotAsValue(S* slot) { | 1349 | 2.85k | return reinterpret_cast<T*>(slot); | 1350 | 2.85k | } |
v8::UnboundScript* v8::internal::ValueHelper::SlotAsValue<v8::UnboundScript, true, unsigned long>(unsigned long*) Line | Count | Source | 1348 | 953 | V8_INLINE static T* SlotAsValue(S* slot) { | 1349 | 953 | return reinterpret_cast<T*>(slot); | 1350 | 953 | } |
v8::Message* v8::internal::ValueHelper::SlotAsValue<v8::Message, false, unsigned long>(unsigned long*) Line | Count | Source | 1348 | 1.44M | V8_INLINE static T* SlotAsValue(S* slot) { | 1349 | 1.44M | return reinterpret_cast<T*>(slot); | 1350 | 1.44M | } |
v8::BigInt64Array* v8::internal::ValueHelper::SlotAsValue<v8::BigInt64Array, false, unsigned long>(unsigned long*) Line | Count | Source | 1348 | 244k | V8_INLINE static T* SlotAsValue(S* slot) { | 1349 | 244k | return reinterpret_cast<T*>(slot); | 1350 | 244k | } |
Unexecuted instantiation: v8::StackFrame* v8::internal::ValueHelper::SlotAsValue<v8::StackFrame, false, unsigned long>(unsigned long*) Unexecuted instantiation: v8::StackTrace* v8::internal::ValueHelper::SlotAsValue<v8::StackTrace, false, unsigned long>(unsigned long*) Unexecuted instantiation: v8::BigInt* v8::internal::ValueHelper::SlotAsValue<v8::BigInt, false, unsigned long>(unsigned long*) Unexecuted instantiation: v8::WasmModuleObject* v8::internal::ValueHelper::SlotAsValue<v8::WasmModuleObject, false, unsigned long>(unsigned long*) v8::Map* v8::internal::ValueHelper::SlotAsValue<v8::Map, false, unsigned long>(unsigned long*) Line | Count | Source | 1348 | 24.0M | V8_INLINE static T* SlotAsValue(S* slot) { | 1349 | 24.0M | return reinterpret_cast<T*>(slot); | 1350 | 24.0M | } |
Unexecuted instantiation: v8::Proxy* v8::internal::ValueHelper::SlotAsValue<v8::Proxy, false, unsigned long>(unsigned long*) Unexecuted instantiation: v8::External* v8::internal::ValueHelper::SlotAsValue<v8::External, false, unsigned long>(unsigned long*) Unexecuted instantiation: v8::WasmMemoryObject* v8::internal::ValueHelper::SlotAsValue<v8::WasmMemoryObject, false, unsigned long>(unsigned long*) Unexecuted instantiation: v8::WasmMemoryObject* v8::internal::ValueHelper::SlotAsValue<v8::WasmMemoryObject, true, unsigned long>(unsigned long*) Unexecuted instantiation: v8::ArrayBufferView* v8::internal::ValueHelper::SlotAsValue<v8::ArrayBufferView, true, unsigned long>(unsigned long*) Unexecuted instantiation: v8::TypedArray* v8::internal::ValueHelper::SlotAsValue<v8::TypedArray, false, unsigned long>(unsigned long*) Unexecuted instantiation: v8::DataView* v8::internal::ValueHelper::SlotAsValue<v8::DataView, false, unsigned long>(unsigned long*) Unexecuted instantiation: v8::FunctionTemplate* v8::internal::ValueHelper::SlotAsValue<v8::FunctionTemplate, true, unsigned long>(unsigned long*) |
1351 | | |
1352 | | #endif // V8_ENABLE_DIRECT_LOCAL |
1353 | | }; |
1354 | | |
1355 | | /** |
1356 | | * Helper functions about handles. |
1357 | | */ |
1358 | | class HandleHelper final { |
1359 | | public: |
1360 | | /** |
1361 | | * Checks whether two handles are equal. |
1362 | | * They are equal iff they are both empty or they are both non-empty and the |
1363 | | * objects to which they refer are physically equal. |
1364 | | * |
1365 | | * If both handles refer to JS objects, this is the same as strict equality. |
1366 | | * For primitives, such as numbers or strings, a `false` return value does not |
1367 | | * indicate that the values aren't equal in the JavaScript sense. |
1368 | | * Use `Value::StrictEquals()` to check primitives for equality. |
1369 | | */ |
1370 | | template <typename T1, typename T2> |
1371 | 347k | V8_INLINE static bool EqualHandles(const T1& lhs, const T2& rhs) { |
1372 | 347k | if (lhs.IsEmpty()) return rhs.IsEmpty(); |
1373 | 347k | if (rhs.IsEmpty()) return false; |
1374 | 347k | return lhs.ptr() == rhs.ptr(); |
1375 | 347k | } Unexecuted instantiation: bool v8::internal::HandleHelper::EqualHandles<v8::TracedReferenceBase, v8::TracedReferenceBase>(v8::TracedReferenceBase const&, v8::TracedReferenceBase const&) bool v8::internal::HandleHelper::EqualHandles<v8::Local<v8::Object>, v8::Local<v8::Object> >(v8::Local<v8::Object> const&, v8::Local<v8::Object> const&) Line | Count | Source | 1371 | 97.3k | V8_INLINE static bool EqualHandles(const T1& lhs, const T2& rhs) { | 1372 | 97.3k | if (lhs.IsEmpty()) return rhs.IsEmpty(); | 1373 | 97.3k | if (rhs.IsEmpty()) return false; | 1374 | 97.3k | return lhs.ptr() == rhs.ptr(); | 1375 | 97.3k | } |
bool v8::internal::HandleHelper::EqualHandles<v8::Local<v8::Context>, v8::Local<v8::Context> >(v8::Local<v8::Context> const&, v8::Local<v8::Context> const&) Line | Count | Source | 1371 | 246k | V8_INLINE static bool EqualHandles(const T1& lhs, const T2& rhs) { | 1372 | 246k | if (lhs.IsEmpty()) return rhs.IsEmpty(); | 1373 | 246k | if (rhs.IsEmpty()) return false; | 1374 | 246k | return lhs.ptr() == rhs.ptr(); | 1375 | 246k | } |
Unexecuted instantiation: bool v8::internal::HandleHelper::EqualHandles<v8::PersistentBase<v8::Context>, v8::Local<v8::Context> >(v8::PersistentBase<v8::Context> const&, v8::Local<v8::Context> const&) Unexecuted instantiation: bool v8::internal::HandleHelper::EqualHandles<v8::PersistentBase<v8::Module>, v8::Local<v8::Module> >(v8::PersistentBase<v8::Module> const&, v8::Local<v8::Module> const&) bool v8::internal::HandleHelper::EqualHandles<v8::Local<v8::Value>, v8::Local<v8::Object> >(v8::Local<v8::Value> const&, v8::Local<v8::Object> const&) Line | Count | Source | 1371 | 3.81k | V8_INLINE static bool EqualHandles(const T1& lhs, const T2& rhs) { | 1372 | 3.81k | if (lhs.IsEmpty()) return rhs.IsEmpty(); | 1373 | 3.81k | if (rhs.IsEmpty()) return false; | 1374 | 3.81k | return lhs.ptr() == rhs.ptr(); | 1375 | 3.81k | } |
Unexecuted instantiation: bool v8::internal::HandleHelper::EqualHandles<v8::Local<v8::SharedArrayBuffer>, v8::Local<v8::SharedArrayBuffer> >(v8::Local<v8::SharedArrayBuffer> const&, v8::Local<v8::SharedArrayBuffer> const&) Unexecuted instantiation: bool v8::internal::HandleHelper::EqualHandles<v8::Local<v8::ArrayBuffer>, v8::Local<v8::ArrayBuffer> >(v8::Local<v8::ArrayBuffer> const&, v8::Local<v8::ArrayBuffer> const&) Unexecuted instantiation: bool v8::internal::HandleHelper::EqualHandles<v8::Local<v8::Value>, v8::Local<v8::Symbol> >(v8::Local<v8::Value> const&, v8::Local<v8::Symbol> const&) Unexecuted instantiation: bool v8::internal::HandleHelper::EqualHandles<v8::Local<v8::Object>, v8::Local<v8::Value> >(v8::Local<v8::Object> const&, v8::Local<v8::Value> const&) |
1376 | | |
1377 | | static V8_EXPORT bool IsOnStack(const void* ptr); |
1378 | | static V8_EXPORT void VerifyOnStack(const void* ptr); |
1379 | | static V8_EXPORT void VerifyOnMainThread(); |
1380 | | }; |
1381 | | |
1382 | | V8_EXPORT void VerifyHandleIsNonEmpty(bool is_empty); |
1383 | | |
1384 | | } // namespace internal |
1385 | | } // namespace v8 |
1386 | | |
1387 | | #endif // INCLUDE_V8_INTERNAL_H_ |