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

Unified Diff: runtime/lib/function.cc

Issue 2983823002: Improve hashCode for closures (Closed)
Patch Set: Error handling 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') | runtime/vm/object.cc » ('J')
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 cf6e29813f2795baaafb582b6969b5f1d8f29bae..0bd2c70d429b5d098b97b05524b2a60a447c9335 100644
--- a/runtime/lib/function.cc
+++ b/runtime/lib/function.cc
@@ -68,11 +68,10 @@ DEFINE_NATIVE_ENTRY(Closure_equals, 2) {
return Bool::False().raw();
}
-DEFINE_NATIVE_ENTRY(Closure_hashCode, 1) {
+DEFINE_NATIVE_ENTRY(Closure_computeHash, 1) {
const Closure& receiver =
Closure::CheckedHandle(zone, arguments->NativeArgAt(0));
- const Function& func = Function::Handle(zone, receiver.function());
- return func.GetClosureHashCode();
+ return Smi::New(receiver.ComputeHash());
}
DEFINE_NATIVE_ENTRY(Closure_clone, 1) {
« no previous file with comments | « no previous file | runtime/lib/function.dart » ('j') | runtime/vm/object.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698