V8
latest master commit
V8 is Google's open source JavaScript engine
Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
Functions
a
c
d
f
g
h
i
j
m
n
o
p
r
s
t
u
Variables
Typedefs
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
v
w
Enumerations
a
c
e
g
i
j
k
m
n
p
r
s
t
w
Enumerator
a
b
c
d
e
g
i
j
k
n
o
p
r
s
Data Structures
Data Structures
Data Structure Index
Class Hierarchy
Data Fields
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
~
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
~
Variables
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
Typedefs
a
b
c
d
e
g
i
m
n
p
r
s
t
u
w
Enumerations
a
b
c
e
f
g
m
n
o
p
s
t
u
w
Enumerator
b
c
d
e
h
j
k
n
o
p
r
s
t
u
Related Functions
a
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
v
w
Files
File List
Globals
All
c
m
s
u
v
Macros
c
m
s
u
v
Examples
•
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
gc-info.h
Go to the documentation of this file.
1
// Copyright 2020 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_CPPGC_INTERNAL_GC_INFO_H_
6
#define INCLUDE_CPPGC_INTERNAL_GC_INFO_H_
7
8
#include <stdint.h>
9
10
#include "
cppgc/internal/finalizer-trait.h
"
11
#include "
cppgc/trace-trait.h
"
12
#include "
v8config.h
"
// NOLINT(build/include_directory)
13
14
namespace
cppgc
{
15
namespace
internal {
16
17
using
GCInfoIndex
= uint16_t;
18
19
class
V8_EXPORT
RegisteredGCInfoIndex
final {
20
public
:
21
RegisteredGCInfoIndex
(
FinalizationCallback
finalization_callback,
22
TraceCallback
trace_callback,
bool
has_v_table);
23
GCInfoIndex
GetIndex
()
const
{
return
index_; }
24
25
private
:
26
const
GCInfoIndex
index_;
27
};
28
29
// Trait determines how the garbage collector treats objects wrt. to traversing,
30
// finalization, and naming.
31
template
<
typename
T>
32
struct
GCInfoTrait
{
33
static
GCInfoIndex
Index
() {
34
static_assert(
sizeof
(T),
"T must be fully defined"
);
35
static
const
RegisteredGCInfoIndex
registered_index(
36
FinalizerTrait<T>::kCallback
,
TraceTrait<T>::Trace
,
37
std::is_polymorphic<T>::value);
38
return
registered_index.
GetIndex
();
39
}
40
};
41
42
}
// namespace internal
43
}
// namespace cppgc
44
45
#endif // INCLUDE_CPPGC_INTERNAL_GC_INFO_H_
finalizer-trait.h
cppgc::internal::GCInfoIndex
uint16_t GCInfoIndex
Definition:
gc-info.h:17
cppgc::TraceCallback
void(*)(Visitor *, const void *) TraceCallback
Definition:
trace-trait.h:24
cppgc::internal::RegisteredGCInfoIndex
Definition:
gc-info.h:19
cppgc::internal::GCInfoTrait
Definition:
gc-info.h:32
cppgc::internal::RegisteredGCInfoIndex::GetIndex
GCInfoIndex GetIndex() const
Definition:
gc-info.h:23
cppgc
Definition:
allocation.h:18
v8config.h
V8_EXPORT
#define V8_EXPORT
Definition:
v8config.h:467
cppgc::internal::GCInfoTrait::Index
static GCInfoIndex Index()
Definition:
gc-info.h:33
trace-trait.h
cppgc::internal::FinalizerTrait
Definition:
finalizer-trait.h:65
cppgc::TraceTrait
Definition:
trace-trait.h:35
cppgc::internal::FinalizationCallback
void(*)(void *) FinalizationCallback
Definition:
finalizer-trait.h:15
v8
include
cppgc
internal
gc-info.h
Generated by
1.8.17