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

Unified Diff: runtime/vm/intermediate_language.cc

Issue 11186007: In optimized code always deoptimize if we encounter an instance call without type feedback (ICData … (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/deopt_instructions.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 13703)
+++ runtime/vm/intermediate_language.cc (working copy)
@@ -1775,18 +1775,32 @@
void InstanceCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
- if (!compiler->is_optimizing()) {
+ if (compiler->is_optimizing()) {
+ if (HasICData() && (ic_data()->NumberOfChecks() > 0)) {
+ compiler->GenerateInstanceCall(deopt_id(),
+ token_pos(),
+ function_name(),
+ ArgumentCount(),
+ argument_names(),
+ checked_argument_count(),
+ locs());
+ } else {
+ Label* deopt =
+ compiler->AddDeoptStub(deopt_id(), kDeoptInstanceCallNoICData);
+ __ jmp(deopt);
+ }
+ } else {
compiler->AddCurrentDescriptor(PcDescriptors::kDeoptBefore,
deopt_id(),
token_pos());
+ compiler->GenerateInstanceCall(deopt_id(),
+ token_pos(),
+ function_name(),
+ ArgumentCount(),
+ argument_names(),
+ checked_argument_count(),
+ locs());
}
- compiler->GenerateInstanceCall(deopt_id(),
- token_pos(),
- function_name(),
- ArgumentCount(),
- argument_names(),
- checked_argument_count(),
- locs());
}
« no previous file with comments | « runtime/vm/deopt_instructions.cc ('k') | runtime/vm/object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698