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

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
Index: runtime/vm/intermediate_language.h
===================================================================
--- runtime/vm/intermediate_language.h (revision 24374)
+++ runtime/vm/intermediate_language.h (working copy)
@@ -3069,8 +3069,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),
@@ -3080,6 +3082,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;
@@ -3109,6 +3117,7 @@
virtual bool MayThrow() const { return true; }
private:
+ const ICData* ic_data_;
const intptr_t token_pos_;
const Function& function_;
const Array& argument_names_;

Powered by Google App Engine
This is Rietveld 408576698