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

Unified Diff: runtime/vm/flow_graph_optimizer.cc

Issue 10910003: Only store IC data with instructions that collect type feedback. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 4 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 | runtime/vm/il_printer.cc » ('j') | runtime/vm/intermediate_language.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_optimizer.cc
===================================================================
--- runtime/vm/flow_graph_optimizer.cc (revision 11599)
+++ runtime/vm/flow_graph_optimizer.cc (working copy)
@@ -176,7 +176,7 @@
}
-static intptr_t ReceiverClassId(Computation* comp) {
+static intptr_t ReceiverClassId(InstanceCallComp* comp) {
if (!comp->HasICData()) return kIllegalCid;
const ICData& ic_data = *comp->ic_data();
@@ -197,10 +197,9 @@
InstanceCallComp* comp,
Value* value) {
// Type propagation has not run yet, we cannot eliminate the check.
- CheckClassComp* check = new CheckClassComp(value, comp);
const ICData& unary_checks =
ICData::ZoneHandle(comp->ic_data()->AsUnaryClassChecks());
- check->set_ic_data(&unary_checks);
+ CheckClassComp* check = new CheckClassComp(value, comp, unary_checks);
InsertBefore(instr, check, instr->env(), BindInstr::kUnused);
}
@@ -244,7 +243,6 @@
Value* value = comp->ArgumentAt(2)->value();
array_op = new StoreIndexedComp(array, index, value, class_id);
}
- array_op->set_ic_data(comp->ic_data());
instr->set_computation(array_op);
RemovePushArguments(comp);
return true;
@@ -361,7 +359,6 @@
new UnboxedDoubleBinaryOpComp(op_kind,
new Value(unbox_left),
new Value(unbox_right));
- double_bin_op->set_ic_data(comp->ic_data());
instr->set_computation(double_bin_op);
if (instr->is_used()) {
@@ -377,7 +374,6 @@
RemovePushArguments(comp);
} else {
BinaryDoubleOpComp* double_bin_op = new BinaryDoubleOpComp(op_kind, comp);
- double_bin_op->set_ic_data(comp->ic_data());
instr->set_computation(double_bin_op);
}
} else if (operands_type == kMintCid) {
@@ -387,7 +383,6 @@
comp,
left,
right);
- bin_op->set_ic_data(comp->ic_data());
instr->set_computation(bin_op);
RemovePushArguments(comp);
} else {
@@ -408,7 +403,6 @@
comp,
left,
right);
- bin_op->set_ic_data(comp->ic_data());
instr->set_computation(bin_op);
RemovePushArguments(comp);
}
@@ -439,7 +433,6 @@
}
if (unary_op == NULL) return false;
- unary_op->set_ic_data(comp->ic_data());
instr->set_computation(unary_op);
RemovePushArguments(comp);
return true;
@@ -631,8 +624,9 @@
call_with_checks = true;
}
PolymorphicInstanceCallComp* call =
- new PolymorphicInstanceCallComp(comp, call_with_checks);
- call->set_ic_data(&unary_checks);
+ new PolymorphicInstanceCallComp(comp,
+ unary_checks,
+ call_with_checks);
instr->set_computation(call);
}
}
« no previous file with comments | « no previous file | runtime/vm/il_printer.cc » ('j') | runtime/vm/intermediate_language.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698