v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
read-only-heap-inl.h
Go to the documentation of this file.
1
// Copyright 2019 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_HEAP_READ_ONLY_HEAP_INL_H_
6
#define V8_HEAP_READ_ONLY_HEAP_INL_H_
7
8
#include "
src/heap/read-only-heap.h
"
9
// Include the non-inl header before the rest of the headers.
10
11
#include "
src/execution/isolate-utils-inl.h
"
12
#include "
src/roots/roots-inl.h
"
13
14
namespace
v8
{
15
namespace
internal
{
16
17
// static
18
ReadOnlyRoots
ReadOnlyHeap::EarlyGetReadOnlyRoots
(
Tagged<HeapObject>
object
) {
19
ReadOnlyHeap
* shared_ro_heap =
20
IsolateGroup::current
()->
shared_read_only_heap
();
21
if
(shared_ro_heap && shared_ro_heap->
roots_init_complete
()) {
22
return
ReadOnlyRoots
(shared_ro_heap->
read_only_roots_
);
23
}
24
return
ReadOnlyRoots
(
GetHeapFromWritableObject
(
object
));
25
}
26
27
}
// namespace internal
28
}
// namespace v8
29
30
#endif
// V8_HEAP_READ_ONLY_HEAP_INL_H_
v8::internal::IsolateGroup::current
static IsolateGroup * current()
Definition
isolate-group.h:181
v8::internal::IsolateGroup::shared_read_only_heap
ReadOnlyHeap * shared_read_only_heap() const
Definition
isolate-group.h:201
v8::internal::ReadOnlyHeap
Definition
read-only-heap.h:35
v8::internal::ReadOnlyHeap::roots_init_complete
bool roots_init_complete() const
Definition
read-only-heap.h:93
v8::internal::ReadOnlyHeap::read_only_roots_
Address read_only_roots_[kEntriesCount]
Definition
read-only-heap.h:127
v8::internal::ReadOnlyHeap::EarlyGetReadOnlyRoots
static V8_EXPORT_PRIVATE ReadOnlyRoots EarlyGetReadOnlyRoots(Tagged< HeapObject > object)
Definition
read-only-heap-inl.h:18
v8::internal::ReadOnlyRoots
Definition
roots.h:709
v8::internal::Tagged
Definition
waiter-queue-node.h:21
isolate-utils-inl.h
v8::internal::internal
internal
Definition
wasm-objects-inl.h:458
v8::internal::GetHeapFromWritableObject
V8_INLINE Heap * GetHeapFromWritableObject(Tagged< HeapObject > object)
Definition
isolate-utils-inl.h:19
v8
Definition
api-arguments-inl.h:19
read-only-heap.h
roots-inl.h
src
heap
read-only-heap-inl.h
Generated on Sun Apr 6 2025 21:08:54 for v8 by
1.12.0