V8 Project
v8::internal::HInstruction Class Referenceabstract

#include <hydrogen-instructions.h>

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

Public Member Functions

HInstructionnext () const
 
HInstructionprevious () const
 
virtual OStreamPrintTo (OStream &os) const OVERRIDE
 
virtual OStreamPrintDataTo (OStream &os) const
 
bool IsLinked () const
 
void Unlink ()
 
void InsertBefore (HInstruction *next)
 
template<class T >
TPrepend (T *instr)
 
void InsertAfter (HInstruction *previous)
 
template<class T >
TAppend (T *instr)
 
virtual HSourcePosition position () const OVERRIDE
 
bool has_position () const
 
void set_position (HSourcePosition position)
 
virtual HSourcePosition operand_position (int index) const OVERRIDE
 
void set_operand_position (Zone *zone, int index, HSourcePosition pos)
 
bool Dominates (HInstruction *other)
 
bool CanTruncateToSmi () const
 
bool CanTruncateToInt32 () const
 
virtual LInstructionCompileToLithium (LChunkBuilder *builder)=0
 
bool CanDeoptimize ()
 
virtual bool HasStackCheck ()
 
- Public Member Functions inherited from v8::internal::HValue
 STATIC_ASSERT (kLastFlag< kBitsPerInt)
 
virtual Opcode opcode () const =0
 
bool IsPhi () const
 
bool IsBitwiseBinaryShift ()
 
 HValue (HType type=HType::Tagged())
 
virtual ~HValue ()
 
HBasicBlock * block () const
 
void SetBlock (HBasicBlock *block)
 
Isolateisolate () const
 
int id () const
 
void set_id (int id)
 
HUseIterator uses () const
 
virtual bool EmitAtUses ()
 
Representation representation () const
 
void ChangeRepresentation (Representation r)
 
virtual void AssumeRepresentation (Representation r)
 
virtual Representation KnownOptimalRepresentation ()
 
HType type () const
 
void set_type (HType new_type)
 
virtual int RedefinedOperandIndex ()
 
bool IsInformativeDefinition ()
 
HValueRedefinedOperand ()
 
bool CanReplaceWithDummyUses ()
 
virtual int argument_delta () const
 
virtual bool IsPurelyInformativeDefinition ()
 
HValueActualValue ()
 
bool IsInteger32Constant ()
 
int32_t GetInteger32Constant ()
 
bool EqualsInteger32Constant (int32_t value)
 
bool IsDefinedAfter (HBasicBlock *other) const
 
virtual int OperandCount () const =0
 
virtual HValueOperandAt (int index) const =0
 
void SetOperandAt (int index, HValue *value)
 
void DeleteAndReplaceWith (HValue *other)
 
void ReplaceAllUsesWith (HValue *other)
 
bool HasNoUses () const
 
bool HasOneUse () const
 
bool HasMultipleUses () const
 
int UseCount () const
 
void Kill ()
 
int flags () const
 
void SetFlag (Flag f)
 
void ClearFlag (Flag f)
 
bool CheckFlag (Flag f) const
 
void CopyFlag (Flag f, HValue *other)
 
bool CheckUsesForFlag (Flag f) const
 
bool CheckUsesForFlag (Flag f, HValue **value) const
 
bool HasAtLeastOneUseWithFlagAndNoneWithout (Flag f) const
 
GVNFlagSet ChangesFlags () const
 
GVNFlagSet DependsOnFlags () const
 
void SetChangesFlag (GVNFlag f)
 
void SetDependsOnFlag (GVNFlag f)
 
void ClearChangesFlag (GVNFlag f)
 
void ClearDependsOnFlag (GVNFlag f)
 
bool CheckChangesFlag (GVNFlag f) const
 
bool CheckDependsOnFlag (GVNFlag f) const
 
void SetAllSideEffects ()
 
void ClearAllSideEffects ()
 
bool HasSideEffects () const
 
bool HasObservableSideEffects () const
 
GVNFlagSet SideEffectFlags () const
 
GVNFlagSet ObservableChangesFlags () const
 
