V8 Project
v8::internal::ExitFrame Class Reference

#include <frames.h>

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

Public Member Functions

virtual Type type () const
 
virtual Codeunchecked_code () const
 
Object *& code_slot () const
 
Object *& constant_pool_slot () const
 
virtual void Iterate (ObjectVisitor *v) const
 
virtual void SetCallerFp (Address caller_fp)
 
- Public Member Functions inherited from v8::StackFrame
int GetLineNumber () const
 Returns the number, 1-based, of the line for the associate function call. More...
 
int GetColumn () const
 Returns the 1-based column offset on the line for the associated function call. More...
 
int GetScriptId () const
 Returns the id of the script for the function for this StackFrame. More...
 
Local< StringGetScriptName () const
 Returns the name of the resource that contains the script for the function for this StackFrame. More...
 
Local< StringGetScriptNameOrSourceURL () const
 Returns the name of the resource that contains the script for the function for this StackFrame or sourceURL value if the script name is undefined and its source ends with //# sourceURL=... More...
 
Local< StringGetFunctionName () const
 Returns the name of the function associated with this stack frame. More...
 
bool IsEval () const
 Returns whether or not the associated function is compiled via a call to eval(). More...
 
bool IsConstructor () const
 Returns whether or not the associated function is called as a constructor via "new". More...
 

Static Public Member Functions

static ExitFramecast (StackFrame *frame)
 
static Type GetStateForFramePointer (Address fp, State *state)
 
static Address ComputeStackPointer (Address fp)
 
static void FillState (Address fp, Address sp, State *state)
 

Protected Member Functions

 ExitFrame (StackFrameIteratorBase *iterator)
 
virtual Address GetCallerStackPointer () const
 

Private Member Functions

virtual void ComputeCallerState (State *state) const
 

Friends

class StackFrameIteratorBase
 

Detailed Description

Definition at line 415 of file frames.h.

Constructor & Destructor Documentation

◆ ExitFrame()

v8::internal::ExitFrame::ExitFrame ( StackFrameIteratorBase iterator)
inlineexplicitprotected

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

145  : StackFrame(iterator) {
146 }
HANDLE HANDLE LPSTACKFRAME64 StackFrame

Member Function Documentation

◆ cast()

static ExitFrame* v8::internal::ExitFrame::cast ( StackFrame frame)
inlinestatic

Definition at line 429 of file frames.h.

429  {
430  DCHECK(frame->is_exit());
431  return static_cast<ExitFrame*>(frame);
432  }
ExitFrame(StackFrameIteratorBase *iterator)
Definition: frames-inl.h:144
#define DCHECK(condition)
Definition: logging.h:205

References DCHECK.

◆ code_slot()

Object *& v8::internal::ExitFrame::code_slot ( ) const

Definition at line 494 of file frames.cc.

494  {
495  const int offset = ExitFrameConstants::kCodeOffset;
496  return Memory::Object_at(fp() + offset);
497 }
static const int kCodeOffset
Definition: frames-arm.h:92
static Object *& Object_at(Address addr)
Definition: v8memory.h:60
const Register fp

References v8::internal::fp, v8::internal::ExitFrameConstants::kCodeOffset, and v8::internal::Memory::Object_at().

Referenced by Iterate(), and unchecked_code().

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

◆ ComputeCallerState()

void v8::internal::ExitFrame::ComputeCallerState ( State state) const
privatevirtual

Definition at line 505 of file frames.cc.

