Flutter Engine
The Flutter Engine
Public Types | Public Member Functions | Public Attributes | List of all members
dart::kernel::TestFragment Class Reference

#include <base_flow_graph_builder.h>

Public Types

typedef ZoneGrowableArray< TargetEntryInstr ** > SuccessorAddressArray
 

Public Member Functions

BlockEntryInstrCreateTrueSuccessor (BaseFlowGraphBuilder *builder)
 
BlockEntryInstrCreateFalseSuccessor (BaseFlowGraphBuilder *builder)
 
void IfTrueGoto (BaseFlowGraphBuilder *builder, JoinEntryInstr *join)
 
TestFragment Negate (bool negate)
 
 TestFragment ()
 
 TestFragment (Instruction *entry, SuccessorAddressArray *true_successor_addresses, SuccessorAddressArray *false_successor_addresses)
 
 TestFragment (Instruction *entry, BranchInstr *branch)
 
void ConnectBranchesTo (BaseFlowGraphBuilder *builder, const TestFragment::SuccessorAddressArray &branches, JoinEntryInstr *join)
 
BlockEntryInstrCreateSuccessorFor (BaseFlowGraphBuilder *builder, const TestFragment::SuccessorAddressArray &branches)
 

Public Attributes

Instructionentry = nullptr
 
SuccessorAddressArraytrue_successor_addresses = nullptr
 
SuccessorAddressArrayfalse_successor_addresses = nullptr
 

Detailed Description

Definition at line 67 of file base_flow_graph_builder.h.

Member Typedef Documentation

◆ SuccessorAddressArray

Definition at line 88 of file base_flow_graph_builder.h.

Constructor & Destructor Documentation

◆ TestFragment() [1/3]

dart::kernel::TestFragment::TestFragment ( )
inline

Definition at line 91 of file base_flow_graph_builder.h.

91{}

◆ TestFragment() [2/3]

dart::kernel::TestFragment::TestFragment ( Instruction entry,
SuccessorAddressArray true_successor_addresses,
SuccessorAddressArray false_successor_addresses 
)
inline

◆ TestFragment() [3/3]

dart::kernel::TestFragment::TestFragment ( Instruction entry,
BranchInstr branch 
)

Definition at line 88 of file base_flow_graph_builder.cc.

89 : entry(entry),
92 true_successor_addresses->Add(branch->true_successor_address());
93 false_successor_addresses->Add(branch->false_successor_address());
94}
void Add(const T &value)
ZoneGrowableArray< TargetEntryInstr ** > SuccessorAddressArray

Member Function Documentation

◆ ConnectBranchesTo()

void dart::kernel::TestFragment::ConnectBranchesTo ( BaseFlowGraphBuilder builder,
const TestFragment::SuccessorAddressArray branches,
JoinEntryInstr join 
)

Definition at line 96 of file base_flow_graph_builder.cc.

99 {
100 ASSERT(!branches.is_empty());
101 for (auto branch : branches) {
102 *branch = builder->BuildTargetEntry();
103 (*branch)->Goto(join);
104 }
105}
#define ASSERT(E)
static SkString join(const CommandLineFlags::StringArray &)
Definition: skpbench.cpp:741

◆ CreateFalseSuccessor()

BlockEntryInstr * dart::kernel::TestFragment::CreateFalseSuccessor ( BaseFlowGraphBuilder builder)

Definition at line 129 of file base_flow_graph_builder.cc.

130 {
133}
BlockEntryInstr * CreateSuccessorFor(BaseFlowGraphBuilder *builder, const TestFragment::SuccessorAddressArray &branches)

◆ CreateSuccessorFor()

BlockEntryInstr * dart::kernel::TestFragment::CreateSuccessorFor ( BaseFlowGraphBuilder builder,
const TestFragment::SuccessorAddressArray branches 
)

Definition at line 107 of file base_flow_graph_builder.cc.

109 {
110 ASSERT(!branches.is_empty());
111
112 if (branches.length() == 1) {
113 TargetEntryInstr* target = builder->BuildTargetEntry();
114 *(branches[0]) = target;
115 return target;
116 }
117
118 JoinEntryInstr* join = builder->BuildJoinEntry();
119 ConnectBranchesTo(builder, branches, join);
120 return join;
121}
void ConnectBranchesTo(BaseFlowGraphBuilder *builder, const TestFragment::SuccessorAddressArray &branches, JoinEntryInstr *join)
uint32_t * target

◆ CreateTrueSuccessor()

BlockEntryInstr * dart::kernel::TestFragment::CreateTrueSuccessor ( BaseFlowGraphBuilder builder)

Definition at line 123 of file base_flow_graph_builder.cc.

◆ IfTrueGoto()

void dart::kernel::TestFragment::IfTrueGoto ( BaseFlowGraphBuilder builder,
JoinEntryInstr join 
)
inline

Definition at line 72 of file base_flow_graph_builder.h.

◆ Negate()

TestFragment dart::kernel::TestFragment::Negate ( bool  negate)
inline

Definition at line 79 of file base_flow_graph_builder.h.

79 {
80 if (negate) {
83 } else {
84 return *this;
85 }
86 }

Member Data Documentation

◆ entry

Instruction* dart::kernel::TestFragment::entry = nullptr

Definition at line 112 of file base_flow_graph_builder.h.

◆ false_successor_addresses

SuccessorAddressArray* dart::kernel::TestFragment::false_successor_addresses = nullptr

Definition at line 114 of file base_flow_graph_builder.h.

◆ true_successor_addresses

SuccessorAddressArray* dart::kernel::TestFragment::true_successor_addresses = nullptr

Definition at line 113 of file base_flow_graph_builder.h.


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