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

Unified Diff: vm/compiler.cc

Issue 9630003: Use GrowableObjectArray in ic-data. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years, 9 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 | « no previous file | vm/object.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: vm/compiler.cc
===================================================================
--- vm/compiler.cc (revision 5108)
+++ vm/compiler.cc (working copy)
@@ -63,8 +63,10 @@
GrowableArray<AstNode*> all_nodes;
sequence_node->CollectAllNodes(&all_nodes);
GrowableArray<intptr_t> node_ids;
- GrowableArray<const ICData*> ic_data_objs;
- code.ExtractIcDataArraysAtCalls(&node_ids, &ic_data_objs);
+ const GrowableObjectArray& ic_data_objs =
+ GrowableObjectArray::Handle(GrowableObjectArray::New());
+ code.ExtractIcDataArraysAtCalls(&node_ids, ic_data_objs);
+ ICData& ic_data_obj = ICData::Handle();
for (intptr_t i = 0; i < node_ids.length(); i++) {
intptr_t node_id = node_ids[i];
bool found_node = false;
@@ -73,7 +75,8 @@
found_node = true;
// Make sure we assign ic data array only once.
ASSERT(all_nodes[n]->ICDataAtId(node_id).IsNull());
- all_nodes[n]->SetIcDataAtId(node_id, *ic_data_objs[i]);
+ ic_data_obj ^= ic_data_objs.At(i);
+ all_nodes[n]->SetIcDataAtId(node_id, ic_data_obj);
}
}
ASSERT(found_node);
« no previous file with comments | « no previous file | vm/object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698