505  {
506  // Set up the caller state.
507  state->sp = caller_sp();
509  state->pc_address = ResolveReturnAddressLocation(
510  reinterpret_cast<Address*>(fp() + ExitFrameConstants::kCallerPCOffset));
511  if (FLAG_enable_ool_constant_pool) {
512  state->constant_pool_address = reinterpret_cast<Address*>(
514  }
515 }
static const int kCallerPCOffset
Definition: frames-arm.h:98
static const int kConstantPoolOffset
Definition: frames-arm.h:90
static const int kCallerFPOffset
Definition: frames-arm.h:96
static Address & Address_at(Address addr)
Definition: v8memory.h:56
byte * Address
Definition: globals.h:101

References v8::internal::Memory::Address_at(), v8::internal::fp, v8::internal::ExitFrameConstants::kCallerFPOffset, v8::internal::ExitFrameConstants::kCallerPCOffset, and v8::internal::ExitFrameConstants::kConstantPoolOffset.

+ Here is the call graph for this function:

◆ ComputeStackPointer()

Address v8::internal::ExitFrame::ComputeStackPointer ( Address  fp)
static

Definition at line 548 of file frames.cc.

548  {
550 }

References v8::internal::Memory::Address_at(), v8::internal::fp, and v8::internal::ExitFrameConstants::kSPOffset.

Referenced by GetStateForFramePointer(), and v8::internal::SafeStackFrameIterator::IsValidExitFrame().

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

◆ constant_pool_slot()

Object*& v8::internal::ExitFrame::constant_pool_slot ( ) const

Referenced by Iterate().

+ Here is the caller graph for this function:

◆ FillState()

void v8::internal::ExitFrame::FillState ( Address  fp,
Address  sp,
State state 
)
static

Definition at line 553 of file frames.cc.

553  {
554  state->sp = sp;
555  state->fp = fp;
556  state->pc_address = ResolveReturnAddressLocation(
557  reinterpret_cast<Address*>(sp - 1 * kPCOnStackSize));
558  state->constant_pool_address =
559  reinterpret_cast<Address*>(fp + ExitFrameConstants::kConstantPoolOffset);
560 }
const int kPCOnStackSize
Definition: globals.h:135
const Register sp

References v8::internal::fp, v8::internal::ExitFrameConstants::kConstantPoolOffset, v8::internal::kPCOnStackSize, and v8::internal::sp.

Referenced by GetStateForFramePointer(), and v8::internal::SafeStackFrameIterator::IsValidExitFrame().

+ Here is the caller graph for this function:

◆ GetCallerStackPointer()

Address v8::internal::ExitFrame::GetCallerStackPointer ( ) const
protectedvirtual

Definition at line 534 of file frames.cc.

534  {
536 }
static const int kCallerSPDisplacement
Definition: frames-arm.h:102

References v8::internal::fp, and v8::internal::ExitFrameConstants::kCallerSPDisplacement.

◆ GetStateForFramePointer()

StackFrame::Type v8::internal::ExitFrame::GetStateForFramePointer ( Address  fp,
State state 
)
static

Definition at line 539 of file frames.cc.

539  {
540  if (fp == 0) return NONE;
542  FillState(fp, sp, state);
543  DCHECK(*state->pc_address != NULL);
544  return EXIT;
545 }
static void FillState(Address fp, Address sp, State *state)
Definition: frames.cc:553
static Address ComputeStackPointer(Address fp)
Definition: frames.cc:548
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
@ NONE

References ComputeStackPointer(), DCHECK, FillState(), v8::internal::fp, NONE, NULL, and v8::internal::sp.

Referenced by v8::internal::EntryFrame::GetCallerState(), v8::internal::StackFrameIterator::Reset(), and v8::internal::SafeStackFrameIterator::SafeStackFrameIterator().

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

◆ Iterate()

void v8::internal::ExitFrame::Iterate ( ObjectVisitor v) const
virtual

Definition at line 523 of file frames.cc.

523  {
524  // The arguments are traversed as part of the expression stack of
525  // the calling frame.
526  IteratePc(v, pc_address(), LookupCode());
527  v->VisitPointer(&code_slot());
528  if (FLAG_enable_ool_constant_pool) {
529  v->VisitPointer(&constant_pool_slot());
530  }
531 }
Object *& constant_pool_slot() const
Object *& code_slot() const
Definition: frames.cc:494

References code_slot(), and constant_pool_slot().

+ Here is the call graph for this function:

◆ SetCallerFp()

void v8::internal::ExitFrame::SetCallerFp ( Address  caller_fp)
virtual

Definition at line 518 of file frames.cc.

518  {
520 }

References v8::internal::Memory::Address_at(), v8::internal::fp, and v8::internal::ExitFrameConstants::kCallerFPOffset.

+ Here is the call graph for this function:

◆ type()

virtual Type v8::internal::ExitFrame::type ( ) const
inlinevirtual

Definition at line 417 of file frames.h.

417 { return EXIT; }

◆ unchecked_code()

Code * v8::internal::ExitFrame::unchecked_code ( ) const
virtual

Definition at line 500 of file frames.cc.

500  {
501  return reinterpret_cast<Code*>(code_slot());
502 }

References code_slot().

+ Here is the call graph for this function:

Friends And Related Function Documentation

◆ StackFrameIteratorBase

friend class StackFrameIteratorBase
friend

Definition at line 449 of file frames.h.


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