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

Unified Diff: runtime/vm/intermediate_language.h

Issue 17646002: Use call counts to determine which static calls to inline. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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_inliner.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intermediate_language.h
===================================================================
--- runtime/vm/intermediate_language.h (revision 24433)
+++ runtime/vm/intermediate_language.h (working copy)
@@ -3072,8 +3072,10 @@
StaticCallInstr(intptr_t token_pos,
const Function& function,
const Array& argument_names,
- ZoneGrowableArray<PushArgumentInstr*>* arguments)
- : token_pos_(token_pos),
+ ZoneGrowableArray<PushArgumentInstr*>* arguments,
+ const Array& ic_data_array)
+ : ic_data_(GetICData(ic_data_array)),
+ token_pos_(token_pos),
function_(function),
argument_names_(argument_names),
arguments_(arguments),
@@ -3083,6 +3085,12 @@
ASSERT(argument_names.IsZoneHandle() || argument_names.InVMHeap());
}
+ // ICData for static calls carries call count.
+ const ICData* ic_data() const { return ic_data_; }
+ bool HasICData() const {
+ return (ic_data() != NULL) && !ic_data()->IsNull();
+ }
+
DECLARE_INSTRUCTION(StaticCall)
virtual CompileType ComputeType() const;
@@ -3112,6 +3120,7 @@
virtual bool MayThrow() const { return true; }
private:
+ const ICData* ic_data_;
const intptr_t token_pos_;
const Function& function_;
const Array& argument_names_;
« no previous file with comments | « runtime/vm/flow_graph_inliner.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698