Range * range () const
 
bool HasRange () const
 
void AddNewRange (Range *r, Zone *zone)
 
void RemoveLastAddedRange ()
 
void ComputeInitialRange (Zone *zone)
 
virtual bool HasEscapingOperandAt (int index)
 
virtual bool HasOutOfBoundsAccess (int size)
 
virtual Representation observed_input_representation (int index)
 
virtual Representation RequiredInputRepresentation (int index)=0
 
virtual void InferRepresentation (HInferRepresentationPhase *h_infer)
 
virtual HValueCanonicalize ()
 
bool Equals (HValue *other)
 
virtual intptr_t Hashcode ()
 
virtual void FinalizeUniqueness ()
 
const char * Mnemonic () const
 
bool HasMonomorphicJSObjectType ()
 
virtual Handle< MapGetMonomorphicJSObjectMap ()
 
bool UpdateInferredType ()
 
virtual HType CalculateInferredType ()
 
virtual bool HandleSideEffectDominator (GVNFlag side_effect, HValue *dominator)
 
bool CannotBeEliminated () const
 
virtual bool TryDecompose (DecompositionResult *decomposition)
 
bool ToStringCanBeObserved () const
 
bool ToNumberCanBeObserved () const
 
MinusZeroMode GetMinusZeroMode ()
 
- 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)
 

Protected Member Functions

 HInstruction (HType type=HType::Tagged())
 
virtual void DeleteFromGraph () OVERRIDE
 
- Protected Member Functions inherited from v8::internal::HValue
virtual bool DataEquals (HValue *other)
 
bool ToStringOrToNumberCanBeObserved () const
 
virtual Representation RepresentationFromInputs ()
 
virtual Representation RepresentationFromUses ()
 
Representation RepresentationFromUseRequirements ()
 
bool HasNonSmiUse ()
 
virtual void UpdateRepresentation (Representation new_rep, HInferRepresentationPhase *h_infer, const char *reason)
 
void AddDependantsToWorklist (HInferRepresentationPhase *h_infer)
 
virtual void RepresentationChanged (Representation to)
 
virtual Range * InferRange (Zone *zone)
 
virtual void InternalSetOperandAt (int index, HValue *value)=0
 
void clear_block ()
 
void set_representation (Representation r)
 
HUseListNodeRemoveUse (HValue *value, int index)
 
void RegisterUse (int index, HValue *new_value)
 

Private Member Functions

void InitializeAsFirst (HBasicBlock *block)
 

Private Attributes

HInstructionnext_
 
HInstructionprevious_
 
HPositionInfo position_
 

Friends

class HBasicBlock
 

Additional Inherited Members

- Public Types inherited from v8::internal::HValue
enum  Flag {
  kFlexibleRepresentation , kCannotBeTagged , kUseGVN , kTrackSideEffectDominators ,
  kCanOverflow , kBailoutOnMinusZero , kCanBeDivByZero , kLeftCanBeMinInt ,
  kLeftCanBeNegative , kLeftCanBePositive , kAllowUndefinedAsNaN , kIsArguments ,
  kTruncatingToInt32 , kAllUsesTruncatingToInt32 , kTruncatingToSmi , kAllUsesTruncatingToSmi ,
  kIsDead , kUint32 , kHasNoObservableSideEffects , kCantBeReplaced ,
  kIsLive , kEndsLiveRange = kIsLive , kLastFlag = kIsLive
}
 
enum  Opcode { kPhi }
 
- Static Public Member Functions inherited from v8::internal::HValue
static HValuecast (HValue *value)
 
- Static Public Attributes inherited from v8::internal::HValue
static const int kNoNumber = -1
 
static const int kNoRedefinedOperand = -1
 
- Static Protected Member Functions inherited from v8::internal::HValue
static GVNFlagSet AllFlagSet ()
 
static GVNFlagSet AllSideEffectsFlagSet ()
 
static GVNFlagSet AllObservableSideEffectsFlagSet ()
 
- Protected Attributes inherited from v8::internal::HValue
HBasicBlock * block_
 
int id_
 
