v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
v8::internal::WritableJitAllocation Class Reference

#include <code-memory-access.h>

Collaboration diagram for v8::internal::WritableJitAllocation:

Public Member Functions

 WritableJitAllocation (const WritableJitAllocation &)=delete
 
WritableJitAllocationoperator= (const WritableJitAllocation &)=delete
 
V8_INLINE ~WritableJitAllocation ()
 
template<typename T , size_t offset>
V8_INLINE void WriteHeaderSlot (T value)
 
template<typename T , size_t offset>
V8_INLINE void WriteHeaderSlot (Tagged< T > value, ReleaseStoreTag)
 
template<typename T , size_t offset>
V8_INLINE void WriteHeaderSlot (Tagged< T > value, RelaxedStoreTag)
 
template<typename T , size_t offset>
V8_INLINE void WriteProtectedPointerHeaderSlot (Tagged< T > value, ReleaseStoreTag)
 
template<typename T , size_t offset>
V8_INLINE void WriteProtectedPointerHeaderSlot (Tagged< T > value, RelaxedStoreTag)
 
template<typename T >
V8_INLINE void WriteHeaderSlot (Address address, T value, RelaxedStoreTag)
 
V8_INLINE void CopyCode (size_t dst_offset, const uint8_t *src, size_t num_bytes)
 
V8_INLINE void CopyData (size_t dst_offset, const uint8_t *src, size_t num_bytes)
 
template<typename T >
V8_INLINE void WriteUnalignedValue (Address address, T value)
 
template<typename T >
V8_INLINE void WriteValue (Address address, T value)
 
template<typename T >
V8_INLINE void WriteValue (Address address, T value, RelaxedStoreTag)
 
V8_INLINE void ClearBytes (size_t offset, size_t len)
 
Address address () const
 
size_t size () const
 
template<typename T , size_t offset>
void WriteHeaderSlot (T value)
 
template<typename T , size_t offset>
void WriteHeaderSlot (Tagged< T > value, ReleaseStoreTag)
 
template<typename T , size_t offset>
void WriteHeaderSlot (Tagged< T > value, RelaxedStoreTag)
 
template<typename T , size_t offset>
void WriteProtectedPointerHeaderSlot (Tagged< T > value, RelaxedStoreTag)
 
template<typename T , size_t offset>
void WriteProtectedPointerHeaderSlot (Tagged< T > value, ReleaseStoreTag)
 

Static Public Member Functions

static WritableJitAllocation ForInstructionStream (Tagged< InstructionStream > istream)
 
static V8_INLINE WritableJitAllocation ForNonExecutableMemory (Address addr, size_t size, ThreadIsolation::JitAllocationType type)
 

Private Types

enum class  JitAllocationSource { kRegister , kLookup }
 

Private Member Functions

V8_INLINE WritableJitAllocation (Address addr, size_t size, ThreadIsolation::JitAllocationType type, JitAllocationSource source, bool enforce_write_api=false)
 
V8_INLINE WritableJitAllocation (Address addr, size_t size, ThreadIsolation::JitAllocationType type, bool enforce_write_api)
 
ThreadIsolation::JitPageReferencepage_ref ()
 
V8_INLINE std::optional< RwxMemoryWriteScopeWriteScopeForApiEnforcement () const
 

Private Attributes

const Address address_
 
std::optional< RwxMemoryWriteScopewrite_scope_
 
std::optional< ThreadIsolation::JitPageReferencepage_ref_
 
const ThreadIsolation::JitAllocation allocation_
 
bool enforce_write_api_ = false
 

Friends

class ThreadIsolation
 
class WritableJitPage
 
class WritableJumpTablePair
 

Detailed Description

Definition at line 392 of file code-memory-access.h.

Member Enumeration Documentation

◆ JitAllocationSource

Enumerator
kRegister 
kLookup 

Definition at line 448 of file code-memory-access.h.

Constructor & Destructor Documentation

◆ WritableJitAllocation() [1/3]

