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

Unified Diff: runtime/vm/flow_graph_compiler.cc

Issue 11299298: Cache lookups at megamorphic call sites in optimized code. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: One change I forgot. Created 8 years 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/dart.cc ('k') | runtime/vm/flow_graph_compiler_ia32.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_compiler.cc
diff --git a/runtime/vm/flow_graph_compiler.cc b/runtime/vm/flow_graph_compiler.cc
index d259e9716a7ec5c1babe464bdbf49d6df13bbaa6..da862428d8087514469dd1665f0d72fbfde0ba39 100644
--- a/runtime/vm/flow_graph_compiler.cc
+++ b/runtime/vm/flow_graph_compiler.cc
@@ -534,24 +534,25 @@ void FlowGraphCompiler::GenerateInstanceCall(
argument_count, deopt_id, token_pos, locs);
return;
}
+
if (is_optimizing()) {
- // Megamorphic call requires one argument ICData.
- ASSERT(ic_data.num_args_tested() == 1);
- label_address = StubCode::MegamorphicCallEntryPoint();
- } else {
- switch (ic_data.num_args_tested()) {
- case 1:
- label_address = StubCode::OneArgCheckInlineCacheEntryPoint();
- break;
- case 2:
- label_address = StubCode::TwoArgsCheckInlineCacheEntryPoint();
- break;
- case 3:
- label_address = StubCode::ThreeArgsCheckInlineCacheEntryPoint();
- break;
- default:
- UNIMPLEMENTED();
- }
+ EmitMegamorphicInstanceCall(ic_data, arguments_descriptor, argument_count,
+ deopt_id, token_pos, locs);
+ return;
+ }
+
+ switch (ic_data.num_args_tested()) {
+ case 1:
+ label_address = StubCode::OneArgCheckInlineCacheEntryPoint();
+ break;
+ case 2:
+ label_address = StubCode::TwoArgsCheckInlineCacheEntryPoint();
+ break;
+ case 3:
+ label_address = StubCode::ThreeArgsCheckInlineCacheEntryPoint();
+ break;
+ default:
+ UNIMPLEMENTED();
}
ExternalLabel target_label("InlineCache", label_address);
EmitInstanceCall(&target_label, ic_data, arguments_descriptor, argument_count,
« no previous file with comments | « runtime/vm/dart.cc ('k') | runtime/vm/flow_graph_compiler_ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698