v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
trace-trait.cc
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
#include "
include/cppgc/trace-trait.h
"
6
7
#include "
src/heap/cppgc/gc-info-table.h
"
8
#include "
src/heap/cppgc/heap-page.h
"
9
10
namespace
cppgc
{
11
namespace
internal
{
12
13
TraceDescriptor
TraceTraitFromInnerAddressImpl::GetTraceDescriptor
(
14
const
void
* address) {
15
// address is guaranteed to be on a normal page because this is used only for
16
// mixins.
17
const
BasePage
* page =
BasePage::FromPayload
(address);
18
page->SynchronizedLoad();
19
const
HeapObjectHeader
& header =
20
page->ObjectHeaderFromInnerAddress<
AccessMode::kAtomic
>(address);
21
return
{header.
ObjectStart
(),
22
GlobalGCInfoTable::GCInfoFromIndex
(
23
header.
GetGCInfoIndex
<
AccessMode::kAtomic
>())
24
.trace};
25
}
26
27
}
// namespace internal
28
}
// namespace cppgc
cppgc::internal::BasePage
Definition
heap-page.h:30
cppgc::internal::BasePage::FromPayload
static BasePage * FromPayload(void *)
Definition
heap-page.h:314
cppgc::internal::GlobalGCInfoTable::GCInfoFromIndex
static const GCInfo & GCInfoFromIndex(GCInfoIndex index)
Definition
gc-info-table.h:115
cppgc::internal::HeapObjectHeader
Definition
heap-object-header.h:58
cppgc::internal::HeapObjectHeader::ObjectStart
Address ObjectStart() const
Definition
heap-object-header.h:208
cppgc::internal::HeapObjectHeader::GetGCInfoIndex
GCInfoIndex GetGCInfoIndex() const
Definition
heap-object-header.h:221
gc-info-table.h
heap-page.h
cppgc::internal::AccessMode::kAtomic
@ kAtomic
cppgc
Definition
cross-heap-remembered-set.h:14
v8::internal::internal
internal
Definition
wasm-objects-inl.h:458
cppgc::TraceDescriptor
Definition
trace-trait.h:44
cppgc::internal::TraceTraitFromInnerAddressImpl::GetTraceDescriptor
static TraceDescriptor GetTraceDescriptor(const void *address)
Definition
trace-trait.cc:13
trace-trait.h
src
heap
cppgc
trace-trait.cc
Generated on Sun Apr 6 2025 21:08:54 for v8 by
1.12.0