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

Unified Diff: runtime/vm/raw_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/object.cc ('k') | runtime/vm/raw_object_snapshot.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/raw_object.h
diff --git a/runtime/vm/raw_object.h b/runtime/vm/raw_object.h
index 8cf284d8107bfafacc8001314c8d91536a14720c..f43b12e8b86f480167ee3cc874ff84c99ce1f98f 100644
--- a/runtime/vm/raw_object.h
+++ b/runtime/vm/raw_object.h
@@ -862,7 +862,11 @@ class RawClosureData : public RawObject {
RawFunction* parent_function_; // Enclosing function of this local function.
RawType* signature_type_;
RawInstance* closure_; // Closure object for static implicit closures.
- RawObject** to() { return reinterpret_cast<RawObject**>(&ptr()->closure_); }
+ RawObject** to_snapshot() {
+ return reinterpret_cast<RawObject**>(&ptr()->closure_);
+ }
+ RawObject* hash_;
+ RawObject** to() { return reinterpret_cast<RawObject**>(&ptr()->hash_); }
friend class Function;
};
« no previous file with comments | « runtime/vm/object.cc ('k') | runtime/vm/raw_object_snapshot.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698