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

Unified Diff: runtime/vm/object.h

Issue 436643002: Faster IC stubs by specializing them for Binary Smi operations (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 4 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/object.h
===================================================================
--- runtime/vm/object.h (revision 39456)
+++ runtime/vm/object.h (working copy)
@@ -3451,6 +3451,9 @@
intptr_t NumberOfChecks() const;
+ // Discounts any checks with usage of zero.
+ intptr_t NumberOfUsedChecks() const;
+
static intptr_t InstanceSize() {
return RoundedAllocationSize(sizeof(RawICData));
}
@@ -3500,6 +3503,7 @@
// Retrieving checks.
+ // TODO(srdjan): GetCheckAt without target.
void GetCheckAt(intptr_t index,
GrowableArray<intptr_t>* class_ids,
Function* target) const;
@@ -3523,11 +3527,13 @@
// Returns this->raw() if num_args_tested == 1 and arg_nr == 1, otherwise
// returns a new ICData object containing only unique arg_nr checks.
+ // Returns only used entries.
RawICData* AsUnaryClassChecksForArgNr(intptr_t arg_nr) const;
RawICData* AsUnaryClassChecks() const {
return AsUnaryClassChecksForArgNr(0);
}
+ // Consider only used entries.
bool AllTargetsHaveSameOwner(intptr_t owner_cid) const;
bool AllReceiversAreNumbers() const;
bool HasOneTarget() const;
@@ -3549,6 +3555,11 @@
return (num_args + 1);
}
+ bool IsUsedAt(intptr_t i) const;
+
+ void GetUsedCidsForTwoArgs(GrowableArray<intptr_t>* first,
+ GrowableArray<intptr_t>* second) const;
+
private:
RawArray* ic_data() const {
return raw_ptr()->ic_data_;

Powered by Google App Engine
This is Rietveld 408576698