v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
heap-object-inl.h
Go to the documentation of this file.
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 V8_OBJECTS_HEAP_OBJECT_INL_H_
6
#define V8_OBJECTS_HEAP_OBJECT_INL_H_
7
8
#include "
src/objects/heap-object.h
"
9
// Include the non-inl header before the rest of the headers.
10
11
#include "
src/common/ptr-compr-inl.h
"
12
#include "
src/objects/instance-type-inl.h
"
13
#include "
src/objects/objects-inl.h
"
14
15
// Has to be the last include (doesn't have include guards):
16
#include "
src/objects/object-macros.h
"
17
18
namespace
v8
{
19
namespace
internal
{
20
21
#define TYPE_CHECKER(type, ...) \
22
bool Is##type(Tagged<HeapObject> obj) { \
23
/* IsBlah() predicates needs to load the map and thus they require the */
\
24
/* main cage base. */
\
25
PtrComprCageBase cage_base = GetPtrComprCageBase(); \
26
return Is##type(obj, cage_base); \
27
} \
28
/* The cage_base passed here must be the base of the main pointer */
\
29
/* compression cage, i.e. the one where the Map space is allocated. */
\
30
bool Is##type(Tagged<HeapObject> obj, PtrComprCageBase cage_base) { \
31
Tagged<Map> map_object = obj->map(cage_base); \
32
return InstanceTypeChecker::Is##type(map_object); \
33
}
34
35
INSTANCE_TYPE_CHECKERS
(
TYPE_CHECKER
)
36
#undef TYPE_CHECKER
37
38
}
// namespace internal
39
}
// namespace v8
40
41
#include "
src/objects/object-macros-undef.h
"
42
43
#endif
// V8_OBJECTS_HEAP_OBJECT_INL_H_
TYPE_CHECKER
#define TYPE_CHECKER(type,...)
Definition
heap-object-inl.h:21
heap-object.h
INSTANCE_TYPE_CHECKERS
#define INSTANCE_TYPE_CHECKERS(V)
Definition
instance-type-checker.h:42
instance-type-inl.h
v8::internal::internal
internal
Definition
wasm-objects-inl.h:458
v8
Definition
api-arguments-inl.h:19
object-macros-undef.h
object-macros.h
objects-inl.h
ptr-compr-inl.h
src
objects
heap-object-inl.h
Generated on Sun Apr 6 2025 21:08:55 for v8 by
1.12.0