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

Unified Diff: runtime/vm/object.h

Issue 2734883002: ICData::NumberOfChecks is O(n) so don't call it in loops (Closed)
Patch Set: Add const Created 3 years, 9 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/jit_optimizer.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/object.h
diff --git a/runtime/vm/object.h b/runtime/vm/object.h
index 84656ed580b6ffe27148810bafbc507befec56b3..6daa41497c14db3084f903386507829ef3929345 100644
--- a/runtime/vm/object.h
+++ b/runtime/vm/object.h
@@ -1918,11 +1918,16 @@ class ICData : public Object {
// the final one.
intptr_t Length() const;
+ // Takes O(result) time!
intptr_t NumberOfChecks() const;
// Discounts any checks with usage of zero.
+ // Takes O(result)) time!
intptr_t NumberOfUsedChecks() const;
+ // Takes O(n) time!
+ bool NumberOfChecksIs(intptr_t n) const;
+
static intptr_t InstanceSize() {
return RoundedAllocationSize(sizeof(RawICData));
}
« no previous file with comments | « runtime/vm/jit_optimizer.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698