V8 Project
v8::internal::StackFrameIterator Class Reference

#include <frames.h>

+ Inheritance diagram for v8::internal::StackFrameIterator:
+ Collaboration diagram for v8::internal::StackFrameIterator:

Public Member Functions

 StackFrameIterator (Isolate *isolate)
 
 StackFrameIterator (Isolate *isolate, ThreadLocalTop *t)
 
StackFrameframe () const
 
void Advance ()
 

Private Member Functions

void Reset (ThreadLocalTop *top)
 
 DISALLOW_COPY_AND_ASSIGN (StackFrameIterator)
 

Detailed Description

Definition at line 835 of file frames.h.

Constructor & Destructor Documentation

◆ StackFrameIterator() [1/2]

v8::internal::StackFrameIterator::StackFrameIterator ( Isolate isolate)
explicit

Definition at line 66 of file frames.cc.

67  : StackFrameIteratorBase(isolate, true) {
68  Reset(isolate->thread_local_top());
69 }
void Reset(ThreadLocalTop *top)
Definition: frames.cc:101

References Reset(), and v8::internal::Isolate::thread_local_top().

+ Here is the call graph for this function:

◆ StackFrameIterator() [2/2]

v8::internal::StackFrameIterator::StackFrameIterator ( Isolate isolate,
ThreadLocalTop *  t 
)

Definition at line 72 of file frames.cc.

73  : StackFrameIteratorBase(isolate, true) {
74  Reset(t);
75 }

References Reset().

+ Here is the call graph for this function:

Member Function Documentation

◆ Advance()

void v8::internal::StackFrameIterator::Advance ( )

Definition at line 78 of file frames.cc.

78  {
79  DCHECK(!done());
80  // Compute the state of the calling frame before restoring
81  // callee-saved registers and unwinding handlers. This allows the
82  // frame code that computes the caller state to access the top
83  // handler and the value of any callee-saved register if needed.
84  StackFrame::State state;
85  StackFrame::Type type = frame_->GetCallerState(&state);
86 
87  // Unwind handlers corresponding to the current frame.
88  StackHandlerIterator it(frame_, handler_);
89  while (!it.done()) it.Advance();
90  handler_ = it.handler();
91 
92  // Advance to the calling frame.
93  frame_ = SingletonFor(type, &state);
94 
95  // When we're done iterating over the stack frames, the handler
96  // chain must have been completely unwound.
97  DCHECK(!done() || handler_ == NULL);
98 }
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes enable context specialization in TurboFan execution budget before interrupt is triggered max percentage of megamorphic generic ICs to allow optimization enable use of SAHF instruction if enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV instructions if enable use of MLS instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for enable use of d16 d31 registers on ARM this requires VFP3 force all emitted branches to be in long enable alignment of csp to bytes on platforms which prefer the register to always be NULL
#define DCHECK(condition)
Definition: logging.h:205
TypeImpl< ZoneTypeConfig > Type

References DCHECK, and NULL.

Referenced by v8::internal::CreateStackMap(), v8::internal::Deoptimizer::DeoptimizeMarkedCodeForContext(), v8::internal::IC::GetSharedFunctionInfo(), v8::internal::Debug::HandleStepIn(), v8::internal::IC::IC(), v8::internal::Isolate::Iterate(), v8::internal::MarkCompactCollector::PrepareThreadForCodeFlushing(), v8::internal::PrintFrames(), v8::internal::MarkCompactCollector::ProcessTopOptimizedFrame(), v8::internal::RUNTIME_FUNCTION(), v8::internal::TraceTopFrame(), and v8::internal::InactiveThreadActivationsChecker::VisitThread().

+ Here is the caller graph for this function:

◆ DISALLOW_COPY_AND_ASSIGN()

v8::internal::StackFrameIterator::DISALLOW_COPY_AND_ASSIGN ( StackFrameIterator  )
private

◆ frame()

StackFrame* v8::internal::StackFrameIterator::frame ( ) const
inline

Definition at line 842 of file frames.h.

842  {
843  DCHECK(!done());
844  return frame_;
845  }

References DCHECK.

Referenced by v8::internal::ProfilerEventsProcessor::AddCurrentStack(), v8::internal::IC::GetSharedFunctionInfo(), v8::internal::Debug::HandleStepIn(), v8::internal::IC::IC(), v8::internal::PrintFrames(), v8::internal::RUNTIME_FUNCTION(), and v8::internal::TraceTopFrame().

+ Here is the caller graph for this function:

◆ Reset()

void v8::internal::StackFrameIterator::Reset ( ThreadLocalTop *  top)
private

Definition at line 101 of file frames.cc.

101  {
102  StackFrame::State state;
104  Isolate::c_entry_fp(top), &state);
105  handler_ = StackHandler::FromAddress(Isolate::handler(top));
106  if (SingletonFor(type) == NULL) return;
107  frame_ = SingletonFor(type, &state);
108 }
static Type GetStateForFramePointer(Address fp, State *state)
Definition: frames.cc:539
static Address c_entry_fp(ThreadLocalTop *thread)
Definition: isolate.h:647
static Address handler(ThreadLocalTop *thread)
Definition: isolate.h:650

References v8::internal::Isolate::c_entry_fp(), v8::internal::ExitFrame::GetStateForFramePointer(), v8::internal::Isolate::handler(), and NULL.

Referenced by StackFrameIterator().

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

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