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

#include <frames.h>

Inheritance diagram for v8::internal::StackFrame:
Collaboration diagram for v8::internal::StackFrame:

Classes

struct  State
 

Public Types

enum  Type { NO_FRAME_TYPE = 0 , STACK_FRAME_TYPE_LIST =(DECLARE_TYPE) NUMBER_OF_TYPES , MANUAL }
 
enum  JsFrameMarker { INNER_JSENTRY_FRAME = (0 << kSmiTagSize) | kSmiTag , OUTERMOST_JSENTRY_FRAME = (1 << kSmiTagSize) | kSmiTag }
 
enum  PrintMode { OVERVIEW , DETAILS }
 

Public Member Functions

 StackFrame (const StackFrame &original) V8_NOEXCEPT
 
bool is_entry () const
 
bool is_construct_entry () const
 
bool is_exit () const
 
bool is_optimized_js () const
 
bool is_unoptimized_js () const
 
bool is_interpreted () const
 
bool is_baseline () const
 
bool is_maglev () const
 
bool is_turbofan_js () const
 
bool is_builtin () const
 
bool is_internal () const
 
bool is_builtin_continuation () const
 
bool is_javascript_builtin_continuation () const
 
bool is_javascript_builtin_with_catch_continuation () const
 
bool is_construct () const
 
bool is_fast_construct () const
 
bool is_builtin_exit () const
 
bool is_api_accessor_exit () const
 
bool is_api_callback_exit () const
 
bool is_irregexp () const
 
bool is_javascript () const
 
Address sp () const
 
Address fp () const
 
Address callee_fp () const
 
Address callee_pc () const
 
Address caller_sp () const
 
Address pc () const
 
bool is_profiler_entry_frame () const
 
bool is_stack_exit_frame () const
 
Address unauthenticated_pc () const
 
Address maybe_unauthenticated_pc () const
 
bool InFastCCall () const
 
Address constant_pool () const
 
void set_constant_pool (Address constant_pool)
 
Addresspc_address () const
 
Addressconstant_pool_address () const
 
StackFrameId id () const
 
StackHandlertop_handler () const
 
virtual Type type () const =0
 
virtual Tagged< HeapObjectunchecked_code () const =0
 
V8_EXPORT_PRIVATE Tagged< CodeLookupCode () const
 
V8_EXPORT_PRIVATE std::pair< Tagged< Code >, int > LookupCodeAndOffset () const
 
V8_EXPORT_PRIVATE Tagged< GcSafeCodeGcSafeLookupCode () const
 
V8_EXPORT_PRIVATE std::pair< Tagged< GcSafeCode >, int > GcSafeLookupCodeAndOffset () const
 
virtual void Iterate (RootVisitor *v) const =0
 
void IteratePc (RootVisitor *v, Address *constant_pool_address, Tagged< GcSafeCode > holder) const
 
virtual void Print (StringStream *accumulator, PrintMode mode, int index) const
 
Isolateisolate () const
 
void operator= (const StackFrame &original)=delete
 

Static Public Member Functions

static constexpr int32_t TypeToMarker (Type type)
 
static constexpr Type MarkerToType (intptr_t marker)
 
static constexpr bool IsTypeMarker (uintptr_t function_or_marker)
 
static bool IsJavaScript (Type t)
 
static Address unauthenticated_pc (Address *pc_address)
 
static Address maybe_unauthenticated_pc (Address *pc_address)
 
static void SetReturnAddressLocationResolver (ReturnAddressLocationResolver resolver)
 
static Address ReadPC (Address *pc_address)
 
static AddressResolveReturnAddressLocation (Address *pc_address)
 

Protected Member Functions

 StackFrame (StackFrameIteratorBase *iterator)
 
virtual Address GetCallerStackPointer () const =0
 

Protected Attributes

const StackFrameIteratorBase *const iterator_
 

Private Member Functions

virtual void ComputeCallerState (State *state) const =0
 
virtual Type GetCallerState (State *state) const
 

Private Attributes

Isolate *const isolate_
 
State state_
 

Static Private Attributes

static ReturnAddressLocationResolver return_address_location_resolver_
 
static const intptr_t kIsolateTag = 1
 

Friends

class StackFrameIterator
 
class StackFrameIteratorBase
 