Representation representation_
 
HType type_
 
HUseListNodeuse_list_
 
Range * range_
 
int flags_
 
GVNFlagSet changes_flags_
 
GVNFlagSet depends_on_flags_
 

Detailed Description

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

Constructor & Destructor Documentation

◆ HInstruction()

v8::internal::HInstruction::HInstruction ( HType  type = HType::Tagged())
inlineexplicitprotected

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

1211  : HValue(type),
1212  next_(NULL),
1213  previous_(NULL),
1215  SetDependsOnFlag(kOsrEntries);
1216  }
HValue(HType type=HType::Tagged())
void SetDependsOnFlag(GVNFlag f)
static const int kNoPosition
Definition: assembler.h:317
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

References v8::internal::HValue::SetDependsOnFlag().

+ Here is the call graph for this function:

Member Function Documentation

◆ Append()

template<class T >
T* v8::internal::HInstruction::Append ( T instr)
inline

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

1165  {
1166  instr->InsertAfter(this);
1167  return instr;
1168  }

Referenced by v8::internal::FINAL< kOperandKind, kNumCachedOperands >::CreateAndInsertAfter().

+ Here is the caller graph for this function:

◆ CanDeoptimize()

bool v8::internal::HInstruction::CanDeoptimize ( )

Definition at line 782 of file hydrogen-instructions.cc.

