v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
serializer-inl.h
Go to the documentation of this file.
1
// Copyright 2021 the V8 project authors. All rights reserved.
2
// Use of this source code is governed by a BSD-style license that can be
3
// found in the LICENSE file.
4
5
#ifndef V8_SNAPSHOT_SERIALIZER_INL_H_
6
#define V8_SNAPSHOT_SERIALIZER_INL_H_
7
8
#include "
src/snapshot/serializer.h
"
9
// Include the non-inl header before the rest of the headers.
10
11
#include "
src/roots/roots-inl.h
"
12
13
namespace
v8
{
14
namespace
internal
{
15
16
bool
Serializer::IsNotMappedSymbol
(
Tagged<HeapObject>
obj)
const
{
17
Tagged<Object>
not_mapped_symbol =
18
ReadOnlyRoots
(
isolate
()).not_mapped_symbol();
19
if
(
V8_EXTERNAL_CODE_SPACE_BOOL
) {
20
// It's possible that an InstructionStream object might have the same
21
// compressed value as the not_mapped_symbol, so we must compare full
22
// pointers.
23
// TODO(v8:11880): Avoid the need for this special case by never putting
24
// InstructionStream references anywhere except the CodeDadaContainer
25
// objects. In particular, the InstructionStream objects should not appear
26
// in serializer's identity map. This should be possible once the
27
// IsolateData::builtins table is migrated to contain Code
28
// references.
29
return
obj.
ptr
() == not_mapped_symbol.
ptr
();
30
}
31
return
obj == not_mapped_symbol;
32
}
33
34
}
// namespace internal
35
}
// namespace v8
36
37
#endif
// V8_SNAPSHOT_SERIALIZER_INL_H_
v8::internal::ReadOnlyRoots
Definition
roots.h:709
v8::internal::Serializer::isolate
Isolate * isolate() const
Definition
serializer.h:195
v8::internal::Serializer::IsNotMappedSymbol
V8_INLINE bool IsNotMappedSymbol(Tagged< HeapObject > obj) const
Definition
serializer-inl.h:16
v8::internal::TaggedImpl::ptr
V8_INLINE constexpr StorageType ptr() const
Definition
tagged-impl.h:114
v8::internal::Tagged
Definition
waiter-queue-node.h:21
V8_EXTERNAL_CODE_SPACE_BOOL
#define V8_EXTERNAL_CODE_SPACE_BOOL
Definition
globals.h:255
v8::internal::internal
internal
Definition
wasm-objects-inl.h:458
v8
Definition
api-arguments-inl.h:19
roots-inl.h
serializer.h
src
snapshot
serializer-inl.h
Generated on Sun Apr 6 2025 21:08:57 for v8 by
1.12.0