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

Unified Diff: runtime/vm/object.h

Issue 11275290: Count per check hits in ICData. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 1 month 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/object.h
diff --git a/runtime/vm/object.h b/runtime/vm/object.h
index a388cb196046393ff7cc1f2615474c352a0fa45f..67e71e294dac109cd2a3d5659cfa3f383dad9add 100644
--- a/runtime/vm/object.h
+++ b/runtime/vm/object.h
@@ -2853,7 +2853,8 @@ class ICData : public Object {
void GetCheckAt(intptr_t index,
GrowableArray<intptr_t>* class_ids,
- Function* target) const;
+ Function* target,
+ intptr_t* count = NULL) const;
srdjan 2012/11/13 20:58:14 Maybe it is OK if this method remains unchanged an
Kevin Millikin (Google) 2012/11/13 20:59:33 I'm not thrilled with the default parameter. It l
Vyacheslav Egorov (Google) 2012/12/17 12:54:16 Done.
void GetOneClassCheckAt(intptr_t index,
intptr_t* class_id,
Function* target) const;
@@ -2863,6 +2864,8 @@ class ICData : public Object {
RawFunction* GetTargetAt(intptr_t index) const;
RawFunction* GetTargetForReceiverClassId(intptr_t class_id) const;
+ intptr_t GetCountAt(intptr_t index) const;
+
// Returns this->raw() if num_args_tested == 1 and arg_nr == 1, otherwise
// returns a new ICData object containing only unique arg_nr checks.
RawICData* AsUnaryClassChecksForArgNr(intptr_t arg_nr) const;
@@ -2879,6 +2882,16 @@ class ICData : public Object {
intptr_t deopt_id,
intptr_t num_args_tested);
+ static intptr_t TestEntryLengthFor(intptr_t num_args);
+
+ static intptr_t TargetIndexFor(intptr_t num_args) {
Kevin Millikin (Google) 2012/11/13 20:59:33 Not an Index, but an Offset (from the beginning of
Vyacheslav Egorov (Google) 2012/12/17 12:54:16 Done.
+ return num_args;
+ }
+
+ static intptr_t CountIndexFor(intptr_t num_args) {
+ return num_args + 1;
+ }
+
private:
RawArray* ic_data() const {
return raw_ptr()->ic_data_;
« no previous file with comments | « runtime/vm/il_printer.cc ('k') | runtime/vm/object.cc » ('j') | runtime/vm/object.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698