782  {
783  // TODO(titzer): make this a virtual method?
784  switch (opcode()) {
785  case HValue::kAbnormalExit:
786  case HValue::kAccessArgumentsAt:
787  case HValue::kAllocate:
788  case HValue::kArgumentsElements:
789  case HValue::kArgumentsLength:
790  case HValue::kArgumentsObject:
791  case HValue::kBlockEntry:
792  case HValue::kBoundsCheckBaseIndexInformation:
793  case HValue::kCallFunction:
794  case HValue::kCallNew:
795  case HValue::kCallNewArray:
796  case HValue::kCallStub:
797  case HValue::kCallWithDescriptor:
798  case HValue::kCapturedObject:
799  case HValue::kClassOfTestAndBranch:
800  case HValue::kCompareGeneric:
801  case HValue::kCompareHoleAndBranch:
802  case HValue::kCompareMap:
803  case HValue::kCompareMinusZeroAndBranch:
804  case HValue::kCompareNumericAndBranch:
805  case HValue::kCompareObjectEqAndBranch:
806  case HValue::kConstant:
807  case HValue::kConstructDouble:
808  case HValue::kContext:
809  case HValue::kDebugBreak:
810  case HValue::kDeclareGlobals:
811  case HValue::kDoubleBits:
812  case HValue::kDummyUse:
813  case HValue::kEnterInlined:
814  case HValue::kEnvironmentMarker:
815  case HValue::kForceRepresentation:
816  case HValue::kGetCachedArrayIndex:
817  case HValue::kGoto:
818  case HValue::kHasCachedArrayIndexAndBranch:
819  case HValue::kHasInstanceTypeAndBranch:
820  case HValue::kInnerAllocatedObject:
821  case HValue::kInstanceOf:
822  case HValue::kInstanceOfKnownGlobal:
823  case HValue::kIsConstructCallAndBranch:
824  case HValue::kIsObjectAndBranch:
825  case HValue::kIsSmiAndBranch:
826  case HValue::kIsStringAndBranch:
827  case HValue::kIsUndetectableAndBranch:
828  case HValue::kLeaveInlined:
829  case HValue::kLoadFieldByIndex:
830  case HValue::kLoadGlobalGeneric:
831  case HValue::kLoadNamedField:
832  case HValue::kLoadNamedGeneric:
833  case HValue::kLoadRoot:
834  case HValue::kMapEnumLength:
835  case HValue::kMathMinMax:
836  case HValue::kParameter:
837  case HValue::kPhi:
838  case HValue::kPushArguments:
839  case HValue::kRegExpLiteral:
840  case HValue::kReturn:
841  case HValue::kSeqStringGetChar:
842  case HValue::kStoreCodeEntry:
843  case HValue::kStoreFrameContext:
844  case HValue::kStoreKeyed:
845  case HValue::kStoreNamedField:
846  case HValue::kStoreNamedGeneric:
847  case HValue::kStringCharCodeAt:
848  case HValue::kStringCharFromCode:
849  case HValue::kTailCallThroughMegamorphicCache:
850  case HValue::kThisFunction:
851  case HValue::kTypeofIsAndBranch:
852  case HValue::kUnknownOSRValue:
853  case HValue::kUseConst:
854  return false;
855 
856  case HValue::kAdd:
857  case HValue::kAllocateBlockContext:
858  case HValue::kApplyArguments:
859  case HValue::kBitwise:
860  case HValue::kBoundsCheck:
861  case HValue::kBranch:
862  case HValue::kCallJSFunction:
863  case HValue::kCallRuntime:
864  case HValue::kChange:
865  case HValue::kCheckHeapObject:
866  case HValue::kCheckInstanceType:
867  case HValue::kCheckMapValue:
868  case HValue::kCheckMaps:
869  case HValue::kCheckSmi:
870  case HValue::kCheckValue:
871  case HValue::kClampToUint8:
872  case HValue::kDateField:
873  case HValue::kDeoptimize:
874  case HValue::kDiv:
875  case HValue::kForInCacheArray:
876  case HValue::kForInPrepareMap:
877  case HValue::kFunctionLiteral:
878  case HValue::kInvokeFunction:
879  case HValue::kLoadContextSlot:
880  case HValue::kLoadFunctionPrototype:
881  case HValue::kLoadGlobalCell:
882  case HValue::kLoadKeyed:
883  case HValue::kLoadKeyedGeneric:
884  case HValue::kMathFloorOfDiv:
885  case HValue::kMod:
886  case HValue::kMul:
887  case HValue::kOsrEntry:
888  case HValue::kPower:
889  case HValue::kRor:
890  case HValue::kSar:
891  case HValue::kSeqStringSetChar:
892  case HValue::kShl:
893  case HValue::kShr:
894  case HValue::kSimulate:
895  case HValue::kStackCheck:
896  case HValue::kStoreContextSlot:
897  case HValue::kStoreGlobalCell:
898  case HValue::kStoreKeyedGeneric:
899  case HValue::kStringAdd:
900  case HValue::kStringCompareAndBranch:
901  case HValue::kSub:
902  case HValue::kToFastProperties:
903  case HValue::kTransitionElementsKind:
904  case HValue::kTrapAllocationMemento:
905  case HValue::kTypeof:
906  case HValue::kUnaryMathOperation:
907  case HValue::kWrapReceiver:
908  return true;
909  }
910  UNREACHABLE();
911  return true;
912 }
virtual Opcode opcode() const =0
#define UNREACHABLE()
Definition: logging.h:30

References v8::internal::HValue::kPhi, v8::internal::HValue::opcode(), and UNREACHABLE.

Referenced by v8::internal::HStoreEliminationPhase::ProcessInstr().

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

◆ CanTruncateToInt32()

bool v8::internal::HInstruction::CanTruncateToInt32 ( ) const
inline

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

References v8::internal::HValue::CheckFlag(), and v8::internal::HValue::kTruncatingToInt32.

+ Here is the call graph for this function:

◆ CanTruncateToSmi()

bool v8::internal::HInstruction::CanTruncateToSmi ( ) const
inline

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

References v8::internal::HValue::CheckFlag(), and v8::internal::HValue::kTruncatingToSmi.

+ Here is the call graph for this function:

◆ CompileToLithium()

virtual LInstruction* v8::internal::HInstruction::CompileToLithium ( LChunkBuilder *  builder)
pure virtual

◆ DeleteFromGraph()

virtual void v8::internal::HInstruction::DeleteFromGraph ( )
inlineprotectedvirtual

Implements v8::internal::HValue.

Reimplemented in v8::internal::FINAL< kOperandKind, kNumCachedOperands >.

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

References Unlink().

+ Here is the call graph for this function:

◆ Dominates()

