v8  3.14.5(node0.10.28)
V8 is Google's open source JavaScript engine
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
HConstant Class Reference

#include <hydrogen-instructions.h>

Inheritance diagram for HConstant:
Collaboration diagram for HConstant:

Public Member Functions

 HConstant (Handle< Object > handle, Representation r)
 
 HConstant (int32_t value, Representation r)
 
 HConstant (double value, Representation r)
 
Handle< Objecthandle ()
 
bool InOldSpace () const
 
bool ImmortalImmovable () const
 
virtual Representation RequiredInputRepresentation (int index)
 
virtual bool IsConvertibleToInteger () const
 
virtual bool EmitAtUses ()
 
virtual HValueCanonicalize ()
 
virtual void PrintDataTo (StringStream *stream)
 
virtual HType CalculateInferredType ()
 
bool IsInteger ()
 
HConstantCopyToRepresentation (Representation r, Zone *zone) const
 
HConstantCopyToTruncatedInt32 (Zone *zone) const
 
bool HasInteger32Value () const
 
int32_t Integer32Value () const
 
bool HasDoubleValue () const
 
double DoubleValue () const
 
bool HasNumberValue () const
 
int32_t NumberValueAsInteger32 () const
 
bool ToBoolean ()
 
bool IsUint32 ()
 
virtual intptr_t Hashcode ()
 
- Public Member Functions inherited from HTemplateInstruction< 0 >
int OperandCount ()
 
HValueOperandAt (int i) const
 
- Public Member Functions inherited from HInstruction
HInstructionnext () const
 
HInstructionprevious () const
 
virtual void PrintTo (StringStream *stream)
 
bool IsLinked () const
 
void Unlink ()
 
void InsertBefore (HInstruction *next)
 
void InsertAfter (HInstruction *previous)
 
int position () const
 
bool has_position () const
 
void set_position (int position)
 
bool CanTruncateToInt32 () const
 
virtual LInstructionCompileToLithium (LChunkBuilder *builder)=0
 
virtual bool IsCall ()
 
- Public Member Functions inherited from HValue
 STATIC_ASSERT (kLastFlag< kBitsPerInt)
 
virtual Opcode opcode () const =0
 
bool IsPhi () const
 
 HValue ()
 
virtual ~HValue ()
 
HBasicBlockblock () const
 
void SetBlock (HBasicBlock *block)
 
int LoopWeight () const
 
int id () const
 
void set_id (int id)
 
HUseIterator uses () const
 
Representation representation () const
 
void ChangeRepresentation (Representation r)
 
void AssumeRepresentation (Representation r)
 
HType type () const
 
void set_type (HType new_type)
 
virtual HValueEnsureAndPropagateNotMinusZero (BitVector *visited)
 
bool IsDefinedAfter (HBasicBlock *other) const
 
void SetOperandAt (int index, HValue *value)
 
void DeleteAndReplaceWith (HValue *other)
 
void ReplaceAllUsesWith (HValue *other)
 
bool HasNoUses () 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
 
bool CheckUsesForFlag (Flag f)
 
GVNFlagSet gvn_flags () const
 
void SetGVNFlag (GVNFlag f)
 
void ClearGVNFlag (GVNFlag f)
 
bool CheckGVNFlag (GVNFlag f) const
 
void SetAllSideEffects ()
 
void ClearAllSideEffects ()
 
bool HasSideEffects () const
 
bool HasObservableSideEffects () const
 
GVNFlagSet DependsOnFlags () const
 
GVNFlagSet SideEffectFlags () const
 
GVNFlagSet ChangesFlags () const
 
GVNFlagSet ObservableChangesFlags () const
 
Rangerange () const
 
bool HasRange () const
 
void AddNewRange (Range *r, Zone *zone)
 
void RemoveLastAddedRange ()
 
void ComputeInitialRange (Zone *zone)
 
virtual Representation InferredRepresentation ()
 
virtual Representation ObservedInputRepresentation (int index)
 
bool Equals (HValue *other)
 
void PrintNameTo (StringStream *stream)
 
void PrintTypeTo (StringStream *stream)
 
void PrintRangeTo (StringStream *stream)
 
void PrintChangesTo (StringStream *stream)
 
const char * Mnemonic () const
 
bool UpdateInferredType ()
 
virtual void SetSideEffectDominator (GVNFlag side_effect, HValue *dominator)
 
bool IsDead () const
 
- Public Member Functions inherited from 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

virtual RangeInferRange (Zone *zone)
 
virtual bool DataEquals (HValue *other)
 
