V8 Project
v8::internal::HCheckMapsEffects Class Reference
+ Inheritance diagram for v8::internal::HCheckMapsEffects:
+ Collaboration diagram for v8::internal::HCheckMapsEffects:

Public Member Functions

 HCheckMapsEffects (Zone *zone)
 
bool Disabled () const
 
void Process (HInstruction *instr, Zone *zone)
 
void Apply (HCheckTable *table)
 
void Union (HCheckMapsEffects *that, Zone *zone)
 
- 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 Attributes

ZoneList< HValue * > objects_
 
GVNFlagSet flags_
 

Detailed Description

Definition at line 802 of file hydrogen-check-elimination.cc.

Constructor & Destructor Documentation

◆ HCheckMapsEffects()

v8::internal::HCheckMapsEffects::HCheckMapsEffects ( Zone zone)
inlineexplicit

Definition at line 804 of file hydrogen-check-elimination.cc.

804 : objects_(0, zone) { }

Member Function Documentation

◆ Apply()

void v8::internal::HCheckMapsEffects::Apply ( HCheckTable table)
inline

Definition at line 831 of file hydrogen-check-elimination.cc.

831  {
832  if (flags_.Contains(kOsrEntries)) {
833  // Uncontrollable map modifications; kill everything.
834  table->Kill();
835  return;
836  }
837 
838  // Kill all unstable entries.
839  if (flags_.Contains(kElementsKind) || flags_.Contains(kMaps)) {
840  table->KillUnstableEntries();
841  }
842 
843  // Kill maps for each object contained in these effects.
844  for (int i = 0; i < objects_.length(); ++i) {
845  table->Kill(objects_[i]->ActualValue());
846  }
847  }
bool Contains(E element) const
Definition: utils.h:851

References v8::internal::EnumSet< E, T >::Contains(), flags_, v8::internal::HCheckTable::Kill(), v8::internal::HCheckTable::KillUnstableEntries(), and objects_.

+ Here is the call graph for this function:

◆ Disabled()

bool v8::internal::HCheckMapsEffects::Disabled ( ) const
inline

Definition at line 807 of file hydrogen-check-elimination.cc.

807 { return false; }

◆ Process()

void v8::internal::HCheckMapsEffects::Process ( HInstruction instr,
Zone zone 
)
inline

Definition at line 810 of file hydrogen-check-elimination.cc.

810  {
811  switch (instr->opcode()) {
812  case HValue::kStoreNamedField: {
813  HStoreNamedField* store = HStoreNamedField::cast(instr);
814  if (store->access().IsMap() || store->has_transition()) {
815  objects_.Add(store->object(), zone);
816  }
817  break;
818  }
819  case HValue::kTransitionElementsKind: {
820  objects_.Add(HTransitionElementsKind::cast(instr)->object(), zone);
821  break;
822  }
823  default: {
824  flags_.Add(instr->ChangesFlags());
825  break;
826  }
827  }
828  }
void Add(E element)
Definition: utils.h:855

References v8::internal::EnumSet< E, T >::Add(), v8::internal::HValue::ChangesFlags(), flags_, objects_, and v8::internal::HValue::opcode().

+ Here is the call graph for this function:

◆ Union()

void v8::internal::HCheckMapsEffects::Union ( HCheckMapsEffects that,
Zone zone 
)
inline

Definition at line 850 of file hydrogen-check-elimination.cc.

850  {
851  flags_.Add(that->flags_);
852  for (int i = 0; i < that->objects_.length(); ++i) {
853  objects_.Add(that->objects_[i], zone);
854  }
855  }

References v8::internal::EnumSet< E, T >::Add(), flags_, and objects_.

+ Here is the call graph for this function:

Member Data Documentation

◆ flags_

GVNFlagSet v8::internal::HCheckMapsEffects::flags_
private

Definition at line 859 of file hydrogen-check-elimination.cc.

Referenced by Apply(), Process(), and Union().

◆ objects_

ZoneList<HValue*> v8::internal::HCheckMapsEffects::objects_
private

Definition at line 858 of file hydrogen-check-elimination.cc.

Referenced by Apply(), Process(), and Union().


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