bool v8::internal::HInstruction::Dominates ( HInstruction other)

Definition at line 721 of file hydrogen-instructions.cc.

721  {
722  if (block() != other->block()) {
723  return block()->Dominates(other->block());
724  }
725  // Both instructions are in the same basic block. This instruction
726  // should precede the other one in order to dominate it.
727  for (HInstruction* instr = next(); instr != NULL; instr = instr->next()) {
728  if (instr == other) {
729  return true;
730  }
731  }
732  return false;
733 }
HInstruction(HType type=HType::Tagged())
HBasicBlock * block() const

References v8::internal::HValue::block(), next(), and NULL.

+ Here is the call graph for this function:

◆ has_position()

bool v8::internal::HInstruction::has_position ( ) const
inline

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

1174  {
1175  return !position().IsUnknown();
1176  }
virtual HSourcePosition position() const OVERRIDE

References v8::internal::HSourcePosition::IsUnknown(), and position().

Referenced by InsertAfter(), InsertBefore(), and set_position().

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

◆ HasStackCheck()

virtual bool v8::internal::HInstruction::HasStackCheck ( )
inlinevirtual

◆ InitializeAsFirst()

void v8::internal::HInstruction::InitializeAsFirst ( HBasicBlock block)
inlineprivate

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

1221  {
1222  DCHECK(!IsLinked());
1223  SetBlock(block);
1224  }
void SetBlock(HBasicBlock *block)
#define DCHECK(condition)
Definition: logging.h:205

References v8::internal::HValue::block(), DCHECK, IsLinked(), and v8::internal::HValue::SetBlock().

+ Here is the call graph for this function:

◆ InsertAfter()

void v8::internal::HInstruction::InsertAfter ( HInstruction previous)

Definition at line 684 of file hydrogen-instructions.cc.

684  {
685  DCHECK(!IsLinked());
686  DCHECK(!previous->IsControlInstruction());
687  DCHECK(!IsControlInstruction() || previous->next_ == NULL);
689  // Never insert anything except constants into the start block after finishing
690  // it.
691  if (block->IsStartBlock() && block->IsFinished() && !IsConstant()) {
692  DCHECK(block->end()->SecondSuccessor() == NULL);
693  InsertAfter(block->end()->FirstSuccessor()->first());
694  return;
695  }
696 
697  // If we're inserting after an instruction with side-effects that is
698  // followed by a simulate instruction, we need to insert after the
699  // simulate instruction instead.
702  DCHECK(next->IsSimulate());
703  previous = next;
704  next = previous->next_;
705  }
706 
708  next_ = next;
709  SetBlock(block);
710  previous->next_ = this;
711  if (next != NULL) next->previous_ = this;
712  if (block->last() == previous) {
713  block->set_last(this);
714  }
715  if (!has_position() && previous->has_position()) {
717  }
718 }
void set_position(HSourcePosition position)
HInstruction * previous() const
void InsertAfter(HInstruction *previous)
bool HasObservableSideEffects() const

References v8::internal::HValue::block(), DCHECK, has_position(), v8::internal::HValue::HasObservableSideEffects(), HBasicBlock, IsLinked(), next(), next_, NULL, position(), previous(), previous_, set_position(), and v8::internal::HValue::SetBlock().

Referenced by v8::internal::HOptimizedGraphBuilder::EnsureArgumentsArePushedForAccess(), and v8::internal::HEscapeAnalysisPhase::NewLoadReplacement().

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

◆ InsertBefore()

void v8::internal::HInstruction::InsertBefore ( HInstruction next)

Definition at line 666 of file hydrogen-instructions.cc.

666  {
667  DCHECK(!IsLinked());
668  DCHECK(!next->IsBlockEntry());
669  DCHECK(!IsControlInstruction());
670  DCHECK(!next->block()->IsStartBlock());
671  DCHECK(next->previous_ != NULL);
672  HInstruction* prev = next->previous();
673  prev->next_ = this;
674  next->previous_ = this;
675  next_ = next;
676  previous_ = prev;
677  SetBlock(next->block());
678  if (!has_position() && next->has_position()) {
680  }
681 }

