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

Unified Diff: runtime/vm/intermediate_language.cc

Issue 11347049: Add flag --always_cleared_ic_data, which forces a cleared ICData to be emitted with each IC call (i… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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/flow_graph_compiler.cc ('k') | runtime/vm/intermediate_language_ia32.cc » ('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 14363)
+++ runtime/vm/intermediate_language.cc (working copy)
@@ -20,6 +20,8 @@
namespace dart {
+DEFINE_FLAG(bool, propagate_ic_data, true,
+ "Propagate IC data from unoptimized to optimized IC calls.");
DECLARE_FLAG(bool, enable_type_checks);
DECLARE_FLAG(int, max_polymorphic_checks);
@@ -1846,6 +1848,13 @@
void InstanceCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
+ ICData& call_ic_data = ICData::ZoneHandle(ic_data()->raw());
+ if (!FLAG_propagate_ic_data || !compiler->is_optimizing()) {
+ call_ic_data = ICData::New(compiler->parsed_function().function(),
+ function_name(),
+ deopt_id(),
+ checked_argument_count());
+ }
if (compiler->is_optimizing()) {
if (HasICData() && (ic_data()->NumberOfChecks() > 0)) {
const ICData& unary_ic_data =
@@ -1866,17 +1875,12 @@
compiler->AddCurrentDescriptor(PcDescriptors::kDeoptBefore,
deopt_id(),
token_pos());
- const ICData& initial_ic_data = ICData::ZoneHandle(
- ICData::New(compiler->parsed_function().function(),
- function_name(),
- deopt_id(),
- checked_argument_count()));
compiler->GenerateInstanceCall(deopt_id(),
token_pos(),
ArgumentCount(),
argument_names(),
locs(),
- initial_ic_data);
+ call_ic_data);
}
}
« no previous file with comments | « runtime/vm/flow_graph_compiler.cc ('k') | runtime/vm/intermediate_language_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698