v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
heap-inl.h File Reference
Include dependency graph for heap-inl.h:

Go to the source code of this file.

Namespaces

namespace  v8
 
namespace  v8::internal
 

Macros

#define ROOT_ACCESSOR(Type, name, CamelName)
 
#define STATIC_ROOTS_FAILED_MSG
 
#define DCHECK_STATIC_ROOT(obj, name)
 
#define ROOT_ACCESSOR(type, name, CamelName)
 

Functions

template<typename T >
Tagged< Tv8::internal::ForwardingAddress (Tagged< T > heap_obj)
 

Macro Definition Documentation

◆ DCHECK_STATIC_ROOT

#define DCHECK_STATIC_ROOT ( obj,
name )

Definition at line 98 of file heap-inl.h.

◆ ROOT_ACCESSOR [1/2]

#define ROOT_ACCESSOR ( Type,
name,
CamelName )
Value:
Tagged<Type> Heap::name() { \
return Cast<Type>(Tagged<Object>(roots_table()[RootIndex::k##CamelName])); \
}

Definition at line 71 of file heap-inl.h.

◆ ROOT_ACCESSOR [2/2]

#define ROOT_ACCESSOR ( type,
name,
CamelName )
Value:
void Heap::set_##name(Tagged<type> value) { \
/* The deserializer makes use of the fact that these common roots are */ \
/* never in new space and never on a page that is being compacted. */ \
DCHECK_IMPLIES(deserialization_complete(), \
!RootsTable::IsImmortalImmovable(RootIndex::k##CamelName)); \
if constexpr (RootsTable::IsImmortalImmovable(RootIndex::k##CamelName)) { \
/* Cast via object to avoid compile errors when trying to cast a Smi */ \
/* to HeapObject (these Smis will anyway be excluded by */ \
/* RootsTable::IsImmortalImmovable but this isn't enough for the*/ \
/* compiler, even with `if constexpr`)*/ \
DCHECK(IsImmovable(Cast<HeapObject>(Cast<Object>(value)))); \
} \
DCHECK_STATIC_ROOT(value, CamelName); \
roots_table()[RootIndex::k##CamelName] = value.ptr(); \
}
const char * name
Definition builtins.cc:39

Definition at line 71 of file heap-inl.h.

◆ STATIC_ROOTS_FAILED_MSG

#define STATIC_ROOTS_FAILED_MSG
Value:
"Read-only heap layout changed. Run `tools/dev/gen-static-roots.py` to " \
"update static-roots.h."

Definition at line 83 of file heap-inl.h.