class StackHandlerIterator
 
class StackFrameIteratorForProfiler
 

Detailed Description

Definition at line 151 of file frames.h.

Member Enumeration Documentation

◆ JsFrameMarker

Enumerator
INNER_JSENTRY_FRAME 
OUTERMOST_JSENTRY_FRAME 

Definition at line 167 of file frames.h.

◆ PrintMode

Enumerator
OVERVIEW 
DETAILS 

Definition at line 372 of file frames.h.

◆ Type

Enumerator
NO_FRAME_TYPE 
STACK_FRAME_TYPE_LIST 
MANUAL 

Definition at line 154 of file frames.h.

Constructor & Destructor Documentation

◆ StackFrame() [1/2]

v8::internal::StackFrame::StackFrame ( const StackFrame & original)
inline

Definition at line 224 of file frames.h.

◆ StackFrame() [2/2]

v8::internal::StackFrame::StackFrame ( StackFrameIteratorBase * iterator)
inlineexplicitprotected

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

Member Function Documentation

◆ callee_fp()

Address v8::internal::StackFrame::callee_fp ( ) const
inline

Definition at line 298 of file frames.h.

Here is the caller graph for this function:

◆ callee_pc()

Address v8::internal::StackFrame::callee_pc ( ) const
inline

Definition at line 299 of file frames.h.

Here is the caller graph for this function:

◆ caller_sp()

Address v8::internal::StackFrame::caller_sp ( ) const
inline

Definition at line 300 of file frames.h.

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

◆ ComputeCallerState()

virtual void v8::internal::StackFrame::ComputeCallerState ( State * state) const
privatepure virtual

Implemented in v8::internal::CommonFrame, v8::internal::EntryFrame, v8::internal::ExitFrame, and v8::internal::NativeFrame.

Here is the caller graph for this function:

◆ constant_pool()

Address v8::internal::StackFrame::constant_pool ( ) const
inline

Definition at line 322 of file frames.h.

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

◆ constant_pool_address()

Address * v8::internal::StackFrame::constant_pool_address ( ) const
inline

Definition at line 329 of file frames.h.

Here is the caller graph for this function:

◆ fp()

Address v8::internal::StackFrame::fp ( ) const
inline

Definition at line 297 of file frames.h.

◆ GcSafeLookupCode()

Tagged< GcSafeCode > v8::internal::StackFrame::GcSafeLookupCode ( ) const

Definition at line 745 of file frames.cc.

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

◆ GcSafeLookupCodeAndOffset()

std::pair< Tagged< GcSafeCode >, int > v8::internal::StackFrame::GcSafeLookupCodeAndOffset ( ) const

Definition at line 749 of file frames.cc.

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

◆ GetCallerStackPointer()

virtual Address v8::internal::StackFrame::GetCallerStackPointer ( ) const
protectedpure virtual

Implemented in v8::internal::CommonFrame, v8::internal::EntryFrame, and v8::internal::JavaScriptFrame.

Here is the caller graph for this function:

◆ GetCallerState()

StackFrame::Type v8::internal::StackFrame::GetCallerState ( State * state) const
privatevirtual

Reimplemented in v8::internal::EntryFrame.

Definition at line 1060 of file frames.cc.

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

◆ id()

StackFrameId v8::internal::StackFrame::id ( ) const
inline

Definition at line 334 of file frames.h.

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

◆ InFastCCall()

bool v8::internal::StackFrame::InFastCCall ( ) const
inline

Definition at line 320 of file frames.h.

Here is the caller graph for this function:

◆ is_api_accessor_exit()

bool v8::internal::StackFrame::is_api_accessor_exit ( ) const
inline

Definition at line 280 of file frames.h.

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

◆ is_api_callback_exit()

bool v8::internal::StackFrame::is_api_callback_exit ( ) const
inline

Definition at line 281 of file frames.h.

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

◆ is_baseline()

bool v8::internal::StackFrame::is_baseline ( ) const
inline

Definition at line 242 of file frames.h.

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

◆ is_builtin()

bool v8::internal::StackFrame::is_builtin ( ) const
inline

Definition at line 266 of file frames.h.

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

◆ is_builtin_continuation()

bool v8::internal::StackFrame::is_builtin_continuation ( ) const
inline

