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

#include <stack-guard.h>

Collaboration diagram for v8::internal::StackGuard:

Classes

class  ThreadLocal
 

Public Types

enum class  InterruptLevel { kNoGC , kNoHeapWrites , kAnyEffect }
 
enum  InterruptFlag : uint32_t { ALL_INTERRUPTS = INTERRUPT_LIST(V) 0 }
 

Public Member Functions

 StackGuard (const StackGuard &)=delete
 
StackGuardoperator= (const StackGuard &)=delete
 
 StackGuard (Isolate *isolate)
 
void SetStackLimit (uintptr_t limit)
 
void SetStackLimitForStackSwitching (uintptr_t limit)
 
char * ArchiveStackGuard (char *to)
 
char * RestoreStackGuard (char *from)
 
void FreeThreadResources ()
 
void InitThread (const ExecutionAccess &lock)
 
uintptr_t climit ()
 
uintptr_t jslimit ()
 
uintptr_t real_climit ()
 
uintptr_t real_jslimit ()
 
Address address_of_jslimit ()
 
Address address_of_real_jslimit ()
 
Address address_of_interrupt_request (InterruptLevel level)
 
Tagged< ObjectHandleInterrupts (InterruptLevel level=InterruptLevel::kAnyEffect)
 
bool HasTerminationRequest ()
 

Static Public Member Functions

static int ArchiveSpacePerThread ()
 
static constexpr InterruptFlag InterruptLevelMask (InterruptLevel level)
 
static constexpr int jslimit_offset ()
 
static constexpr int real_jslimit_offset ()
 
static char * Iterate (RootVisitor *v, char *thread_storage)
 

Static Public Attributes

static constexpr int kNumberOfInterruptLevels = 3
 
static constexpr int kSizeInBytes = 8 * kSystemPointerSize
 

Private Member Functions

bool CheckInterrupt (InterruptFlag flag)
 
void RequestInterrupt (InterruptFlag flag)
 
void ClearInterrupt (InterruptFlag flag)
 
int FetchAndClearInterrupts (InterruptLevel level)
 
void SetStackLimitInternal (const ExecutionAccess &lock, uintptr_t limit, uintptr_t jslimit)
 
bool has_pending_interrupts (const ExecutionAccess &lock)
 
void update_interrupt_requests_and_stack_limits (const ExecutionAccess &lock)
 
void PushInterruptsScope (InterruptsScope *scope)
 
void PopInterruptsScope ()
 

Private Attributes

Isolateisolate_
 
ThreadLocal thread_local_
 

Static Private Attributes

static const uintptr_t kInterruptLimit = 0xfffffffe
 
static const uintptr_t kIllegalLimit = 0xfffffff8
 

Friends

class Isolate
 
class StackLimitCheck
 
class InterruptsScope
 

Detailed Description

Definition at line 24 of file stack-guard.h.

Member Enumeration Documentation

◆ InterruptFlag

Enumerator
ALL_INTERRUPTS 

Definition at line 92 of file stack-guard.h.

◆ InterruptLevel

Enumerator
kNoGC 
kNoHeapWrites 
kAnyEffect 

Definition at line 65 of file stack-guard.h.

Constructor & Destructor Documentation

◆ StackGuard() [1/2]

v8::internal::StackGuard::StackGuard ( const StackGuard & )
delete

◆ StackGuard() [2/2]

v8::internal::StackGuard::StackGuard ( Isolate * isolate)
inlineexplicit

Definition at line 29 of file stack-guard.h.

Member Function Documentation

◆ address_of_interrupt_request()

Address v8::internal::StackGuard::address_of_interrupt_request ( InterruptLevel level)
inline

Definition at line 135 of file stack-guard.h.

◆ address_of_jslimit()

Address v8::internal::StackGuard::address_of_jslimit ( )
inline

Definition at line 129 of file stack-guard.h.

◆ address_of_real_jslimit()

Address v8::internal::StackGuard::address_of_real_jslimit ( )
inline

Definition at line 132 of file stack-guard.h.

◆ ArchiveSpacePerThread()

static int v8::internal::StackGuard::ArchiveSpacePerThread ( )
inlinestatic

Definition at line 54 of file stack-guard.h.

Here is the caller graph for this function:

◆ ArchiveStackGuard()

char * v8::internal::StackGuard::ArchiveStackGuard ( char * to)

Definition at line 228 of file stack-guard.cc.

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

◆ CheckInterrupt()

bool v8::internal::StackGuard::CheckInterrupt ( InterruptFlag flag)
private

Definition at line 164 of file stack-guard.cc.

◆ ClearInterrupt()

void v8::internal::StackGuard::ClearInterrupt ( InterruptFlag flag)
private

Definition at line 185 of file stack-guard.cc.

Here is the call graph for this function:

◆ climit()

uintptr_t v8::internal::StackGuard::climit ( )
inline

Definition at line 110 of file stack-guard.h.

Here is the caller graph for this function:

◆ FetchAndClearInterrupts()

int v8::internal::StackGuard::FetchAndClearInterrupts ( InterruptLevel level)
private

Definition at line 211 of file stack-guard.cc.

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

◆ FreeThreadResources()

void v8::internal::StackGuard::FreeThreadResources ( )

Definition at line 241 of file stack-guard.cc.

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

