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

Unified Diff: runtime/vm/intermediate_language.cc

Issue 335173002: Save ICData of unoptimized code in the function, thus preserving it across repated unoptimized comp… (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/flow_graph_optimizer.cc ('k') | runtime/vm/object.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intermediate_language.cc
===================================================================
--- runtime/vm/intermediate_language.cc (revision 37375)
+++ runtime/vm/intermediate_language.cc (working copy)
@@ -2255,16 +2255,16 @@
void InstanceCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
- ICData& call_ic_data = ICData::ZoneHandle(ic_data()->raw());
+ const ICData* call_ic_data = NULL;
if (!FLAG_propagate_ic_data || !compiler->is_optimizing()) {
const Array& arguments_descriptor =
Array::Handle(ArgumentsDescriptor::New(ArgumentCount(),
argument_names()));
- call_ic_data = ICData::New(compiler->parsed_function().function(),
- function_name(),
- arguments_descriptor,
- deopt_id(),
- checked_argument_count());
+ call_ic_data = compiler->GetOrAddInstanceCallICData(
+ deopt_id(), function_name(), arguments_descriptor,
+ checked_argument_count());
+ } else {
+ call_ic_data = &ICData::ZoneHandle(ic_data()->raw());
}
if (compiler->is_optimizing()) {
ASSERT(HasICData());
@@ -2284,7 +2284,7 @@
ArgumentCount(),
argument_names(),
locs(),
- call_ic_data);
+ *call_ic_data);
}
} else {
// Unoptimized code.
@@ -2297,7 +2297,7 @@
ArgumentCount(),
argument_names(),
locs(),
- call_ic_data);
+ *call_ic_data);
}
}
@@ -2329,7 +2329,7 @@
void StaticCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
- ICData& call_ic_data = ICData::ZoneHandle(ic_data()->raw());
+ const ICData* call_ic_data = NULL;
if (!FLAG_propagate_ic_data || !compiler->is_optimizing()) {
const Array& arguments_descriptor =
Array::Handle(ArgumentsDescriptor::New(ArgumentCount(),
@@ -2342,12 +2342,12 @@
(recognized_kind == MethodRecognizer::kMathMax)) {
num_args_checked = 2;
}
- call_ic_data = ICData::New(compiler->parsed_function().function(),
- String::Handle(function().name()),
- arguments_descriptor,
- deopt_id(),
- num_args_checked); // No arguments checked.
- call_ic_data.AddTarget(function());
+ call_ic_data = compiler->GetOrAddStaticCallICData(deopt_id(),
+ function(),
+ arguments_descriptor,
+ num_args_checked);
+ } else {
+ call_ic_data = &ICData::ZoneHandle(ic_data()->raw());
}
if (!compiler->is_optimizing()) {
// Some static calls can be optimized by the optimizing compiler (e.g. sqrt)
@@ -2362,7 +2362,7 @@
ArgumentCount(),
argument_names(),
locs(),
- call_ic_data);
+ *call_ic_data);
}
« no previous file with comments | « runtime/vm/flow_graph_optimizer.cc ('k') | runtime/vm/object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698