- Protected Member Functions inherited from HTemplateInstruction< 0 >
void InternalSetOperandAt (int i, HValue *value)
 
- Protected Member Functions inherited from HInstruction
 HInstruction ()
 
virtual void DeleteFromGraph ()
 
- Protected Member Functions inherited from HValue
virtual void RepresentationChanged (Representation to)
 
void clear_block ()
 
void set_representation (Representation r)
 
HUseListNodeRemoveUse (HValue *value, int index)
 
void RegisterUse (int index, HValue *new_value)
 

Additional Inherited Members

- Public Types inherited from HValue
enum  Flag {
  kFlexibleRepresentation, kUseGVN, kTrackSideEffectDominators, kCanOverflow,
  kBailoutOnMinusZero, kCanBeDivByZero, kDeoptimizeOnUndefined, kIsArguments,
  kTruncatingToInt32, kIsDead, kUint32, kLastFlag = kUint32
}
 
enum  Opcode { kPhi }
 
- Static Public Member Functions inherited from HValue
static GVNFlag ChangesFlagFromInt (int x)
 
static GVNFlag DependsOnFlagFromInt (int x)
 
static GVNFlagSet ConvertChangesToDependsFlags (GVNFlagSet flags)
 
static HValuecast (HValue *value)
 
- Static Public Attributes inherited from HValue
static const int kNoNumber = -1
 
static const int kChangesToDependsFlagsLeftShift = 1
 
- Static Protected Member Functions inherited from HValue
static GVNFlagSet AllDependsOnFlagSet ()
 
static GVNFlagSet AllChangesFlagSet ()
 
static GVNFlagSet AllSideEffectsFlagSet ()
 
static GVNFlagSet AllObservableSideEffectsFlagSet ()
 
- Protected Attributes inherited from HValue
HBasicBlockblock_
 
int id_
 
Representation representation_
 
HType type_
 
HUseListNodeuse_list_
 
Rangerange_
 
int flags_
 
GVNFlagSet gvn_flags_
 

Detailed Description

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

Constructor & Destructor Documentation

HConstant ( int32_t  value,
Representation  r 
)
HConstant ( double  value,
Representation  r 
)

Member Function Documentation

HType CalculateInferredType ( )
virtual

Reimplemented from HValue.

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

References HType::HeapNumber(), Smi::IsValid(), HType::Smi(), and HType::TypeFromValue().

HValue * Canonicalize ( )
virtual

Reimplemented from HValue.

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

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

virtual bool DataEquals ( HValue other)
inlineprotectedvirtual

Reimplemented from HValue.

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

References ASSERT, HValue::cast(), and Handle< T >::is_null().

double DoubleValue ( ) const
inline

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

References ASSERT.

Referenced by HDiv::NewHDiv(), and HConstant::ToBoolean().

virtual bool EmitAtUses ( )
inlinevirtual

Reimplemented from HValue.

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

References Representation::IsDouble(), and HValue::representation().

Handle<Object> handle ( )
inline

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

References ASSERT, FACTORY, and v8::internal::TENURED.

Referenced by HConstant::PrintDataTo(), and HConstant::ToBoolean().

bool HasDoubleValue ( ) const
inline

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

Referenced by HConstant::ToBoolean().

virtual intptr_t Hashcode ( )
inlinevirtual

Reimplemented from HValue.

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

References ASSERT, and ASSERT_ALLOCATION_DISABLED.

bool HasInteger32Value ( ) const
inline
bool HasNumberValue ( ) const
inline
bool ImmortalImmovable ( ) const
inline

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

References ASSERT, HEAP, and isnan().

Range * InferRange ( Zone zone)
protectedvirtual

Reimplemented from HValue.

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

References HValue::InferRange(), and Range::set_can_be_minus_zero().

bool InOldSpace ( ) const
inline

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

References HEAP.

int32_t Integer32Value ( ) const
inline
virtual bool IsConvertibleToInteger ( ) const
inlinevirtual

Reimplemented from HValue.

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

Referenced by HPhi::InferredRepresentation().

bool IsInteger ( )
inline

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

bool IsUint32 ( )
inline

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

int32_t NumberValueAsInteger32 ( ) const
inline

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

References ASSERT.

Referenced by HBitwise::NewHBitwise(), and v8::internal::NumberValueAsInteger32().

void PrintDataTo ( StringStream stream)
virtual

Reimplemented from HInstruction.

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

References StringStream::Add(), and HConstant::handle().

virtual Representation RequiredInputRepresentation ( int  index)
inlinevirtual

Implements HValue.

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

References Representation::None().


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