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

Unified Diff: runtime/vm/object.h

Issue 2983973002: Revert "Improve hashCode for closure objects" (Closed)
Patch Set: Created 3 years, 5 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/dart_entry.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 82a88e6cff619ccf8043077079e33bfbd779663f..62d6344021e9fd5afaf20afe5971f6a315fa9083 100644
--- a/runtime/vm/object.h
+++ b/runtime/vm/object.h
@@ -2410,7 +2410,7 @@ class Function : public Object {
RawInstance* ImplicitInstanceClosure(const Instance& receiver) const;
- intptr_t ComputeClosureHash() const;
+ RawSmi* GetClosureHashCode() const;
// Redirection information for a redirecting factory.
bool IsRedirectingFactory() const;
@@ -3081,6 +3081,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);
@@ -5538,9 +5541,6 @@ class Instance : public Object {
// Equivalent to invoking hashCode on this instance.
virtual RawObject* HashCode() const;
- // Equivalent to invoking identityHashCode with this instance.
- RawObject* IdentityHashCode() const;
-
static intptr_t InstanceSize() {
return RoundedAllocationSize(sizeof(RawInstance));
}
@@ -8356,9 +8356,6 @@ class Closure : public Instance {
RawContext* context() const { return raw_ptr()->context_; }
static intptr_t context_offset() { return OFFSET_OF(RawClosure, context_); }
- RawSmi* hash() const { return raw_ptr()->hash_; }
- static intptr_t hash_offset() { return OFFSET_OF(RawClosure, hash_); }
-
static intptr_t InstanceSize() {
return RoundedAllocationSize(sizeof(RawClosure));
}
@@ -8370,8 +8367,6 @@ class Closure : public Instance {
return true;
}
- int64_t ComputeHash() const;
-
static RawClosure* New(const TypeArguments& instantiator_type_arguments,
const TypeArguments& function_type_arguments,
const Function& function,
« no previous file with comments | « runtime/vm/dart_entry.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698