155 {
156 call_site_count_ = 0;
157 instruction_count_ = 0;
158 for (BlockIterator block_it = graph.postorder_iterator(); !block_it.Done();
159 block_it.Advance()) {
160
161
162 const intptr_t block_id = block_it.Current()->block_id();
163 if (graph.prologue_info().Contains(block_id)) {
164 continue;
165 }
166
167 for (ForwardInstructionIterator it(block_it.Current()); !it.Done();
168 it.Advance()) {
169 Instruction* current = it.Current();
170
171 if (current->IsRedefinition()) {
172 continue;
173 }
174
175
176
177 if (current->IsUnboxedConstant()) {
178 continue;
179 }
180 ++instruction_count_;
181
182
183
184
185
186 if (current->IsAllocateObject()) {
187 instruction_count_ += current->InputCount();
188 } else if (current->ArgumentCount() > 0) {
189 ASSERT(!current->HasMoveArguments());
190 instruction_count_ += current->ArgumentCount();
191 }
192 if (current->IsInstanceCall() || current->IsStaticCall() ||
193 current->IsClosureCall()) {
194 ++call_site_count_;
195 continue;
196 }
197 if (current->IsPolymorphicInstanceCall()) {
198 PolymorphicInstanceCallInstr*
call =
199 current->AsPolymorphicInstanceCall();
200
201
202
203
204
205 if (!
call->IsSureToCallSingleRecognizedTarget() &&
206 (
call->token_kind() != Token::kEQ)) {
207 ++call_site_count_;
208 }
209 }
210 }
211 }
212 }