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

Unified Diff: runtime/lib/function.cc

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 | « no previous file | runtime/lib/function.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/function.cc
diff --git a/runtime/lib/function.cc b/runtime/lib/function.cc
index 0bd2c70d429b5d098b97b05524b2a60a447c9335..cf6e29813f2795baaafb582b6969b5f1d8f29bae 100644
--- a/runtime/lib/function.cc
+++ b/runtime/lib/function.cc
@@ -68,10 +68,11 @@ DEFINE_NATIVE_ENTRY(Closure_equals, 2) {
return Bool::False().raw();
}
-DEFINE_NATIVE_ENTRY(Closure_computeHash, 1) {
+DEFINE_NATIVE_ENTRY(Closure_hashCode, 1) {
const Closure& receiver =
Closure::CheckedHandle(zone, arguments->NativeArgAt(0));
- return Smi::New(receiver.ComputeHash());
+ const Function& func = Function::Handle(zone, receiver.function());
+ return func.GetClosureHashCode();
}
DEFINE_NATIVE_ENTRY(Closure_clone, 1) {
« no previous file with comments | « no previous file | runtime/lib/function.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698