References v8::internal::HValue::block(), DCHECK, has_position(), IsLinked(), next(), next_, NULL, position(), previous(), previous_, set_position(), and v8::internal::HValue::SetBlock().

Referenced by v8::internal::HRepresentationChangesPhase::InsertRepresentationChangeForUse(), and v8::internal::BoundsCheckBbData::MoveIndexIfNecessary().

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

◆ IsLinked()

bool v8::internal::HInstruction::IsLinked ( ) const
inline

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

1153 { return block() != NULL; }

References v8::internal::HValue::block(), and NULL.

Referenced by v8::internal::HOptimizedGraphBuilder::BuildLoad(), v8::internal::HOptimizedGraphBuilder::HandleKeyedElementAccess(), v8::internal::HOptimizedGraphBuilder::HandlePolymorphicNamedFieldAccess(), InitializeAsFirst(), InsertAfter(), InsertBefore(), v8::internal::HUint32AnalysisPhase::Run(), and Unlink().

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

◆ next()

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

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

1147 { return next_; }

References next_.

Referenced by v8::internal::BoundsCheckBbData::CoverCheck(), Dominates(), InsertAfter(), InsertBefore(), v8::internal::HComputeChangeUndefinedToNaN::Run(), v8::internal::HRepresentationChangesPhase::Run(), and v8::internal::HEnvironmentLivenessAnalysisPhase::UpdateLivenessAtInstruction().

+ Here is the caller graph for this function:

◆ operand_position()

virtual HSourcePosition v8::internal::HInstruction::operand_position ( int  index) const
inlinevirtual

Reimplemented from v8::internal::HValue.

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

1183  {
1184  const HSourcePosition pos = position_.operand_position(index);
1185  return pos.IsUnknown() ? position() : pos;
1186  }
HSourcePosition operand_position(int idx) const

References v8::internal::HSourcePosition::IsUnknown(), v8::internal::HPositionInfo::operand_position(), position(), and position_.

+ Here is the call graph for this function:

◆ position()

virtual HSourcePosition v8::internal::HInstruction::position ( ) const
inlinevirtual

Reimplemented from v8::internal::HValue.

Reimplemented in v8::internal::FINAL< kOperandKind, kNumCachedOperands >.

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

1171  {
1172  return HSourcePosition(position_.position());
1173  }
HSourcePosition position() const

References v8::internal::HPositionInfo::position(), and position_.

Referenced by has_position(), InsertAfter(), InsertBefore(), operand_position(), and set_position().

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

◆ Prepend()

template<class T >
T* v8::internal::HInstruction::Prepend ( T instr)
inline

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

1158  {
1159  instr->InsertBefore(this);
1160  return instr;
1161  }

Referenced by v8::internal::FINAL< kOperandKind, kNumCachedOperands >::CreateAndInsertBefore().

+ Here is the caller graph for this function:

◆ previous()

HInstruction* v8::internal::HInstruction::previous ( ) const
inline

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

1148 { return previous_; }

References previous_.

Referenced by InsertAfter(), InsertBefore(), and v8::internal::State::Process().

+ Here is the caller graph for this function:

◆ PrintDataTo()

OStream & v8::internal::HInstruction::PrintDataTo ( OStream os) const
virtual

