V8 Project
v8::internal::DeoptimizedFrameInfo Class Reference

#include <deoptimizer.h>

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

Public Member Functions

 DeoptimizedFrameInfo (Deoptimizer *deoptimizer, int frame_index, bool has_arguments_adaptor, bool has_construct_stub)
 
virtual ~DeoptimizedFrameInfo ()
 
void Iterate (ObjectVisitor *v)
 
int parameters_count ()
 
int expression_count ()
 
JSFunctionGetFunction ()
 
ObjectGetContext ()
 
bool HasConstructStub ()
 
ObjectGetParameter (int index)
 
ObjectGetExpression (int index)
 
int GetSourcePosition ()
 
- Public Member Functions inherited from v8::internal::Malloced
void * operator new (size_t size)
 
void operator delete (void *p)
 

Private Member Functions

void SetParameter (int index, Object *obj)
 
void SetExpression (int index, Object *obj)
 

Private Attributes

JSFunctionfunction_
 
Objectcontext_
 
bool has_construct_stub_
 
int parameters_count_
 
int expression_count_
 
Object ** parameters_
 
Object ** expression_stack_
 
int source_position_
 

Friends

class Deoptimizer
 

Additional Inherited Members

- Static Public Member Functions inherited from v8::internal::Malloced
static void FatalProcessOutOfMemory ()
 
static void * New (size_t size)
 
static void Delete (void *p)
 

Detailed Description

Definition at line 916 of file deoptimizer.h.

Constructor & Destructor Documentation

◆ DeoptimizedFrameInfo()

v8::internal::DeoptimizedFrameInfo::DeoptimizedFrameInfo ( Deoptimizer deoptimizer,
int  frame_index,
bool  has_arguments_adaptor,
bool  has_construct_stub 
)

Definition at line 3592 of file deoptimizer.cc.

3595  {
3596  FrameDescription* output_frame = deoptimizer->output_[frame_index];
3597  function_ = output_frame->GetFunction();
3598  context_ = reinterpret_cast<Object*>(output_frame->GetContext());
3599  has_construct_stub_ = has_construct_stub;
3600  expression_count_ = output_frame->GetExpressionCount();
3602  // Get the source position using the unoptimized code.
3603  Address pc = reinterpret_cast<Address>(output_frame->GetPc());
3604  Code* code = Code::cast(deoptimizer->isolate()->FindCodeObject(pc));
3605  source_position_ = code->SourcePosition(pc);
3606 
3607  for (int i = 0; i < expression_count_; i++) {
3608  SetExpression(i, output_frame->GetExpression(i));
3609  }
3610 
3611  if (has_arguments_adaptor) {
3612  output_frame = deoptimizer->output_[frame_index - 1];
3613  CHECK_EQ(output_frame->GetFrameType(), StackFrame::ARGUMENTS_ADAPTOR);
3614  }
3615 
3616  parameters_count_ = output_frame->ComputeParametersCount();
3618  for (int i = 0; i < parameters_count_; i++) {
3619  SetParameter(i, output_frame->GetParameter(i));
3620  }
3621 }
void SetParameter(int index, Object *obj)
Definition: deoptimizer.h:965
void SetExpression(int index, Object *obj)
Definition: deoptimizer.h:971
#define CHECK_EQ(expected, value)
Definition: logging.h:169
kSerializedDataOffset Object
Definition: objects-inl.h:5322
const Register pc
byte * Address
Definition: globals.h:101

References v8::internal::compiler::ARGUMENTS_ADAPTOR, CHECK_EQ, v8::internal::FrameDescription::ComputeParametersCount(), context_, expression_count_, expression_stack_, v8::internal::Isolate::FindCodeObject(), function_, v8::internal::FrameDescription::GetContext(), v8::internal::FrameDescription::GetExpression(), v8::internal::FrameDescription::GetExpressionCount(), v8::internal::FrameDescription::GetFrameType(), v8::internal::FrameDescription::GetFunction(), v8::internal::FrameDescription::GetParameter(), v8::internal::FrameDescription::GetPc(), has_construct_stub_, v8::internal::Deoptimizer::isolate(), v8::internal::Deoptimizer::output_, parameters_, parameters_count_, v8::internal::pc, SetExpression(), SetParameter(), source_position_, and v8::internal::Code::SourcePosition().

+ Here is the call graph for this function:

◆ ~DeoptimizedFrameInfo()

v8::internal::DeoptimizedFrameInfo::~DeoptimizedFrameInfo ( )
virtual

Definition at line 3624 of file deoptimizer.cc.

3624  {
3625  delete[] expression_stack_;
3626  delete[] parameters_;
3627 }

References expression_stack_, and parameters_.

Member Function Documentation

◆ expression_count()

int v8::internal::DeoptimizedFrameInfo::expression_count ( )
inline

Definition at line 931 of file deoptimizer.h.

931 { return expression_count_; }

References expression_count_.

Referenced by v8::internal::Deoptimizer::DebuggerInspectableFrame(), v8::internal::FrameInspector::expression_count(), GetExpression(), v8::internal::Deoptimizer::MaterializeHeapNumbersForDebuggerInspectableFrame(), and SetExpression().

+ Here is the caller graph for this function:

◆ GetContext()

Object* v8::internal::DeoptimizedFrameInfo::GetContext ( )
inline

Definition at line 939 of file deoptimizer.h.

939 { return context_; }

References context_.

Referenced by v8::internal::FrameInspector::GetContext().

+ Here is the caller graph for this function:

◆ GetExpression()

Object* v8::internal::DeoptimizedFrameInfo::GetExpression ( int  index)
inline

