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

Unified Diff: runtime/vm/object.h

Issue 2598623002: Cache hash code for closures. (Closed)
Patch Set: remove redundant assertion 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/clustered_snapshot.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 816a79889cb1d0e1b5987e97cadfc7783369d37a..2c62d62d738e1cc0dc7a0e43913d3c49c5be17fd 100644
--- a/runtime/vm/object.h
+++ b/runtime/vm/object.h
@@ -2347,6 +2347,8 @@ class Function : public Object {
RawInstance* ImplicitInstanceClosure(const Instance& receiver) const;
+ RawSmi* GetClosureHashCode() const;
+
// Redirection information for a redirecting factory.
bool IsRedirectingFactory() const;
RawType* RedirectionType() const;
@@ -3015,6 +3017,9 @@ class ClosureData : public Object {
RawInstance* implicit_static_closure() const { return raw_ptr()->closure_; }
void set_implicit_static_closure(const Instance& closure) const;
+ RawObject* hash() const { return raw_ptr()->hash_; }
+ void set_hash(intptr_t value) const;
+
static RawClosureData* New();
FINAL_HEAP_OBJECT_IMPLEMENTATION(ClosureData, Object);
« no previous file with comments | « runtime/vm/clustered_snapshot.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698