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

Unified Diff: runtime/vm/object.h

Issue 135913003: Optimize getField by caching a closure generated from a specialized function kind. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 11 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/bootstrap_natives.h ('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 eccf39fcdfcf2a37a690e0aa1511873a78c1edfe..bb8d0d2659ce9e424f8bec060a620515efc82c36 100644
--- a/runtime/vm/object.h
+++ b/runtime/vm/object.h
@@ -1886,7 +1886,9 @@ class Function : public Object {
// Returns true if this function represents a (possibly implicit) closure
// function.
bool IsClosureFunction() const {
- return kind() == RawFunction::kClosureFunction;
+ return (kind() == RawFunction::kClosureFunction) ||
+ (kind() == RawFunction::kGetFieldClosure) ||
+ (kind() == RawFunction::kSetFieldClosure);
}
// Returns true if this function represents an implicit closure function.
« no previous file with comments | « runtime/vm/bootstrap_natives.h ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698