Reimplemented in v8::internal::FINAL< kOperandKind, kNumCachedOperands >, v8::internal::FINAL< kOperandKind, kNumCachedOperands >, v8::internal::FINAL< kOperandKind, kNumCachedOperands >, v8::internal::FINAL< kOperandKind, kNumCachedOperands >, v8::internal::FINAL< kOperandKind, kNumCachedOperands >, v8::internal::FINAL< kOperandKind, kNumCachedOperands >, v8::internal::FINAL< kOperandKind, kNumCachedOperands >, v8::internal::FINAL< kOperandKind, kNumCachedOperands >, v8::internal::FINAL< kOperandKind, kNumCachedOperands >, v8::internal::FINAL< kOperandKind, kNumCachedOperands >, v8::internal::FINAL< kOperandKind, kNumCachedOperands >, v8::internal::FINAL< kOperandKind, kNumCachedOperands >, v8::internal::FINAL< kOperandKind, kNumCachedOperands >, v8::internal::FINAL< kOperandKind, kNumCachedOperands >, v8::internal::FINAL< kOperandKind, kNumCachedOperands >, v8::internal::FINAL< kOperandKind, kNumCachedOperands >, v8::internal::FINAL< kOperandKind, kNumCachedOperands >, v8::internal::FINAL< kOperandKind, kNumCachedOperands >, v8::internal::FINAL< kOperandKind, kNumCachedOperands >, v8::internal::FINAL< kOperandKind, kNumCachedOperands >, v8::internal::FINAL< kOperandKind, kNumCachedOperands >, v8::internal::FINAL< kOperandKind, kNumCachedOperands >, v8::internal::FINAL< kOperandKind, kNumCachedOperands >, v8::internal::FINAL< kOperandKind, kNumCachedOperands >, v8::internal::FINAL< kOperandKind, kNumCachedOperands >, v8::internal::FINAL< kOperandKind, kNumCachedOperands >, v8::internal::FINAL< kOperandKind, kNumCachedOperands >, v8::internal::FINAL< kOperandKind, kNumCachedOperands >, v8::internal::FINAL< kOperandKind, kNumCachedOperands >, v8::internal::FINAL< kOperandKind, kNumCachedOperands >, v8::internal::HStringCompareAndBranch, v8::internal::HCompareObjectEqAndBranch, v8::internal::HCompareNumericAndBranch, v8::internal::FINAL< kOperandKind, kNumCachedOperands >, v8::internal::FINAL< kOperandKind, kNumCachedOperands >, v8::internal::FINAL< kOperandKind, kNumCachedOperands >, v8::internal::FINAL< kOperandKind, kNumCachedOperands >, v8::internal::FINAL< kOperandKind, kNumCachedOperands >, v8::internal::HBinaryOperation, v8::internal::FINAL< kOperandKind, kNumCachedOperands >, v8::internal::FINAL< kOperandKind, kNumCachedOperands >, v8::internal::FINAL< kOperandKind, kNumCachedOperands >, v8::internal::FINAL< kOperandKind, kNumCachedOperands >, v8::internal::FINAL< kOperandKind, kNumCachedOperands >, v8::internal::FINAL< kOperandKind, kNumCachedOperands >, v8::internal::FINAL< kOperandKind, kNumCachedOperands >, v8::internal::FINAL< kOperandKind, kNumCachedOperands >, v8::internal::FINAL< kOperandKind, kNumCachedOperands >, v8::internal::FINAL< kOperandKind, kNumCachedOperands >, v8::internal::HBinaryCall, v8::internal::HUnaryCall, v8::internal::FINAL< kOperandKind, kNumCachedOperands >, v8::internal::FINAL< kOperandKind, kNumCachedOperands >, v8::internal::FINAL< kOperandKind, kNumCachedOperands >, v8::internal::FINAL< kOperandKind, kNumCachedOperands >, v8::internal::FINAL< kOperandKind, kNumCachedOperands >, v8::internal::HUnaryOperation, v8::internal::FINAL< kOperandKind, kNumCachedOperands >, v8::internal::FINAL< kOperandKind, kNumCachedOperands >, v8::internal::FINAL< kOperandKind, kNumCachedOperands >, v8::internal::HUnaryControlInstruction, v8::internal::FINAL< kOperandKind, kNumCachedOperands >, v8::internal::FINAL< kOperandKind, kNumCachedOperands >, v8::internal::HControlInstruction, v8::internal::HAllocateBlockContext, and v8::internal::FINAL< kOperandKind, kNumCachedOperands >.

Definition at line 641 of file hydrogen-instructions.cc.

641  { // NOLINT
642  for (int i = 0; i < OperandCount(); ++i) {
643  if (i > 0) os << " ";
644  os << NameOf(OperandAt(i));
645  }
646  return os;
647 }
virtual int OperandCount() const =0
virtual HValue * OperandAt(int index) const =0

