V8 Project
v8::internal::UsePosition Class Reference

#include <lithium-allocator.h>

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

Public Member Functions

 UsePosition (LifetimePosition pos, LOperand *operand, LOperand *hint)
 
LOperandoperand () const
 
bool HasOperand () const
 
LOperandhint () const
 
bool HasHint () const
 
bool RequiresRegister () const
 
bool RegisterIsBeneficial () const
 
LifetimePosition pos () const
 
UsePositionnext () const
 
- Public Member Functions inherited from v8::internal::ZoneObject
 INLINE (void *operator new(size_t size, Zone *zone))
 
void operator delete (void *, size_t)
 
void operator delete (void *pointer, Zone *zone)
 

Private Member Functions

void set_next (UsePosition *next)
 

Private Attributes

LOperand *const operand_
 
LOperand *const hint_
 
LifetimePosition const pos_
 
UsePositionnext_
 
bool requires_reg_
 
bool register_beneficial_
 

Friends

class LiveRange
 

Detailed Description

Definition at line 160 of file lithium-allocator.h.

Constructor & Destructor Documentation

◆ UsePosition()

v8::internal::UsePosition::UsePosition ( LifetimePosition  pos,
LOperand operand,
LOperand hint 
)

Definition at line 25 of file lithium-allocator.cc.

28  : operand_(operand),
29  hint_(hint),
30  pos_(pos),
31  next_(NULL),
32  requires_reg_(false),
33  register_beneficial_(true) {
34  if (operand_ != NULL && operand_->IsUnallocated()) {
35  LUnallocated* unalloc = LUnallocated::cast(operand_);
36  requires_reg_ = unalloc->HasRegisterPolicy() ||
37  unalloc->HasDoubleRegisterPolicy();
38  register_beneficial_ = !unalloc->HasAnyPolicy();
39  }
40  DCHECK(pos_.IsValid());
41 }
static LUnallocated * cast(LOperand *op)
Definition: lithium.h:138
LifetimePosition const pos_
LifetimePosition pos() const
LOperand * operand() const
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

References v8::internal::LUnallocated::cast(), DCHECK, v8::internal::LUnallocated::HasAnyPolicy(), v8::internal::LUnallocated::HasDoubleRegisterPolicy(), v8::internal::LUnallocated::HasRegisterPolicy(), v8::internal::LifetimePosition::IsValid(), NULL, operand_, pos_, register_beneficial_, and requires_reg_.

+ Here is the call graph for this function:

Member Function Documentation

◆ HasHint()

bool v8::internal::UsePosition::HasHint ( ) const

Definition at line 44 of file lithium-allocator.cc.

44  {
45  return hint_ != NULL && !hint_->IsUnallocated();
46 }

References hint_, and NULL.

Referenced by v8::internal::LiveRange::AddUsePosition(), and v8::internal::LiveRange::FirstHint().

+ Here is the caller graph for this function:

◆ HasOperand()

bool v8::internal::UsePosition::HasOperand ( ) const
inline

Definition at line 165 of file lithium-allocator.h.

165 { return operand_ != NULL; }

References NULL, and operand_.

Referenced by v8::internal::LiveRange::ConvertOperands().

+ Here is the caller graph for this function:

◆ hint()

LOperand* v8::internal::UsePosition::hint ( ) const
inline

Definition at line 167 of file lithium-allocator.h.

167 { return hint_; }

References hint_.

Referenced by v8::internal::LiveRange::FirstHint().

+ Here is the caller graph for this function:

◆ next()

UsePosition* v8::internal::UsePosition::next ( ) const
inline

◆ operand()

LOperand* v8::internal::UsePosition::operand ( ) const
inline

Definition at line 164 of file lithium-allocator.h.

164 { return operand_; }

References operand_.

Referenced by v8::internal::LiveRange::ConvertOperands().

+ Here is the caller graph for this function:

◆ pos()

LifetimePosition v8::internal::UsePosition::pos ( ) const
inline

Definition at line 172 of file lithium-allocator.h.

172 { return pos_; }

References pos_.

Referenced by v8::internal::LiveRange::AddUsePosition(), v8::internal::LiveRange::CanBeSpilled(), v8::internal::LiveRange::ConvertOperands(), v8::internal::LiveRange::NextUsePosition(), v8::internal::LiveRange::PreviousUsePositionRegisterIsBeneficial(), v8::internal::LiveRange::ShouldBeAllocatedBefore(), and v8::internal::LiveRange::SplitAt().

+ Here is the caller graph for this function:

◆ RegisterIsBeneficial()

bool v8::internal::UsePosition::RegisterIsBeneficial ( ) const

Definition at line 54 of file lithium-allocator.cc.

54  {
55  return register_beneficial_;
56 }

References register_beneficial_.

Referenced by v8::internal::LiveRange::NextUsePositionRegisterIsBeneficial(), and v8::internal::LiveRange::PreviousUsePositionRegisterIsBeneficial().

+ Here is the caller graph for this function:

◆ RequiresRegister()

bool v8::internal::UsePosition::RequiresRegister ( ) const

Definition at line 49 of file lithium-allocator.cc.

49  {
50  return requires_reg_;
51 }

References requires_reg_.

Referenced by v8::internal::LiveRange::ConvertOperands(), and v8::internal::LiveRange::NextRegisterPosition().

+ Here is the caller graph for this function:

◆ set_next()

void v8::internal::UsePosition::set_next ( UsePosition next)
inlineprivate

Definition at line 176 of file lithium-allocator.h.

176 { next_ = next; }
UsePosition * next() const

References next(), and next_.

Referenced by v8::internal::LiveRange::AddUsePosition().

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

Friends And Related Function Documentation

◆ LiveRange

friend class LiveRange
friend

Definition at line 185 of file lithium-allocator.h.

Member Data Documentation

◆ hint_

LOperand* const v8::internal::UsePosition::hint_
private

Definition at line 179 of file lithium-allocator.h.

Referenced by HasHint(), and hint().

◆ next_

UsePosition* v8::internal::UsePosition::next_
private

◆ operand_

LOperand* const v8::internal::UsePosition::operand_
private

Definition at line 178 of file lithium-allocator.h.

Referenced by HasOperand(), operand(), and UsePosition().

◆ pos_

LifetimePosition const v8::internal::UsePosition::pos_
private

Definition at line 180 of file lithium-allocator.h.

Referenced by pos(), and UsePosition().

◆ register_beneficial_

bool v8::internal::UsePosition::register_beneficial_
private

Definition at line 183 of file lithium-allocator.h.

Referenced by RegisterIsBeneficial(), and UsePosition().

◆ requires_reg_

bool v8::internal::UsePosition::requires_reg_
private

Definition at line 182 of file lithium-allocator.h.

Referenced by RequiresRegister(), and UsePosition().


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