v8::internal::WritableJitAllocation::WritableJitAllocation ( const WritableJitAllocation & )
delete
Here is the caller graph for this function:

◆ ~WritableJitAllocation()

v8::internal::WritableJitAllocation::~WritableJitAllocation ( )

Definition at line 40 of file code-memory-access-inl.h.

◆ WritableJitAllocation() [2/3]

v8::internal::WritableJitAllocation::WritableJitAllocation ( Address addr,
size_t size,
ThreadIsolation::JitAllocationType type,
JitAllocationSource source,
bool enforce_write_api = false )
private

Definition at line 50 of file code-memory-access-inl.h.

◆ WritableJitAllocation() [3/3]

v8::internal::WritableJitAllocation::WritableJitAllocation ( Address addr,
size_t size,
ThreadIsolation::JitAllocationType type,
bool enforce_write_api )
private

Definition at line 75 of file code-memory-access-inl.h.

Member Function Documentation

◆ address()

Address v8::internal::WritableJitAllocation::address ( ) const
inline

Definition at line 444 of file code-memory-access.h.

Here is the caller graph for this function:

◆ ClearBytes()

void v8::internal::WritableJitAllocation::ClearBytes ( size_t offset,
size_t len )

Definition at line 259 of file code-memory-access-inl.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CopyCode()

void v8::internal::WritableJitAllocation::CopyCode ( size_t dst_offset,
const uint8_t * src,
size_t num_bytes )

Definition at line 245 of file code-memory-access-inl.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CopyData()

void v8::internal::WritableJitAllocation::CopyData ( size_t dst_offset,
const uint8_t * src,
size_t num_bytes )

Definition at line 252 of file code-memory-access-inl.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ForInstructionStream()

WritableJitAllocation v8::internal::WritableJitAllocation::ForInstructionStream ( Tagged< InstructionStream > istream)
static

Definition at line 659 of file code-memory-access.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ForNonExecutableMemory()

WritableJitAllocation v8::internal::WritableJitAllocation::ForNonExecutableMemory ( Address addr,
size_t size,
ThreadIsolation::JitAllocationType type )
static

Definition at line 83 of file code-memory-access-inl.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator=()

WritableJitAllocation & v8::internal::WritableJitAllocation::operator= ( const WritableJitAllocation & )
delete

◆ page_ref()

ThreadIsolation::JitPageReference & v8::internal::WritableJitAllocation::page_ref ( )
inlineprivate

Definition at line 461 of file code-memory-access.h.

◆ size()

size_t v8::internal::WritableJitAllocation::size ( ) const
inline

Definition at line 445 of file code-memory-access.h.

Here is the caller graph for this function:

◆ WriteHeaderSlot() [1/7]

template<typename T >
V8_INLINE void v8::internal::WritableJitAllocation::WriteHeaderSlot ( Address address,
T value,
RelaxedStoreTag tag )

Definition at line 194 of file code-memory-access-inl.h.

Here is the call graph for this function:

◆ WriteHeaderSlot() [2/7]

template<typename T , size_t offset>
void v8::internal::WritableJitAllocation::WriteHeaderSlot ( T value)

Definition at line 133 of file code-memory-access-inl.h.

Here is the call graph for this function:

◆ WriteHeaderSlot() [3/7]

template<typename T , size_t offset>
V8_INLINE void v8::internal::WritableJitAllocation::WriteHeaderSlot ( T value)
Here is the caller graph for this function:

◆ WriteHeaderSlot() [4/7]

template<typename T , size_t offset>
void v8::internal::WritableJitAllocation::WriteHeaderSlot ( Tagged< T > value,
RelaxedStoreTag  )

Definition at line 161 of file code-memory-access-inl.h.

Here is the call graph for this function:

◆ WriteHeaderSlot() [5/7]

template<typename T , size_t offset>
V8_INLINE void v8::internal::WritableJitAllocation::WriteHeaderSlot ( Tagged< T > value,
RelaxedStoreTag  )

◆ WriteHeaderSlot() [6/7]