References v8::internal::HValue::OperandAt(), and v8::internal::HValue::OperandCount().

Referenced by PrintTo().

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

◆ PrintTo()

OStream & v8::internal::HInstruction::PrintTo ( OStream os) const
virtual

Implements v8::internal::HValue.

Reimplemented in v8::internal::FINAL< kOperandKind, kNumCachedOperands >.

Definition at line 632 of file hydrogen-instructions.cc.

632  { // NOLINT
633  os << Mnemonic() << " ";
634  PrintDataTo(os) << ChangesOf(this) << TypeOf(this);
635  if (CheckFlag(HValue::kHasNoObservableSideEffects)) os << " [noOSE]";
636  if (CheckFlag(HValue::kIsDead)) os << " [dead]";
637  return os;
638 }
virtual OStream & PrintDataTo(OStream &os) const
const char * Mnemonic() const
MachineType TypeOf(MachineType machine_type)
Definition: machine-type.h:70

References v8::internal::HValue::CheckFlag(), v8::internal::HValue::kHasNoObservableSideEffects, v8::internal::HValue::kIsDead, v8::internal::HValue::Mnemonic(), PrintDataTo(), and v8::internal::compiler::TypeOf().

+ Here is the call graph for this function:

◆ set_operand_position()

void v8::internal::HInstruction::set_operand_position ( Zone zone,
int  index,
HSourcePosition  pos 
)
inline

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

1187  {
1188  DCHECK(0 <= index && index < OperandCount());
1190  position_.set_operand_position(index, pos);
1191  }
void set_operand_position(int idx, HSourcePosition pos)
void ensure_storage_for_operand_positions(Zone *zone, int operand_count)

References DCHECK, v8::internal::HPositionInfo::ensure_storage_for_operand_positions(), v8::internal::HValue::OperandCount(), position_, and v8::internal::HPositionInfo::set_operand_position().

Referenced by v8::internal::HOptimizedGraphBuilder::BuildCompareInstruction(), v8::internal::HBinaryOperation::SetOperandPositions(), and v8::internal::HCompareNumericAndBranch::SetOperandPositions().

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

◆ set_position()

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

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

1177  {
1178  DCHECK(!has_position());
1181  }
void set_position(HSourcePosition pos)

References DCHECK, has_position(), v8::internal::HSourcePosition::IsUnknown(), position(), position_, and v8::internal::HPositionInfo::set_position().

Referenced by InsertAfter(), InsertBefore(), and v8::internal::HRepresentationChangesPhase::InsertRepresentationChangeForUse().

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

◆ Unlink()

void v8::internal::HInstruction::Unlink ( )

Definition at line 650 of file hydrogen-instructions.cc.

650  {
651  DCHECK(IsLinked());
652  DCHECK(!IsControlInstruction()); // Must never move control instructions.
653  DCHECK(!IsBlockEntry()); // Doesn't make sense to delete these.
654  DCHECK(previous_ != NULL);
655  previous_->next_ = next_;
656  if (next_ == NULL) {
657  DCHECK(block()->last() == this);
658  block()->set_last(previous_);
659  } else {
661  }
662  clear_block();
663 }

References v8::internal::HValue::block(), v8::internal::HValue::clear_block(), DCHECK, IsLinked(), next_, NULL, and previous_.

Referenced by v8::internal::BoundsCheckBbData::CoverCheck(), DeleteFromGraph(), and v8::internal::BoundsCheckBbData::MoveIndexIfNecessary().

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

Friends And Related Function Documentation

◆ HBasicBlock

friend class HBasicBlock
friend

Member Data Documentation

◆ next_

HInstruction* v8::internal::HInstruction::next_
private

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

Referenced by InsertAfter(), InsertBefore(), next(), and Unlink().

◆ position_

HPositionInfo v8::internal::HInstruction::position_
private

◆ previous_

HInstruction* v8::internal::HInstruction::previous_
private

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

Referenced by InsertAfter(), InsertBefore(), previous(), and Unlink().


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