Definition at line 268 of file frames.h.

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

◆ is_builtin_exit()

bool v8::internal::StackFrame::is_builtin_exit ( ) const
inline

Definition at line 279 of file frames.h.

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

◆ is_construct()

bool v8::internal::StackFrame::is_construct ( ) const
inline

Definition at line 277 of file frames.h.

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

◆ is_construct_entry()

bool v8::internal::StackFrame::is_construct_entry ( ) const
inline

Definition at line 231 of file frames.h.

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

◆ is_entry()

bool v8::internal::StackFrame::is_entry ( ) const
inline

Definition at line 230 of file frames.h.

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

◆ is_exit()

bool v8::internal::StackFrame::is_exit ( ) const
inline

Definition at line 232 of file frames.h.

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

◆ is_fast_construct()

bool v8::internal::StackFrame::is_fast_construct ( ) const
inline

Definition at line 278 of file frames.h.

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

◆ is_internal()

bool v8::internal::StackFrame::is_internal ( ) const
inline

Definition at line 267 of file frames.h.

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

◆ is_interpreted()

bool v8::internal::StackFrame::is_interpreted ( ) const
inline

Definition at line 241 of file frames.h.

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

◆ is_irregexp()

bool v8::internal::StackFrame::is_irregexp ( ) const
inline

Definition at line 282 of file frames.h.

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

◆ is_javascript()

bool v8::internal::StackFrame::is_javascript ( ) const
inline

Definition at line 290 of file frames.h.

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

◆ is_javascript_builtin_continuation()

bool v8::internal::StackFrame::is_javascript_builtin_continuation ( ) const
inline

Definition at line 271 of file frames.h.

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

◆ is_javascript_builtin_with_catch_continuation()

bool v8::internal::StackFrame::is_javascript_builtin_with_catch_continuation ( ) const
inline

Definition at line 274 of file frames.h.

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

◆ is_maglev()

bool v8::internal::StackFrame::is_maglev ( ) const
inline

Definition at line 243 of file frames.h.

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

◆ is_optimized_js()

bool v8::internal::StackFrame::is_optimized_js ( ) const
inline

Definition at line 233 of file frames.h.

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

◆ is_profiler_entry_frame()

bool v8::internal::StackFrame::is_profiler_entry_frame ( ) const
inline

Definition at line 302 of file frames.h.

Here is the caller graph for this function:

◆ is_stack_exit_frame()

bool v8::internal::StackFrame::is_stack_exit_frame ( ) const
inline

Definition at line 305 of file frames.h.

Here is the caller graph for this function:

◆ is_turbofan_js()

bool v8::internal::StackFrame::is_turbofan_js ( ) const
inline

Definition at line 244 of file frames.h.

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

◆ is_unoptimized_js()

bool v8::internal::StackFrame::is_unoptimized_js ( ) const
inline

Definition at line 237 of file frames.h.

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

◆ IsJavaScript()

static bool v8::internal::StackFrame::IsJavaScript ( Type t)
inlinestatic

Definition at line 284 of file frames.h.

Here is the caller graph for this function:

◆ isolate()

Isolate * v8::internal::StackFrame::isolate ( ) const
inline

Definition at line 376 of file frames.h.

Here is the caller graph for this function:

◆ IsTypeMarker()

static constexpr bool v8::internal::StackFrame::IsTypeMarker ( uintptr_t function_or_marker)
inlinestaticconstexpr

Definition at line 214 of file frames.h.

Here is the caller graph for this function:

◆ Iterate()

◆ IteratePc()

void v8::internal::StackFrame::IteratePc ( RootVisitor * v,
Address * constant_pool_address,
Tagged< GcSafeCode > holder ) const

Definition at line 768 of file frames.cc.

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

◆ LookupCode()

Tagged< Code > v8::internal::StackFrame::LookupCode ( ) const

Definition at line 757 of file frames.cc.

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

◆ LookupCodeAndOffset()

std::pair< Tagged< Code >, int > v8::internal::StackFrame::LookupCodeAndOffset ( ) const

Definition at line 762 of file frames.cc.

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

◆ MarkerToType()

static constexpr Type v8::internal::StackFrame::MarkerToType ( intptr_t marker)
inlinestaticconstexpr

