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
9// Include the non-inl header before the rest of the headers.
10
11#include "src/roots/roots-inl.h"
12
13namespace v8 {
14namespace internal {
15
17 Tagged<Object> not_mapped_symbol =
18 ReadOnlyRoots(isolate()).not_mapped_symbol();
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_
Isolate * isolate() const
Definition serializer.h:195
V8_INLINE bool IsNotMappedSymbol(Tagged< HeapObject > obj) const
V8_INLINE constexpr StorageType ptr() const
#define V8_EXTERNAL_CODE_SPACE_BOOL
Definition globals.h:255