Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
dart::DefinitionWorklist Class Reference

#include <flow_graph.h>

Inheritance diagram for dart::DefinitionWorklist:
dart::ValueObject

Public Member Functions

 DefinitionWorklist (FlowGraph *flow_graph, intptr_t initial_capacity)
 
void Add (Definition *defn)
 
bool Contains (Definition *defn) const
 
bool IsEmpty () const
 
DefinitionRemoveLast ()
 
const GrowableArray< Definition * > & definitions () const
 
BitVectorcontains_vector () const
 
void Clear ()
 
- Public Member Functions inherited from dart::ValueObject
 ValueObject ()
 
 ~ValueObject ()
 

Detailed Description

Definition at line 822 of file flow_graph.h.

Constructor & Destructor Documentation

◆ DefinitionWorklist()

dart::DefinitionWorklist::DefinitionWorklist ( FlowGraph flow_graph,
intptr_t  initial_capacity 
)
inline

Definition at line 824 of file flow_graph.h.

825 : defs_(initial_capacity),
826 contains_vector_(new BitVector(flow_graph->zone(),
827 flow_graph->current_ssa_temp_index())) {}

Member Function Documentation

◆ Add()

void dart::DefinitionWorklist::Add ( Definition defn)
inline

Definition at line 829 of file flow_graph.h.

829 {
830 if (!Contains(defn)) {
831 defs_.Add(defn);
832 contains_vector_->Add(defn->ssa_temp_index());
833 }
834 }
void Add(intptr_t i)
Definition: bit_vector.h:63
bool Contains(Definition *defn) const
Definition: flow_graph.h:836

◆ Clear()

void dart::DefinitionWorklist::Clear ( )
inline

Definition at line 852 of file flow_graph.h.

852 {
853 defs_.TruncateTo(0);
854 contains_vector_->Clear();
855 }

◆ Contains()

bool dart::DefinitionWorklist::Contains ( Definition defn) const
inline

Definition at line 836 of file flow_graph.h.

836 {
837 return (defn->ssa_temp_index() >= 0) &&
838 contains_vector_->Contains(defn->ssa_temp_index());
839 }
bool Contains(intptr_t i) const
Definition: bit_vector.h:91

◆ contains_vector()

BitVector * dart::DefinitionWorklist::contains_vector ( ) const
inline

Definition at line 850 of file flow_graph.h.

850{ return contains_vector_; }

◆ definitions()

const GrowableArray< Definition * > & dart::DefinitionWorklist::definitions ( ) const
inline

Definition at line 849 of file flow_graph.h.

849{ return defs_; }

◆ IsEmpty()

bool dart::DefinitionWorklist::IsEmpty ( ) const
inline

Definition at line 841 of file flow_graph.h.

841{ return defs_.is_empty(); }

◆ RemoveLast()

Definition * dart::DefinitionWorklist::RemoveLast ( )
inline

Definition at line 843 of file flow_graph.h.

843 {
844 Definition* defn = defs_.RemoveLast();
845 contains_vector_->Remove(defn->ssa_temp_index());
846 return defn;
847 }
void Remove(intptr_t i)
Definition: bit_vector.h:68

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