Definition at line 954 of file deoptimizer.h.

954  {
955  DCHECK(0 <= index && index < expression_count());
956  return expression_stack_[index];
957  }
#define DCHECK(condition)
Definition: logging.h:205

References DCHECK, expression_count(), and expression_stack_.

Referenced by v8::internal::FrameInspector::GetExpression().

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

◆ GetFunction()

JSFunction* v8::internal::DeoptimizedFrameInfo::GetFunction ( )
inline

Definition at line 934 of file deoptimizer.h.

934  {
935  return function_;
936  }

References function_.

Referenced by v8::internal::FrameInspector::GetFunction().

+ Here is the caller graph for this function:

◆ GetParameter()

Object* v8::internal::DeoptimizedFrameInfo::GetParameter ( int  index)
inline

Definition at line 948 of file deoptimizer.h.

948  {
949  DCHECK(0 <= index && index < parameters_count());
950  return parameters_[index];
951  }

References DCHECK, parameters_, and parameters_count().

Referenced by v8::internal::FrameInspector::GetParameter().

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

◆ GetSourcePosition()

int v8::internal::DeoptimizedFrameInfo::GetSourcePosition ( )
inline

Definition at line 959 of file deoptimizer.h.

959  {
960  return source_position_;
961  }

References source_position_.

Referenced by v8::internal::FrameInspector::GetSourcePosition().

+ Here is the caller graph for this function:

◆ HasConstructStub()

bool v8::internal::DeoptimizedFrameInfo::HasConstructStub ( )
inline

Definition at line 943 of file deoptimizer.h.

943  {
944  return has_construct_stub_;
945  }

References has_construct_stub_.

Referenced by v8::internal::FrameInspector::IsConstructor().

+ Here is the caller graph for this function:

◆ Iterate()

void v8::internal::DeoptimizedFrameInfo::Iterate ( ObjectVisitor v)

Definition at line 3630 of file deoptimizer.cc.

3630  {
3631  v->VisitPointer(bit_cast<Object**>(&function_));
3632  v->VisitPointer(&context_);
3633  v->VisitPointers(parameters_, parameters_ + parameters_count_);
3635 }

References context_, expression_count_, expression_stack_, function_, parameters_, and parameters_count_.

Referenced by v8::internal::DeoptimizerData::Iterate().

+ Here is the caller graph for this function:

◆ parameters_count()

int v8::internal::DeoptimizedFrameInfo::parameters_count ( )
inline

Definition at line 928 of file deoptimizer.h.

928 { return parameters_count_; }

References parameters_count_.

Referenced by v8::internal::Deoptimizer::DebuggerInspectableFrame(), GetParameter(), v8::internal::FrameInspector::GetParametersCount(), v8::internal::Deoptimizer::MaterializeHeapNumbersForDebuggerInspectableFrame(), and SetParameter().

+ Here is the caller graph for this function:

◆ SetExpression()

void v8::internal::DeoptimizedFrameInfo::SetExpression ( int  index,
Object obj 
)
inlineprivate

Definition at line 971 of file deoptimizer.h.

971  {
972  DCHECK(0 <= index && index < expression_count());
973  expression_stack_[index] = obj;
974  }

References DCHECK, expression_count(), and expression_stack_.

Referenced by DeoptimizedFrameInfo(), and v8::internal::Deoptimizer::MaterializeHeapNumbersForDebuggerInspectableFrame().

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

◆ SetParameter()

void v8::internal::DeoptimizedFrameInfo::SetParameter ( int  index,
Object obj 
)
inlineprivate

Definition at line 965 of file deoptimizer.h.

965  {
966  DCHECK(0 <= index && index < parameters_count());
967  parameters_[index] = obj;
968  }

References DCHECK, parameters_, and parameters_count().

Referenced by DeoptimizedFrameInfo(), and v8::internal::Deoptimizer::MaterializeHeapNumbersForDebuggerInspectableFrame().

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

Friends And Related Function Documentation

◆ Deoptimizer

friend class Deoptimizer
friend

Definition at line 985 of file deoptimizer.h.

Member Data Documentation

◆ context_

Object* v8::internal::DeoptimizedFrameInfo::context_
private

Definition at line 977 of file deoptimizer.h.

Referenced by DeoptimizedFrameInfo(), GetContext(), and Iterate().

◆ expression_count_

int v8::internal::DeoptimizedFrameInfo::expression_count_
private

Definition at line 980 of file deoptimizer.h.

Referenced by DeoptimizedFrameInfo(), expression_count(), and Iterate().

◆ expression_stack_

Object** v8::internal::DeoptimizedFrameInfo::expression_stack_
private

◆ function_

JSFunction* v8::internal::DeoptimizedFrameInfo::function_
private

Definition at line 976 of file deoptimizer.h.

Referenced by DeoptimizedFrameInfo(), GetFunction(), and Iterate().

◆ has_construct_stub_

bool v8::internal::DeoptimizedFrameInfo::has_construct_stub_
private

Definition at line 978 of file deoptimizer.h.

Referenced by DeoptimizedFrameInfo(), and HasConstructStub().

◆ parameters_

Object** v8::internal::DeoptimizedFrameInfo::parameters_
private

◆ parameters_count_

int v8::internal::DeoptimizedFrameInfo::parameters_count_
private

Definition at line 979 of file deoptimizer.h.

Referenced by DeoptimizedFrameInfo(), Iterate(), and parameters_count().

◆ source_position_

int v8::internal::DeoptimizedFrameInfo::source_position_
private

Definition at line 983 of file deoptimizer.h.

Referenced by DeoptimizedFrameInfo(), and GetSourcePosition().


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