Definition at line 205 of file frames.h.

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

◆ maybe_unauthenticated_pc() [1/2]

Address v8::internal::StackFrame::maybe_unauthenticated_pc ( ) const
inline

Definition at line 89 of file frames-inl.h.

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

◆ maybe_unauthenticated_pc() [2/2]

static Address v8::internal::StackFrame::maybe_unauthenticated_pc ( Address * pc_address)
inlinestatic

◆ operator=()

void v8::internal::StackFrame::operator= ( const StackFrame & original)
delete

◆ pc()

Address v8::internal::StackFrame::pc ( ) const
inline

Definition at line 78 of file frames-inl.h.

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

◆ pc_address()

Address * v8::internal::StackFrame::pc_address ( ) const
inline

Definition at line 327 of file frames.h.

Here is the caller graph for this function:

◆ Print()

void v8::internal::StackFrame::Print ( StringStream * accumulator,
PrintMode mode,
int index ) const
virtual

Reimplemented in v8::internal::ApiAccessorExitFrame, v8::internal::ApiCallbackExitFrame, v8::internal::BuiltinExitFrame, and v8::internal::JavaScriptFrame.

Definition at line 1386 of file frames.cc.

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

◆ ReadPC()

Address v8::internal::StackFrame::ReadPC ( Address * pc_address)
inlinestatic

Definition at line 103 of file frames-inl.h.

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

◆ ResolveReturnAddressLocation()

Address * v8::internal::StackFrame::ResolveReturnAddressLocation ( Address * pc_address)
inlinestatic

Definition at line 107 of file frames-inl.h.

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

◆ set_constant_pool()

void v8::internal::StackFrame::set_constant_pool ( Address constant_pool)
inline

Definition at line 323 of file frames.h.

Here is the call graph for this function:

◆ SetReturnAddressLocationResolver()

void v8::internal::StackFrame::SetReturnAddressLocationResolver ( ReturnAddressLocationResolver resolver)
static

Definition at line 813 of file frames.cc.

◆ sp()

Address v8::internal::StackFrame::sp ( ) const
inline

Definition at line 293 of file frames.h.

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

◆ top_handler()

StackHandler * v8::internal::StackFrame::top_handler ( ) const
inline

Definition at line 74 of file frames-inl.h.

Here is the caller graph for this function:

◆ type()

◆ TypeToMarker()

static constexpr int32_t v8::internal::StackFrame::TypeToMarker ( Type type)
inlinestaticconstexpr

Definition at line 196 of file frames.h.

Here is the caller graph for this function:

◆ unauthenticated_pc() [1/2]

Address v8::internal::StackFrame::unauthenticated_pc ( ) const
inline

Definition at line 80 of file frames-inl.h.

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

◆ unauthenticated_pc() [2/2]

Address v8::internal::StackFrame::unauthenticated_pc ( Address * pc_address)
inlinestatic

Definition at line 85 of file frames-inl.h.

Here is the call graph for this function:

◆ unchecked_code()

Friends And Related Symbol Documentation

◆ StackFrameIterator

friend class StackFrameIterator
friend

Definition at line 402 of file frames.h.

◆ StackFrameIteratorBase

friend class StackFrameIteratorBase
friend

Definition at line 403 of file frames.h.

◆ StackFrameIteratorForProfiler

friend class StackFrameIteratorForProfiler
friend

Definition at line 405 of file frames.h.

◆ StackHandlerIterator

friend class StackHandlerIterator
friend

Definition at line 404 of file frames.h.

Member Data Documentation

◆ isolate_

Isolate* const v8::internal::StackFrame::isolate_
private

Definition at line 389 of file frames.h.

◆ iterator_

const StackFrameIteratorBase* const v8::internal::StackFrame::iterator_
protected

Definition at line 386 of file frames.h.

◆ kIsolateTag

const intptr_t v8::internal::StackFrame::kIsolateTag = 1
staticprivate

Definition at line 400 of file frames.h.

◆ return_address_location_resolver_

ReturnAddressLocationResolver v8::internal::StackFrame::return_address_location_resolver_
staticprivate
Initial value:
=
nullptr

Definition at line 392 of file frames.h.

◆ state_

State v8::internal::StackFrame::state_
private

Definition at line 390 of file frames.h.


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