V8 Project
v8::internal::HArithmeticBinaryOperation Class Reference

#include <hydrogen-instructions.h>

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

Public Member Functions

 HArithmeticBinaryOperation (HValue *context, HValue *left, HValue *right)
 
virtual void RepresentationChanged (Representation to) OVERRIDE
 
- Public Member Functions inherited from v8::internal::HBinaryOperation
 HBinaryOperation (HValue *context, HValue *left, HValue *right, HType type=HType::Tagged())
 
HValuecontext () const
 
HValueleft () const
 
HValueright () const
 
bool AreOperandsBetterSwitched ()
 
HValueBetterLeftOperand ()
 
HValueBetterRightOperand ()
 
void set_observed_input_representation (int index, Representation rep)
 
virtual void initialize_output_representation (Representation observed)
 
virtual Representation observed_input_representation (int index) OVERRIDE
 
virtual void UpdateRepresentation (Representation new_rep, HInferRepresentationPhase *h_infer, const char *reason) OVERRIDE
 
virtual void InferRepresentation (HInferRepresentationPhase *h_infer) OVERRIDE
 
virtual Representation RepresentationFromInputs () OVERRIDE
 
Representation RepresentationFromOutput ()
 
virtual void AssumeRepresentation (Representation r) OVERRIDE
 
virtual bool IsCommutative () const
 
virtual OStreamPrintDataTo (OStream &os) const OVERRIDE
 
virtual Representation RequiredInputRepresentation (int index) OVERRIDE
 
void SetOperandPositions (Zone *zone, HSourcePosition left_pos, HSourcePosition right_pos)
 
bool RightIsPowerOf2 ()
 
- Public Member Functions inherited from v8::internal::HTemplateInstruction< 3 >
virtual int OperandCount () const FINAL OVERRIDE
 
virtual HValueOperandAt (int i) const FINAL OVERRIDE
 
- Public Member Functions inherited from v8::internal::HInstruction
HInstructionnext () const
 
HInstructionprevious () const
 
virtual OStreamPrintTo (OStream &os) const OVERRIDE
 
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 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
 
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 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)
 

Private Member Functions

virtual bool IsDeletable () const OVERRIDE
 

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
 
- Protected Member Functions inherited from v8::internal::HTemplateInstruction< 3 >
 HTemplateInstruction (HType type=HType::Tagged())
 
virtual void InternalSetOperandAt (int i, HValue *value) FINAL OVERRIDE
 
- Protected Member Functions inherited from v8::internal::HInstruction
 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 RepresentationFromUses ()
 
Representation RepresentationFromUseRequirements ()
 
bool HasNonSmiUse ()
 
void AddDependantsToWorklist (HInferRepresentationPhase *h_infer)
 
virtual Range * InferRange (Zone *zone)
 
void clear_block ()
 
void set_representation (Representation r)
 
HUseListNodeRemoveUse (HValue *value, int index)
 
void RegisterUse (int index, HValue *new_value)
 
- 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 4219 of file hydrogen-instructions.h.

Constructor & Destructor Documentation

◆ HArithmeticBinaryOperation()

v8::internal::HArithmeticBinaryOperation::HArithmeticBinaryOperation ( HValue context,
HValue left,
HValue right 
)
inline

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

4222  : HBinaryOperation(context, left, right, HType::TaggedNumber()) {
4226  }
HBinaryOperation(HValue *context, HValue *left, HValue *right, HType type=HType::Tagged())

References v8::internal::HValue::kAllowUndefinedAsNaN, v8::internal::HValue::kFlexibleRepresentation, v8::internal::HValue::SetAllSideEffects(), and v8::internal::HValue::SetFlag().

+ Here is the call graph for this function:

Member Function Documentation

◆ IsDeletable()

virtual bool v8::internal::HArithmeticBinaryOperation::IsDeletable ( ) const
inlineprivatevirtual

Reimplemented from v8::internal::HValue.

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 >, and v8::internal::FINAL< kOperandKind, kNumCachedOperands >.

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

4243 { return true; }

◆ RepresentationChanged()

virtual void v8::internal::HArithmeticBinaryOperation::RepresentationChanged ( Representation  to)
inlinevirtual

Reimplemented from v8::internal::HValue.

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

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

4228  {
4229  if (to.IsTagged() &&
4232  ClearFlag(kUseGVN);
4233  } else {
4235  SetFlag(kUseGVN);
4236  }
4237  if (to.IsTagged()) SetChangesFlag(kNewSpacePromotion);
4238  }
void SetChangesFlag(GVNFlag f)
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 expose gc extension under the specified name show built in functions in stack traces use random jit cookie to mask large constants minimum length for automatic enable preparsing CPU profiler sampling interval in microseconds trace out of bounds accesses to external arrays default size of stack region v8 is allowed to maximum length of function source code printed in a stack trace min size of a semi the new space consists of two semi spaces print one trace line following each garbage collection do not print trace line after scavenger collection print cumulative GC statistics in only print modified registers Trace simulator debug messages Implied by trace sim abort randomize hashes to avoid predictable hash Fixed seed to use to hash property Print the time it takes to deserialize the snapshot A filename with extra code to be included in the A file to write the raw snapshot bytes to(mksnapshot only)") DEFINE_STRING(raw_context_file

References v8::internal::HValue::ClearAllSideEffects(), v8::internal::HValue::ClearFlag(), v8::internal::HValue::kUseGVN, v8::internal::HBinaryOperation::left(), v8::internal::HBinaryOperation::right(), v8::internal::HValue::SetAllSideEffects(), v8::internal::HValue::SetChangesFlag(), v8::internal::HValue::SetFlag(), to(), and v8::internal::HValue::ToNumberCanBeObserved().

+ Here is the call graph for this function:

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