◆ HandleInterrupts()

Tagged< Object > v8::internal::StackGuard::HandleInterrupts ( InterruptLevel level = InterruptLevel::kAnyEffect)

Definition at line 298 of file stack-guard.cc.

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

◆ has_pending_interrupts()

bool v8::internal::StackGuard::has_pending_interrupts ( const ExecutionAccess & lock)
inlineprivate

Definition at line 178 of file stack-guard.h.

Here is the caller graph for this function:

◆ HasTerminationRequest()

bool v8::internal::StackGuard::HasTerminationRequest ( )

Definition at line 198 of file stack-guard.cc.

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

◆ InitThread()

void v8::internal::StackGuard::InitThread ( const ExecutionAccess & lock)

Definition at line 262 of file stack-guard.cc.

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

◆ InterruptLevelMask()

static constexpr InterruptFlag v8::internal::StackGuard::InterruptLevelMask ( InterruptLevel level)
inlinestaticconstexpr

Definition at line 103 of file stack-guard.h.

Here is the caller graph for this function:

◆ Iterate()

static char * v8::internal::StackGuard::Iterate ( RootVisitor * v,
char * thread_storage )
inlinestatic

Definition at line 164 of file stack-guard.h.

Here is the caller graph for this function:

◆ jslimit()

uintptr_t v8::internal::StackGuard::jslimit ( )
inline

Definition at line 117 of file stack-guard.h.

Here is the caller graph for this function:

◆ jslimit_offset()

static constexpr int v8::internal::StackGuard::jslimit_offset ( )
inlinestaticconstexpr

Definition at line 140 of file stack-guard.h.

Here is the caller graph for this function:

◆ operator=()

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

◆ PopInterruptsScope()

void v8::internal::StackGuard::PopInterruptsScope ( )
private

Definition at line 137 of file stack-guard.cc.

Here is the call graph for this function:

◆ PushInterruptsScope()

void v8::internal::StackGuard::PushInterruptsScope ( InterruptsScope * scope)
private

Definition at line 111 of file stack-guard.cc.

Here is the call graph for this function:

◆ real_climit()

uintptr_t v8::internal::StackGuard::real_climit ( )
inline

Definition at line 121 of file stack-guard.h.

Here is the caller graph for this function:

◆ real_jslimit()

uintptr_t v8::internal::StackGuard::real_jslimit ( )
inline

Definition at line 128 of file stack-guard.h.

Here is the caller graph for this function:

◆ real_jslimit_offset()

static constexpr int v8::internal::StackGuard::real_jslimit_offset ( )
inlinestaticconstexpr

Definition at line 145 of file stack-guard.h.

Here is the caller graph for this function:

◆ RequestInterrupt()

void v8::internal::StackGuard::RequestInterrupt ( InterruptFlag flag)
private

Definition at line 169 of file stack-guard.cc.

Here is the call graph for this function:

◆ RestoreStackGuard()

char * v8::internal::StackGuard::RestoreStackGuard ( char * from)

Definition at line 235 of file stack-guard.cc.

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

◆ SetStackLimit()

void v8::internal::StackGuard::SetStackLimit ( uintptr_t limit)

Definition at line 56 of file stack-guard.cc.

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

◆ SetStackLimitForStackSwitching()

void v8::internal::StackGuard::SetStackLimitForStackSwitching ( uintptr_t limit)

Definition at line 78 of file stack-guard.cc.

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

◆ SetStackLimitInternal()

void v8::internal::StackGuard::SetStackLimitInternal ( const ExecutionAccess & lock,
uintptr_t limit,
uintptr_t jslimit )
private

Definition at line 62 of file stack-guard.cc.

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

◆ update_interrupt_requests_and_stack_limits()

void v8::internal::StackGuard::update_interrupt_requests_and_stack_limits ( const ExecutionAccess & lock)
inlineprivate

Definition at line 34 of file stack-guard.cc.

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

Friends And Related Symbol Documentation

◆ InterruptsScope

friend class InterruptsScope
friend

Definition at line 283 of file stack-guard.h.

◆ Isolate

friend class Isolate
friend

Definition at line 281 of file stack-guard.h.

◆ StackLimitCheck

friend class StackLimitCheck
friend

Definition at line 282 of file stack-guard.h.

Member Data Documentation

◆ isolate_

Isolate* v8::internal::StackGuard::isolate_
private

Definition at line 278 of file stack-guard.h.

◆ kIllegalLimit

const uintptr_t v8::internal::StackGuard::kIllegalLimit = 0xfffffff8
staticprivate

Definition at line 191 of file stack-guard.h.

◆ kInterruptLimit

const uintptr_t v8::internal::StackGuard::kInterruptLimit = 0xfffffffe
staticprivate

Definition at line 190 of file stack-guard.h.

◆ kNumberOfInterruptLevels

int v8::internal::StackGuard::kNumberOfInterruptLevels = 3
staticconstexpr

Definition at line 66 of file stack-guard.h.

◆ kSizeInBytes

int v8::internal::StackGuard::kSizeInBytes = 8 * kSystemPointerSize
staticconstexpr

Definition at line 162 of file stack-guard.h.

◆ thread_local_

ThreadLocal v8::internal::StackGuard::thread_local_
private

Definition at line 279 of file stack-guard.h.


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