template<typename T , size_t offset>
void v8::internal::WritableJitAllocation::WriteHeaderSlot ( Tagged< T > value,
ReleaseStoreTag  )

Definition at line 149 of file code-memory-access-inl.h.

Here is the call graph for this function:

◆ WriteHeaderSlot() [7/7]

template<typename T , size_t offset>
V8_INLINE void v8::internal::WritableJitAllocation::WriteHeaderSlot ( Tagged< T > value,
ReleaseStoreTag  )

◆ WriteProtectedPointerHeaderSlot() [1/4]

template<typename T , size_t offset>
void v8::internal::WritableJitAllocation::WriteProtectedPointerHeaderSlot ( Tagged< T > value,
RelaxedStoreTag  )

Definition at line 174 of file code-memory-access-inl.h.

Here is the call graph for this function:

◆ WriteProtectedPointerHeaderSlot() [2/4]

template<typename T , size_t offset>
V8_INLINE void v8::internal::WritableJitAllocation::WriteProtectedPointerHeaderSlot ( Tagged< T > value,
RelaxedStoreTag  )

◆ WriteProtectedPointerHeaderSlot() [3/4]

template<typename T , size_t offset>
void v8::internal::WritableJitAllocation::WriteProtectedPointerHeaderSlot ( Tagged< T > value,
ReleaseStoreTag  )

Definition at line 184 of file code-memory-access-inl.h.

Here is the call graph for this function:

◆ WriteProtectedPointerHeaderSlot() [4/4]

template<typename T , size_t offset>
V8_INLINE void v8::internal::WritableJitAllocation::WriteProtectedPointerHeaderSlot ( Tagged< T > value,
ReleaseStoreTag  )
Here is the caller graph for this function:

◆ WriteScopeForApiEnforcement()

std::optional< RwxMemoryWriteScope > v8::internal::WritableJitAllocation::WriteScopeForApiEnforcement ( ) const
private

Definition at line 89 of file code-memory-access-inl.h.

Here is the caller graph for this function:

◆ WriteUnalignedValue()

template<typename T >
V8_INLINE void v8::internal::WritableJitAllocation::WriteUnalignedValue ( Address address,
T value )

Definition at line 216 of file code-memory-access-inl.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ WriteValue() [1/2]

template<typename T >
V8_INLINE void v8::internal::WritableJitAllocation::WriteValue ( Address address,
T value )

Definition at line 226 of file code-memory-access-inl.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ WriteValue() [2/2]

template<typename T >
V8_INLINE void v8::internal::WritableJitAllocation::WriteValue ( Address address,
T value,
RelaxedStoreTag  )

Definition at line 235 of file code-memory-access-inl.h.

Here is the call graph for this function:

Friends And Related Symbol Documentation

◆ ThreadIsolation

friend class ThreadIsolation
friend

Definition at line 481 of file code-memory-access.h.

◆ WritableJitPage

friend class WritableJitPage
friend

Definition at line 482 of file code-memory-access.h.

◆ WritableJumpTablePair

friend class WritableJumpTablePair
friend

Definition at line 483 of file code-memory-access.h.

Member Data Documentation

◆ address_

const Address v8::internal::WritableJitAllocation::address_
private

Definition at line 469 of file code-memory-access.h.

◆ allocation_

const ThreadIsolation::JitAllocation v8::internal::WritableJitAllocation::allocation_
private

Definition at line 478 of file code-memory-access.h.

◆ enforce_write_api_

bool v8::internal::WritableJitAllocation::enforce_write_api_ = false
private

Definition at line 479 of file code-memory-access.h.

◆ page_ref_

std::optional<ThreadIsolation::JitPageReference> v8::internal::WritableJitAllocation::page_ref_
private

Definition at line 477 of file code-memory-access.h.

◆ write_scope_

std::optional<RwxMemoryWriteScope> v8::internal::WritableJitAllocation::write_scope_
private

Definition at line 476 of file code-memory-access.h.


The documentation for this class was generated from the following files: