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

Unified Diff: sdk/lib/_internal/lib/js_helper.dart

Issue 24280003: Add Object.hashCodeOf to get the default hashCode of an object. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Now top-level and called identityHashCode Created 7 years, 3 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 | « sdk/lib/_internal/lib/core_patch.dart ('k') | sdk/lib/core/identical.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/lib/js_helper.dart
diff --git a/sdk/lib/_internal/lib/js_helper.dart b/sdk/lib/_internal/lib/js_helper.dart
index 073436ecea169ef59f502ec39fba3eece762e471..66a60bb1791196bb3017a3af855a261a67fcaff5 100644
--- a/sdk/lib/_internal/lib/js_helper.dart
+++ b/sdk/lib/_internal/lib/js_helper.dart
@@ -1422,7 +1422,7 @@ class _StackTrace implements StackTrace {
}
}
-int _objectHashCode(var object) {
+int objectHashCode(var object) {
if (object == null || JS('bool', "typeof # != 'object'", object)) {
return object.hashCode;
} else {
@@ -1440,7 +1440,7 @@ makeLiteralMap(keyValuePairs) {
makeConstantMap(keyValuePairs) {
return fillLiteralMap(keyValuePairs,
- new LinkedHashMap(equals: identical, hashCode: _objectHashCode));
+ new LinkedHashMap(equals: identical, hashCode: objectHashCode));
}
fillLiteralMap(keyValuePairs, Map result) {
« no previous file with comments | « sdk/lib/_internal/lib/core_patch.dart ('k') | sdk/lib/core/identical.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698