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

Unified Diff: runtime/vm/object.h

Issue 2572543003: Treat dispatchers and implicit accessors the same for inlining decisions. (Closed)
Patch Set: Created 4 years 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/object.h
diff --git a/runtime/vm/object.h b/runtime/vm/object.h
index 77b87e63a9a96b35a1d2df54549771b3dfa958f6..397b445f45b18353f3f11f91e0944d1cf1206b53 100644
--- a/runtime/vm/object.h
+++ b/runtime/vm/object.h
@@ -2033,7 +2033,7 @@ class ICData : public Object {
bool AllTargetsHaveSameOwner(intptr_t owner_cid) const;
bool AllReceiversAreNumbers() const;
bool HasOneTarget() const;
- bool HasOnlyDispatcherTargets() const;
+ bool HasOnlyDispatcherOrImplicitAccessorTargets() const;
bool HasReceiverClassId(intptr_t class_id) const;
static RawICData* New(const Function& owner,
@@ -2649,6 +2649,18 @@ class Function : public Object {
Error* bound_error,
Heap::Space space) const;
+ bool IsDispatcherOrImplicitAccessor() const {
+ switch (kind()) {
+ case RawFunction::kImplicitGetter:
+ case RawFunction::kImplicitSetter:
+ case RawFunction::kNoSuchMethodDispatcher:
+ case RawFunction::kInvokeFieldDispatcher:
+ return true;
+ default:
+ return false;
+ }
+ }
+
// Returns true if this function represents an explicit getter function.
bool IsGetterFunction() const {
return kind() == RawFunction::kGetterFunction;
« 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