V8 Project
v8::internal::HSourcePosition Class Reference

#include <hydrogen-instructions.h>

+ Collaboration diagram for v8::internal::HSourcePosition:

Public Member Functions

 HSourcePosition (const HSourcePosition &other)
 
bool IsUnknown () const
 
int position () const
 
void set_position (int position)
 
int inlining_id () const
 
void set_inlining_id (int inlining_id)
 
int raw () const
 

Static Public Member Functions

static HSourcePosition Unknown ()
 

Private Types

typedef BitField< int, 0, 9 > InliningIdField
 
typedef BitField< int, 9, 23 > PositionField
 

Private Member Functions

 HSourcePosition (int value)
 

Private Attributes

int value_
 

Friends

class HPositionInfo
 
class LCodeGenBase
 

Detailed Description

Definition at line 424 of file hydrogen-instructions.h.

Member Typedef Documentation

◆ InliningIdField

Definition at line 453 of file hydrogen-instructions.h.

◆ PositionField

Definition at line 456 of file hydrogen-instructions.h.

Constructor & Destructor Documentation

◆ HSourcePosition() [1/2]

v8::internal::HSourcePosition::HSourcePosition ( const HSourcePosition other)
inline

Definition at line 426 of file hydrogen-instructions.h.

426 : value_(other.value_) { }

Referenced by Unknown().

+ Here is the caller graph for this function:

◆ HSourcePosition() [2/2]

v8::internal::HSourcePosition::HSourcePosition ( int  value)
inlineexplicitprivate

Definition at line 458 of file hydrogen-instructions.h.

458 : value_(value) { }

Member Function Documentation

◆ inlining_id()

int v8::internal::HSourcePosition::inlining_id ( ) const
inline

Definition at line 443 of file hydrogen-instructions.h.

References v8::internal::BitFieldBase< T, shift, size, uint32_t >::decode(), and value_.

Referenced by v8::internal::operator<<(), and set_inlining_id().

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

◆ IsUnknown()

bool v8::internal::HSourcePosition::IsUnknown ( ) const
inline

Definition at line 432 of file hydrogen-instructions.h.

432 { return value_ == RelocInfo::kNoPosition; }
static const int kNoPosition
Definition: assembler.h:317

References v8::internal::RelocInfo::kNoPosition, and value_.

Referenced by v8::internal::HInstruction::has_position(), v8::internal::HRepresentationChangesPhase::InsertRepresentationChangeForUse(), v8::internal::HInstruction::operand_position(), v8::internal::operator<<(), and v8::internal::HInstruction::set_position().

+ Here is the caller graph for this function:

◆ position()

int v8::internal::HSourcePosition::position ( ) const
inline

Definition at line 434 of file hydrogen-instructions.h.

434 { return PositionField::decode(value_); }

References v8::internal::BitFieldBase< T, shift, size, U >::decode(), and value_.

Referenced by v8::internal::operator<<(), and set_position().

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

◆ raw()

int v8::internal::HSourcePosition::raw ( ) const
inline

Definition at line 450 of file hydrogen-instructions.h.

450 { return value_; }

References value_.

Referenced by v8::internal::LCodeGen::DeoptimizeBranch(), v8::internal::LCodeGen::DeoptimizeIf(), v8::internal::operator<<(), and v8::internal::HPositionInfo::set_position().

+ Here is the caller graph for this function:

◆ set_inlining_id()

void v8::internal::HSourcePosition::set_inlining_id ( int  inlining_id)
inline

Definition at line 444 of file hydrogen-instructions.h.

444  {
445  if (FLAG_hydrogen_track_positions) {
446  value_ = static_cast<int>(InliningIdField::update(value_, inlining_id));
447  }
448  }
static uint32_t update(uint32_t previous, T value)
Definition: utils.h:223

References inlining_id(), v8::internal::BitFieldBase< T, shift, size, uint32_t >::update(), and value_.

Referenced by v8::internal::HGraphBuilder::EnterInlinedSource().

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

◆ set_position()

void v8::internal::HSourcePosition::set_position ( int  position)
inline

Definition at line 435 of file hydrogen-instructions.h.

435  {
436  if (FLAG_hydrogen_track_positions) {
437  value_ = static_cast<int>(PositionField::update(value_, position));
438  } else {
439  value_ = position;
440  }
441  }

References position(), v8::internal::BitFieldBase< T, shift, size, U >::update(), and value_.

Referenced by v8::internal::HGraphBuilder::ScriptPositionToSourcePosition(), and v8::internal::HGraphBuilder::SetSourcePosition().

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

◆ Unknown()

static HSourcePosition v8::internal::HSourcePosition::Unknown ( )
inlinestatic

Definition at line 428 of file hydrogen-instructions.h.

428  {
430  }
HSourcePosition(const HSourcePosition &other)

References HSourcePosition(), and v8::internal::RelocInfo::kNoPosition.

Referenced by v8::internal::HPositionInfo::ensure_storage_for_operand_positions(), and v8::internal::HValue::position().

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

Friends And Related Function Documentation

◆ HPositionInfo

friend class HPositionInfo
friend

Definition at line 460 of file hydrogen-instructions.h.

◆ LCodeGenBase

friend class LCodeGenBase
friend

Definition at line 461 of file hydrogen-instructions.h.

Member Data Documentation

◆ value_

int v8::internal::HSourcePosition::value_
private

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