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

Unified Diff: runtime/vm/object.cc

Issue 8394061: Store IC data instead of array of classes in AST node, so that we can easier access targets and f... (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 9 years, 2 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/object.h ('k') | runtime/vm/opt_code_generator_ia32.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.cc
===================================================================
--- runtime/vm/object.cc (revision 755)
+++ runtime/vm/object.cc (working copy)
@@ -4427,30 +4427,18 @@
}
-void Code::ExtractTypesAtIcCalls(
+void Code::ExtractIcDataArraysAtCalls(
GrowableArray<intptr_t>* node_ids,
- GrowableArray<ZoneGrowableArray<const Class*>*>* type_arrays) const {
+ GrowableArray<const Array*>* arrays) const {
ASSERT(node_ids != NULL);
- ASSERT(type_arrays != NULL);
+ ASSERT(arrays != NULL);
const PcDescriptors& descriptors =
PcDescriptors::Handle(this->pc_descriptors());
for (intptr_t i = 0; i < descriptors.Length(); i++) {
if (descriptors.DescriptorKind(i) == PcDescriptors::kIcCall) {
- ICData ic_data(Array::Handle(
- CodePatcher::GetInstanceCallIcDataAt(descriptors.PC(i))));
- ASSERT(ic_data.NumberOfArgumentsChecked() == 1);
- int len = ic_data.NumberOfChecks();
- ZoneGrowableArray<const Class*>* types =
- new ZoneGrowableArray<const Class*>();
- Function& target = Function::Handle();
- for (intptr_t k = 0; k < len; k++) {
- GrowableArray<const Class*> classes;
- ic_data.GetCheckAt(k, &classes, &target);
- ASSERT(classes.length() == 1);
- types->Add(classes[0]);
- }
node_ids->Add(descriptors.NodeId(i));
- type_arrays->Add(types);
+ arrays->Add(&Array::ZoneHandle(
+ CodePatcher::GetInstanceCallIcDataAt(descriptors.PC(i))));
}
}
}
« no previous file with comments | « runtime/vm/object.h ('k') | runtime/vm/opt_code_generator_ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698