Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(488)

Unified Diff: runtime/vm/coverage.cc

Issue 333403002: Cleanup: use a ZoneGrowableArray instead of Array for ICData map. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/compiler.cc ('k') | runtime/vm/flow_graph_builder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/coverage.cc
===================================================================
--- runtime/vm/coverage.cc (revision 37378)
+++ runtime/vm/coverage.cc (working copy)
@@ -70,11 +70,12 @@
ASSERT(function.HasCode());
// Print the hit counts for all IC datas.
+ ZoneGrowableArray<const ICData*>* ic_data_array =
+ new(isolate) ZoneGrowableArray<const ICData*>();
+ function.RestoreICDataMap(ic_data_array);
const Code& code = Code::Handle(function.unoptimized_code());
- const Array& ic_array = Array::Handle(code.ExtractTypeFeedbackArray());
const PcDescriptors& descriptors = PcDescriptors::Handle(
code.pc_descriptors());
- ICData& ic_data = ICData::Handle();
for (int j = 0; j < descriptors.Length(); j++) {
HANDLESCOPE(isolate);
@@ -83,8 +84,8 @@
if ((kind == PcDescriptors::kIcCall) ||
(kind == PcDescriptors::kUnoptStaticCall)) {
intptr_t deopt_id = descriptors.DeoptId(j);
- ic_data ^= ic_array.At(deopt_id);
- if (!ic_data.IsNull()) {
+ const ICData* ic_data= (*ic_data_array)[deopt_id];
+ if (!ic_data->IsNull()) {
intptr_t token_pos = descriptors.TokenPos(j);
intptr_t line = pos_to_line[token_pos];
#if defined(DEBUG)
@@ -94,7 +95,7 @@
ASSERT(test_line == line);
#endif
hits_arr.AddValue(line);
- hits_arr.AddValue(ic_data.AggregateCount());
+ hits_arr.AddValue(ic_data->AggregateCount());
}
}
}
« no previous file with comments | « runtime/vm/compiler.cc ('k') | runtime/vm/flow_graph_builder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698